From 4dc045d4dfaf2c40595499c9ba8c1668634e374daffae8b2e7757469c31e48fc Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 20 Jun 2023 16:04:19 +0000 Subject: [PATCH] - Drop %tmpfiles_create_package It can't work during transactional updates because the paths that systemd-tmpfiles usually operates on (such as /var) can't be changed. It appears that the only user of this macro doesn't really need this macro so let's drop it. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=100 --- macros.systemd | 27 --------------------------- systemd-rpm-macros.changes | 10 ++++++++++ 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/macros.systemd b/macros.systemd index 994a496..0b90a34 100644 --- a/macros.systemd +++ b/macros.systemd @@ -239,33 +239,6 @@ fi \ /usr/bin/systemd-sysusers %{?*} || : \ %{nil} -# This may be used by package installation scripts to create files according to -# their tmpfiles configuration from a package installation script, even before -# the files of that package are installed on disk. -# -# FIXME: this macro should be removed because it cannot work on transactional -# systems since directories that systemd-tmpfiles usually operates on (i.e. -# /var, /etc) are not available during (transactional) updates. So packages -# can't rely on the behavior this macro is supposed to provide. -# -# Example: -# Source1: %{name}-tmpfiles.conf -# ... -# %install -# install -D %SOURCE1 %{buildroot}%{_tmpfilesdir}/%{name}.conf -# %pre -# %tmpfiles_create_package %{name} %SOURCE1 -# %files -# %{_tmpfilesdir}/%{name}.conf -# -%tmpfiles_create_package() \ -%{expand:%%{?!__systemd_twoargs_%#:%%{error:The %%%%tmpfiles_create_package macro requires two arguments}}} \ -[ -d /run/systemd/system ] && [ -x /usr/bin/systemd-tmpfiles ] && \ - /usr/bin/systemd-tmpfiles --replace=%_tmpfilesdir/%1.conf --create - < + +- Drop %tmpfiles_create_package + + It can't work during transactional updates because the paths that + systemd-tmpfiles usually operates on (such as /var) can't be changed. It + appears that the only user of this macro doesn't really need this macro so + let's drop it. + ------------------------------------------------------------------- Tue Jun 20 15:57:37 UTC 2023 - Franck Bui