forked from pool/systemd-rpm-macros
- 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
This commit is contained in:
parent
ca23be8300
commit
4dc045d4df
@ -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 - <<SYSTEMD_INLINE_EOF || : \
|
||||
%(cat %2) \
|
||||
SYSTEMD_INLINE_EOF\
|
||||
%{nil}
|
||||
|
||||
# This should be used by package installation scripts which require users or
|
||||
# groups to be present before the files installed by the package are present on
|
||||
# disk (for example because some files are owned by those users or groups).
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 20 16:01:33 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- 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 <fbui@suse.com>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user