From 910e6f9385c8e8ad1fcf47d5be899deab7ab4f5d Mon Sep 17 00:00:00 2001 From: Andy Caldwell Date: Mon, 3 Oct 2022 16:14:12 +0100 Subject: [PATCH] Ensure rpm-* ABI compatibility (#3880) * Ensure `python3-rpm` pulls in appropriate libs * Add rpm-build-libs -> rpm-libs dependency too * Declare release `4.18.0-2` with fixes --- SPECS/rpm/rpm.spec | 13 ++++++++++--- .../manifests/package/pkggen_core_aarch64.txt | 12 ++++++------ .../manifests/package/pkggen_core_x86_64.txt | 12 ++++++------ .../manifests/package/toolchain_aarch64.txt | 16 ++++++++-------- .../manifests/package/toolchain_x86_64.txt | 16 ++++++++-------- 5 files changed, 38 insertions(+), 31 deletions(-) diff --git a/SPECS/rpm/rpm.spec b/SPECS/rpm/rpm.spec index b53dd34f7ec..7771560a59c 100644 --- a/SPECS/rpm/rpm.spec +++ b/SPECS/rpm/rpm.spec @@ -1,7 +1,7 @@ Summary: Package manager Name: rpm Version: 4.18.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ AND LGPLv2+ AND BSD Vendor: Microsoft Corporation Distribution: Mariner @@ -20,6 +20,7 @@ Patch1: define-RPM_LD_FLAGS.patch Patch2: fix_RPM_GNUC_DEPRECATED_headers.patch BuildRequires: autoconf BuildRequires: automake +BuildRequires: awk BuildRequires: debugedit BuildRequires: elfutils-devel BuildRequires: file-devel @@ -27,6 +28,7 @@ BuildRequires: gettext BuildRequires: libarchive-devel BuildRequires: libcap-devel BuildRequires: libselinux-devel +BuildRequires: libtool BuildRequires: lua-devel BuildRequires: openssl-devel BuildRequires: popt-devel @@ -66,6 +68,7 @@ Shared libraries librpm and librpmio %package build-libs Summary: Librpmbuild.so.* libraries needed to build rpms. +Requires: %{name}-libs = %{version}-%{release} %description build-libs %{summary} @@ -106,7 +109,8 @@ These are the additional language files of rpm. %package -n python3-rpm Summary: Python 3 bindings for rpm. Group: Development/Libraries -Requires: %{name}-build-libs +Requires: %{name}-build-libs = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: python3 Provides: %{name}-python3 = %{version}-%{release} @@ -151,7 +155,7 @@ popd sed -i 's/@MAJORVER-PROVIDES-VERSIONS@/%{python3_version}/' %{SOURCE3} # Fix the interpreter path for python replacing the first line -sed -i '1 s:.*:#!/usr/bin/python3:' %{SOURCE5} +sed -i '1 s:.*:#!%{_bindir}/python3:' %{SOURCE5} %check make check TESTSUITEFLAGS=-j%{_smp_build_ncpus} @@ -281,6 +285,9 @@ popd %{python3_sitelib}/* %changelog +* Fri Sep 30 2022 Andy Caldwell - 4.18.0-2 +- Create versioned dependencies from `python3-rpm` -> `rpm-build-libs` -> `rpm-libs` to ensure ABI compatibility + * Wed Sep 21 2022 Daniel McIlvaney - 4.18.0-1 - Update to 4.18.0 to resolve CVE-2021-35938, CVE-2021-35939, and CVE-2021-3521 diff --git a/toolkit/resources/manifests/package/pkggen_core_aarch64.txt b/toolkit/resources/manifests/package/pkggen_core_aarch64.txt index c4857295fc2..0c5740dc95d 100644 --- a/toolkit/resources/manifests/package/pkggen_core_aarch64.txt +++ b/toolkit/resources/manifests/package/pkggen_core_aarch64.txt @@ -175,12 +175,12 @@ libcap-devel-2.60-1.cm2.aarch64.rpm debugedit-5.0-1.cm2.aarch64.rpm libarchive-3.6.1-1.cm2.aarch64.rpm libarchive-devel-3.6.1-1.cm2.aarch64.rpm -rpm-4.18.0-1.cm2.aarch64.rpm -rpm-build-4.18.0-1.cm2.aarch64.rpm -rpm-build-libs-4.18.0-1.cm2.aarch64.rpm -rpm-devel-4.18.0-1.cm2.aarch64.rpm -rpm-lang-4.18.0-1.cm2.aarch64.rpm -rpm-libs-4.18.0-1.cm2.aarch64.rpm +rpm-4.18.0-2.cm2.aarch64.rpm +rpm-build-4.18.0-2.cm2.aarch64.rpm +rpm-build-libs-4.18.0-2.cm2.aarch64.rpm +rpm-devel-4.18.0-2.cm2.aarch64.rpm +rpm-lang-4.18.0-2.cm2.aarch64.rpm +rpm-libs-4.18.0-2.cm2.aarch64.rpm cpio-2.13-4.cm2.aarch64.rpm cpio-lang-2.13-4.cm2.aarch64.rpm e2fsprogs-libs-1.46.5-3.cm2.aarch64.rpm diff --git a/toolkit/resources/manifests/package/pkggen_core_x86_64.txt b/toolkit/resources/manifests/package/pkggen_core_x86_64.txt index 16d9ea07145..7c2c498758d 100644 --- a/toolkit/resources/manifests/package/pkggen_core_x86_64.txt +++ b/toolkit/resources/manifests/package/pkggen_core_x86_64.txt @@ -175,12 +175,12 @@ libcap-devel-2.60-1.cm2.x86_64.rpm debugedit-5.0-1.cm2.x86_64.rpm libarchive-3.6.1-1.cm2.x86_64.rpm libarchive-devel-3.6.1-1.cm2.x86_64.rpm -rpm-4.18.0-1.cm2.x86_64.rpm -rpm-build-4.18.0-1.cm2.x86_64.rpm -rpm-build-libs-4.18.0-1.cm2.x86_64.rpm -rpm-devel-4.18.0-1.cm2.x86_64.rpm -rpm-lang-4.18.0-1.cm2.x86_64.rpm -rpm-libs-4.18.0-1.cm2.x86_64.rpm +rpm-4.18.0-2.cm2.x86_64.rpm +rpm-build-4.18.0-2.cm2.x86_64.rpm +rpm-build-libs-4.18.0-2.cm2.x86_64.rpm +rpm-devel-4.18.0-2.cm2.x86_64.rpm +rpm-lang-4.18.0-2.cm2.x86_64.rpm +rpm-libs-4.18.0-2.cm2.x86_64.rpm cpio-2.13-4.cm2.x86_64.rpm cpio-lang-2.13-4.cm2.x86_64.rpm e2fsprogs-libs-1.46.5-3.cm2.x86_64.rpm diff --git a/toolkit/resources/manifests/package/toolchain_aarch64.txt b/toolkit/resources/manifests/package/toolchain_aarch64.txt index 7b994829d7a..26e5c7cb076 100644 --- a/toolkit/resources/manifests/package/toolchain_aarch64.txt +++ b/toolkit/resources/manifests/package/toolchain_aarch64.txt @@ -518,20 +518,20 @@ python3-markupsafe-2.1.0-1.cm2.aarch64.rpm python3-newt-0.52.21-4.cm2.aarch64.rpm python3-pip-3.9.14-1.cm2.noarch.rpm python3-pygments-2.4.2-7.cm2.noarch.rpm -python3-rpm-4.18.0-1.cm2.aarch64.rpm +python3-rpm-4.18.0-2.cm2.aarch64.rpm python3-setuptools-3.9.14-1.cm2.noarch.rpm python3-test-3.9.14-1.cm2.aarch64.rpm python3-tools-3.9.14-1.cm2.aarch64.rpm readline-8.1-1.cm2.aarch64.rpm readline-debuginfo-8.1-1.cm2.aarch64.rpm readline-devel-8.1-1.cm2.aarch64.rpm -rpm-4.18.0-1.cm2.aarch64.rpm -rpm-build-4.18.0-1.cm2.aarch64.rpm -rpm-build-libs-4.18.0-1.cm2.aarch64.rpm -rpm-debuginfo-4.18.0-1.cm2.aarch64.rpm -rpm-devel-4.18.0-1.cm2.aarch64.rpm -rpm-lang-4.18.0-1.cm2.aarch64.rpm -rpm-libs-4.18.0-1.cm2.aarch64.rpm +rpm-4.18.0-2.cm2.aarch64.rpm +rpm-build-4.18.0-2.cm2.aarch64.rpm +rpm-build-libs-4.18.0-2.cm2.aarch64.rpm +rpm-debuginfo-4.18.0-2.cm2.aarch64.rpm +rpm-devel-4.18.0-2.cm2.aarch64.rpm +rpm-lang-4.18.0-2.cm2.aarch64.rpm +rpm-libs-4.18.0-2.cm2.aarch64.rpm sed-4.8-2.cm2.aarch64.rpm sed-debuginfo-4.8-2.cm2.aarch64.rpm sed-lang-4.8-2.cm2.aarch64.rpm diff --git a/toolkit/resources/manifests/package/toolchain_x86_64.txt b/toolkit/resources/manifests/package/toolchain_x86_64.txt index 801eae52e36..39447b0112e 100644 --- a/toolkit/resources/manifests/package/toolchain_x86_64.txt +++ b/toolkit/resources/manifests/package/toolchain_x86_64.txt @@ -518,20 +518,20 @@ python3-markupsafe-2.1.0-1.cm2.x86_64.rpm python3-newt-0.52.21-4.cm2.x86_64.rpm python3-pip-3.9.14-1.cm2.noarch.rpm python3-pygments-2.4.2-7.cm2.noarch.rpm -python3-rpm-4.18.0-1.cm2.x86_64.rpm +python3-rpm-4.18.0-2.cm2.x86_64.rpm python3-setuptools-3.9.14-1.cm2.noarch.rpm python3-test-3.9.14-1.cm2.x86_64.rpm python3-tools-3.9.14-1.cm2.x86_64.rpm readline-8.1-1.cm2.x86_64.rpm readline-debuginfo-8.1-1.cm2.x86_64.rpm readline-devel-8.1-1.cm2.x86_64.rpm -rpm-4.18.0-1.cm2.x86_64.rpm -rpm-build-4.18.0-1.cm2.x86_64.rpm -rpm-build-libs-4.18.0-1.cm2.x86_64.rpm -rpm-debuginfo-4.18.0-1.cm2.x86_64.rpm -rpm-devel-4.18.0-1.cm2.x86_64.rpm -rpm-lang-4.18.0-1.cm2.x86_64.rpm -rpm-libs-4.18.0-1.cm2.x86_64.rpm +rpm-4.18.0-2.cm2.x86_64.rpm +rpm-build-4.18.0-2.cm2.x86_64.rpm +rpm-build-libs-4.18.0-2.cm2.x86_64.rpm +rpm-debuginfo-4.18.0-2.cm2.x86_64.rpm +rpm-devel-4.18.0-2.cm2.x86_64.rpm +rpm-lang-4.18.0-2.cm2.x86_64.rpm +rpm-libs-4.18.0-2.cm2.x86_64.rpm sed-4.8-2.cm2.x86_64.rpm sed-debuginfo-4.8-2.cm2.x86_64.rpm sed-lang-4.8-2.cm2.x86_64.rpm