From 09c52e76085e141ca97449a230d5c229ec074cba Mon Sep 17 00:00:00 2001 From: happy_orange Date: Tue, 15 Aug 2023 20:11:32 +0800 Subject: [PATCH] disable networkd package because of the network has been provided by networkmanager --- systemd.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/systemd.spec b/systemd.spec index fbc99a7..1974eb9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,4 +1,4 @@ -%define anolis_release 6 +%define anolis_release 7 %global __requires_exclude pkg-config %global pkgdir %{_prefix}/lib/systemd @@ -15,6 +15,8 @@ %bcond_without tests %bcond_without lto %bcond_with inplace +# disable networkd +%bcond_with networkd %if %{without lto} %global _lto_cflags %nil @@ -93,7 +95,11 @@ Requires: systemd-pam = %{EVR} Requires: (systemd-rpm-macros = %{EVR} if rpm-build) Requires: systemd-libs = %{EVR} Requires: (util-linux-core or util-linux) +%if %{with networkd} Recommends: systemd-networkd = %{EVR} +%else +Obsoletes: %{name}-networkd < %{EVR} +%endif Recommends: systemd-resolved = %{EVR} Recommends: diffutils libxkbcommon Provides: /bin/systemctl /sbin/shutdown syslog @@ -235,6 +241,7 @@ and to write journal files from serialized journal contents. This package contains systemd-journal-gatewayd, systemd-journal-remote, and systemd-journal-upload. +%if %{with networkd} %package networkd Summary: System daemon that manages network configurations Requires: systemd = %{EVR} @@ -245,6 +252,7 @@ Obsoletes: systemd < 246.6 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. +%endif %package resolved Summary: Network Name Resolution manager @@ -370,6 +378,9 @@ CONFIGURE_OPTS=( -Dtape-gid=33 -Dtty-gid=5 -Dusers-gid=100 -Dutmp-gid=22 -Dvideo-gid=39 -Dwheel-gid=10 -Dsystemd-journal-gid=190 -Dsystemd-network-uid=192 -Dsystemd-resolve-uid=193 +%if %{without networkd} + -Dnetworkd=false +%endif ) %if %{with inplace} @@ -567,6 +578,7 @@ fi %systemd_postun_with_restart %journal_remote_units_restart %firewalld_reload +%if %{with networkd} %post networkd 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." @@ -576,6 +588,7 @@ fi %preun networkd %systemd_preun systemd-networkd.service systemd-networkd-wait-online.service +%endif %preun resolved if [ $1 -eq 0 ] ; then @@ -650,7 +663,6 @@ fi %config(noreplace) /etc/systemd/oomd.conf %dir /etc/systemd/system %dir /etc/systemd/user -%dir /etc/systemd/network /usr/sbin/init /usr/sbin/halt /usr/sbin/poweroff @@ -1846,6 +1858,7 @@ fi /usr/lib/systemd/system/systemd-journal-gatewayd.socket /usr/lib/systemd/system/systemd-journal-remote.socket +%if %{with networkd} %files networkd %config(noreplace) /etc/systemd/networkd.conf /usr/bin/networkctl @@ -1887,6 +1900,7 @@ fi /usr/lib/systemd/system/systemd-networkd-wait-online.service /usr/lib/systemd/system/systemd-networkd-wait-online@.service /usr/lib/systemd/system/systemd-networkd.socket +%endif %files oomd-defaults %dir /usr/lib/systemd/oomd.conf.d @@ -1911,6 +1925,9 @@ fi %doc docs/DISTRO_PORTING.md docs/HACKING.md %changelog +* Tue Aug 15 2023 happy_orange - 252.4-7 +- disable networkd because of the network has been provides by networkmanager package + * Wed Apr 12 2023 Chunmei Xu - 252.4-6 - optimise spec file -- Gitee