On Wed, Mar 23, 2022 at 05:55:19PM +0100, Ewoud Kohl van Wijngaarden wrote: > On Mon, Mar 21, 2022 at 07:12:23PM -0400, Sam Varshavchik wrote: > > %install > > mkdir -p $RPM_BUILD_ROOT/lib/systemd/system > > cat >$RPM_BUILD_ROOT/lib/systemd/system/testsystemd.service <<EOF > > [Unit] > > Description=testsystemd > > > > [Install] > > WantedBy=multi-user.target > > > > [Service] > > Type=oneshot > > RemainAfterExit=true > > ExecStart=/bin/true > > ExecStop=/bin/true > > EOF > > > > %post > > %systemd_post testsystemd.service > > > > %preun > > %systemd_preun testsystemd.service > > > > %postun > > %systemd_postun_with_restart testsystemd.service > > > > %files > > /lib/systemd/system/* > > I couldn't reproduce it, but I also made some changes to use more macros. I > added BuildRequires: systemd-rpm-macros. Perhaps that was at least the > missing piece. Then I also used %{_unitdir} instead of /lib/systemd/system/ > (and %{buildroot} instead of $RPM_BUILD_ROOT, but that shouldn't matter). I suspect that the path may be an issue. The transfiletrigger in systemd is matched on /etc/systemd/system, /usr/lib/systemd/system, and as far as I know, /usr/lib/systemd/system and /lib/systemd/system are different paths as far as rpm is concerned. %{_unitdir} should be used instead of /lib/systemd/system/. Zbyszek _______________________________________________ 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