pwru icon indicating copy to clipboard operation
pwru copied to clipboard

Package pwru for major distros

Open brb opened this issue 2 years ago • 17 comments

Each pwru release published in https://github.com/cilium/pwru/releases is statically linked, and it doesn't have any runtime dependencies. So, it should be trivial to package for major distros (Archlinux, Ubuntu, Debian, Fedora, etc).

brb avatar Sep 21 '22 10:09 brb

I would like to work on this. Any advice on how to begin? Thanks

varunkumare99 avatar Nov 02 '22 14:11 varunkumare99

Let me ping some maintainers first. Mind pinging me (martynas) on Slack? We can coordinate there.

brb avatar Nov 02 '22 14:11 brb

sure!

varunkumare99 avatar Nov 02 '22 14:11 varunkumare99

Hey @brb Is this still up for grabs? Let me know if I can try tacking this

ShubhamPalriwala avatar Mar 29 '23 18:03 ShubhamPalriwala

Yep, just that I still didn't manage to coordinate all efforts with pkg maintainers. Which distro would you target first?

brb avatar Apr 03 '23 14:04 brb

I use Arch Linux so I would prefer that as a good starting point.

Also, if possible, can you share some articles/docs I can refer to with respect to packaging such an app

ShubhamPalriwala avatar Apr 03 '23 14:04 ShubhamPalriwala

Great! I'm not familiar with distro packaging. Perhaphs you could reach out to the Arch community? @Foxboron mentioned that he might help with Arch.

brb avatar Apr 04 '23 07:04 brb

Sorry for the delay. I've been busy with other Arch projects and haven't had time to package new things into the repositories for a couple of months.

I've uploaded cilium-cli and pwru to the Arch repos today. Debug packages are also available from https://debuginfod.archlinux.org as well.

https://archlinux.org/packages/community/x86_64/pwru/ https://archlinux.org/packages/community/x86_64/cilium-cli/

Package files can be found here. https://github.com/Foxboron/archlinux-pkgbuilds/tree/master/pwru https://github.com/Foxboron/archlinux-pkgbuilds/tree/master/cilium-cli

Foxboron avatar Apr 05 '23 12:04 Foxboron

@Foxboron Thanks a lot!

brb avatar Apr 13 '23 08:04 brb

@ShubhamPalriwala Maybe let's continue with Debian/Ubuntu?

brb avatar Apr 17 '23 08:04 brb

~~bfp2go looks at /sys/devices/system/cpu/possible on the building machine to determine the number of cores to add hooks for, and pwru seems to fail if the number does not match what is observed at runtime. This makes it pretty difficult to build any distribution packages, even for internal corporate distribution.~~

terinjokes avatar May 24 '23 16:05 terinjokes

I can help for Fedora

tao12345666333 avatar May 24 '23 23:05 tao12345666333

@terinjokes Do you have an output of such a failure?

brb avatar May 25 '23 14:05 brb

@tao12345666333 Great! Will you ping Fedora pkg maintainers?

brb avatar May 25 '23 14:05 brb

yes.

tao12345666333 avatar May 25 '23 14:05 tao12345666333

~~@brb If the machine that compiled pwru has more CPUs than the machine that runs it I get the following error, along with an exit code 1:~~

Creating perf event reader: failed to create perf ring for CPU 1: can't create perf event: Invalid argument

~~If the machine that compiled pwru has less CPUs than the target machine (eg, was built in a CI environment) it runs without any error messages, but I don't see packets scheduled onto the higher CPU cores.~~

~~I can create a separate issue, but seems like the current implementation will have issues with distribution packages.~~

terinjokes avatar May 25 '23 14:05 terinjokes

@terinjokes Could you create a separate issue, and include strace output? Thanks. My colleague said that the CPU detection should happen during the runtime.

brb avatar May 26 '23 09:05 brb