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 o = o_networkd
elif '.so.' in n: elif '.so.' in n:
o = o_libs o = o_libs
elif re.search(r'''udev(?!\.pc)| elif re.search(r'''udev(?!\.pc)|
hwdb| hwdb|
bootctl| bootctl|
@ -98,6 +99,7 @@ for file in files(buildroot):
random-seed| random-seed|
modules-load| modules-load|
timesync| timesync|
crypttab|
cryptsetup| cryptsetup|
kmod| kmod|
quota| quota|
@ -110,25 +112,35 @@ for file in files(buildroot):
repart| repart|
gpt-auto| gpt-auto|
volatile-root| volatile-root|
verity-setup| veritysetup|
integritysetup|
integritytab|
remount-fs| remount-fs|
/boot$| /boot$|
/boot/efi| /boot/efi|
/kernel/| /kernel/|
/kernel$| /kernel$|
/modprobe.d /modprobe.d|
''', n, re.X): 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 o = o_udev
elif re.search(r'''resolvectl|
resolved| elif re.search(r'''resolved|resolve1|
systemd-resolve| systemd-resolve|
resolvconf| resolvconf|
resolve1\. systemd\.(positive|negative)
''', n, re.X): ''', n, re.X): # resolvectl and nss-resolve are in the main package.
# keep only nss-resolve in systemd
o = o_resolve o = o_resolve
elif re.search(r'10-oomd-.*defaults.conf|lib/systemd/oomd.conf.d', n, re.X): elif re.search(r'10-oomd-.*defaults.conf|lib/systemd/oomd.conf.d', n, re.X):
o = o_oomd_defaults o = o_oomd_defaults
elif n.endswith('.standalone'): elif n.endswith('.standalone'):
if 'tmpfiles' in n: if 'tmpfiles' in n:
o = o_standalone_tmpfiles o = o_standalone_tmpfiles
@ -136,6 +148,7 @@ for file in files(buildroot):
o = o_standalone_sysusers o = o_standalone_sysusers
else: else:
assert False, 'Found .standalone not belonging to known packages' assert False, 'Found .standalone not belonging to known packages'
else: else:
o = o_rest 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%{?elf_suffix}
Recommends: libpwquality.so.1(LIBPWQUALITY_1.0)%{?elf_bits} Recommends: libpwquality.so.1(LIBPWQUALITY_1.0)%{?elf_bits}
Recommends: libqrencode.so.4%{?elf_suffix} 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 %description
systemd is a system and service manager that runs as PID 1 and starts the rest 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} Provides: udev%{_isa} = %{version}
Obsoletes: udev < 183 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 # https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c9
Suggests: systemd-bootchart Suggests: systemd-bootchart
# https://bugzilla.redhat.com/show_bug.cgi?id=1408878 # 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 manage device nodes. This package is necessary on physical machines and in
virtual machines, but not in containers. virtual machines, but not in containers.
It also contains tools to manage encrypted home areas and secrets bound to the
machine.
%package container %package container
# Name is the same as in Debian # Name is the same as in Debian
Summary: Tools for containers and VMs Summary: Tools for containers and VMs
@ -367,6 +399,8 @@ devices.
Summary: Network Name Resolution manager Summary: Network Name Resolution manager
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: %{name} < 249~~ Obsoletes: %{name} < 249~~
Requires: libidn2.so.0%{?elf_suffix}
Requires: libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
%description resolved %description resolved
systemd-resolved is a system service that provides network name resolution to systemd-resolved is a system service that provides network name resolution to