From 2ad971f9a70505ba40911a59873d7e3922c8073b Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Nov 12 2018 17:35:01 +0000 Subject: Use systemd-rpm-macros for BuildRequires Also put BuildRequires before Requires in the examples being changed. https://pagure.io/packaging-committee/issue/824 --- diff --git a/guidelines/modules/ROOT/pages/Scriptlets.adoc b/guidelines/modules/ROOT/pages/Scriptlets.adoc index 4770c72..7843255 100644 --- a/guidelines/modules/ROOT/pages/Scriptlets.adoc +++ b/guidelines/modules/ROOT/pages/Scriptlets.adoc @@ -284,8 +284,8 @@ Packages containing systemd unit files need to use scriptlets to ensure proper h The systemd package provides a set of helper macros to handle systemd scriptlet operations. These macros support systemd "presets", as documented in Features/PackagePresets. The `+%systemd_requires+` macro is a shortcut for listing the per-scriptlet dependencies on systemd. .... +BuildRequires: systemd-rpm-macros %{?systemd_requires} -BuildRequires: systemd [...] %post @@ -314,8 +314,8 @@ If a package is suitable for installation without systemd (in a container image, There are additional macros for user units (those installed under `+%_userunitdir+`) that should be used similarly to those for system units. These enable and disable user units according to presets, and are `+%systemd_user_post+` (to be used in `+%post+`) and `+%systemd_user_preun+` (to be used in `+%preun+`). .... +BuildRequires: systemd-rpm-macros %{?systemd_requires} -BuildRequires: systemd [...] %post diff --git a/guidelines/modules/ROOT/pages/Systemd.adoc b/guidelines/modules/ROOT/pages/Systemd.adoc index 3aadfe3..d3cfbee 100644 --- a/guidelines/modules/ROOT/pages/Systemd.adoc +++ b/guidelines/modules/ROOT/pages/Systemd.adoc @@ -345,7 +345,7 @@ Packages with systemd unit files *must* put them into `+%{_unitdir}+`. `+%{_unit Please note that in order for the `+%{_unitdir}+` macro to exist, your package must have: .... -BuildRequires: systemd +BuildRequires: systemd-rpm-macros .... === %files section diff --git a/guidelines/modules/ROOT/pages/Tmpfiles.d.adoc b/guidelines/modules/ROOT/pages/Tmpfiles.d.adoc index e8fdeff..7d32482 100644 --- a/guidelines/modules/ROOT/pages/Tmpfiles.d.adoc +++ b/guidelines/modules/ROOT/pages/Tmpfiles.d.adoc @@ -35,7 +35,7 @@ In the spec file, the packager needs to install the tmpfiles.d conf file into th .... # For the _tmpfilesdir macro. -BuildRequires: systemd +BuildRequires: systemd-rpm-macros # tmpfiles.d configuration for the /run directory Source1: %{name}-tmpfiles.conf