From 43c2a09ec138e0f0c54bd483b78ca2aed2b9b91d Mon Sep 17 00:00:00 2001 From: Christian Glombek Date: Sep 07 2020 14:15:52 +0000 Subject: [PATCH 1/2] Create shared, sysusers and tmpfiles sub-packages Splits libsystemd-shared object, systemd-sysusers and systemd-tmpfiles into their own subpackages. --- diff --git a/split-files.py b/split-files.py index f3e3aa6..293beed 100644 --- a/split-files.py +++ b/split-files.py @@ -23,6 +23,9 @@ o_devel = open('.file-list-devel', 'w') o_container = open('.file-list-container', 'w') o_remote = open('.file-list-remote', 'w') o_tests = open('.file-list-tests', 'w') +o_shared = open('.file-list-shared', 'w') +o_sysusers = open('.file-list-sysusers', 'w') +o_tmpfiles = open('.file-list-tmpfiles', 'w') o_rest = open('.file-list-rest', 'w') for file in files(buildroot): n = file.path[1:] @@ -51,6 +54,12 @@ for file in files(buildroot): o = o_pam elif '/rpm/' in n: o = o_rpm_macros + elif re.search(r'/libsystemd-shared-...\.so$|/lib/systemd$', n, re.X): + o = o_shared + elif re.search(r'sysusers(?!.*\.conf)', n, re.X): + o = o_sysusers + elif re.search(r'tmpfiles(?!.*\.conf)', n, re.X): + o = o_tmpfiles elif re.search(r'/lib.*\.pc|/man3/|/usr/include|(?= 1.9.18 Requires: %{name}-pam = %{version}-%{release} Requires: %{name}-rpm-macros = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-shared = %{version}-%{release} +Requires: %{name}-sysusers = %{version}-%{release} +Requires: %{name}-tmpfiles = %{version}-%{release} Recommends: diffutils Requires: util-linux Recommends: libxkbcommon%{?_isa} @@ -307,6 +310,44 @@ and to write journal files from serialized journal contents. This package contains systemd-journal-gatewayd, systemd-journal-remote, and systemd-journal-upload. +%package shared +Summary: Shared library object for systemd +License: LGPLv2+ + +%description shared +This package contains libsystemd-shared-%(c=%{version}; echo ${c:0:2}).so +and owns the %{_prefix}/lib/systemd directory. + +%package sysusers +Summary: Declarative allocation of system users and groups +Requires: %{name}-shared%{?_isa} = %{version}-%{release} +License: LGPLv2+ + +%description sysusers +Systemd-sysusers uses the files from sysusers.d directory to create system +users and groups and to add users to groups, at package installation or boot +time. + +This tool may be used to allocate system users and groups only, it is not +useful for creating non-system (i.e. regular, "human") users and groups, +as it accesses /etc/passwd and /etc/group directly, bypassing any more +complex user databases, for example any database involving NIS or LDAP. + +%package tmpfiles +Summary: Creates, deletes and cleans up volatile and temporary files and directories +Requires: %{name}-shared%{?_isa} = %{version}-%{release} +License: LGPLv2+ + +%description tmpfiles +Systemd-tmpfiles uses the files from tmpfiles.d to create volatile files +and directories during boot and to do periodic cleanup afterwards. + +tmpfiles.d configuration files provide a generic mechanism to define the +creation of regular files, directories, pipes, and device nodes, adjustments +to their access mode, ownership, attributes, quota assignments, and contents, +and finally their time-based removal. It is mostly commonly used for volatile +and temporary files and directories. + %package tests Summary: Internal unit tests for systemd Requires: %{name}%{?_isa} = %{version}-%{release} @@ -801,9 +842,20 @@ fi %files journal-remote -f .file-list-remote +%files shared -f .file-list-shared + +%files sysusers -f .file-list-sysusers + +%files tmpfiles -f .file-list-tmpfiles + %files tests -f .file-list-tests %changelog +* Mon Sep 7 2020 Christian Glombek - 246.4-2 +- Create shared, sysusers and tmpfiles sub-packages: + Splits libsystemd-shared object, systemd-sysusers and systemd-tmpfiles + into their own subpackages + * Wed Sep 2 2020 Zbigniew Jędrzejewski-Szmek - 246.4-1 - Update to latest stable version: a rework of how the unit cache mtime works (hopefully #1872068, #1871327, #1867930), plus various fixes to From e6e00fde41462bcc2602dbeb55a1198e093eeeef Mon Sep 17 00:00:00 2001 From: Christian Glombek Date: Sep 07 2020 16:53:38 +0000 Subject: [PATCH 2/2] Split out networkd sub-package And add it to main package as recommended dependency. --- diff --git a/split-files.py b/split-files.py index 293beed..41c20aa 100644 --- a/split-files.py +++ b/split-files.py @@ -24,6 +24,7 @@ o_container = open('.file-list-container', 'w') o_remote = open('.file-list-remote', 'w') o_tests = open('.file-list-tests', 'w') o_shared = open('.file-list-shared', 'w') +o_networkd = open('.file-list-networkd', 'w') o_sysusers = open('.file-list-sysusers', 'w') o_tmpfiles = open('.file-list-tmpfiles', 'w') o_rest = open('.file-list-rest', 'w') @@ -56,6 +57,8 @@ for file in files(buildroot): o = o_rpm_macros elif re.search(r'/libsystemd-shared-...\.so$|/lib/systemd$', n, re.X): o = o_shared + elif re.search(r'networkd(?!.*\.conf)', n, re.X): + o = o_networkd elif re.search(r'sysusers(?!.*\.conf)', n, re.X): o = o_sysusers elif re.search(r'tmpfiles(?!.*\.conf)', n, re.X): diff --git a/systemd.spec b/systemd.spec index 5dcac14..997554d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -153,6 +153,7 @@ Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-shared = %{version}-%{release} Requires: %{name}-sysusers = %{version}-%{release} Requires: %{name}-tmpfiles = %{version}-%{release} +Recommends: %{name}-networkd = %{version}-%{release} Recommends: diffutils Requires: util-linux Recommends: libxkbcommon%{?_isa} @@ -310,6 +311,20 @@ and to write journal files from serialized journal contents. This package contains systemd-journal-gatewayd, systemd-journal-remote, and systemd-journal-upload. +%package networkd +Summary: A system service that manages network configurations +Requires: %{name}%{?_isa} = %{version}-%{release} +License: LGPLv2+ +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description networkd +%{summary}. + +It detects and configures network devices as they appear, +as well as creating virtual network devices. + %package shared Summary: Shared library object for systemd License: LGPLv2+ @@ -668,8 +683,6 @@ if [ $1 -eq 0 ] ; then serial-getty@.service \ console-getty.service \ debug-shell.service \ - systemd-networkd.service \ - systemd-networkd-wait-online.service \ systemd-resolved.service \ systemd-homed.service \ >/dev/null || : @@ -804,6 +817,14 @@ fi %systemd_postun_with_restart systemd-journal-upload.service %firewalld_reload +%preun networkd +if [ $1 -eq 0 ] ; then + systemctl disable --quiet \ + systemd-networkd.service \ + systemd-networkd-wait-online.service \ + >/dev/null || : +fi + %global _docdir_fmt %{name} %files -f %{name}.lang -f .file-list-rest @@ -842,6 +863,8 @@ fi %files journal-remote -f .file-list-remote +%files networkd -f .file-list-networkd + %files shared -f .file-list-shared %files sysusers -f .file-list-sysusers @@ -855,6 +878,7 @@ fi - Create shared, sysusers and tmpfiles sub-packages: Splits libsystemd-shared object, systemd-sysusers and systemd-tmpfiles into their own subpackages +- Split out networkd sub-package and add to main package as recommended dependency * Wed Sep 2 2020 Zbigniew Jędrzejewski-Szmek - 246.4-1 - Update to latest stable version: a rework of how the unit cache mtime works