From af240ff91578d182c852be72047d824665f79bf5 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sep 17 2024 01:09:16 +0000 Subject: Fix description of %{?systemd_requires} macro to match reality Fedora Rawhide, 40: # dnf install systemd-rpm-macros # rpm --eval %{?systemd_requires} | Requires(post): systemd | Requires(preun): systemd | Requires(postun): systemd I discovered this issue when processing 'fedora-review' tool output. It reported: | - systemd_post is invoked in %post, systemd_preun in %preun, and | systemd_postun in %postun for Systemd service files. | Note: Systemd service file(s) in maxscale | See: https://docs.fedoraproject.org/en-US/packaging- | guidelines/Scriptlets/#_scriptlets And I remembered there is a macro for that, but the macro description in the docs did not match the requirement stated by 'fedora-review'. --- diff --git a/guidelines/modules/ROOT/pages/Scriptlets.adoc b/guidelines/modules/ROOT/pages/Scriptlets.adoc index 961aec7..83d7642 100644 --- a/guidelines/modules/ROOT/pages/Scriptlets.adoc +++ b/guidelines/modules/ROOT/pages/Scriptlets.adoc @@ -469,7 +469,7 @@ and request the restart and reload operations for the specified units in each on If package scriptlets call other systemd tools, for example `systemd-tmpfiles`, the package SHOULD declare appropriate dependencies. The `+%{?systemd_requires}+` macro is a shortcut to require systemd for the -`%pre`, `%post`, and `%postun` scriptlets. +`%post`, `%preun`, and `%postun` scriptlets. Note that those dependencies are **not** required for the `%systemd_{post,preun,postun_with_restart,user_post,user_preun}` macros listed above.