SHA256
1
0
forked from pool/systemd

Accepting request 1101213 from Base:System

- Drop 0003-strip-the-domain-part-from-etc-hostname-when-setting.patch
  /etc/hostname is supposed to contain the static host name of the system. This
  patch was used to work around cases where users incorrectly save the FQDN
  instead. However this is incorrect and not consistent with what
  systemd-hostnamed does and what other distributions do. Also assuming that
  /etc/hostname will contain the system host name only removes any ambiguities
  since the host name can contain a period.
  /etc/hosts is usually where one sets the domain name by aliasing the host name
  to the FQDN.
  Note that the installer used to save the FQDN in /etc/hostname but this has
  been fixed since several years now (bsc#972463).

- systemd-homed is no more considered as experimental
  It's been moved to its own dedicated sub-package "systemd-homed".

- systemd-userdb is no more considered as experimental (jsc#PED-2668)
  As such it's been moved to the main package.

    - upstream commit 3a3b022d2cc112803ea7b9beea98bbcad110368a (bsc#1212434 bsc#1213575)

OBS-URL: https://build.opensuse.org/request/show/1101213
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=398
This commit is contained in:
Dominique Leuenberger 2023-07-29 18:10:03 +00:00 committed by Git OBS Bridge
commit 0b8a1e7599
6 changed files with 148 additions and 111 deletions

View File

@ -1,39 +0,0 @@
From c6ed74889adade0287ee609150611544d8d5c6d2 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Tue, 28 May 2013 15:17:35 +0200
Subject: [PATCH 04/11] strip the domain part from /etc/hostname when setting
system host name
[fbui: fixes bnc#820213]
[fbui: forwardported from bfd2462b8ddec591d953841ab22bb30bdc6f9085]
[fbui: adjust context and make sure that strip of the domain name is
only done when setting the system host name. Therefore it's
still possible to pass an FQDN to hostnamectl]
[fbui: I'm still not sure that it was the right thing to do. Other
possibility was to fix the installer to create a correct
/etc/hostname file. Need to investigate...]
---
src/shared/hostname-setup.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/shared/hostname-setup.c b/src/shared/hostname-setup.c
index 511aa7d031..351d0e761d 100644
--- a/src/shared/hostname-setup.c
+++ b/src/shared/hostname-setup.c
@@ -189,6 +189,13 @@ int hostname_setup(bool really) {
else
log_warning_errno(r, "Failed to read configured hostname: %m");
} else {
+ char *domain;
+
+ /* SUSE: strip the domain name */
+ domain = strchr(b, '.');
+ if (domain)
+ *domain = '\0';
+
hn = b;
source = HOSTNAME_STATIC;
}
--
2.26.2

View File

@ -1,46 +1,29 @@
# #
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/systemd/homed.conf
%config(noreplace) %{_sysconfdir}/systemd/oomd.conf %config(noreplace) %{_sysconfdir}/systemd/oomd.conf
%if %{with sd_boot} %if %{with sd_boot}
%dir %{_unitdir}/initrd.target.wants %dir %{_unitdir}/initrd.target.wants
%endif %endif
%{_bindir}/homectl
%{_bindir}/oomctl %{_bindir}/oomctl
%{_bindir}/systemd-repart %{_bindir}/systemd-repart
%{_bindir}/userdbctl
%{_datadir}/bash-completion/completions/homectl
%{_datadir}/bash-completion/completions/oomctl %{_datadir}/bash-completion/completions/oomctl
%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Home.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Manager.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.oom1.Manager.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.oom1.Manager.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Image.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Image.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Manager.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Manager.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.home1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.oom1.service %{_datadir}/dbus-1/system-services/org.freedesktop.oom1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.home1.conf
%{_datadir}/dbus-1/system.d/org.freedesktop.oom1.conf %{_datadir}/dbus-1/system.d/org.freedesktop.oom1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.home1.policy
%{_datadir}/zsh/site-functions/_oomctl %{_datadir}/zsh/site-functions/_oomctl
%{_mandir}/man1/homectl.1.gz
%{_mandir}/man1/oomctl.1.gz %{_mandir}/man1/oomctl.1.gz
%if %{with sd_boot} %if %{with sd_boot}
%{_mandir}/man1/systemd-measure.1.gz %{_mandir}/man1/systemd-measure.1.gz
%{_mandir}/man1/ukify.1.gz %{_mandir}/man1/ukify.1.gz
%endif %endif
%{_mandir}/man1/userdbctl.1.gz
%{_mandir}/man5/homed.conf.5.gz
%{_mandir}/man5/homed.conf.d.5.gz
%{_mandir}/man5/oomd.conf.5.gz %{_mandir}/man5/oomd.conf.5.gz
%{_mandir}/man5/oomd.conf.d.5.gz %{_mandir}/man5/oomd.conf.d.5.gz
%{_mandir}/man5/org.freedesktop.home1.5.gz
%{_mandir}/man5/org.freedesktop.oom1.5.gz %{_mandir}/man5/org.freedesktop.oom1.5.gz
%{_mandir}/man5/repart.d.5.gz %{_mandir}/man5/repart.d.5.gz
%{_mandir}/man5/sysupdate.d.5.gz %{_mandir}/man5/sysupdate.d.5.gz
%{_mandir}/man8/pam_systemd_home.8.gz
%{_mandir}/man8/systemd-homed.8.gz
%{_mandir}/man8/systemd-homed.service.8.gz
%{_mandir}/man8/systemd-oomd.8.gz %{_mandir}/man8/systemd-oomd.8.gz
%{_mandir}/man8/systemd-oomd.service.8.gz %{_mandir}/man8/systemd-oomd.service.8.gz
%if %{with sd_boot} %if %{with sd_boot}
@ -59,13 +42,8 @@
%{_mandir}/man8/systemd-sysupdate.8.gz %{_mandir}/man8/systemd-sysupdate.8.gz
%{_mandir}/man8/systemd-sysupdate.service.8.gz %{_mandir}/man8/systemd-sysupdate.service.8.gz
%{_mandir}/man8/systemd-sysupdate.timer.8.gz %{_mandir}/man8/systemd-sysupdate.timer.8.gz
%{_mandir}/man8/systemd-userdbd.8.gz
%{_mandir}/man8/systemd-userdbd.service.8.gz
%{_pam_moduledir}/pam_systemd_home.so
%{_systemd_util_dir}/system/initrd-root-fs.target.wants/systemd-repart.service %{_systemd_util_dir}/system/initrd-root-fs.target.wants/systemd-repart.service
%{_systemd_util_dir}/system/sysinit.target.wants/systemd-repart.service %{_systemd_util_dir}/system/sysinit.target.wants/systemd-repart.service
%{_systemd_util_dir}/systemd-homed
%{_systemd_util_dir}/systemd-homework
%if %{with sd_boot} %if %{with sd_boot}
%{_systemd_util_dir}/systemd-measure %{_systemd_util_dir}/systemd-measure
%endif %endif
@ -74,7 +52,6 @@
%{_systemd_util_dir}/systemd-pcrphase %{_systemd_util_dir}/systemd-pcrphase
%endif %endif
%{_systemd_util_dir}/systemd-sysupdate %{_systemd_util_dir}/systemd-sysupdate
%{_systemd_util_dir}/systemd-userdbd
%{_systemd_util_dir}/systemd-userwork %{_systemd_util_dir}/systemd-userwork
%if %{with sd_boot} %if %{with sd_boot}
%{_systemd_util_dir}/ukify %{_systemd_util_dir}/ukify
@ -86,8 +63,6 @@
%{_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.service %{_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.service
%{_unitdir}/sysinit.target.wants/systemd-pcrphase.service %{_unitdir}/sysinit.target.wants/systemd-pcrphase.service
%endif %endif
%{_unitdir}/systemd-homed-activate.service
%{_unitdir}/systemd-homed.service
%{_unitdir}/systemd-oomd.service %{_unitdir}/systemd-oomd.service
%{_unitdir}/systemd-oomd.socket %{_unitdir}/systemd-oomd.socket
%if %{with sd_boot} %if %{with sd_boot}
@ -103,5 +78,3 @@
%{_unitdir}/systemd-sysupdate-reboot.timer %{_unitdir}/systemd-sysupdate-reboot.timer
%{_unitdir}/systemd-sysupdate.service %{_unitdir}/systemd-sysupdate.service
%{_unitdir}/systemd-sysupdate.timer %{_unitdir}/systemd-sysupdate.timer
%{_unitdir}/systemd-userdbd.service
%{_unitdir}/systemd-userdbd.socket

23
files.homed Normal file
View File

@ -0,0 +1,23 @@
#
# Please keep the list sorted (with `LC_ALL=C sort`).
#
%config(noreplace) %{_sysconfdir}/systemd/homed.conf
%{_bindir}/homectl
%{_datadir}/bash-completion/completions/homectl
%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Home.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Manager.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.home1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.home1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.home1.policy
%{_mandir}/man1/homectl.1.gz
%{_mandir}/man5/homed.conf.5.gz
%{_mandir}/man5/homed.conf.d.5.gz
%{_mandir}/man5/org.freedesktop.home1.5.gz
%{_mandir}/man8/pam_systemd_home.8.gz
%{_mandir}/man8/systemd-homed.8.gz
%{_mandir}/man8/systemd-homed.service.8.gz
%{_pam_moduledir}/pam_systemd_home.so
%{_systemd_util_dir}/systemd-homed
%{_systemd_util_dir}/systemd-homework
%{_unitdir}/systemd-homed-activate.service
%{_unitdir}/systemd-homed.service

View File

@ -123,6 +123,7 @@
%{_bindir}/systemd-umount %{_bindir}/systemd-umount
%{_bindir}/timedatectl %{_bindir}/timedatectl
%if %{without bootstrap} %if %{without bootstrap}
%{_bindir}/userdbctl
%{_datadir}/bash-completion/completions/busctl %{_datadir}/bash-completion/completions/busctl
%{_datadir}/bash-completion/completions/hostnamectl %{_datadir}/bash-completion/completions/hostnamectl
%{_datadir}/bash-completion/completions/journalctl %{_datadir}/bash-completion/completions/journalctl
@ -261,6 +262,7 @@
%{_mandir}/man1/systemd-umount.1.gz %{_mandir}/man1/systemd-umount.1.gz
%{_mandir}/man1/systemd.1.gz %{_mandir}/man1/systemd.1.gz
%{_mandir}/man1/timedatectl.1.gz %{_mandir}/man1/timedatectl.1.gz
%{_mandir}/man1/userdbctl.1.gz
%{_mandir}/man5/binfmt.d.5.gz %{_mandir}/man5/binfmt.d.5.gz
%{_mandir}/man5/dnssec-trust-anchors.d.5.gz %{_mandir}/man5/dnssec-trust-anchors.d.5.gz
%{_mandir}/man5/environment.d.5.gz %{_mandir}/man5/environment.d.5.gz
@ -394,6 +396,8 @@
%{_mandir}/man8/systemd-update-utmp.service.8.gz %{_mandir}/man8/systemd-update-utmp.service.8.gz
%{_mandir}/man8/systemd-user-sessions.8.gz %{_mandir}/man8/systemd-user-sessions.8.gz
%{_mandir}/man8/systemd-user-sessions.service.8.gz %{_mandir}/man8/systemd-user-sessions.service.8.gz
%{_mandir}/man8/systemd-userdbd.8.gz
%{_mandir}/man8/systemd-userdbd.service.8.gz
%{_mandir}/man8/systemd-xdg-autostart-generator.8.gz %{_mandir}/man8/systemd-xdg-autostart-generator.8.gz
%endif %endif
%{_modprobedir}/systemd.conf %{_modprobedir}/systemd.conf
@ -430,6 +434,9 @@
%{_systemd_util_dir}/systemd-update-utmp %{_systemd_util_dir}/systemd-update-utmp
%{_systemd_util_dir}/systemd-user-runtime-dir %{_systemd_util_dir}/systemd-user-runtime-dir
%{_systemd_util_dir}/systemd-user-sessions %{_systemd_util_dir}/systemd-user-sessions
%if %{without bootstrap}
%{_systemd_util_dir}/systemd-userdbd
%endif
%{_systemd_util_dir}/systemd-xdg-autostart-condition %{_systemd_util_dir}/systemd-xdg-autostart-condition
%{_systemd_util_dir}/user-generators/systemd-xdg-autostart-generator %{_systemd_util_dir}/user-generators/systemd-xdg-autostart-generator
%{_systemd_util_dir}/user-preset/90-systemd.preset %{_systemd_util_dir}/user-preset/90-systemd.preset
@ -608,6 +615,10 @@
%{_unitdir}/systemd-update-done.service %{_unitdir}/systemd-update-done.service
%{_unitdir}/systemd-update-utmp.service %{_unitdir}/systemd-update-utmp.service
%{_unitdir}/systemd-user-sessions.service %{_unitdir}/systemd-user-sessions.service
%if %{without bootstrap}
%{_unitdir}/systemd-userdbd.service
%{_unitdir}/systemd-userdbd.socket
%endif
%{_unitdir}/time-set.target %{_unitdir}/time-set.target
%{_unitdir}/time-sync.target %{_unitdir}/time-sync.target
%{_unitdir}/timers.target %{_unitdir}/timers.target

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Fri Jul 28 14:40:48 UTC 2023 - Franck Bui <fbui@suse.com>
- Drop 0003-strip-the-domain-part-from-etc-hostname-when-setting.patch
/etc/hostname is supposed to contain the static host name of the system. This
patch was used to work around cases where users incorrectly save the FQDN
instead. However this is incorrect and not consistent with what
systemd-hostnamed does and what other distributions do. Also assuming that
/etc/hostname will contain the system host name only removes any ambiguities
since the host name can contain a period.
/etc/hosts is usually where one sets the domain name by aliasing the host name
to the FQDN.
Note that the installer used to save the FQDN in /etc/hostname but this has
been fixed since several years now (bsc#972463).
-------------------------------------------------------------------
Tue Jul 25 06:30:55 UTC 2023 - Franck Bui <fbui@suse.com>
- systemd-homed is no more considered as experimental
It's been moved to its own dedicated sub-package "systemd-homed".
-------------------------------------------------------------------
Mon Jul 24 14:29:35 UTC 2023 - Franck Bui <fbui@suse.com>
- systemd-userdb is no more considered as experimental (jsc#PED-2668)
As such it's been moved to the main package.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 18 08:54:44 UTC 2023 - Franck Bui <fbui@suse.com> Tue Jul 18 08:54:44 UTC 2023 - Franck Bui <fbui@suse.com>
@ -836,7 +868,7 @@ Wed Jun 1 07:20:05 UTC 2022 - Franck Bui <fbui@suse.com>
This includes the following bug fixes: This includes the following bug fixes:
- upstream commit e6b169418369abbc88c8f622e02e1d704a23d4ef (bsc#1137373 bsc#1181658 bsc#1194708 bsc#1195157 bsc#1197570) - upstream commit e6b169418369abbc88c8f622e02e1d704a23d4ef (bsc#1137373 bsc#1181658 bsc#1194708 bsc#1195157 bsc#1197570)
- upstream commit 3a3b022d2cc112803ea7b9beea98bbcad110368a (bsc#1212434) - upstream commit 3a3b022d2cc112803ea7b9beea98bbcad110368a (bsc#1212434 bsc#1213575)
* Rebased 0001-conf-parser-introduce-early-drop-ins.patch * Rebased 0001-conf-parser-introduce-early-drop-ins.patch

View File

@ -38,6 +38,7 @@
%define mini -mini %define mini -mini
%bcond_without bootstrap %bcond_without bootstrap
%bcond_with coredump %bcond_with coredump
%bcond_with homed
%bcond_with importd %bcond_with importd
%bcond_with journal_remote %bcond_with journal_remote
%bcond_with machined %bcond_with machined
@ -52,6 +53,7 @@
%define mini %nil %define mini %nil
%bcond_with bootstrap %bcond_with bootstrap
%bcond_without coredump %bcond_without coredump
%bcond_without homed
%bcond_without importd %bcond_without importd
%bcond_without journal_remote %bcond_without journal_remote
%bcond_without machined %bcond_without machined
@ -188,6 +190,7 @@ Source205: files.sysvcompat
Source206: files.uefi-boot Source206: files.uefi-boot
Source207: files.experimental Source207: files.experimental
Source208: files.coredump Source208: files.coredump
Source209: files.homed
# #
# All changes backported from upstream are tracked by the git repository, which # All changes backported from upstream are tracked by the git repository, which
@ -199,13 +202,12 @@ Source208: files.coredump
# get rid of one of them ! # get rid of one of them !
# #
Patch1: 0001-restore-var-run-and-var-lock-bind-mount-if-they-aren.patch Patch1: 0001-restore-var-run-and-var-lock-bind-mount-if-they-aren.patch
Patch2: 0002-rc-local-fix-ordering-startup-for-etc-init.d-boot.lo.patch Patch2: 0001-conf-parser-introduce-early-drop-ins.patch
Patch3: 0003-strip-the-domain-part-from-etc-hostname-when-setting.patch Patch3: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
%if %{with sysvcompat} %if %{with sysvcompat}
Patch8: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch Patch4: 0002-rc-local-fix-ordering-startup-for-etc-init.d-boot.lo.patch
Patch5: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch
%endif %endif
Patch10: 0001-conf-parser-introduce-early-drop-ins.patch
Patch12: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
# Patches listed below are put in quarantine. Normally all changes must go to # Patches listed below are put in quarantine. Normally all changes must go to
# upstream first and then are cherry-picked in the SUSE git repository. But for # upstream first and then are cherry-picked in the SUSE git repository. But for
@ -480,6 +482,43 @@ To activate this NSS module, you will need to include it in /etc/nsswitch.conf,
see nss-resolve(8) manpage for more details. see nss-resolve(8) manpage for more details.
%endif %endif
%if %{with homed}
%package homed
Summary: Home Area/User Account Manager
License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
%systemd_requires
BuildRequires: pkgconfig(fdisk)
BuildRequires: pkgconfig(libcryptsetup)
BuildRequires: pkgconfig(libfido2)
BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pwquality)
# These Recommends because some symbols of these libs are dlopen()ed by homed
Recommends: libfido2
Recommends: libpwquality1
Recommends: libqrencode4
%description homed
This package contains systemd-homed.service, a system service that manages home
directories of users. The home directories managed are self-contained, and thus
include the user's full metadata record in the home's data storage itself,
making them easy to migrate between machines; the user account and home
directory becoming the same concept.
This package also includes homectl(1), a tool to interact with systemd-homed and
PAM module to automatically mount home directories on user login.
See homectl(1) man page for instructions to create a new user account.
A description of the various storage mechanisms implemented by systemd-homed can
be found at https://systemd.io/HOME_DIRECTORY/.
Note that nss-systemd has still not been integrated into nsswitch and therefore
needs to be added manually into /etc/nsswitch.conf, see nss-systemd(8) man page
for an example on how to do that.
%endif
%if %{with portabled} %if %{with portabled}
%package portable %package portable
Summary: Systemd tools for portable services Summary: Systemd tools for portable services
@ -488,9 +527,8 @@ Requires: %{name} = %{version}-%{release}
%systemd_requires %systemd_requires
%description portable %description portable
Systemd tools to manage portable services. The feature is still Systemd tools to manage portable services. The feature is still considered
considered experimental so the package might change or vanish. experimental so the package might change or vanish. Use at own risk.
Use at own risk.
More information can be found online: More information can be found online:
@ -617,17 +655,8 @@ Requires: %{name} = %{version}-%{release}
# Needed by ukify # Needed by ukify
Requires: python3-pefile Requires: python3-pefile
%systemd_requires %systemd_requires
# These Recommends because some symbols of these libs are dlopen()ed by home stuff # fdisk is a build requirement for repart
Recommends: libfido2
Recommends: libpwquality1
Recommends: libqrencode4
# libfido2, libpwquality1 and libqrencode4 are build requirements for home stuff
BuildRequires: pkgconfig(libfido2)
BuildRequires: pkgconfig(libqrencode)
BuildRequires: pkgconfig(pwquality)
# fdisk and openssl are build requirements for home stuff and repart
BuildRequires: pkgconfig(fdisk) BuildRequires: pkgconfig(fdisk)
BuildRequires: pkgconfig(openssl)
%description experimental %description experimental
This package contains optional extra services that are considered as previews This package contains optional extra services that are considered as previews
@ -642,24 +671,7 @@ change without the usual backwards-compatibility promises.
Components that turn out to be stable and considered as fully supported will be 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. merged into the main package or moved into a dedicated package.
Currently this package contains: homed, repart, userdbd, oomd, measure, Currently this package contains: repart, oomd, measure, pcrphase and ukify.
pcrphase and ukify.
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). Have fun (at your own risk).
%endif %endif
@ -733,8 +745,10 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
-Dtpm=%{when_not bootstrap} \ -Dtpm=%{when_not bootstrap} \
-Dtpm2=%{when_not bootstrap} \ -Dtpm2=%{when_not bootstrap} \
-Dtranslations=%{when_not bootstrap} \ -Dtranslations=%{when_not bootstrap} \
-Duserdb=%{when_not bootstrap} \
\ \
-Dcoredump=%{when coredump} \ -Dcoredump=%{when coredump} \
-Dhomed=%{when homed} \
-Dimportd=%{when importd} \ -Dimportd=%{when importd} \
-Dmachined=%{when machined} \ -Dmachined=%{when machined} \
-Dnetworkd=%{when networkd} \ -Dnetworkd=%{when networkd} \
@ -756,11 +770,9 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
-Ddns-over-tls=%{when resolved openssl} \ -Ddns-over-tls=%{when resolved openssl} \
-Dresolve=%{when resolved} \ -Dresolve=%{when resolved} \
\ \
-Dhomed=%{when experimental} \
-Doomd=%{when experimental} \ -Doomd=%{when experimental} \
-Drepart=%{when experimental} \ -Drepart=%{when experimental} \
-Dsysupdate=%{when experimental} \ -Dsysupdate=%{when experimental} \
-Duserdb=%{when experimental} \
\ \
-Dtests=%{when testsuite unsafe} \ -Dtests=%{when testsuite unsafe} \
-Dinstall-tests=%{when testsuite} -Dinstall-tests=%{when testsuite}
@ -996,6 +1008,7 @@ if [ $1 -gt 1 ]; then
%systemd_pre getty@.service %systemd_pre getty@.service
%systemd_pre systemd-timesyncd.service %systemd_pre systemd-timesyncd.service
%systemd_pre systemd-journald-audit.socket %systemd_pre systemd-journald-audit.socket
%systemd_pre systemd-userdbd.socket
fi fi
%post %post
@ -1039,6 +1052,7 @@ if [ $1 -gt 1 ]; then
%systemd_post getty@.service %systemd_post getty@.service
%systemd_post systemd-timesyncd.service %systemd_post systemd-timesyncd.service
%systemd_post systemd-journald-audit.socket %systemd_post systemd-journald-audit.socket
%systemd_post systemd-userdbd.socket
fi fi
# Run the hacks/fixups to clean up old garbages left by (very) old versions of # Run the hacks/fixups to clean up old garbages left by (very) old versions of
@ -1046,9 +1060,10 @@ fi
%{_systemd_util_dir}/rpm/fixlet-systemd-post.sh $1 || : %{_systemd_util_dir}/rpm/fixlet-systemd-post.sh $1 || :
%postun %postun
# Avoid restarting logind until fixed upstream (issue #1163)
%systemd_postun_with_restart systemd-journald.service %systemd_postun_with_restart systemd-journald.service
%systemd_postun_with_restart systemd-timesyncd.service %systemd_postun_with_restart systemd-timesyncd.service
# Avoid restarting logind until fixed upstream (issue #1163) %systemd_postun_with_restart systemd-userdbd.service
%pre -n udev%{?mini} %pre -n udev%{?mini}
# Units listed below can be enabled at installation accoding to their preset # Units listed below can be enabled at installation accoding to their preset
@ -1203,6 +1218,26 @@ fi
%endif %endif
%endif %endif
%if %{with homed}
%pre homed
%systemd_pre systemd-homed.service
%post homed
if [ $1 -eq 1 ]; then
pam-config --add --systemd-homed || :
fi
%systemd_post systemd-homed.service
%preun homed
%systemd_preun systemd-homed.service
if [ $1 -eq 0 ]; then
pam-config --delete --systemd-homed || :
fi
%postun homed
%systemd_postun_with_restart systemd-homed.service
%endif
%if %{with portabled} %if %{with portabled}
%pre portable %pre portable
%systemd_pre systemd-portabled.service %systemd_pre systemd-portabled.service
@ -1217,30 +1252,26 @@ fi
%systemd_preun systemd-portabled.service %systemd_preun systemd-portabled.service
%postun portable %postun portable
%systemd_postun systemd-portabled.service %systemd_postun_with_restart systemd-portabled.service
%endif %endif
%if %{with experimental} %if %{with experimental}
%pre experimental %pre experimental
%systemd_pre systemd-homed.service %systemd_pre systemd-homed.service
%systemd_pre systemd-oomd.service systemd-oomd.socket %systemd_pre systemd-oomd.service systemd-oomd.socket
%systemd_pre systemd-userdbd.service systemd-userdbd.socket
%post experimental %post experimental
%sysusers_create systemd-oom.conf %sysusers_create systemd-oom.conf
%systemd_post systemd-homed.service %systemd_post systemd-homed.service
%systemd_post systemd-oomd.service systemd-oomd.socket %systemd_post systemd-oomd.service systemd-oomd.socket
%systemd_post systemd-userdbd.service systemd-userdbd.socket
%preun experimental %preun experimental
%systemd_preun systemd-homed.service %systemd_preun systemd-homed.service
%systemd_preun systemd-oomd.service systemd-oomd.socket %systemd_preun systemd-oomd.service systemd-oomd.socket
%systemd_preun systemd-userdbd.service systemd-userdbd.socket
%postun experimental %postun experimental
%systemd_postun systemd-homed.service %systemd_postun systemd-homed.service
%systemd_postun systemd-oomd.service systemd-oomd.socket %systemd_postun systemd-oomd.service systemd-oomd.socket
%systemd_postun systemd-userdbd.service systemd-userdbd.socket
%endif %endif
# File trigger definitions # File trigger definitions
@ -1330,6 +1361,12 @@ fi
%ghost %dir %{_localstatedir}/log/journal/remote %ghost %dir %{_localstatedir}/log/journal/remote
%endif %endif
%if %{with homed}
%files homed
%defattr(-,root,root)
%include %{SOURCE209}
%endif
%if %{with portabled} %if %{with portabled}
%files portable %files portable
%defattr(-,root,root) %defattr(-,root,root)