On Mon, Feb 7, 2022 at 9:57 PM Paweł Marciniak <sunwire+fas(a)gmail.com> wrote:
Can someone tell me why none of the scriptlets (%pre, post etc) in the spec file
https://download.copr.fedorainfracloud.org/results/sunwire/rpmtest/fedora...
work?
After building the package, all scriptlets are missing and rpm -qp --scripts returns
nothing.
Is this a bug in pyproject-rpm-macros? Am i missing something?
rpm:
https://download.copr.fedorainfracloud.org/results/sunwire/rpmtest/fedora...
srpm:
https://download.copr.fedorainfracloud.org/results/sunwire/rpmtest/fedora...
Hi!
At first glance, this happens because you apply the scriptlets to the
wrong package.
You need to give %pre, %post, etc. the same "package name" argument as
%description and %files, namely the package name that contains the
service files, so "%pre -n python3-%{github_name}" etc.
Also note that enabling systemd services with presets and scriptlets
like these is forbidden for official Fedora packages,
and you should probably also use the macros provided by
systemd-rpm-macros instead:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_sy...
Fabio