systemd_post/pre should be called in any cases (regardless of file triggers)

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1381
This commit is contained in:
Franck Bui 2023-05-02 12:14:31 +00:00 committed by Git OBS Bridge
parent 2f6697b330
commit e681296532

View File

@ -966,18 +966,16 @@ tar -cO \
# installation images uses a hardcoded list of packages with a %%pre that needs
# to be run during the build and complains if it can't find one.
%pre
%if %{without filetriggers}
if [ $1 -gt 1 ]; then
# We keep these just in case we're upgrading from an old version that
# was missing these units. During package installation, these macros are
# NOPs for systemd anyways (the branding preset package takes care of
# applying the presets in its %%posttrans in this case).
# was missing one of these units. During package installation, these
# macros are NOPs for the main package (the branding preset package
# takes care of applying the presets in its %%posttrans in this case).
%systemd_pre remote-fs.target
%systemd_pre getty@.service
%systemd_pre systemd-timesyncd.service
%systemd_pre systemd-journald-audit.socket
fi
%endif
%post
# Make /etc/machine-id an empty file during package installation. On the first
@ -1031,6 +1029,7 @@ fi
systemd-sysusers || :
systemd-tmpfiles --create || :
journalctl --update-catalog || :
%endif
if [ $1 -gt 1 ]; then
# See comments for %%systemd_pre in %%pre.
@ -1039,7 +1038,6 @@ if [ $1 -gt 1 ]; then
%systemd_post systemd-timesyncd.service
%systemd_post systemd-journald-audit.socket
fi
%endif
# v228 wrongly set world writable suid root permissions on timestamp files used
# by permanent timers. Fix the timestamps that might have been created by the