Skip to content

Commit 910e6f9

Browse files
bossmcanphel31
authored andcommitted
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
1 parent f734683 commit 910e6f9

File tree

5 files changed

+38
-31
lines changed

5 files changed

+38
-31
lines changed

SPECS/rpm/rpm.spec

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Package manager
22
Name: rpm
33
Version: 4.18.0
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: GPLv2+ AND LGPLv2+ AND BSD
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -20,13 +20,15 @@ Patch1: define-RPM_LD_FLAGS.patch
2020
Patch2: fix_RPM_GNUC_DEPRECATED_headers.patch
2121
BuildRequires: autoconf
2222
BuildRequires: automake
23+
BuildRequires: awk
2324
BuildRequires: debugedit
2425
BuildRequires: elfutils-devel
2526
BuildRequires: file-devel
2627
BuildRequires: gettext
2728
BuildRequires: libarchive-devel
2829
BuildRequires: libcap-devel
2930
BuildRequires: libselinux-devel
31+
BuildRequires: libtool
3032
BuildRequires: lua-devel
3133
BuildRequires: openssl-devel
3234
BuildRequires: popt-devel
@@ -66,6 +68,7 @@ Shared libraries librpm and librpmio
6668

6769
%package build-libs
6870
Summary: Librpmbuild.so.* libraries needed to build rpms.
71+
Requires: %{name}-libs = %{version}-%{release}
6972

7073
%description build-libs
7174
%{summary}
@@ -106,7 +109,8 @@ These are the additional language files of rpm.
106109
%package -n python3-rpm
107110
Summary: Python 3 bindings for rpm.
108111
Group: Development/Libraries
109-
Requires: %{name}-build-libs
112+
Requires: %{name}-build-libs = %{version}-%{release}
113+
Requires: %{name}-libs = %{version}-%{release}
110114
Requires: python3
111115
Provides: %{name}-python3 = %{version}-%{release}
112116

@@ -151,7 +155,7 @@ popd
151155
sed -i 's/@MAJORVER-PROVIDES-VERSIONS@/%{python3_version}/' %{SOURCE3}
152156

153157
# Fix the interpreter path for python replacing the first line
154-
sed -i '1 s:.*:#!/usr/bin/python3:' %{SOURCE5}
158+
sed -i '1 s:.*:#!%{_bindir}/python3:' %{SOURCE5}
155159

156160
%check
157161
make check TESTSUITEFLAGS=-j%{_smp_build_ncpus}
@@ -281,6 +285,9 @@ popd
281285
%{python3_sitelib}/*
282286

283287
%changelog
288+
* Fri Sep 30 2022 Andy Caldwell <andycaldwell@microsoft> - 4.18.0-2
289+
- Create versioned dependencies from `python3-rpm` -> `rpm-build-libs` -> `rpm-libs` to ensure ABI compatibility
290+
284291
* Wed Sep 21 2022 Daniel McIlvaney <[email protected]> - 4.18.0-1
285292
- Update to 4.18.0 to resolve CVE-2021-35938, CVE-2021-35939, and CVE-2021-3521
286293

toolkit/resources/manifests/package/pkggen_core_aarch64.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ libcap-devel-2.60-1.cm2.aarch64.rpm
175175
debugedit-5.0-1.cm2.aarch64.rpm
176176
libarchive-3.6.1-1.cm2.aarch64.rpm
177177
libarchive-devel-3.6.1-1.cm2.aarch64.rpm
178-
rpm-4.18.0-1.cm2.aarch64.rpm
179-
rpm-build-4.18.0-1.cm2.aarch64.rpm
180-
rpm-build-libs-4.18.0-1.cm2.aarch64.rpm
181-
rpm-devel-4.18.0-1.cm2.aarch64.rpm
182-
rpm-lang-4.18.0-1.cm2.aarch64.rpm
183-
rpm-libs-4.18.0-1.cm2.aarch64.rpm
178+
rpm-4.18.0-2.cm2.aarch64.rpm
179+
rpm-build-4.18.0-2.cm2.aarch64.rpm
180+
rpm-build-libs-4.18.0-2.cm2.aarch64.rpm
181+
rpm-devel-4.18.0-2.cm2.aarch64.rpm
182+
rpm-lang-4.18.0-2.cm2.aarch64.rpm
183+
rpm-libs-4.18.0-2.cm2.aarch64.rpm
184184
cpio-2.13-4.cm2.aarch64.rpm
185185
cpio-lang-2.13-4.cm2.aarch64.rpm
186186
e2fsprogs-libs-1.46.5-3.cm2.aarch64.rpm

toolkit/resources/manifests/package/pkggen_core_x86_64.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ libcap-devel-2.60-1.cm2.x86_64.rpm
175175
debugedit-5.0-1.cm2.x86_64.rpm
176176
libarchive-3.6.1-1.cm2.x86_64.rpm
177177
libarchive-devel-3.6.1-1.cm2.x86_64.rpm
178-
rpm-4.18.0-1.cm2.x86_64.rpm
179-
rpm-build-4.18.0-1.cm2.x86_64.rpm
180-
rpm-build-libs-4.18.0-1.cm2.x86_64.rpm
181-
rpm-devel-4.18.0-1.cm2.x86_64.rpm
182-
rpm-lang-4.18.0-1.cm2.x86_64.rpm
183-
rpm-libs-4.18.0-1.cm2.x86_64.rpm
178+
rpm-4.18.0-2.cm2.x86_64.rpm
179+
rpm-build-4.18.0-2.cm2.x86_64.rpm
180+
rpm-build-libs-4.18.0-2.cm2.x86_64.rpm
181+
rpm-devel-4.18.0-2.cm2.x86_64.rpm
182+
rpm-lang-4.18.0-2.cm2.x86_64.rpm
183+
rpm-libs-4.18.0-2.cm2.x86_64.rpm
184184
cpio-2.13-4.cm2.x86_64.rpm
185185
cpio-lang-2.13-4.cm2.x86_64.rpm
186186
e2fsprogs-libs-1.46.5-3.cm2.x86_64.rpm

toolkit/resources/manifests/package/toolchain_aarch64.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -518,20 +518,20 @@ python3-markupsafe-2.1.0-1.cm2.aarch64.rpm
518518
python3-newt-0.52.21-4.cm2.aarch64.rpm
519519
python3-pip-3.9.14-1.cm2.noarch.rpm
520520
python3-pygments-2.4.2-7.cm2.noarch.rpm
521-
python3-rpm-4.18.0-1.cm2.aarch64.rpm
521+
python3-rpm-4.18.0-2.cm2.aarch64.rpm
522522
python3-setuptools-3.9.14-1.cm2.noarch.rpm
523523
python3-test-3.9.14-1.cm2.aarch64.rpm
524524
python3-tools-3.9.14-1.cm2.aarch64.rpm
525525
readline-8.1-1.cm2.aarch64.rpm
526526
readline-debuginfo-8.1-1.cm2.aarch64.rpm
527527
readline-devel-8.1-1.cm2.aarch64.rpm
528-
rpm-4.18.0-1.cm2.aarch64.rpm
529-
rpm-build-4.18.0-1.cm2.aarch64.rpm
530-
rpm-build-libs-4.18.0-1.cm2.aarch64.rpm
531-
rpm-debuginfo-4.18.0-1.cm2.aarch64.rpm
532-
rpm-devel-4.18.0-1.cm2.aarch64.rpm
533-
rpm-lang-4.18.0-1.cm2.aarch64.rpm
534-
rpm-libs-4.18.0-1.cm2.aarch64.rpm
528+
rpm-4.18.0-2.cm2.aarch64.rpm
529+
rpm-build-4.18.0-2.cm2.aarch64.rpm
530+
rpm-build-libs-4.18.0-2.cm2.aarch64.rpm
531+
rpm-debuginfo-4.18.0-2.cm2.aarch64.rpm
532+
rpm-devel-4.18.0-2.cm2.aarch64.rpm
533+
rpm-lang-4.18.0-2.cm2.aarch64.rpm
534+
rpm-libs-4.18.0-2.cm2.aarch64.rpm
535535
sed-4.8-2.cm2.aarch64.rpm
536536
sed-debuginfo-4.8-2.cm2.aarch64.rpm
537537
sed-lang-4.8-2.cm2.aarch64.rpm

toolkit/resources/manifests/package/toolchain_x86_64.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -518,20 +518,20 @@ python3-markupsafe-2.1.0-1.cm2.x86_64.rpm
518518
python3-newt-0.52.21-4.cm2.x86_64.rpm
519519
python3-pip-3.9.14-1.cm2.noarch.rpm
520520
python3-pygments-2.4.2-7.cm2.noarch.rpm
521-
python3-rpm-4.18.0-1.cm2.x86_64.rpm
521+
python3-rpm-4.18.0-2.cm2.x86_64.rpm
522522
python3-setuptools-3.9.14-1.cm2.noarch.rpm
523523
python3-test-3.9.14-1.cm2.x86_64.rpm
524524
python3-tools-3.9.14-1.cm2.x86_64.rpm
525525
readline-8.1-1.cm2.x86_64.rpm
526526
readline-debuginfo-8.1-1.cm2.x86_64.rpm
527527
readline-devel-8.1-1.cm2.x86_64.rpm
528-
rpm-4.18.0-1.cm2.x86_64.rpm
529-
rpm-build-4.18.0-1.cm2.x86_64.rpm
530-
rpm-build-libs-4.18.0-1.cm2.x86_64.rpm
531-
rpm-debuginfo-4.18.0-1.cm2.x86_64.rpm
532-
rpm-devel-4.18.0-1.cm2.x86_64.rpm
533-
rpm-lang-4.18.0-1.cm2.x86_64.rpm
534-
rpm-libs-4.18.0-1.cm2.x86_64.rpm
528+
rpm-4.18.0-2.cm2.x86_64.rpm
529+
rpm-build-4.18.0-2.cm2.x86_64.rpm
530+
rpm-build-libs-4.18.0-2.cm2.x86_64.rpm
531+
rpm-debuginfo-4.18.0-2.cm2.x86_64.rpm
532+
rpm-devel-4.18.0-2.cm2.x86_64.rpm
533+
rpm-lang-4.18.0-2.cm2.x86_64.rpm
534+
rpm-libs-4.18.0-2.cm2.x86_64.rpm
535535
sed-4.8-2.cm2.x86_64.rpm
536536
sed-debuginfo-4.8-2.cm2.x86_64.rpm
537537
sed-lang-4.8-2.cm2.x86_64.rpm

0 commit comments

Comments
 (0)