SHA256
1
0
forked from pool/systemd

Accepting request 415263 from home:jengelh:branches:Base:System

Split systemctl and tmpfiles into a separate package

The backstory is that %{?systemd_requires} in all kinds of .spec files
pulls in systemd, which is not always desirable. Upstream has come up
with some solution where they make use of a rpm tag (available in
4.10+) that is only about ordering - cf
2424b6bd71
. The commit explicitly states though, that "installing systemd
afterwards [...], does not result in the same outcome."

With this proposed change to our systemd.spec, we could have the cake
and eat it too:

* symlinks in /etc/systemd can be created at install time, permitting
the administrator to install/use systemd as init system in a container
at a later date (enabling "same outcome")

* mandatory tmp directories will be created at install time already,
so the administrator does not have to run `tmpfiles --root=/mycontainer`
before launching the (systemd-less) container.

* the only protruding dependency of systemctl.rpm is libgcrypt20,
i.e. comparatively light.

* the OrderWithRequires feature can be done independently

Sounds like a plan? @mpluskal too #boo980389

OBS-URL: https://build.opensuse.org/request/show/415263
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=942
This commit is contained in:
Marcus Meissner 2016-07-29 11:07:07 +00:00 committed by Git OBS Bridge
parent 00bec688d4
commit 7bff8388c6
4 changed files with 68 additions and 19 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Jul 26 11:07:25 UTC 2016 - jengelh@inai.de
- Split systemctl and tmpfiles into a separate package
-------------------------------------------------------------------
Sun Jul 17 03:41:05 UTC 2016 - asarai@suse.com
- Backport unified_cgroup_hierarchy fix for Linux >= 4.4. boo#989276
+ systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jun 18 16:17:36 UTC 2016 - arvidjaar@gmail.com Sat Jun 18 16:17:36 UTC 2016 - arvidjaar@gmail.com

View File

@ -114,6 +114,7 @@ Requires: netcfg
Requires: pam-config >= 0.79-5 Requires: pam-config >= 0.79-5
BuildRequires: pam-config >= 0.79-5 BuildRequires: pam-config >= 0.79-5
Requires: pwdutils Requires: pwdutils
Requires: systemctl = %version-%release
Requires: systemd-presets-branding Requires: systemd-presets-branding
Requires: sysvinit-tools Requires: sysvinit-tools
Requires: util-linux >= 2.27.1 Requires: util-linux >= 2.27.1
@ -261,6 +262,8 @@ Patch527: 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch
Patch528: 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch Patch528: 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch
# PATCH-FIX-UPSTREAM -- fixed after 228 # PATCH-FIX-UPSTREAM -- fixed after 228
Patch529: 0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch Patch529: 0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch
# PATCH-FIX-UPSTREAM -- fixed after 320
Patch530: systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch
# UDEV PATCHES # UDEV PATCHES
# ============ # ============
@ -286,7 +289,7 @@ Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch
Patch1012: 1012-Skip-persistent-device-link-creation-on-multipath-de.patch Patch1012: 1012-Skip-persistent-device-link-creation-on-multipath-de.patch
# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch # PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch
Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch
# PATCH-FIX-SUSE See bnc#882714 comment #51 # PATCH-FIX-SUSE See bnc#882714 comment #51
Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch
# PATCH-FIX-SUSE 1062-rules-set-default-permissions-for-GenWQE-devices.patch (bnc#890977) # PATCH-FIX-SUSE 1062-rules-set-default-permissions-for-GenWQE-devices.patch (bnc#890977)
Patch1062: 1062-rules-set-default-permissions-for-GenWQE-devices.patch Patch1062: 1062-rules-set-default-permissions-for-GenWQE-devices.patch
@ -385,6 +388,18 @@ This library provides several of the systemd C APIs:
* sd-login(3): APIs to introspect and monitor seat, login session and * sd-login(3): APIs to introspect and monitor seat, login session and
user status information on the local system. user status information on the local system.
%package -n systemctl
Summary: systemd essential helper programs
License: LGPL-2.1+
Group: System/Base
%description -n systemctl
This subpackage contains the "systemctl" and "tmpfiles" programs of
systemd, factored out to support RPM scriptlets making use of these
two. It is meant for container/chroot directories for which the
administrator intends not to use systemd as init system while still
maintaining the /etc/systemd links for a later time.
%package -n udev%{?mini} %package -n udev%{?mini}
Summary: A rule-based device node and kernel event manager Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
@ -471,8 +486,8 @@ Provides: syslog
Provides: sysvinit(syslog) Provides: sysvinit(syslog)
Requires(pre): /usr/bin/getent Requires(pre): /usr/bin/getent
Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupadd
Requires(post): /usr/bin/getent Requires(post): /usr/bin/getent
Requires(post): /usr/bin/setfacl Requires(post): /usr/bin/setfacl
Requires(post): /usr/bin/systemctl Requires(post): /usr/bin/systemctl
Requires(post): permissions Requires(post): permissions
Conflicts: otherproviders(syslog) Conflicts: otherproviders(syslog)
@ -607,6 +622,7 @@ cp %{SOURCE7} m4/
%patch527 -p1 %patch527 -p1
%patch528 -p1 %patch528 -p1
%patch529 -p1 %patch529 -p1
%patch530 -p1
# udev patches # udev patches
%patch1002 -p1 %patch1002 -p1
@ -816,7 +832,7 @@ cat << EOF > %{buildroot}%{_prefix}/lib/systemd/system/getty@tty1.service.d/nocl
TTYVTDisallocate=no TTYVTDisallocate=no
EOF EOF
#ensure we get the running kernel sysctl settings. #ensure we get the running kernel sysctl settings.
cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/current-kernel-sysctl.conf cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/current-kernel-sysctl.conf
d! /run/sysctl.d d! /run/sysctl.d
@ -886,7 +902,7 @@ do
ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/
done done
# add entries for xkeyboard-config converted keymaps; mappings, # add entries for xkeyboard-config converted keymaps; mappings,
# which already exist in original systemd mapping table are being # which already exist in original systemd mapping table are being
# ignored though, i.e. not overwritten # ignored though, i.e. not overwritten
if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then
@ -1152,7 +1168,6 @@ exit 0
%defattr(-,root,root) %defattr(-,root,root)
/bin/systemd /bin/systemd
/bin/systemd-ask-password /bin/systemd-ask-password
/bin/systemctl
%if %{with networkd} %if %{with networkd}
%{_bindir}/networkctl %{_bindir}/networkctl
%endif %endif
@ -1164,7 +1179,6 @@ exit 0
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_bindir}/machinectl %{_bindir}/machinectl
%endif %endif
%{_bindir}/systemctl
%{_bindir}/systemd-analyze %{_bindir}/systemd-analyze
%{_bindir}/coredumpctl %{_bindir}/coredumpctl
%{_bindir}/systemd-delta %{_bindir}/systemd-delta
@ -1181,7 +1195,6 @@ exit 0
%{_bindir}/systemd-loginctl %{_bindir}/systemd-loginctl
%{_bindir}/systemd-inhibit %{_bindir}/systemd-inhibit
%{_bindir}/systemd-tty-ask-password-agent %{_bindir}/systemd-tty-ask-password-agent
%{_bindir}/systemd-tmpfiles
%{_bindir}/systemd-machine-id-setup %{_bindir}/systemd-machine-id-setup
%{_bindir}/systemd-nspawn %{_bindir}/systemd-nspawn
%{_bindir}/systemd-stdio-bridge %{_bindir}/systemd-stdio-bridge
@ -1275,10 +1288,6 @@ exit 0
%dir %{_sysconfdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d
%{_libexecdir}/modules-load.d/sg.conf %{_libexecdir}/modules-load.d/sg.conf
%dir %{_libexecdir}/tmpfiles.d
%dir %{_sysconfdir}/tmpfiles.d
%{_libexecdir}/tmpfiles.d/*.conf
%dir %{_libexecdir}/binfmt.d %dir %{_libexecdir}/binfmt.d
%dir %{_sysconfdir}/binfmt.d %dir %{_sysconfdir}/binfmt.d
@ -1582,4 +1591,13 @@ exit 0
%endif %endif
%endif %endif
%files -n systemctl
%defattr(-,root,root)
/bin/systemctl
%_bindir/systemctl
%_bindir/systemd-tmpfiles
%dir %_sysconfdir/tmpfiles.d
%dir %_libexecdir/tmpfiles.d
%_libexecdir/tmpfiles.d/*.conf
%changelog %changelog

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 26 11:07:25 UTC 2016 - jengelh@inai.de
- Split systemctl and tmpfiles into a separate package
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jul 17 03:41:05 UTC 2016 - asarai@suse.com Sun Jul 17 03:41:05 UTC 2016 - asarai@suse.com

View File

@ -109,6 +109,7 @@ Requires: netcfg
Requires: pam-config >= 0.79-5 Requires: pam-config >= 0.79-5
BuildRequires: pam-config >= 0.79-5 BuildRequires: pam-config >= 0.79-5
Requires: pwdutils Requires: pwdutils
Requires: systemctl = %version-%release
Requires: systemd-presets-branding Requires: systemd-presets-branding
Requires: sysvinit-tools Requires: sysvinit-tools
Requires: util-linux >= 2.27.1 Requires: util-linux >= 2.27.1
@ -382,6 +383,18 @@ This library provides several of the systemd C APIs:
* sd-login(3): APIs to introspect and monitor seat, login session and * sd-login(3): APIs to introspect and monitor seat, login session and
user status information on the local system. user status information on the local system.
%package -n systemctl
Summary: systemd essential helper programs
License: LGPL-2.1+
Group: System/Base
%description -n systemctl
This subpackage contains the "systemctl" and "tmpfiles" programs of
systemd, factored out to support RPM scriptlets making use of these
two. It is meant for container/chroot directories for which the
administrator intends not to use systemd as init system while still
maintaining the /etc/systemd links for a later time.
%package -n udev%{?mini} %package -n udev%{?mini}
Summary: A rule-based device node and kernel event manager Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
@ -1150,7 +1163,6 @@ exit 0
%defattr(-,root,root) %defattr(-,root,root)
/bin/systemd /bin/systemd
/bin/systemd-ask-password /bin/systemd-ask-password
/bin/systemctl
%if %{with networkd} %if %{with networkd}
%{_bindir}/networkctl %{_bindir}/networkctl
%endif %endif
@ -1162,7 +1174,6 @@ exit 0
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_bindir}/machinectl %{_bindir}/machinectl
%endif %endif
%{_bindir}/systemctl
%{_bindir}/systemd-analyze %{_bindir}/systemd-analyze
%{_bindir}/coredumpctl %{_bindir}/coredumpctl
%{_bindir}/systemd-delta %{_bindir}/systemd-delta
@ -1179,7 +1190,6 @@ exit 0
%{_bindir}/systemd-loginctl %{_bindir}/systemd-loginctl
%{_bindir}/systemd-inhibit %{_bindir}/systemd-inhibit
%{_bindir}/systemd-tty-ask-password-agent %{_bindir}/systemd-tty-ask-password-agent
%{_bindir}/systemd-tmpfiles
%{_bindir}/systemd-machine-id-setup %{_bindir}/systemd-machine-id-setup
%{_bindir}/systemd-nspawn %{_bindir}/systemd-nspawn
%{_bindir}/systemd-stdio-bridge %{_bindir}/systemd-stdio-bridge
@ -1273,10 +1283,6 @@ exit 0
%dir %{_sysconfdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d
%{_libexecdir}/modules-load.d/sg.conf %{_libexecdir}/modules-load.d/sg.conf
%dir %{_libexecdir}/tmpfiles.d
%dir %{_sysconfdir}/tmpfiles.d
%{_libexecdir}/tmpfiles.d/*.conf
%dir %{_libexecdir}/binfmt.d %dir %{_libexecdir}/binfmt.d
%dir %{_sysconfdir}/binfmt.d %dir %{_sysconfdir}/binfmt.d
@ -1580,4 +1586,13 @@ exit 0
%endif %endif
%endif %endif
%files -n systemctl
%defattr(-,root,root)
/bin/systemctl
%_bindir/systemctl
%_bindir/systemd-tmpfiles
%dir %_sysconfdir/tmpfiles.d
%dir %_libexecdir/tmpfiles.d
%_libexecdir/tmpfiles.d/*.conf
%changelog %changelog