From 49aed1e4e6a4ca9622da091275a88faeca0c4463 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Apr 04 2022 22:14:22 +0000 Subject: Make sure our packages don't conflict with EPEL backports In Hyperscale, systemd-boot and systemd-timesyncd are provided by systemd-udev so let's make sure that we don't have conflicts when installing Hyperscale on a systemd with either of these packages installed by conflicting/obsoleting/providing these packages from systemd-udev. Similarly, let's make sure epel-rpm-macros-systemd doesn't conflict with rpm-macros-systemd using the same approach. To make sure we can merge the previous networkd package fixes into the c9s branch, we make it conditional on the stream version we're building for. --- diff --git a/split-files.py b/split-files.py index 3d410fd..c7cfed4 100644 --- a/split-files.py +++ b/split-files.py @@ -1,9 +1,24 @@ import re, sys, os, collections buildroot = sys.argv[1] +release = sys.argv[2] known_files = sys.stdin.read().splitlines() known_files = {line.split()[-1]:line for line in known_files} +networkd_regex = r''' + /usr/lib/systemd/network/80-| + networkd| + networkctl| + org.freedesktop.network1 +''' + +if release == "8": + networkd_regex += r'''| + systemd.netdev| + systemd.network| + systemd-network-generator + ''' + def files(root): os.chdir(root) todo = collections.deque(['.']) @@ -77,14 +92,7 @@ for file in files(buildroot): org.freedesktop.(import|machine)1 ''', n, re.X): o = o_container - elif re.search(r'''/usr/lib/systemd/network/80-| - networkd| - networkctl| - org.freedesktop.network1| - systemd.netdev| - systemd.network| - systemd-network-generator - ''', n, re.X): + elif re.search(networkd_regex, n, re.X): o = o_networkd elif '.so.' in n: o = o_libs diff --git a/systemd.spec b/systemd.spec index 76c9bb2..1b3d8c1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -43,7 +43,7 @@ Name: systemd Url: https://pagure.io/centos-sig-hyperscale/systemd %if %{without inplace} Version: 250.3 -Release: 6.3%{?dist} +Release: 6.4%{?dist} %else # determine the build information from local checkout Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/') @@ -279,6 +279,11 @@ Systemd PAM module registers the session with systemd-logind. %package rpm-macros Summary: Macros that define paths and scriptlets related to systemd BuildArch: noarch +# Make sure we obsolete the existing version and any possible future versions +# of epel-rpm-macros-systemd in c8s and c9s. +Conflicts: epel-rpm-macros-systemd < 10-0 +Obsoletes: epel-rpm-macros-systemd < 10-0 +Provides: epel-rpm-macros-systemd = 10-0 %description rpm-macros Just the definitions of rpm macros. @@ -318,6 +323,12 @@ Obsoletes: systemd < 245.6-1 Provides: udev = %{version} Provides: udev%{_isa} = %{version} Obsoletes: udev < 183 +Conflicts: systemd-boot < %{version}-%{release} +Obsoletes: systemd-boot < %{version}-%{release} +Provides: systemd-boot = %{version}-%{release} +Conflicts: systemd-timesyncd < %{version}-%{release} +Obsoletes: systemd-timesyncd < %{version}-%{release} +Provides: systemd-timesyncd = %{version}-%{release} # Recommends to replace normal Requires deps for stuff that is dlopen()ed # used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home @@ -737,7 +748,7 @@ install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE24} # Split files in build root into rpms. See split-files.py for the # rules towards the end, anything which is an exception needs a line # here. -python3 %{SOURCE2} %buildroot < - 250.3-6.4 +- Make sure our packages override the corresponding backports from EPEL. +- Modify the networkd fix from the previous release so that it can be merged + into the c9s branch. + * Wed Apr 01 2022 Daan De Meyer - 250.3-6.3 - Move systemd-network-generator and networkd man pages to networkd package to avoid conflicts with systemd-extras from EPEL