From 8c3cf71ce1b93d68a636fcbccd5a72f155fe2a23 Mon Sep 17 00:00:00 2001 From: jslobodzian Date: Thu, 26 May 2022 21:58:02 -0700 Subject: [PATCH] Reduce base RPM package size, re-add in container image (#3056) * Reduce rpm size and reinstate in container image * Updated per code review comments --- SPECS/core-packages/core-packages.spec | 7 +++++-- SPECS/rpm/rpm.spec | 12 ++++++++---- .../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 ++++++++-------- 6 files changed, 41 insertions(+), 34 deletions(-) diff --git a/SPECS/core-packages/core-packages.spec b/SPECS/core-packages/core-packages.spec index 5d8b596d97b..13eddb878cc 100644 --- a/SPECS/core-packages/core-packages.spec +++ b/SPECS/core-packages/core-packages.spec @@ -1,7 +1,7 @@ Summary: Metapackage with core sets of packages Name: core-packages Version: 2.0 -Release: 5%{?dist} +Release: 6%{?dist} License: ASL 2.0 Vendor: Microsoft Corporation Distribution: Mariner @@ -39,7 +39,6 @@ Requires: net-tools Requires: openssh-clients Requires: pkg-config Requires: procps-ng -Requires: rpm Requires: sudo Requires: systemd Requires: tar @@ -69,6 +68,7 @@ Requires: nspr Requires: nss-libs Requires: openssl Requires: readline +Requires: rpm Requires: rpm-libs Requires: sed Requires: sqlite-libs @@ -89,6 +89,9 @@ Requires: zlib %files container %changelog +* Tue May 24 2022 Jon Slobodzian - 2.0-6 +- Add rpm to base container image + * Wed May 04 2022 Suresh Babu Chalamalasetty - 2.0-5 - Add gzip and sed to base container image diff --git a/SPECS/rpm/rpm.spec b/SPECS/rpm/rpm.spec index ef40dea4833..0e0f6a09ccc 100644 --- a/SPECS/rpm/rpm.spec +++ b/SPECS/rpm/rpm.spec @@ -1,7 +1,7 @@ Summary: Package manager Name: rpm Version: 4.17.0 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ AND LGPLv2+ AND BSD Vendor: Microsoft Corporation Distribution: Mariner @@ -34,7 +34,7 @@ BuildRequires: zstd-devel Requires: bash Requires: libarchive Requires: libselinux -Requires: lua +Requires: lua-libs Requires: rpm-libs = %{version}-%{release} Patch0: remove-docs-from-makefile.patch @@ -82,6 +82,7 @@ Requires: elfutils-devel Requires: elfutils-libelf Requires: file Requires: gzip +Requires: lua Requires: mariner-rpm-macros Requires: patch Requires: tar @@ -206,8 +207,6 @@ popd %{_libdir}/rpm/tgpg %{_libdir}/rpm/platform %{_libdir}/rpm-plugins/* -%{_libdir}/rpm/pythondistdeps.py -%{_fileattrsdir}/python.attr # Because of no doxygen dependency, we do not produce manpages that require it. # %{_mandir}/man8/rpm.8.gz # %{_mandir}/man8/rpm2cpio.8.gz @@ -248,6 +247,7 @@ popd %{_libdir}/rpm/mkinstalldirs %{_libdir}/rpm/pkgconfigdeps.sh %{_libdir}/rpm/*.prov +%{_libdir}/rpm/pythondistdeps.py %{_libdir}/rpm/pythondeps.sh %{_libdir}/rpm/ocamldeps.sh @@ -276,6 +276,10 @@ popd %{python3_sitelib}/* %changelog +* Tue May 24 2022 Jon Slobodzian - 4.17.0-8 +- Move lua runtime dependency from main rpm package. Move to rpm-build. +- Move python files to rpm-build package. This removes the implied dependency on python3 by the rpm package. + * Fri May 13 2022 Andy Caldwell - 4.17.0-7 - Add missing dependencies to rpmbuild (file, diff and patch) diff --git a/toolkit/resources/manifests/package/pkggen_core_aarch64.txt b/toolkit/resources/manifests/package/pkggen_core_aarch64.txt index 9fa2358c8b3..038d4c9d350 100644 --- a/toolkit/resources/manifests/package/pkggen_core_aarch64.txt +++ b/toolkit/resources/manifests/package/pkggen_core_aarch64.txt @@ -176,12 +176,12 @@ libcap-devel-2.60-1.cm2.aarch64.rpm debugedit-5.0-1.cm2.aarch64.rpm libarchive-3.6.0-1.cm2.aarch64.rpm libarchive-devel-3.6.0-1.cm2.aarch64.rpm -rpm-4.17.0-7.cm2.aarch64.rpm -rpm-build-4.17.0-7.cm2.aarch64.rpm -rpm-build-libs-4.17.0-7.cm2.aarch64.rpm -rpm-devel-4.17.0-7.cm2.aarch64.rpm -rpm-lang-4.17.0-7.cm2.aarch64.rpm -rpm-libs-4.17.0-7.cm2.aarch64.rpm +rpm-4.17.0-8.cm2.aarch64.rpm +rpm-build-4.17.0-8.cm2.aarch64.rpm +rpm-build-libs-4.17.0-8.cm2.aarch64.rpm +rpm-devel-4.17.0-8.cm2.aarch64.rpm +rpm-lang-4.17.0-8.cm2.aarch64.rpm +rpm-libs-4.17.0-8.cm2.aarch64.rpm cpio-2.13-4.cm2.aarch64.rpm cpio-lang-2.13-4.cm2.aarch64.rpm e2fsprogs-libs-1.46.5-1.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 d6a52228b32..5ca82f34fbd 100644 --- a/toolkit/resources/manifests/package/pkggen_core_x86_64.txt +++ b/toolkit/resources/manifests/package/pkggen_core_x86_64.txt @@ -176,12 +176,12 @@ libcap-devel-2.60-1.cm2.x86_64.rpm debugedit-5.0-1.cm2.x86_64.rpm libarchive-3.6.0-1.cm2.x86_64.rpm libarchive-devel-3.6.0-1.cm2.x86_64.rpm -rpm-4.17.0-7.cm2.x86_64.rpm -rpm-build-4.17.0-7.cm2.x86_64.rpm -rpm-build-libs-4.17.0-7.cm2.x86_64.rpm -rpm-devel-4.17.0-7.cm2.x86_64.rpm -rpm-lang-4.17.0-7.cm2.x86_64.rpm -rpm-libs-4.17.0-7.cm2.x86_64.rpm +rpm-4.17.0-8.cm2.x86_64.rpm +rpm-build-4.17.0-8.cm2.x86_64.rpm +rpm-build-libs-4.17.0-8.cm2.x86_64.rpm +rpm-devel-4.17.0-8.cm2.x86_64.rpm +rpm-lang-4.17.0-8.cm2.x86_64.rpm +rpm-libs-4.17.0-8.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-1.cm2.x86_64.rpm diff --git a/toolkit/resources/manifests/package/toolchain_aarch64.txt b/toolkit/resources/manifests/package/toolchain_aarch64.txt index 8ceea246b18..70f3effe9e6 100644 --- a/toolkit/resources/manifests/package/toolchain_aarch64.txt +++ b/toolkit/resources/manifests/package/toolchain_aarch64.txt @@ -516,20 +516,20 @@ python3-markupsafe-2.1.0-1.cm2.aarch64.rpm python3-newt-0.52.21-4.cm2.aarch64.rpm python3-pip-3.9.12-1.cm2.noarch.rpm python3-pygments-2.4.2-7.cm2.noarch.rpm -python3-rpm-4.17.0-7.cm2.aarch64.rpm +python3-rpm-4.17.0-8.cm2.aarch64.rpm python3-setuptools-3.9.12-1.cm2.noarch.rpm python3-test-3.9.12-1.cm2.aarch64.rpm python3-tools-3.9.12-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.17.0-7.cm2.aarch64.rpm -rpm-build-4.17.0-7.cm2.aarch64.rpm -rpm-build-libs-4.17.0-7.cm2.aarch64.rpm -rpm-debuginfo-4.17.0-7.cm2.aarch64.rpm -rpm-devel-4.17.0-7.cm2.aarch64.rpm -rpm-lang-4.17.0-7.cm2.aarch64.rpm -rpm-libs-4.17.0-7.cm2.aarch64.rpm +rpm-4.17.0-8.cm2.aarch64.rpm +rpm-build-4.17.0-8.cm2.aarch64.rpm +rpm-build-libs-4.17.0-8.cm2.aarch64.rpm +rpm-debuginfo-4.17.0-8.cm2.aarch64.rpm +rpm-devel-4.17.0-8.cm2.aarch64.rpm +rpm-lang-4.17.0-8.cm2.aarch64.rpm +rpm-libs-4.17.0-8.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 3ba100f1099..afd5b569813 100644 --- a/toolkit/resources/manifests/package/toolchain_x86_64.txt +++ b/toolkit/resources/manifests/package/toolchain_x86_64.txt @@ -516,20 +516,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.12-1.cm2.noarch.rpm python3-pygments-2.4.2-7.cm2.noarch.rpm -python3-rpm-4.17.0-7.cm2.x86_64.rpm +python3-rpm-4.17.0-8.cm2.x86_64.rpm python3-setuptools-3.9.12-1.cm2.noarch.rpm python3-test-3.9.12-1.cm2.x86_64.rpm python3-tools-3.9.12-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.17.0-7.cm2.x86_64.rpm -rpm-build-4.17.0-7.cm2.x86_64.rpm -rpm-build-libs-4.17.0-7.cm2.x86_64.rpm -rpm-debuginfo-4.17.0-7.cm2.x86_64.rpm -rpm-devel-4.17.0-7.cm2.x86_64.rpm -rpm-lang-4.17.0-7.cm2.x86_64.rpm -rpm-libs-4.17.0-7.cm2.x86_64.rpm +rpm-4.17.0-8.cm2.x86_64.rpm +rpm-build-4.17.0-8.cm2.x86_64.rpm +rpm-build-libs-4.17.0-8.cm2.x86_64.rpm +rpm-debuginfo-4.17.0-8.cm2.x86_64.rpm +rpm-devel-4.17.0-8.cm2.x86_64.rpm +rpm-lang-4.17.0-8.cm2.x86_64.rpm +rpm-libs-4.17.0-8.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