#1128 Tweak form of systemd dependency macros
Merged 7 months ago by tibbs. Opened 7 months ago by tibbs.
tibbs/packaging-committee fix1023  into  master

@@ -448,7 +448,7 @@ 

  

  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

+ The `+%{?systemd_requires}+` macro is a shortcut to require systemd for the

  `%pre`, `%post`, and `%postun` scriptlets.

  Note that those dependencies are **not** required for the

  `%systemd_{post,preun,postun_with_restart,user_post,user_preun}`
@@ -456,10 +456,14 @@ 

  

  If the package wants to use systemd tools if they are available,

  but does not want to declare a dependency,

- then the `%systemd_ordering` macro MAY be used

- as a weaker form of `%systemd_requires`

+ then the `+%{?systemd_ordering}+` macro MAY be used

+ as a weaker form of `+%{?systemd_requires}+`

  that only declares an ordering during an RPM transaction.

  

+ NOTE: The macros take the form `+%{?systemd_requires}+`

+ instead of `+%systemd_requires+` to allow the specfile to parse properly

+ in the case where the systemd macros have yet to be installed.

+ 

  ===== Macro details

  

  For details on what these macros evaluate to, refer to the following sources:

Recommend %{?systemd_requires} and such instead of %systemd_requires so
the specfile will still parse if systemd-rpm-macros is not installed.

Fixes #1023

rebased onto a82a5be

7 months ago

Indeed. Fixed and squashed.

Pull-Request has been merged by tibbs

7 months ago
Metadata