From db1b910161a497e9020ff695b914981761eb2438691b050b5c25d00c92165924 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 14 Jan 2021 15:32:12 +0000 Subject: [PATCH] - prepare usrmerge (boo#1029961) * don't install legacy symlinks to / * use %_pamdir to install pam modules * leave nss files in /usr/lib*, glibc loads them from there just fine independent of usrmerge OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1132 --- systemd-mini.changes | 9 +++++++++ systemd-mini.spec | 17 +++++++++-------- systemd.changes | 9 +++++++++ systemd.spec | 17 +++++++++-------- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index be0880d..01b1b71 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jan 13 10:37:16 UTC 2021 - Ludwig Nussel + +- prepare usrmerge (boo#1029961) + * don't install legacy symlinks to / + * use %_pamdir to install pam modules + * leave nss files in /usr/lib*, glibc loads them from there just + fine independent of usrmerge + ------------------------------------------------------------------- Fri Dec 18 08:54:20 UTC 2020 - Franck Bui diff --git a/systemd-mini.spec b/systemd-mini.spec index 73c531f..d317871 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1,7 +1,7 @@ # # spec file for package systemd-mini # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -511,7 +511,7 @@ systemd-journal-remote, and systemd-journal-upload. -Dsplit-bin=true \ -Dsystem-uid-max=499 \ -Dsystem-gid-max=499 \ - -Dpamlibdir=/%{_lib}/security \ + -Dpamlibdir=%{_pamdir} \ -Drpmmacrosdir=no \ -Dcertificate-root=%{_sysconfdir}/pki/systemd \ -Ddefault-hierarchy=hybrid \ @@ -577,10 +577,7 @@ systemd-journal-remote, and systemd-journal-upload. %install %meson_install -# move to %{_lib} -%if ! 0%{?bootstrap} -mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib} -%else +%if 0%{?bootstrap} rm %{buildroot}%{_libdir}/libnss_systemd.so* rm -r %{buildroot}%{_datadir}/locale %endif @@ -611,6 +608,7 @@ for s in %{S:100} %{S:101} %{S:102}; do install -m0755 -D $s %{buildroot}%{_prefix}/lib/systemd/scripts/${s#*/scripts-systemd-} done +%if !0%{?usrmerged} # Legacy sysvinit tools mkdir -p %{buildroot}/sbin ln -s ../usr/lib/systemd/systemd %{buildroot}/sbin/init @@ -622,6 +620,7 @@ 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 +%endif # Make sure we don't ship static enablement symlinks in /etc during # installation, presets should be honoured instead. @@ -1171,7 +1170,7 @@ fi %dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-sleep/ -/%{_lib}/security/pam_systemd.so +%{_pamdir}/pam_systemd.so %if %{with gnuefi} %dir %{_prefix}/lib/systemd/boot @@ -1350,6 +1349,7 @@ fi %files sysvinit %defattr(-,root,root,-) +%if !0%{?usrmerged} /sbin/init /sbin/reboot /sbin/halt @@ -1359,6 +1359,7 @@ fi /sbin/telinit /sbin/runlevel %endif +%endif %{_sbindir}/init %{_sbindir}/reboot %{_sbindir}/halt @@ -1508,7 +1509,7 @@ fi %files -n nss-myhostname %defattr(-, root, root) -/%{_lib}/*nss_myhostname* +%{_libdir}/*nss_myhostname* %{_mandir}/man8/libnss_myhostname.* %{_mandir}/man8/nss-myhostname.* diff --git a/systemd.changes b/systemd.changes index be0880d..01b1b71 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jan 13 10:37:16 UTC 2021 - Ludwig Nussel + +- prepare usrmerge (boo#1029961) + * don't install legacy symlinks to / + * use %_pamdir to install pam modules + * leave nss files in /usr/lib*, glibc loads them from there just + fine independent of usrmerge + ------------------------------------------------------------------- Fri Dec 18 08:54:20 UTC 2020 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 1e20e22..2d6b5af 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,7 +1,7 @@ # # spec file for package systemd # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -509,7 +509,7 @@ systemd-journal-remote, and systemd-journal-upload. -Dsplit-bin=true \ -Dsystem-uid-max=499 \ -Dsystem-gid-max=499 \ - -Dpamlibdir=/%{_lib}/security \ + -Dpamlibdir=%{_pamdir} \ -Drpmmacrosdir=no \ -Dcertificate-root=%{_sysconfdir}/pki/systemd \ -Ddefault-hierarchy=hybrid \ @@ -575,10 +575,7 @@ systemd-journal-remote, and systemd-journal-upload. %install %meson_install -# move to %{_lib} -%if ! 0%{?bootstrap} -mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib} -%else +%if 0%{?bootstrap} rm %{buildroot}%{_libdir}/libnss_systemd.so* rm -r %{buildroot}%{_datadir}/locale %endif @@ -609,6 +606,7 @@ for s in %{S:100} %{S:101} %{S:102}; do install -m0755 -D $s %{buildroot}%{_prefix}/lib/systemd/scripts/${s#*/scripts-systemd-} done +%if !0%{?usrmerged} # Legacy sysvinit tools mkdir -p %{buildroot}/sbin ln -s ../usr/lib/systemd/systemd %{buildroot}/sbin/init @@ -620,6 +618,7 @@ 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 +%endif # Make sure we don't ship static enablement symlinks in /etc during # installation, presets should be honoured instead. @@ -1169,7 +1168,7 @@ fi %dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-sleep/ -/%{_lib}/security/pam_systemd.so +%{_pamdir}/pam_systemd.so %if %{with gnuefi} %dir %{_prefix}/lib/systemd/boot @@ -1348,6 +1347,7 @@ fi %files sysvinit %defattr(-,root,root,-) +%if !0%{?usrmerged} /sbin/init /sbin/reboot /sbin/halt @@ -1357,6 +1357,7 @@ fi /sbin/telinit /sbin/runlevel %endif +%endif %{_sbindir}/init %{_sbindir}/reboot %{_sbindir}/halt @@ -1506,7 +1507,7 @@ fi %files -n nss-myhostname %defattr(-, root, root) -/%{_lib}/*nss_myhostname* +%{_libdir}/*nss_myhostname* %{_mandir}/man8/libnss_myhostname.* %{_mandir}/man8/nss-myhostname.*