Disable systemd-networkd

Resolves: #1962257
This commit is contained in:
Michal Sekletar 2021-05-19 15:58:33 +00:00
parent 4a0dddf416
commit 2c73bac024
1 changed files with 1 additions and 38 deletions

View File

@ -156,7 +156,6 @@ Requires: dbus >= 1.9.18
Requires: %{name}-pam = %{version}-%{release}
Requires: %{name}-rpm-macros = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
%{?fedora:Recommends: %{name}-networkd = %{version}-%{release}}
Recommends: diffutils
Requires: util-linux
Recommends: libxkbcommon%{?_isa}
@ -325,18 +324,6 @@ 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: System daemon that manages network configurations
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
# https://src.fedoraproject.org/rpms/systemd/pull-request/34
Obsoletes: systemd < 246.6-2
%description networkd
systemd-networkd is a system service that manages networks. It detects
and configures network devices as they appear, as well as creating virtual
network devices.
%package resolved
Summary: System daemon that provides network name resolution to local applications
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -464,6 +451,7 @@ CONFIGURE_OPTS=(
-Dhomed=false
-Duserdb=false
-Dportabled=false
-Dnetworkd=false
)
%if %{without lto}
@ -816,29 +804,6 @@ fi
%systemd_postun_with_restart systemd-journal-gatewayd.service systemd-journal-remote.service systemd-journal-upload.service
%firewalld_reload
%pre networkd
getent group systemd-network &>/dev/null || groupadd -r -g 192 systemd-network 2>&1 || :
getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-network -d / -s /sbin/nologin -c "systemd Network Management" systemd-network &>/dev/null || :
%post networkd
# systemd-networkd was split out in systemd-246.6-2.
# Ideally, we would have a trigger scriptlet to record enablement
# state when upgrading from systemd <= systemd-246.6-1. But, AFAICS,
# rpm doesn't allow us to trigger on another package, short of
# querying the rpm database ourselves, which seems risky. For rpm,
# systemd and systemd-networkd are completely unrelated. So let's use
# a hack to detect if an old systemd version is currently present in
# the file system.
# https://bugzilla.redhat.com/show_bug.cgi?id=1943263
if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-6].so &>/dev/null; then
echo "Skipping presets for systemd-networkd.service, seems we are upgrading from old systemd."
else
%systemd_post systemd-networkd.service systemd-networkd-wait-online.service
fi
%preun networkd
%systemd_preun systemd-networkd.service systemd-networkd-wait-online.service
%pre resolved
getent group systemd-resolve &>/dev/null || groupadd -r -g 193 systemd-resolve 2>&1 || :
getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-resolve -d / -s /sbin/nologin -c "systemd Resolver" systemd-resolve &>/dev/null || :
@ -890,8 +855,6 @@ getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-res
%files journal-remote -f .file-list-remote
%files networkd -f .file-list-networkd
%files resolved -f .file-list-resolved
%files oomd-defaults -f .file-list-oomd-defaults