Accepting request 798553 from home:fbui:systemd:openSUSE-Factory

- Drop legacy /sbin/{udevd,udevadm) symlinks hopefully for good
  Since boo#1160890 has been fixed since a couple of months now.

- Drop content of /usr/share/factory/ (bsc#1170146)
  systemd ships several files in /usr/share/factory/etc that are
  copied to /etc in case those files are missing there. Unfortunately
  the content does not match the openSUSE defaults.

- Drop most of the tmpfiles that deal with generic paths (bsc#1078466)
  They are problematic because some of them conflict with SUSE
  defaults. Therefore it seems better to let the revelant packages
  owning these paths to provide their own definitions instead.

OBS-URL: https://build.opensuse.org/request/show/798553
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1097
This commit is contained in:
Franck Bui 2020-04-28 07:44:28 +00:00 committed by Git OBS Bridge
parent d0e92b5fd6
commit 96b3e78070
7 changed files with 127 additions and 86 deletions

View File

@ -1,38 +0,0 @@
From ca2788b478d763e49d2463378272d9fef2ef1bf3 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Mon, 9 May 2016 16:10:21 +0200
Subject: [PATCH 1/1] Fix /run/lock group to follow openSUSE policy
This is a partial import of commit
88013cabb939e4bd7347ce324c9eb9c1a45582de part of SUSE/v210 branch.
However /var/lock/{subsys,lockdev} are left alone and will be created
because:
- a bug was opened requesting /var/lock/subsys, see commit
0671c57670fc09e0cb970d081a1b523ea9c62b5b.
- creating /var/lock/lockdev shouldn't hurt.
[fixes: bnc#733523]
---
tmpfiles.d/legacy.conf | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf
index 62e2ae0986..415918f407 100644
--- a/tmpfiles.d/legacy.conf
+++ b/tmpfiles.d/legacy.conf
@@ -10,7 +10,8 @@
# These files are considered legacy and are unnecessary on legacy-free
# systems.
-d /run/lock 0755 root root -
+# On openSUSE, /run/lock is owned by the 'lock' group.
+d /run/lock 0775 root lock -
L /var/lock - - - - ../run/lock
# /run/lock/subsys is used for serializing SysV service execution, and
--
2.16.4

View File

@ -1,26 +0,0 @@
From b66a7b4b5aa25a1ffb4b76fe9545046dabd92c03 Mon Sep 17 00:00:00 2001
From: Reinhard Max <max@suse.de>
Date: Fri, 19 Apr 2013 16:56:26 +0200
Subject: [PATCH 1/1] SUSE policy: do not clean /tmp by default.
Fix regression in the default for tmp auto-deletion (FATE#314974).
---
tmpfiles.d/tmp.conf | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
index fe5225d751..dedc7569e1 100644
--- a/tmpfiles.d/tmp.conf
+++ b/tmpfiles.d/tmp.conf
@@ -8,5 +8,6 @@
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override
-q /tmp 1777 root root 10d
-q /var/tmp 1777 root root 30d
+# SUSE policy: we don't clean those directories
+q /tmp 1777 root root -
+q /var/tmp 1777 root root -
--
2.16.4

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Mon Apr 27 15:45:50 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop legacy /sbin/{udevd,udevadm) symlinks hopefully for good
Since boo#1160890 has been fixed since a couple of months now.
-------------------------------------------------------------------
Mon Apr 27 14:50:36 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop content of /usr/share/factory/ (bsc#1170146)
systemd ships several files in /usr/share/factory/etc that are
copied to /etc in case those files are missing there. Unfortunately
the content does not match the openSUSE defaults.
-------------------------------------------------------------------
Mon Apr 27 14:33:35 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop most of the tmpfiles that deal with generic paths (bsc#1078466)
They are problematic because some of them conflict with SUSE
defaults. Therefore it seems better to let the revelant packages
owning these paths to provide their own definitions instead.
-------------------------------------------------------------------
Fri Apr 24 07:38:48 UTC 2020 - Franck Bui <fbui@suse.com>

View File

@ -151,6 +151,7 @@ Source2: systemd-user
Source3: systemd-sysv-convert
Source4: systemd-sysv-install
%endif
Source5: tmpfiles-suse.conf
Source6: baselibs.conf
Source11: after-local.service
Source14: kbd-model-map.legacy
@ -165,9 +166,7 @@ Source102: scripts-systemd-migrate-sysconfig-i18n.sh
# broken in upstream and need an urgent fix. Even in this case, the
# patches are temporary and should be removed as soon as a fix is
# merged by upstream.
Patch1: 0001-SUSE-policy-do-not-clean-tmp-by-default.patch
Patch2: 0001-Fix-run-lock-group-to-follow-openSUSE-policy.patch
Patch3: 0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch
Patch1: 0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -582,12 +581,6 @@ rm %{buildroot}%{_sbindir}/resolvconf
rm %{buildroot}%{_mandir}/man1/resolvconf.1*
%endif
# FIXME: These obsolete symlinks are still needed by YaST so let's
# keep them until boo#1160890 is fixed.
mkdir -p %{buildroot}/sbin
ln -sf %{_bindir}/udevadm %{buildroot}/sbin/udevadm
ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd
%if %{with sysvcompat}
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/sysv-convert
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/migrated
@ -741,6 +734,35 @@ rm -f %{buildroot}%{_presetdir}/*.preset
echo 'disable *' >%{buildroot}%{_presetdir}/99-default.preset
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.
#
# 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.
#
# 4. And to finish, 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.
rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf
install -m 644 %{S:5} %{buildroot}%{_tmpfilesdir}/suse.conf
# The content of the files shipped by systemd doesn't match the
# defaults used by SUSE. Don't ship those files but leave the decision
# to use the mechanism to the individual packages that actually
# consume those configs (like glibc or pam), see bsc#1170146.
rm -fr %{buildroot}%{_datadir}/factory/*
# Add entries for xkeyboard-config converted keymaps; mappings, which
# already exist in original systemd mapping table are being ignored
# though, i.e. not overwritten; needed as long as YaST uses console
@ -1353,8 +1375,6 @@ fi
%files -n udev%{?mini}
%defattr(-,root,root)
/sbin/udevd
/sbin/udevadm
%{_bindir}/udevadm
%{_bindir}/systemd-hwdb
%dir %{_prefix}/lib/udev/

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Mon Apr 27 15:45:50 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop legacy /sbin/{udevd,udevadm) symlinks hopefully for good
Since boo#1160890 has been fixed since a couple of months now.
-------------------------------------------------------------------
Mon Apr 27 14:50:36 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop content of /usr/share/factory/ (bsc#1170146)
systemd ships several files in /usr/share/factory/etc that are
copied to /etc in case those files are missing there. Unfortunately
the content does not match the openSUSE defaults.
-------------------------------------------------------------------
Mon Apr 27 14:33:35 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop most of the tmpfiles that deal with generic paths (bsc#1078466)
They are problematic because some of them conflict with SUSE
defaults. Therefore it seems better to let the revelant packages
owning these paths to provide their own definitions instead.
-------------------------------------------------------------------
Fri Apr 24 07:38:48 UTC 2020 - Franck Bui <fbui@suse.com>

View File

@ -149,6 +149,7 @@ Source2: systemd-user
Source3: systemd-sysv-convert
Source4: systemd-sysv-install
%endif
Source5: tmpfiles-suse.conf
Source6: baselibs.conf
Source11: after-local.service
Source14: kbd-model-map.legacy
@ -163,9 +164,7 @@ Source102: scripts-systemd-migrate-sysconfig-i18n.sh
# broken in upstream and need an urgent fix. Even in this case, the
# patches are temporary and should be removed as soon as a fix is
# merged by upstream.
Patch1: 0001-SUSE-policy-do-not-clean-tmp-by-default.patch
Patch2: 0001-Fix-run-lock-group-to-follow-openSUSE-policy.patch
Patch3: 0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch
Patch1: 0001-Revert-job-Don-t-mark-as-redundant-if-deps-are-relev.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -580,12 +579,6 @@ rm %{buildroot}%{_sbindir}/resolvconf
rm %{buildroot}%{_mandir}/man1/resolvconf.1*
%endif
# FIXME: These obsolete symlinks are still needed by YaST so let's
# keep them until boo#1160890 is fixed.
mkdir -p %{buildroot}/sbin
ln -sf %{_bindir}/udevadm %{buildroot}/sbin/udevadm
ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd
%if %{with sysvcompat}
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/sysv-convert
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/migrated
@ -739,6 +732,35 @@ rm -f %{buildroot}%{_presetdir}/*.preset
echo 'disable *' >%{buildroot}%{_presetdir}/99-default.preset
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.
#
# 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.
#
# 4. And to finish, 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.
rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf
install -m 644 %{S:5} %{buildroot}%{_tmpfilesdir}/suse.conf
# The content of the files shipped by systemd doesn't match the
# defaults used by SUSE. Don't ship those files but leave the decision
# to use the mechanism to the individual packages that actually
# consume those configs (like glibc or pam), see bsc#1170146.
rm -fr %{buildroot}%{_datadir}/factory/*
# Add entries for xkeyboard-config converted keymaps; mappings, which
# already exist in original systemd mapping table are being ignored
# though, i.e. not overwritten; needed as long as YaST uses console
@ -1351,8 +1373,6 @@ fi
%files -n udev%{?mini}
%defattr(-,root,root)
/sbin/udevd
/sbin/udevadm
%{_bindir}/udevadm
%{_bindir}/systemd-hwdb
%dir %{_prefix}/lib/udev/

15
tmpfiles-suse.conf Normal file
View File

@ -0,0 +1,15 @@
#
# See tmpfiles.d(5) for details
#
# Type Path Mode User Group Age Argument
# Legacy symlink. Maybe should be owned by util-linux ?
L+ /etc/mtab - - - - ../proc/self/mounts
# FIXME: Might be moved to lockded.
d /run/lock 0775 root lock -
# FIXME: Should these one be moved to shadow ?
f /var/log/wtmp 0664 root utmp -
f /var/log/btmp 0660 root utmp -
f /var/log/lastlog 0664 root utmp -