Add Recommends for dlopened libs and move files into subpackages

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-12-09 23:10:44 +01:00
parent 1634b1b16a
commit b24b99d669
2 changed files with 55 additions and 8 deletions

View File

@ -85,6 +85,7 @@ for file in files(buildroot):
o = o_networkd
elif '.so.' in n:
o = o_libs
elif re.search(r'''udev(?!\.pc)|
hwdb|
bootctl|
@ -98,6 +99,7 @@ for file in files(buildroot):
random-seed|
modules-load|
timesync|
crypttab|
cryptsetup|
kmod|
quota|
@ -110,25 +112,35 @@ for file in files(buildroot):
repart|
gpt-auto|
volatile-root|
verity-setup|
veritysetup|
integritysetup|
integritytab|
remount-fs|
/boot$|
/boot/efi|
/kernel/|
/kernel$|
/modprobe.d
''', n, re.X):
/modprobe.d|
binfmt|
sysctl|
coredump|
homed|home1|
portabled|portable1
''', n, re.X): # coredumpctl, homectl, portablectl are included in the main package because
# they can be used to interact with remote daemons. Also, the user could be
# confused if those user-facing binaries are not available.
o = o_udev
elif re.search(r'''resolvectl|
resolved|
elif re.search(r'''resolved|resolve1|
systemd-resolve|
resolvconf|
resolve1\.
''', n, re.X):
# keep only nss-resolve in systemd
systemd\.(positive|negative)
''', n, re.X): # resolvectl and nss-resolve are in the main package.
o = o_resolve
elif re.search(r'10-oomd-.*defaults.conf|lib/systemd/oomd.conf.d', n, re.X):
o = o_oomd_defaults
elif n.endswith('.standalone'):
if 'tmpfiles' in n:
o = o_standalone_tmpfiles
@ -136,6 +148,7 @@ for file in files(buildroot):
o = o_standalone_sysusers
else:
assert False, 'Found .standalone not belonging to known packages'
else:
o = o_rest

View File

@ -216,6 +216,18 @@ Recommends: libpcre2-8.so.0%{?elf_suffix}
Recommends: libpwquality.so.1%{?elf_suffix}
Recommends: libpwquality.so.1(LIBPWQUALITY_1.0)%{?elf_bits}
Recommends: libqrencode.so.4%{?elf_suffix}
Recommends: libbpf.so.0%{?elf_suffix}
Recommends: libbpf.so.0(LIBBPF_0.4.0)%{?elf_bits}
# used by systemd-coredump and systemd-analyze
Recommends: libdw.so.1%{?elf_suffix}
Recommends: libdw.so.1(ELFUTILS_0.186)%{?elf_bits}
Recommends: libelf.so.1%{?elf_suffix}
Recommends: libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Recommends: libcryptsetup.so.12%{?elf_suffix}
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
%description
systemd is a system and service manager that runs as PID 1 and starts the rest
@ -299,6 +311,23 @@ Provides: udev = %{version}
Provides: udev%{_isa} = %{version}
Obsoletes: udev < 183
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Recommends: libcryptsetup.so.12%{?elf_suffix}
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
# used by systemd-coredump and systemd-analyze
Recommends: libdw.so.1%{?elf_suffix}
Recommends: libdw.so.1(ELFUTILS_0.186)%{?elf_bits}
Recommends: libelf.so.1%{?elf_suffix}
Recommends: libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
# used by home, cryptsetup, cryptenroll
Recommends: libfido2.so.1%{?elf_suffix}
Recommends: libtss2-esys.so.0%{?elf_suffix}
Recommends: libtss2-mu.so.0%{?elf_suffix}
Recommends: libtss2-rc.so.0%{?elf_suffix}
# https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c9
Suggests: systemd-bootchart
# https://bugzilla.redhat.com/show_bug.cgi?id=1408878
@ -313,6 +342,9 @@ This package contains systemd-udev and the rules and hardware database needed to
manage device nodes. This package is necessary on physical machines and in
virtual machines, but not in containers.
It also contains tools to manage encrypted home areas and secrets bound to the
machine.
%package container
# Name is the same as in Debian
Summary: Tools for containers and VMs
@ -367,6 +399,8 @@ devices.
Summary: Network Name Resolution manager
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{name} < 249~~
Requires: libidn2.so.0%{?elf_suffix}
Requires: libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
%description resolved
systemd-resolved is a system service that provides network name resolution to