Accepting request 1111019 from Base:System
- systemd.spec: %regenerate_initrd_post is only used by udev sub-package hence move the build requirement pulling this macro in in the list of udev BRs. - Don't ship after-local.service anymore. This was mostly a hack for people wanting to execute any random things once the boot was finished. We shouldn't encourage such practice and it actually conflicts with the sysv-generator which believes that /etc/init.d/after.local is SysV init script that needs to be converted into a native unit file. We still install a copy of this service in /etc if the user is relying on it, for backward compatibility. - fixlet-systemd-post.sh: fix invalid use of rpm macro %{_localstatedir} OBS-URL: https://build.opensuse.org/request/show/1111019 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=401
This commit is contained in:
commit
c2a9aa25e3
@ -1,17 +0,0 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=/etc/init.d/after.local Compatibility
|
||||
ConditionFileIsExecutable=/etc/init.d/after.local
|
||||
After=getty.target
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
ExecStart=/etc/init.d/after.local
|
||||
TimeoutSec=0
|
||||
RemainAfterExit=yes
|
@ -472,7 +472,6 @@
|
||||
%{_udevrulesdir}/71-seat.rules
|
||||
%{_udevrulesdir}/73-seat-late.rules
|
||||
%{_udevrulesdir}/99-systemd.rules
|
||||
%{_unitdir}/after-local.service
|
||||
%{_unitdir}/autovt@.service
|
||||
%{_unitdir}/basic.target
|
||||
%{_unitdir}/blockdev@.target
|
||||
@ -515,7 +514,6 @@
|
||||
%{_unitdir}/local-fs.target.wants/tmp.mount
|
||||
%{_unitdir}/modprobe@.service
|
||||
%{_unitdir}/multi-user.target
|
||||
%{_unitdir}/multi-user.target.wants/after-local.service
|
||||
%{_unitdir}/multi-user.target.wants/getty.target
|
||||
%{_unitdir}/multi-user.target.wants/systemd-logind.service
|
||||
%{_unitdir}/multi-user.target.wants/systemd-user-sessions.service
|
||||
|
@ -131,6 +131,7 @@ migrate_language () {
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Migrate old i18n settings previously configured in /etc/sysconfig to the new
|
||||
# locations used by systemd (/etc/locale.conf, /etc/vconsole.conf, ...). Recent
|
||||
# versions of systemd parse the new locations only.
|
||||
@ -139,7 +140,8 @@ migrate_language () {
|
||||
# might be upgrading from a system which was running SysV init (systemd package
|
||||
# is being installed).
|
||||
#
|
||||
# It's run only once.
|
||||
# Note: run only once.
|
||||
#
|
||||
migrate_sysconfig_i18n() {
|
||||
local tagfile=/var/lib/systemd/rpm/systemd-i18n_migrated
|
||||
local -i rv=0
|
||||
@ -252,9 +254,25 @@ fix_bsc_1020601() {
|
||||
# Note: run at each package update.
|
||||
#
|
||||
fix_issue_11329() {
|
||||
if [ -L %{_localstatedir}/lib/systemd/timesync ]; then
|
||||
rm %{_localstatedir}/lib/systemd/timesync
|
||||
mv %{_localstatedir}/lib/private/systemd/timesync %{_localstatedir}/lib/systemd/timesync
|
||||
if [ -L /var/lib/systemd/timesync ]; then
|
||||
rm /var/lib/systemd/timesync
|
||||
mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# We don't ship after-local.service anymore however as a courtesy we install a
|
||||
# copy in /etc for users who are relying on it.
|
||||
#
|
||||
# Note: should run only once since it is conditionalized on the presence of
|
||||
# %{_unitdir}/after-local.service
|
||||
#
|
||||
drop_after_local_support() {
|
||||
if [ -x /etc/init.d/after.local ] &&
|
||||
[ -f /usr/lib/systemd/system/after-local.service ]; then
|
||||
echo "after-local.service is no more provided by systemd but a copy has been installed in /etc"
|
||||
cp /usr/lib/systemd/system/after-local.service /etc/systemd/system/
|
||||
ln -s ../after-local.service /etc/systemd/system/multi-user.target.wants/after-local.service
|
||||
fi
|
||||
}
|
||||
|
||||
@ -264,5 +282,6 @@ fix_pre_210 || r=1
|
||||
migrate_sysconfig_i18n || r=1
|
||||
fix_bsc_1020601 || r=1
|
||||
fix_issue_11329 || r=1
|
||||
drop_after_local_support || r=1
|
||||
|
||||
exit $r
|
||||
|
@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 14 06:33:05 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- systemd.spec: %regenerate_initrd_post is only used by udev sub-package hence
|
||||
move the build requirement pulling this macro in in the list of udev BRs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 12 19:24:02 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- Don't ship after-local.service anymore. This was mostly a hack for people
|
||||
wanting to execute any random things once the boot was finished. We shouldn't
|
||||
encourage such practice and it actually conflicts with the sysv-generator
|
||||
which believes that /etc/init.d/after.local is SysV init script that needs to
|
||||
be converted into a native unit file.
|
||||
|
||||
We still install a copy of this service in /etc if the user is relying on
|
||||
it, for backward compatibility.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 12 18:28:07 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- fixlet-systemd-post.sh: fix invalid use of rpm macro %{_localstatedir}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 11 07:54:35 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
15
systemd.spec
15
systemd.spec
@ -108,9 +108,6 @@ BuildRequires: libmount-devel >= 2.27.1
|
||||
BuildRequires: meson >= 0.53.2
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: python3-Jinja2
|
||||
# regenerate_initrd_post macro is expanded during build, hence this BR. Also
|
||||
# this macro was introduced since version 12.4.
|
||||
BuildRequires: suse-module-tools >= 12.4
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(blkid) >= 2.26
|
||||
|
||||
@ -171,7 +168,6 @@ Source4: systemd-sysv-install
|
||||
Source5: tmpfiles-suse.conf
|
||||
Source6: baselibs.conf
|
||||
Source7: triggers.systemd
|
||||
Source11: after-local.service
|
||||
Source14: kbd-model-map.legacy
|
||||
|
||||
Source100: fixlet-container-post.sh
|
||||
@ -308,6 +304,8 @@ Requires(pre): group(kvm)
|
||||
Requires(post): sed
|
||||
Requires(post): coreutils
|
||||
Requires(postun):coreutils
|
||||
# 'regenerate_initrd_post' macro is expanded during build, hence this BR.
|
||||
BuildRequires: suse-module-tools
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0
|
||||
BuildRequires: pkgconfig(libkmod) >= 15
|
||||
@ -727,8 +725,9 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
|
||||
%if %{without sysvcompat}
|
||||
-Dsysvinit-path= \
|
||||
-Dsysvrcnd-path= \
|
||||
%endif
|
||||
%else
|
||||
-Drc-local=/etc/init.d/boot.local \
|
||||
%endif
|
||||
-Dcreate-log-dirs=false \
|
||||
-Ddebug-shell=/bin/bash \
|
||||
\
|
||||
@ -921,10 +920,6 @@ mkdir -p %{buildroot}%{_userpresetdir}
|
||||
mkdir -p %{buildroot}%{_systemd_system_env_generator_dir}
|
||||
mkdir -p %{buildroot}%{_systemd_user_env_generator_dir}
|
||||
|
||||
# Ensure after.local wrapper is called.
|
||||
install -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/
|
||||
ln -s ../after-local.service %{buildroot}%{_unitdir}/multi-user.target.wants/
|
||||
|
||||
# ghost directories with default permissions.
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight
|
||||
|
||||
@ -1068,7 +1063,7 @@ if [ $1 -gt 1 ]; then
|
||||
%systemd_post systemd-userdbd.socket
|
||||
fi
|
||||
|
||||
# Run the hacks/fixups to clean up old garbages left by (very) old versions of
|
||||
# Run the hacks/fixups to clean up the old stuff left by (very) old versions of
|
||||
# systemd.
|
||||
%{_systemd_util_dir}/rpm/fixlet-systemd-post.sh $1 || :
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user