From 4b5dfd9d8c60056814491bc87cd6f09df3c6cdcb4661249a95bd1c8e1adfb208 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 7 Feb 2023 08:56:44 +0000 Subject: [PATCH] - Conditionalize the use of /lib/modprobe.d only on systems with split usr support enabled (i.e. SLE). OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1346 --- systemd.changes | 6 ++++++ systemd.spec | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/systemd.changes b/systemd.changes index c99d8994..ad21e72b 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 7 08:44:32 UTC 2023 - Franck Bui + +- Conditionalize the use of /lib/modprobe.d only on systems with split usr + support enabled (i.e. SLE). + ------------------------------------------------------------------- Mon Jan 30 08:39:24 UTC 2023 - Franck Bui diff --git a/systemd.spec b/systemd.spec index f3627169..2d222902 100644 --- a/systemd.spec +++ b/systemd.spec @@ -780,6 +780,10 @@ ln -s ../usr/bin/systemctl %{buildroot}/sbin/poweroff ln -s ../usr/bin/systemctl %{buildroot}/sbin/telinit ln -s ../usr/bin/systemctl %{buildroot}/sbin/runlevel %endif + +# kmod keeps insisting on using /lib/modprobe.d only. +mkdir -p %{buildroot}%{_modprobedir} +mv %{buildroot}/usr/lib/modprobe.d/* %{buildroot}%{_modprobedir}/ %endif # Make sure we don't ship static enablement symlinks in /etc during @@ -790,12 +794,6 @@ rm -f %{buildroot}/etc/systemd/system/default.target # Replace upstream systemd-user with the openSUSE one. install -m0644 -D --target-directory=%{buildroot}%{_pam_vendordir} %{SOURCE2} -# kmod keeps insisting on using /lib on SLE. -if [ "$(realpath %{_modprobedir})" != /usr/lib/modprobe.d ]; then - mkdir -p %{buildroot}%{_modprobedir} - mv %{buildroot}/usr/lib/modprobe.d/* %{buildroot}%{_modprobedir}/ -fi - # Don't enable wall ask password service, it spams every console (bnc#747783). rm %{buildroot}%{_unitdir}/multi-user.target.wants/systemd-ask-password-wall.path