SHA256
1
0
forked from pool/systemd

- Merge nss-resolved and nss-mymachines NSS plug-in modules into systemd-network

and systemd-container respectively.
  These modules are plug-in modules hence the shared library packaging policy
  doesn't apply for them. Moreover they're pretty useless alone without their
  respective systemd services, Hence let's reduce the number of sub-packages as
  the list keeps increasing.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1238
This commit is contained in:
Franck Bui 2022-01-31 10:16:32 +00:00 committed by Git OBS Bridge
parent fb4acfad52
commit 6cfe6f2376
5 changed files with 54 additions and 69 deletions

View File

@ -9,4 +9,3 @@ systemd
libsystemd0
libudev1
nss-myhostname
nss-mymachines

View File

@ -6,8 +6,11 @@
%if ! 0%{?bootstrap}
%{_datadir}/bash-completion/completions/systemd-nspawn
%{_datadir}/zsh/site-functions/_systemd-nspawn
%{_libdir}/libnss_mymachines.so.2
%{_mandir}/man1/systemd-nspawn.1.gz
%{_mandir}/man5/systemd.nspawn.5.gz
%{_mandir}/man8/libnss_mymachines.so.2.8.gz
%{_mandir}/man8/nss-mymachines.8.gz
%endif
%{_unitdir}/systemd-nspawn@.service

View File

@ -44,10 +44,13 @@
%{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.resolve1.policy
%{_datadir}/zsh/site-functions/_resolvectl
%{_libdir}/libnss_resolve.so.2
%{_mandir}/man1/resolvectl.1.gz
%{_mandir}/man5/org.freedesktop.resolve1.5.gz
%{_mandir}/man5/resolved.conf.5.gz
%{_mandir}/man5/resolved.conf.d.5.gz
%{_mandir}/man8/libnss_resolve.so.2.8.gz
%{_mandir}/man8/nss-resolve.8.gz
%{_mandir}/man8/systemd-resolved.8.gz
%{_mandir}/man8/systemd-resolved.service.8.gz
%{_systemd_util_dir}/resolv.conf

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Jan 28 16:04:36 UTC 2022 - Franck Bui <fbui@suse.com>
- Merge nss-resolved and nss-mymachines NSS plug-in modules into systemd-network
and systemd-container respectively.
These modules are plug-in modules hence the shared library packaging policy
doesn't apply for them. Moreover they're pretty useless alone without their
respective systemd services, Hence let's reduce the number of sub-packages as
the list keeps increasing.
-------------------------------------------------------------------
Thu Jan 27 10:50:50 UTC 2022 - Franck Bui <fbui@suse.com>

View File

@ -251,8 +251,8 @@ Conflicts: libudev-devel
%endif
%description devel
Development headers and files for libsystemd and libudev libraries. These files
are useful for developing applications linking to these libraries.
Development headers and files for libsystemd and libudev libraries for
developing and building applications linking to these libraries.
%package sysvinit
Summary: System V init tools
@ -301,6 +301,7 @@ License: GPL-2.0-only
URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
Requires: %{name} = %{version}-%{release}
%systemd_requires
Requires: filesystem
Requires: kmod
Requires: system-group-hardware
Requires: group(kvm)
@ -313,10 +314,8 @@ Conflicts: dracut < 044.1
Conflicts: filesystem < 11.5
Conflicts: mkinitrd < 2.7.0
Conflicts: util-linux < 2.16
Requires: filesystem
%if 0%{?bootstrap}
Provides: udev = %{version}-%{release}
Conflicts: libudev1
Conflicts: udev
# avoid kiwi picking it for bootstrap
Requires: this-is-only-for-build-envs
@ -362,20 +361,29 @@ Summary: Systemd tools for container management
License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
%systemd_requires
Obsoletes: nss-mymachines < %{version}-%{release}
Provides: nss-mymachines = %{version}-%{release}
Provides: systemd-container = %{version}-%{release}
Provides: systemd:%{_bindir}/systemd-nspawn
%if 0%{?bootstrap}
Conflicts: systemd-container
Provides: systemd-container = %{version}-%{release}
%endif
%description container
Systemd tools to spawn and manage containers and virtual machines.
This package contains systemd-nspawn, machinectl, systemd-machined,
and systemd-importd.
In addition, it also contains a plugin for the Name Service Switch (NSS),
providing host name resolution for all local containers and virtual machines
using network namespacing and registered with systemd-machined. It also maps
UID/GIDs ranges used by containers to useful names.
To activate this NSS module, you will need to include it in /etc/nsswitch.conf,
see nss-mymachines(8) manpage for more details.
%if %{with networkd} || %{with resolved}
%package network
Summary: Systemd tools for networkd and resolved
Summary: sytemd network manager and Network Name Resolution manager
License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
%systemd_requires
@ -383,13 +391,31 @@ Requires: %{name} = %{version}-%{release}
Recommends: pkgconfig(libidn2)
BuildRequires: pkgconfig(libidn2)
BuildRequires: pkgconfig(openssl)
Obsoletes: nss-resolve < %{version}-%{release}
Provides: nss-resolve = %{version}-%{release}
Provides: systemd:/usr/lib/systemd/systemd-networkd
Provides: systemd:/usr/lib/systemd/systemd-resolved
%description network
Systemd tools to manage network settings using networkd and
resolver tools for resolved
systemd-networkd is a system service that manages networks. It detects and
configures network devices as they appear, as well as manages network addresses
and routes for any link for which it finds a .network file, see
systemd.network(5). It can also create virtual network devices based on their
description given by systemd.netdev(5) files. It may be controlle by
networkctl(1).
systemd-resolved is a system service that provides network name resolution to
local applications. It implements a caching and validating DNS/DNSSEC stub
resolver, as well as an LLMNR and MulticastDNS resolver and responder. It may be
controlled by resolvectl(1).
Addtionally, this package also contains a plug-in module for the Name Service
Switch (NSS), which enables hostname resolutions by contacting
systemd-resolved(8). It replaces the nss-dns plug-in module that traditionally
resolves hostnames via DNS.
To activate this NSS module, you will need to include it in /etc/nsswitch.conf,
see nss-resolve(8) manpage for more details.
%endif
%if %{with portabled}
@ -438,38 +464,6 @@ To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-hostname(8) manpage for more details.
%endif
%if %{with resolved}
%package -n nss-resolve
Summary: Plugin for local hostname resolution via systemd-resolved
License: LGPL-2.1-or-later
Requires: %{name}-network = %{version}-%{release}
%description -n nss-resolve
This package contains a plug-in module for the Name Service Switch
(NSS), which enables host name resolutions via the systemd-resolved(8)
local network name resolution service. It replaces the nss-dns plug-in
module that traditionally resolves hostnames via DNS.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-resolve(8) manpage for more details.
%endif
%if %{with machined}
%package -n nss-mymachines
Summary: Plugin for local virtual host name resolution
License: LGPL-2.1-or-later
%description -n nss-mymachines
This package contains a plugin for the Name Service Switch (NSS),
providing host name resolution for all local containers and virtual
machines registered with systemd-machined to their respective IP
addresses. It also maps UID/GIDs ranges used by containers to useful
names.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-mymachines(8) manpage for more details.
%endif
%if %{with journal_remote}
%package journal-remote
Summary: Gateway for serving journal events over the network using HTTP
@ -617,7 +611,6 @@ Have fun with these services at your own risk.
%autosetup -p1 -n systemd-v%{version}%{suse_version}
%build
# keep split-usr until all packages have moved their systemd rules to /usr
%meson \
-Dmode=release \
-Dversion-tag=%{version}%{suse_version} \
@ -1143,16 +1136,6 @@ fi
%postun -n nss-systemd -p /sbin/ldconfig
%endif
%if %{with resolved}
%post -n nss-resolve -p /sbin/ldconfig
%postun -n nss-resolve -p /sbin/ldconfig
%endif
%if %{with machined}
%post -n nss-mymachines -p /sbin/ldconfig
%postun -n nss-mymachines -p /sbin/ldconfig
%endif
%if %{with journal_remote}
%pre journal-remote
%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
@ -1193,6 +1176,7 @@ fi
%service_add_post systemd-networkd-wait-online.service
%endif
%if %{with resolved}
%ldconfig
%service_add_post systemd-resolved.service
%endif
@ -1211,6 +1195,7 @@ fi
%service_del_postun systemd-networkd-wait-online.service
%endif
%if %{with resolved}
%ldconfig
%service_del_postun systemd-resolved.service
%endif
%endif
@ -1357,22 +1342,6 @@ fi
%{_mandir}/man8/nss-systemd.*
%endif
%if %{with resolved}
%files -n nss-resolve
%defattr(-, root, root)
%{_libdir}/libnss_resolve.so.2
%{_mandir}/man8/libnss_resolve.*
%{_mandir}/man8/nss-resolve.*
%endif
%if %{with machined}
%files -n nss-mymachines
%defattr(-,root,root)
%{_libdir}/libnss_mymachines.so*
%{_mandir}/man8/libnss_mymachines.*
%{_mandir}/man8/nss-mymachines.*
%endif
%if %{with journal_remote}
%files journal-remote
%defattr(-, root, root)