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

Add install target to libbpf-tools #3263

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

olsajiri
Copy link
Contributor

@olsajiri olsajiri commented Feb 5, 2021

We plan to put those tools in separate rpm, so we need a way to install them.

Adding install target with standard DESTDIR and prefix make variables.

We plan to put those tools in separate rpm,
so we need a way to install them.

Adding install target with standard DESTDIR
and prefix make variables.

Signed-off-by: Jiri Olsa <[email protected]>
@olsajiri
Copy link
Contributor Author

olsajiri commented Feb 5, 2021

We'd like to have these tools available in package due to
their small dependencies.

Also I'd like to start the discussion about packaging these
tools. I made test fedora rpm that looks like:

    $ rpm -ql bcc-libbpf-tools
    /usr/bin/biolatency
    /usr/bin/biopattern
    /usr/bin/biosnoop
    /usr/bin/biostacks
    /usr/bin/bitesize
    /usr/bin/cpudist
    /usr/bin/drsnoop
    /usr/bin/execsnoop
    /usr/bin/filelife
    /usr/bin/hardirqs
    /usr/bin/llcstat
    /usr/bin/numamove
    /usr/bin/opensnoop
    /usr/bin/readahead
    /usr/bin/runqlat
    /usr/bin/runqlen
    /usr/bin/runqslower
    /usr/bin/softirqs
    /usr/bin/syscount
    /usr/bin/tcpconnect
    /usr/bin/tcpconnlat
    /usr/bin/vfsstat
    /usr/bin/xfsslower
    /usr/lib/.build-id
    /usr/lib/.build-id/0c
    ...

Would you guys agree or propose another location?

thanks,
jirka

@anakryiko
Copy link
Contributor

Changes look good to me. As for the location, I don't have much of an opinion, tbh :)

@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@vt-alt
Copy link
Contributor

vt-alt commented Feb 10, 2021

@olsajiri For ALT Linux I wanted to create a package named libbpf-tools with binaries installed into /usr/bin each tool with bpf- prefix. What do you think?

Example temporary rpm build (not yet committed to the repository): http://git.altlinux.org/tasks/265490/build/400/x86_64/rpms/libbpf-tools-0.18.0-alt2.x86_64.rpm

Why not 'bcc-prefix for a package name? I think these tools aren't bcc specific, but libbpf specific,. they just located inbcc` source tree (like gdb is located in binutils tree, but it's a different thing).

About binaries names, I thought, that no prefix would be confusing since there is already execsnoop in bcc-tools (different tool!), execsnoop in perf-tools, and execsnoop in bpftrace.

@anakryiko
Copy link
Contributor

@olsajiri, @vt-alt, @mika A friendly ping. All of you expressed desire to package libbpf-tools. It would be great if you managed to do it in a consistent manner. :)

@vt-alt
Copy link
Contributor

vt-alt commented Mar 9, 2021

JFYI. I already packaged it for ALT like this: https://altlinux.pkgs.org/sisyphus/classic-x86_64/libbpf-tools-0.18.0-alt2.x86_64.rpm.html (Changelog date does not reflect that package is committed 13 Feb.)

@mika
Copy link
Contributor

mika commented Mar 10, 2021 via email

@mika
Copy link
Contributor

mika commented Mar 15, 2021 via email

@anakryiko
Copy link
Contributor

Cheers, Vasudev

Super confusing seeing replies from two people under the same account... Do you guys share the same computer? :)

Regarding the rest, I think bpf- prefix makes sense and it would be great for all distros to stick to the same convention. I hope everyone else will agree as well. Thanks!

@olsajiri
Copy link
Contributor Author

hi,
sorry for late reply

I did not push the package yet for fedora/rhel, because I was waiting for new bcc release,
that would contain this patch, so I dont need to patch it ;-)

@olsajiri For ALT Linux I wanted to create a package named libbpf-tools with binaries installed into /usr/bin each tool with bpf- prefix. What do you think?

Example temporary rpm build (not yet committed to the repository): http://git.altlinux.org/tasks/265490/build/400/x86_64/rpms/libbpf-tools-0.18.0-alt2.x86_64.rpm

Why not 'bcc-prefix for a package name? I think these tools aren't bcc specific, but libbpf specific,. they just located inbcc` source tree (like gdb is located in binutils tree, but it's a different thing).

assuming libbpf will not come up with its own tools ;-) @anakryiko ?

makes sense, I'll check with bcc maintainer, but I think we could go with libbpf-tools

About binaries names, I thought, that no prefix would be confusing since there is already execsnoop in bcc-tools (different tool!), execsnoop in perf-tools, and execsnoop in bpftrace.

sounds good to me.. also easy for user to type bpf- and tab completion will do the job

thanks,
jirka

@anakryiko
Copy link
Contributor

assuming libbpf will not come up with its own tools ;-) @anakryiko ?

no, of course.

About binaries names, I thought, that no prefix would be confusing since there is already execsnoop in bcc-tools (different tool!), execsnoop in perf-tools, and execsnoop in bpftrace.

sounds good to me.. also easy for user to type bpf- and tab completion will do the job

yep, sounds like a pretty nice convenience

@anakryiko
Copy link
Contributor

@mika, @vt-alt as packagers, I was wondering what you thought about #3889 ? This should allow to package libbpf-tools on much bigger variety of distros and kernels, but I'm not sure if it's relevant to you at all. Would love to hear comments, thanks!

@mika
Copy link
Contributor

mika commented Mar 28, 2022 via email

@vt-alt
Copy link
Contributor

vt-alt commented Mar 28, 2022

BTW, in ALT we build newer kernels (of the two main flavours) with CONFIG_DEBUG_INFO_BTF=y.

jirutka added a commit to jirutka/bcc that referenced this pull request Dec 17, 2023
Fedora adds prefix bpf- to the tool names, mainly to distinguish them
from the old tools written in Python. Alpine Linux is going to do the
same, but for a slightly different reason - there are dozens of these
tools, so it's a good idea to add them a common prefix, to make it easier
to recognize them among all other commands.

See-Also: iovisor#3263

See-Also: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/35688
chenhengqi pushed a commit that referenced this pull request Dec 20, 2023
Fedora adds prefix bpf- to the tool names, mainly to distinguish them
from the old tools written in Python. Alpine Linux is going to do the
same, but for a slightly different reason - there are dozens of these
tools, so it's a good idea to add them a common prefix, to make it easier
to recognize them among all other commands.

See-Also: #3263

See-Also: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/35688
dkruces pushed a commit to dkruces/bcc that referenced this pull request Nov 28, 2024
Fedora adds prefix bpf- to the tool names, mainly to distinguish them
from the old tools written in Python. Alpine Linux is going to do the
same, but for a slightly different reason - there are dozens of these
tools, so it's a good idea to add them a common prefix, to make it easier
to recognize them among all other commands.

See-Also: iovisor#3263

See-Also: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/35688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants