Skip to content

Commit

Permalink
Reduce base RPM package size, re-add in container image (#3056)
Browse files Browse the repository at this point in the history
* Reduce rpm size and reinstate in container image

* Updated per code review comments
  • Loading branch information
jslobodzian authored May 27, 2022
1 parent 024943f commit 8c3cf71
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 34 deletions.
7 changes: 5 additions & 2 deletions SPECS/core-packages/core-packages.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -39,7 +39,6 @@ Requires: net-tools
Requires: openssh-clients
Requires: pkg-config
Requires: procps-ng
Requires: rpm
Requires: sudo
Requires: systemd
Requires: tar
Expand Down Expand Up @@ -69,6 +68,7 @@ Requires: nspr
Requires: nss-libs
Requires: openssl
Requires: readline
Requires: rpm
Requires: rpm-libs
Requires: sed
Requires: sqlite-libs
Expand All @@ -89,6 +89,9 @@ Requires: zlib
%files container

%changelog
* Tue May 24 2022 Jon Slobodzian <[email protected]> - 2.0-6
- Add rpm to base container image

* Wed May 04 2022 Suresh Babu Chalamalasetty <[email protected]> - 2.0-5
- Add gzip and sed to base container image

Expand Down
12 changes: 8 additions & 4 deletions SPECS/rpm/rpm.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -82,6 +82,7 @@ Requires: elfutils-devel
Requires: elfutils-libelf
Requires: file
Requires: gzip
Requires: lua
Requires: mariner-rpm-macros
Requires: patch
Requires: tar
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -276,6 +276,10 @@ popd
%{python3_sitelib}/*

%changelog
* Tue May 24 2022 Jon Slobodzian <[email protected]> - 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 <[email protected]> - 4.17.0-7
- Add missing dependencies to rpmbuild (file, diff and patch)

Expand Down
12 changes: 6 additions & 6 deletions toolkit/resources/manifests/package/pkggen_core_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions toolkit/resources/manifests/package/pkggen_core_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions toolkit/resources/manifests/package/toolchain_aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions toolkit/resources/manifests/package/toolchain_x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c3cf71

Please sign in to comment.