Skip to content

Conversation

@bluca
Copy link

@bluca bluca commented Nov 11, 2025

Ubuntu, Fedora and other distro create the tcpdump user/group pair by default, to be used for unprivileged access to tcpdump:

https://git.launchpad.net/ubuntu/+source/tcpdump/tree/debian/tcpdump.postinst https://src.fedoraproject.org/rpms/tcpdump/blob/rawhide/f/tcpdump-sysusers.conf

Add a sysusers.d config file and install it. This configuration file will create the 'tcpdump' user/group pair on first boot/factory reset/package installation, without requiring manual scripts or actions. This is very important for image-based OSes, but it is useful in other cases too, to allow using declarative configuration instead of scripts.

RPM now has built-in support for sysusers.d too.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html

This is just a one-line config file, so if a system doesn't support sysusers.d, it is a harmless no-op (and can be deleted/not packaged too).

Ubuntu, Fedora and other distro create the tcpdump user/group
pair by default, to be used for unprivileged access to tcpdump:

https://git.launchpad.net/ubuntu/+source/tcpdump/tree/debian/tcpdump.postinst
https://src.fedoraproject.org/rpms/tcpdump/blob/rawhide/f/tcpdump-sysusers.conf

Add a sysusers.d config file and install it. This configuration
file will create the 'tcpdump' user/group pair on first boot/factory
reset/package installation, without requiring manual scripts or actions.
This is very important for image-based OSes, but it is useful in other
cases too, to allow using declarative configuration instead of scripts.

RPM now has built-in support for sysusers.d too.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html

This is just a one-line config file, so if a system doesn't support
sysusers.d, it is a harmless no-op (and can be deleted/not packaged
too).
@fxlb
Copy link
Member

fxlb commented Nov 11, 2025

Each distribution has its own compilation process and, possibly, its own patches.
(e.g. https://salsa.debian.org/debian/tcpdump/-/tree/master/debian?ref_type=heads)

It is the role of package maintainers to adapt projects to their distribution.
This systemd configuration could conflict with their process.
Therefore, I am not in favor of this PR.

@infrastation
Copy link
Member

I agree this detail belongs entirely to the packaging method of every binary distribution.

@bluca
Copy link
Author

bluca commented Nov 11, 2025

This systemd configuration could conflict with their process.

Hi,

Thanks for having a look!

Speaking as a distribution maintainer (not of tcpdump specifically, but many other packages), I can attest that this does not conflict with any process.

In fact, generally speaking most maintainers prefer when upstream provides such generic configurations, as they are applicable everywhere, and contribute to reducing meaningless small differences between distributions. Opinions might vary of course, but this seems to me to be the majority view.

If an override is needed, it is trivial to do so, and all packaging systems allow to ignore upstream-shipped files and adding our own, so this creates no problems.

Here's a few examples of upstream projects shipping sysusers.d configs:

https://github.com/util-linux/util-linux/blob/master/misc-utils/uuidd-sysusers.conf.in
https://gitlab.freedesktop.org/dbus/dbus/-/blob/main/bus/sysusers.d/dbus.conf.in?ref_type=heads
https://github.com/polkit-org/polkit/blob/main/data/polkit.conf.in
https://github.com/deepin-community/stunnel4/blob/master/debian/stunnel4.sysusers#L4
https://github.com/flatpak/flatpak/blob/main/system-helper/flatpak.conf.in
https://github.com/fwupd/fwupd/blob/main/data/motd/fwupd.sysusers
https://github.com/stefanberger/swtpm/blob/master/src/swtpm-sysusers.conf.in

Of course this is your project so it's entirely up to you. Thanks for your consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants