rpmlint icon indicating copy to clipboard operation
rpmlint copied to clipboard

Requires(pre) for %sysusers_create_package

Open socketpair opened this issue 4 years ago • 4 comments

I think if

%pre
%sysusers_create_package

is used,

Requires(pre): /usr/bin/systemd-sysusers

must also be used.

See https://bugzilla.redhat.com/show_bug.cgi?id=1972026 as an example of such bug.

socketpair avatar Jun 15 '21 16:06 socketpair

If it is possible for macros implementation to inject dependency, It's better to fix the macros instead of rely on linters.

socketpair avatar Jun 15 '21 16:06 socketpair

Am I right that it's only a Fedora-specific issue?

marxin avatar Jun 16 '21 10:06 marxin

I don't know, possibly yes. Any checks are consequences of some packaging guidlines. But that's new feature (macros) and it could be used not only in Fedora/Centos

socketpair avatar Jun 16 '21 16:06 socketpair

%sysusers_create_package comes from systemd itself (it ships rpm macros that it expects distros to ship), so I would expect this to be consistent across all distros. In general, we should be ensuring that systemd macros are used properly and that dependencies exist as necessary.

Conan-Kudo avatar Aug 05 '21 02:08 Conan-Kudo