Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(libbpf/bpftool): scaffold libbpf/bpftool #28494

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

borissmidt
Copy link
Contributor

@borissmidt borissmidt commented Nov 5, 2024

libbpf/bpftool: Automated upstream mirror for bpftool stand-alone build

Check List

@borissmidt borissmidt marked this pull request as draft November 5, 2024 19:57
@borissmidt
Copy link
Contributor Author

Not sure how i have to do the test.
I also noticed one issue with the package, the binaries are not made to be executable will aqua handle this?
i.e. chmod +x binary?

@borissmidt borissmidt marked this pull request as ready for review November 5, 2024 20:24
@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Nov 5, 2024

Not sure how i have to do the test.

https://aquaproj.github.io/docs/products/aqua-registry/contributing/#how-to-add-a-package

Run test: cmdx t <package name>

You can also execute tools in a container by cmdx con.

$ cmdx con
+ bash scripts/connect.sh
[INFO] Connecting to the container aqua-registry (linux/arm64)
root@9238446e53ff:/workspace# bpftool --help
Usage: bpftool [OPTIONS] OBJECT { COMMAND | help }
       bpftool batch file FILE
       bpftool version

       OBJECT := { prog | map | link | cgroup | perf | net | feature | btf | gen | struct_ops | iter }
       OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} |
                    {-V|--version} }

If you want to run tools in your machine without containers, there are two ways.

  1. Import pkgs/<package>/pkg.yaml in aqua.yaml
packages:
  # ...
  - import: pkgs/libbpf/bpftool/pkg.yaml

You need to run aqua policy allow to use the local registry.

aqua policy allow

Then you can run bpftool.

bpftool --help
  1. Add aqua-all.yaml in $AQUA_GLOBAL_CONFIG
export AQUA_GLOBAL_CONFIG=$PWD/aqua-all.yaml:$AQUA_GLOBAL_CONFIG

You need to run aqua policy allow to use the local registry.

aqua policy allow

Then you can run all tools.

bpftool --help

I also noticed one issue with the package, the binaries are not made to be executable will aqua handle this?
i.e. chmod +x binary?

aqua makes commands executable.

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Nov 5, 2024
@suzuki-shunsuke
Copy link
Member

@suzuki-shunsuke suzuki-shunsuke merged commit 69fef4b into aquaproj:main Nov 5, 2024
16 checks passed
@suzuki-shunsuke suzuki-shunsuke added this to the v4.246.2 milestone Nov 5, 2024
@suzuki-shunsuke
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants