SHA256
1
0
forked from pool/systemd

Accepting request 1005162 from Base:System

- 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.

- Move nss-systemd and nss-myhostname NSS modules into the main package

- 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/request/show/1005162
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=364
This commit is contained in:
Dominique Leuenberger 2022-09-22 12:49:16 +00:00 committed by Git OBS Bridge
parent 9277d8b349
commit 05bd7fe51d
4 changed files with 76 additions and 93 deletions

View File

@ -9,4 +9,3 @@ systemd
post "<prefix>%{_sbindir}/pam-config -a --systemd || :" post "<prefix>%{_sbindir}/pam-config -a --systemd || :"
libsystemd0 libsystemd0
libudev1 libudev1
nss-myhostname

View File

@ -221,6 +221,8 @@
%{_journalcatalogdir}/systemd.zh_CN.catalog %{_journalcatalogdir}/systemd.zh_CN.catalog
%{_journalcatalogdir}/systemd.zh_TW.catalog %{_journalcatalogdir}/systemd.zh_TW.catalog
%if %{without bootstrap} %if %{without bootstrap}
%{_libdir}/libnss_myhostname.so.2
%{_libdir}/libnss_systemd.so.2
%{_mandir}/man1/busctl.1.gz %{_mandir}/man1/busctl.1.gz
%{_mandir}/man1/hostnamectl.1.gz %{_mandir}/man1/hostnamectl.1.gz
%{_mandir}/man1/init.1.gz %{_mandir}/man1/init.1.gz
@ -328,6 +330,10 @@
%{_mandir}/man7/systemd.time.7.gz %{_mandir}/man7/systemd.time.7.gz
%{_mandir}/man8/30-systemd-environment-d-generator.8.gz %{_mandir}/man8/30-systemd-environment-d-generator.8.gz
%{_mandir}/man8/halt.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/pam_systemd.8.gz
%{_mandir}/man8/poweroff.8.gz %{_mandir}/man8/poweroff.8.gz
%{_mandir}/man8/reboot.8.gz %{_mandir}/man8/reboot.8.gz

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Wed Sep 21 09:18:34 UTC 2022 - Franck Bui <fbui@suse.com>
- 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 <fbui@suse.com>
- Move nss-systemd and nss-myhostname NSS modules into the main package
-------------------------------------------------------------------
Tue Sep 20 15:07:58 UTC 2022 - Franck Bui <fbui@suse.com>
- 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 <fbui@suse.com> Mon Sep 5 06:56:51 UTC 2022 - Franck Bui <fbui@suse.com>

View File

@ -153,6 +153,10 @@ Provides: sbin_init
Provides: sysvinit:/sbin/init Provides: sysvinit:/sbin/init
Conflicts: sbin_init Conflicts: sbin_init
Conflicts: sysvinit 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} Provides: systemd-logger = %{version}-%{release}
Obsoletes: systemd-logger < %{version}-%{release} Obsoletes: systemd-logger < %{version}-%{release}
Provides: systemd-sysvinit = %{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 https://systemd.io/PORTABLE_SERVICES
%endif %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} %if %{with journal_remote}
%package journal-remote %package journal-remote
Summary: Gateway for serving journal events over the network using HTTP Summary: Gateway for serving journal events over the network using HTTP
@ -623,23 +599,37 @@ BuildRequires: pkgconfig(fdisk)
BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(openssl)
%description experimental %description experimental
This package contains optional extra services that are considered as This package contains optional extra services that are considered as previews
previews and are provided so users can do early experiments with the and are provided so users can do early experiments with the new features or
new features or technologies without waiting for them to be fully technologies without waiting for them to be fully supported by either upstream
supported by either upstream and openSUSE. and openSUSE.
Please note that all services should be considered in development Please note that all services should be considered in development phase and as
phase and as such their behaviors details, unit files, option names, such their behaviors details, unit files, option names, etc... are subject to
etc... are subject to change without the usual backwards-compatibility change without the usual backwards-compatibility promises.
promises.
Components that turn out to be stable and considered as fully Components that turn out to be stable and considered as fully supported will be
supported will be merged into the main package or moved into a merged into the main package or moved into a dedicated package.
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 <username>`
- Verify the previous steps with `getent passwd <username>`
Have fun (at your own risk).
%endif %endif
%if %{without bootstrap} %if %{without bootstrap}
@ -897,23 +887,21 @@ echo 'disable *' >%{buildroot}%{_userpresetdir}/99-default.preset
# The tmpfiles dealing with the generic paths is pretty messy # The tmpfiles dealing with the generic paths is pretty messy
# currently because: # currently because:
# #
# 1. filesystem package wants to define the generic paths and some of # 1. filesystem package wants to define the generic paths and some of them
# them conflict with the definition given by systemd in var.conf, # conflict with the definition given by systemd in var.conf, see
# see bsc#1078466. # bsc#1078466.
# #
# 2. /tmp and /var/tmp are not cleaned by default on SUSE distros # 2. /tmp and /var/tmp are not cleaned by default on SUSE distros (fate#314974)
# (fate#314974) which conflict with tmp.conf. # which conflict with tmp.conf.
# #
# 3. There're also legacy.conf which defines various legacy paths # 3. There're also legacy.conf which defines various legacy paths which either
# which either don't match the SUSE defaults or don't look needed # don't match the SUSE defaults or don't look needed at all.
# at all.
# #
# 4. And to finish, we don't want the part in etc.conf which imports # 4. We don't want the part in etc.conf which imports default upstream files in
# default upstream files in empty /etc, see below. # empty /etc, see below.
# #
# To keep things simple, we remove all these tmpfiles config files but # To keep things simple, we remove all these tmpfiles config files but still
# still keep the remaining paths that still don't have a better home # keep the remaining paths that still don't have a better home in suse.conf.
# in suse.conf.
rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf
install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/suse.conf install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/suse.conf
@ -989,6 +977,8 @@ fi
%if %{without bootstrap} %if %{without bootstrap}
pam-config --add --systemd || : pam-config --add --systemd || :
# Run ldconfig for nss-systemd and nss-myhostname NSS modules.
%ldconfig
%endif %endif
# systemd-sysusers is not available in %pre so this needs to be done # systemd-sysusers is not available in %pre so this needs to be done
@ -1008,7 +998,7 @@ systemctl daemon-reexec || :
# only understood by the latest version of the user manager and the # only understood by the latest version of the user manager and the
# user service is started before the user manager get reexecuted. But # user service is started before the user manager get reexecuted. But
# this case is very unlikely especially since we don't restart any # 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 # Before doing this, we unfortunately have to wait until users will
# reexec their user manager (by either rebooting or restarting their # reexec their user manager (by either rebooting or restarting their
@ -1071,22 +1061,6 @@ fi
# It's run only once. # It's run only once.
%{_prefix}/lib/systemd/scripts/migrate-sysconfig-i18n.sh || : %{_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 %postun
# daemon-reload is implied by %%systemd_postun_with_restart # daemon-reload is implied by %%systemd_postun_with_restart
%systemd_postun_with_restart systemd-journald.service %systemd_postun_with_restart systemd-journald.service
@ -1148,11 +1122,11 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%posttrans -n udev%{?mini} %posttrans -n udev%{?mini}
%regenerate_initrd_posttrans %regenerate_initrd_posttrans
%post -n libudev%{?mini}1 -p /sbin/ldconfig %post -n libudev%{?mini}1 -p %ldconfig
%post -n libsystemd0%{?mini} -p /sbin/ldconfig %post -n libsystemd0%{?mini} -p %ldconfig
%postun -n libudev%{?mini}1 -p /sbin/ldconfig %postun -n libudev%{?mini}1 -p %ldconfig
%postun -n libsystemd0%{?mini} -p /sbin/ldconfig %postun -n libsystemd0%{?mini} -p %ldconfig
%post container %post container
%tmpfiles_create systemd-nspawn.conf %tmpfiles_create systemd-nspawn.conf
@ -1186,11 +1160,6 @@ fi
%sysusers_create systemd-coredump.conf %sysusers_create systemd-coredump.conf
%endif %endif
%if %{without bootstrap}
%ldconfig_scriptlets -n nss-myhostname
%ldconfig_scriptlets -n nss-systemd
%endif
%if %{with journal_remote} %if %{with journal_remote}
%pre journal-remote %pre journal-remote
%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
@ -1364,18 +1333,6 @@ fi
%if %{without bootstrap} %if %{without bootstrap}
%files lang -f systemd.lang %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 %endif
%if %{with journal_remote} %if %{with journal_remote}