On Mon, Feb 7, 2022 at 9:57 PM Paweł Marciniak <sunwire+fas@xxxxxxxxx> 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-35-x86_64/03364007-python-input-remapper/python-input-remapper.spec 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-35-x86_64/03364007-python-input-remapper/python3-input-remapper-1.4.0-4.git20220205.fc35.noarch.rpm > srpm: > https://download.copr.fedorainfracloud.org/results/sunwire/rpmtest/fedora-35-x86_64/03364007-python-input-remapper/python-input-remapper-1.4.0-4.git20220205.fc35.src.rpm 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/#_systemd Fabio _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure