From 713f9ebffae9e6ac13605f1a53e0a6fa07ccc9977cf62c4c9841260fca4777e6 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 20 Sep 2022 15:09:28 +0000 Subject: [PATCH 1/3] - Give the instructions to create a home directory with systemd-homed in the description of the systemd-experimental sub-package OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1312 --- systemd.changes | 6 ++++++ systemd.spec | 40 +++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/systemd.changes b/systemd.changes index 64113e4f..a34ee7e9 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 20 15:07:58 UTC 2022 - Franck Bui + +- Give the instructions to create a home directory with systemd-homed in the + description of the systemd-experimental sub-package + ------------------------------------------------------------------- Mon Sep 5 06:56:51 UTC 2022 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 0922fd48..3ecf99c3 100644 --- a/systemd.spec +++ b/systemd.spec @@ -623,23 +623,37 @@ BuildRequires: pkgconfig(fdisk) BuildRequires: pkgconfig(openssl) %description experimental -This package contains optional extra services that are considered as -previews and are provided so users can do early experiments with the -new features or technologies without waiting for them to be fully -supported by either upstream and openSUSE. +This package contains optional extra services that are considered as previews +and are provided so users can do early experiments with the new features or +technologies without waiting for them to be fully supported by either upstream +and openSUSE. -Please note that all services should be considered in development -phase and as such their behaviors details, unit files, option names, -etc... are subject to change without the usual backwards-compatibility -promises. +Please note that all services should be considered in development phase and as +such their behaviors details, unit files, option names, etc... are subject to +change without the usual backwards-compatibility promises. -Components that turn out to be stable and considered as fully -supported will be merged into the main package or moved into a -dedicated package. +Components that turn out to be stable and considered as fully supported will be +merged into the main package or moved into a dedicated package. -The package contains: homed, repart, userdbd, oomd. +Currently this package contains: homed, repart, userdbd, oomd. -Have fun with these services at your own risk. +In case you want to create a user with systemd-homed quickly, here are the steps +you can follow: + + - Make sure the nss-systemd package is installed and added into + /etc/nsswitch.conf, see nss-systemd(8) man page for details + + - Integrate pam_systemd_home.so in your PAM stack. You can do that either by + following the instructions in pam_systemd_home(8) man page or by executing + `pam-config --add --systemd_home` command + + - Enable and start systemd-homed with `systemctl enable --now systemd-homed` + + - Create a user with `homectl create ` + + - Verify the previous steps with `getent passwd ` + +Have fun (at your own risk). %endif %if %{without bootstrap} From a0873f187151931d31377f49c8db36e7dc1bb586b59b1a020c3607e718c97f6a Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Wed, 21 Sep 2022 07:49:53 +0000 Subject: [PATCH 2/3] - Move nss-systemd and nss-myhostname NSS modules into the main package OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1313 --- baselibs.conf | 1 - files.systemd | 6 +++++ systemd.changes | 5 ++++ systemd.spec | 61 +++++++++---------------------------------------- 4 files changed, 22 insertions(+), 51 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index d8badad8..d277a558 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -9,4 +9,3 @@ systemd post "%{_sbindir}/pam-config -a --systemd || :" libsystemd0 libudev1 -nss-myhostname diff --git a/files.systemd b/files.systemd index a149243f..d9360a4e 100644 --- a/files.systemd +++ b/files.systemd @@ -221,6 +221,8 @@ %{_journalcatalogdir}/systemd.zh_CN.catalog %{_journalcatalogdir}/systemd.zh_TW.catalog %if %{without bootstrap} +%{_libdir}/libnss_myhostname.so.2 +%{_libdir}/libnss_systemd.so.2 %{_mandir}/man1/busctl.1.gz %{_mandir}/man1/hostnamectl.1.gz %{_mandir}/man1/init.1.gz @@ -328,6 +330,10 @@ %{_mandir}/man7/systemd.time.7.gz %{_mandir}/man8/30-systemd-environment-d-generator.8.gz %{_mandir}/man8/halt.8.gz +%{_mandir}/man8/libnss_myhostname.so.2.8.gz +%{_mandir}/man8/libnss_systemd.so.2.8.gz +%{_mandir}/man8/nss-myhostname.8.gz +%{_mandir}/man8/nss-systemd.8.gz %{_mandir}/man8/pam_systemd.8.gz %{_mandir}/man8/poweroff.8.gz %{_mandir}/man8/reboot.8.gz diff --git a/systemd.changes b/systemd.changes index a34ee7e9..19ae5796 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Sep 21 07:48:58 UTC 2022 - Franck Bui + +- Move nss-systemd and nss-myhostname NSS modules into the main package + ------------------------------------------------------------------- Tue Sep 20 15:07:58 UTC 2022 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 3ecf99c3..976552b8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -153,6 +153,10 @@ Provides: sbin_init Provides: sysvinit:/sbin/init Conflicts: sbin_init Conflicts: sysvinit +Obsoletes: nss-systemd < %{version}-%{release} +Provides: nss-systemd = %{version}-%{release} +Obsoletes: nss-myhostname < %{version}-%{release} +Provides: nss-myhostname = %{version}-%{release} Provides: systemd-logger = %{version}-%{release} Obsoletes: systemd-logger < %{version}-%{release} Provides: systemd-sysvinit = %{version}-%{release} @@ -472,34 +476,6 @@ http://0pointer.net/blog/walkthrough-for-portable-services.html https://systemd.io/PORTABLE_SERVICES %endif -%if %{without bootstrap} -%package -n nss-systemd -Summary: Plugin for local virtual host name resolution -License: LGPL-2.1-or-later - -%description -n nss-systemd -This package contains a plugin for the Name Service Switch (NSS), -which enables resolution of all dynamically allocated service -users. (See the DynamicUser= setting in unit files.) - -To activate this NSS module, you will need to include it in -/etc/nsswitch.conf, see nss-systemd(8) manpage for more details. - -%package -n nss-myhostname -Summary: Plugin for local system host name resolution -License: LGPL-2.1-or-later - -%description -n nss-myhostname -This package contains a plug-in module for the Name Service Switch -(NSS), primarly providing hostname resolution for the locally -configured system hostname as returned by gethostname(2). For example, -it resolves the local hostname to locally configured IP addresses, as -well as "localhost" to 127.0.0.1/::1. - -To activate this NSS module, you will need to include it in -/etc/nsswitch.conf, see nss-hostname(8) manpage for more details. -%endif - %if %{with journal_remote} %package journal-remote Summary: Gateway for serving journal events over the network using HTTP @@ -1003,6 +979,8 @@ fi %if %{without bootstrap} pam-config --add --systemd || : +# Run ldconfig for nss-systemd and nss-myhostname NSS modules. +%ldconfig %endif # systemd-sysusers is not available in %pre so this needs to be done @@ -1022,7 +1000,7 @@ systemctl daemon-reexec || : # only understood by the latest version of the user manager and the # user service is started before the user manager get reexecuted. But # this case is very unlikely especially since we don't restart any -# user service for now on. +# user service for now. # # Before doing this, we unfortunately have to wait until users will # reexec their user manager (by either rebooting or restarting their @@ -1162,11 +1140,11 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules %posttrans -n udev%{?mini} %regenerate_initrd_posttrans -%post -n libudev%{?mini}1 -p /sbin/ldconfig -%post -n libsystemd0%{?mini} -p /sbin/ldconfig +%post -n libudev%{?mini}1 -p %ldconfig +%post -n libsystemd0%{?mini} -p %ldconfig -%postun -n libudev%{?mini}1 -p /sbin/ldconfig -%postun -n libsystemd0%{?mini} -p /sbin/ldconfig +%postun -n libudev%{?mini}1 -p %ldconfig +%postun -n libsystemd0%{?mini} -p %ldconfig %post container %tmpfiles_create systemd-nspawn.conf @@ -1200,11 +1178,6 @@ fi %sysusers_create systemd-coredump.conf %endif -%if %{without bootstrap} -%ldconfig_scriptlets -n nss-myhostname -%ldconfig_scriptlets -n nss-systemd -%endif - %if %{with journal_remote} %pre journal-remote %service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service @@ -1378,18 +1351,6 @@ fi %if %{without bootstrap} %files lang -f systemd.lang - -%files -n nss-myhostname -%defattr(-, root, root) -%{_libdir}/*nss_myhostname* -%{_mandir}/man8/libnss_myhostname.* -%{_mandir}/man8/nss-myhostname.* - -%files -n nss-systemd -%defattr(-, root, root) -%{_libdir}/libnss_systemd.so* -%{_mandir}/man8/libnss_systemd.so.* -%{_mandir}/man8/nss-systemd.* %endif %if %{with journal_remote} From 1fdf4c261e304ffc93c81ccd7f04e5523efdc4f0f57c75ed28105e77629cbee2 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Wed, 21 Sep 2022 09:24:59 +0000 Subject: [PATCH 3/3] - Drop the old band aid used during the breakage introduced by the switch of /tmp to tmpfs This was done to address the regression reported in boo#1175779 but shouldn't be necessary anymore since the (few) affected users should have updated systemd during the last 2 years. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1314 --- systemd.changes | 10 ++++++++++ systemd.spec | 40 +++++++++++----------------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/systemd.changes b/systemd.changes index 19ae5796..cb7d59cf 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Sep 21 09:18:34 UTC 2022 - Franck Bui + +- Drop the old band aid used during the breakage introduced by the switch of + /tmp to tmpfs + + This was done to address the regression reported in boo#1175779 but shouldn't + be necessary anymore since the (few) affected users should have updated + systemd during the last 2 years. + ------------------------------------------------------------------- Wed Sep 21 07:48:58 UTC 2022 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 976552b8..436dac92 100644 --- a/systemd.spec +++ b/systemd.spec @@ -887,23 +887,21 @@ echo 'disable *' >%{buildroot}%{_userpresetdir}/99-default.preset # The tmpfiles dealing with the generic paths is pretty messy # currently because: # -# 1. filesystem package wants to define the generic paths and some of -# them conflict with the definition given by systemd in var.conf, -# see bsc#1078466. +# 1. filesystem package wants to define the generic paths and some of them +# conflict with the definition given by systemd in var.conf, see +# bsc#1078466. # -# 2. /tmp and /var/tmp are not cleaned by default on SUSE distros -# (fate#314974) which conflict with tmp.conf. +# 2. /tmp and /var/tmp are not cleaned by default on SUSE distros (fate#314974) +# which conflict with tmp.conf. # -# 3. There're also legacy.conf which defines various legacy paths -# which either don't match the SUSE defaults or don't look needed -# at all. +# 3. There're also legacy.conf which defines various legacy paths which either +# don't match the SUSE defaults or don't look needed at all. # -# 4. And to finish, we don't want the part in etc.conf which imports -# default upstream files in empty /etc, see below. +# 4. We don't want the part in etc.conf which imports default upstream files in +# empty /etc, see below. # -# To keep things simple, we remove all these tmpfiles config files but -# still keep the remaining paths that still don't have a better home -# in suse.conf. +# To keep things simple, we remove all these tmpfiles config files but still +# keep the remaining paths that still don't have a better home in suse.conf. rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/suse.conf @@ -1063,22 +1061,6 @@ fi # It's run only once. %{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || : -# During the migration to tmpfs for /tmp, a bug was introduced that -# affected users using tmpfs for /tmp and happened during the _second_ -# update following the one that introduced tmpfs on /tmp. It consisted -# in creating a dangling symlink /etc/systemd/system/tmp.mount -# pointing to the old copy that previous versions shipped in -# /usr/share/systemd, which doesn't exist anymore. So we migrate the -# link to the new location. -# -# Users have been exposed to this bug during a short period of time as -# it was present only in one release and was fixed shortly after by -# the next update. So we can assume that it's safe to drop it in 6 -# months (ie March 2021). -if [ "$(readlink -f %{_sysconfdir}/systemd/system/tmp.mount)" = "%{_datadir}/systemd/tmp.mount" ] ; then - ln -sf %{_unitdir}/tmp.mount %{_sysconfdir}/systemd/system/tmp.mount -fi - %postun # daemon-reload is implied by %%systemd_postun_with_restart %systemd_postun_with_restart systemd-journald.service