From e3c469ade3bcbf9976c28ba04ed8b33a425355e6 Mon Sep 17 00:00:00 2001 From: happy_orange Date: Tue, 15 Aug 2023 17:29:13 +0800 Subject: [PATCH] disable networkd package because of the network has been provided by networkmanager --- systemd.spec | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/systemd.spec b/systemd.spec index f57621a..7722c07 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global __requires_exclude pkg-config %global pkgdir %{_prefix}/lib/systemd @@ -18,6 +18,9 @@ # See README.build-in-place. %bcond_with inplace +# disable networkd +%bcond_with networkd + %global have_gnu_efi 1 %global have_bpf 1 @@ -135,8 +138,6 @@ BuildRequires: perl(IPC::SysV) BuildRequires: bpftool %endif -BuildRequires: xen-devel - Requires(post): coreutils Requires(post): grep # systemd-machine-id-setup requires libssl @@ -145,7 +146,11 @@ Requires: dbus >= 1.9.18 Requires: %{name}-pam = %{version}-%{release} Requires: (%{name}-rpm-macros = %{version}-%{release} if rpm-build) Requires: %{name}-libs = %{version}-%{release} +%if %{with networkd} Recommends: %{name}-networkd = %{version}-%{release} +%else +Obsoletes: %{name}-networkd < %{version}-%{release} +%endif Recommends: %{name}-resolved = %{version}-%{release} Recommends: diffutils Requires: (util-linux-core or util-linux) @@ -345,6 +350,7 @@ 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: %{name} = %{version}-%{release} @@ -355,6 +361,8 @@ Obsoletes: systemd < 246.6-2 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 @@ -518,6 +526,9 @@ CONFIGURE_OPTS=( -Dsystemd-journal-gid=190 -Dsystemd-network-uid=192 -Dsystemd-resolve-uid=193 +%if %{without networkd} + -Dnetworkd=false +%endif ) %if %{without lto} @@ -798,6 +809,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." @@ -807,6 +819,7 @@ fi %preun networkd %systemd_preun systemd-networkd.service systemd-networkd-wait-online.service +%endif %preun resolved if [ $1 -eq 0 ] ; then @@ -897,7 +910,9 @@ fi %files journal-remote -f .file-list-remote +%if %{with networkd} %files networkd -f .file-list-networkd +%endif %files oomd-defaults -f .file-list-oomd-defaults @@ -917,6 +932,9 @@ fi %{_docdir}/%{name}-%{doc}/20-yama-ptrace.conf %changelog +* Tue Aug 15 2023 happy_orange - 252.4-2 +- disable networkd because of the network has been provides by networkmanager package + * Thu Jan 05 2023 happy_orange - 252.4-1 - update to 252.4 -- Gitee