From a2dfb71ccd49eb011bd10ba556d3f461426e59fd Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Fri, 29 Mar 2024 17:12:59 +0000 Subject: [PATCH 1/3] kernel: compress modules with gzip Signed-off-by: Ben Cressey --- packages/kernel-5.10/config-bottlerocket | 4 ++-- packages/kernel-5.15/config-bottlerocket | 4 ++-- packages/kernel-6.1/config-bottlerocket | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/kernel-5.10/config-bottlerocket b/packages/kernel-5.10/config-bottlerocket index 264e12b633c..48a9d61ae52 100644 --- a/packages/kernel-5.10/config-bottlerocket +++ b/packages/kernel-5.10/config-bottlerocket @@ -91,9 +91,9 @@ CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y CONFIG_DECOMPRESS_ZSTD=y -# Enable xz modules compression +# Enable gz modules compression CONFIG_MODULE_COMPRESS=y -CONFIG_MODULE_COMPRESS_XZ=y +CONFIG_MODULE_COMPRESS_GZIP=y # Load i8042 controller, keyboard, and mouse as modules, to avoid waiting for # them before mounting the root device. diff --git a/packages/kernel-5.15/config-bottlerocket b/packages/kernel-5.15/config-bottlerocket index 3e963c6ed94..17c211587e6 100644 --- a/packages/kernel-5.15/config-bottlerocket +++ b/packages/kernel-5.15/config-bottlerocket @@ -115,9 +115,9 @@ CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y CONFIG_DECOMPRESS_ZSTD=y -# Enable xz modules compression +# Enable gz modules compression # CONFIG_MODULE_COMPRESS_NONE is not set -CONFIG_MODULE_COMPRESS_XZ=y +CONFIG_MODULE_COMPRESS_GZIP=y # Add virtio drivers for development setups running as guests in qemu CONFIG_VIRTIO_CONSOLE=m diff --git a/packages/kernel-6.1/config-bottlerocket b/packages/kernel-6.1/config-bottlerocket index 000efd66e84..812bf19cb62 100644 --- a/packages/kernel-6.1/config-bottlerocket +++ b/packages/kernel-6.1/config-bottlerocket @@ -120,9 +120,9 @@ CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y CONFIG_DECOMPRESS_ZSTD=y -# Enable xz modules compression +# Enable gz modules compression # CONFIG_MODULE_COMPRESS_NONE is not set -CONFIG_MODULE_COMPRESS_XZ=y +CONFIG_MODULE_COMPRESS_GZIP=y # Add virtio drivers for development setups running as guests in qemu CONFIG_VIRTIO_CONSOLE=m From 12fea8f31b51eea7c45d0c0d7abbc77e396f41f2 Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Fri, 29 Mar 2024 17:13:27 +0000 Subject: [PATCH 2/3] kmod: build with zlib instead of lzma Signed-off-by: Ben Cressey --- packages/kmod/Cargo.toml | 2 +- packages/kmod/kmod.spec | 9 ++++----- variants/Cargo.lock | 9 +-------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/kmod/Cargo.toml b/packages/kmod/Cargo.toml index cfc05a9e331..84bee98b5f3 100644 --- a/packages/kmod/Cargo.toml +++ b/packages/kmod/Cargo.toml @@ -17,5 +17,5 @@ sha512 = "05ca70381808bec5f262b94db625662c385408988178a35e4aaf4960ee0716dc0cbfc3 [build-dependencies] glibc = { path = "../glibc" } -liblzma = { path = "../liblzma" } +libz = { path = "../libz" } libzstd = { path = "../libzstd" } diff --git a/packages/kmod/kmod.spec b/packages/kmod/kmod.spec index 808723224d2..80046f55465 100644 --- a/packages/kmod/kmod.spec +++ b/packages/kmod/kmod.spec @@ -6,9 +6,9 @@ License: GPL-2.0-or-later AND LGPL-2.1-or-later URL: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-%{version}.tar.xz BuildRequires: %{_cross_os}glibc-devel -BuildRequires: %{_cross_os}liblzma-devel +BuildRequires: %{_cross_os}libz-devel BuildRequires: %{_cross_os}libzstd-devel -Requires: %{_cross_os}liblzma +Requires: %{_cross_os}libz Requires: %{_cross_os}libzstd %description @@ -28,10 +28,9 @@ cp tools/COPYING COPYING.GPL %build %cross_configure \ - --with-xz \ + --with-zlib \ --with-zstd \ - --without-openssl \ - --without-zlib + --without-openssl %make_build diff --git a/variants/Cargo.lock b/variants/Cargo.lock index febf0798b83..49889c4cde2 100644 --- a/variants/Cargo.lock +++ b/variants/Cargo.lock @@ -557,7 +557,7 @@ name = "kmod" version = "0.1.0" dependencies = [ "glibc", - "liblzma", + "libz", "libzstd", ] @@ -746,13 +746,6 @@ dependencies = [ "glibc", ] -[[package]] -name = "liblzma" -version = "0.1.0" -dependencies = [ - "glibc", -] - [[package]] name = "libmnl" version = "0.1.0" From 13a3ce222101c8e148ac2627e74f9cba06a09fa3 Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Fri, 29 Mar 2024 17:12:24 +0000 Subject: [PATCH 3/3] packages: remove liblzma Signed-off-by: Ben Cressey --- packages/liblzma/Cargo.toml | 19 -------------- packages/liblzma/liblzma.spec | 49 ----------------------------------- 2 files changed, 68 deletions(-) delete mode 100644 packages/liblzma/Cargo.toml delete mode 100644 packages/liblzma/liblzma.spec diff --git a/packages/liblzma/Cargo.toml b/packages/liblzma/Cargo.toml deleted file mode 100644 index 169de559952..00000000000 --- a/packages/liblzma/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "liblzma" -version = "0.1.0" -edition = "2021" -publish = false -build = "../build.rs" - -[lib] -path = "../packages.rs" - -[package.metadata.build-package] -releases-url = "https://tukaani.org/xz" - -[[package.metadata.build-package.external-files]] -url = "https://tukaani.org/xz/xz-5.4.5.tar.xz" -sha512 = "5cbc3b5bb35a9f5773ad657788fe77013471e3b621c5a8149deb7389d48535926e5bed103456fcfe5ecb044b236b1055b03938a6cc877cfc749372b899fc79e5" - -[build-dependencies] -glibc = { path = "../glibc" } diff --git a/packages/liblzma/liblzma.spec b/packages/liblzma/liblzma.spec deleted file mode 100644 index 946495c72e0..00000000000 --- a/packages/liblzma/liblzma.spec +++ /dev/null @@ -1,49 +0,0 @@ -Name: %{_cross_os}liblzma -Version: 5.4.5 -Release: 1%{?dist} -Summary: Library for XZ and LZMA compressed files -URL: https://tukaani.org/xz -License: LicenseRef-scancode-lzma-sdk-pd -Source: https://tukaani.org/xz/xz-%{version}.tar.xz -BuildRequires: %{_cross_os}glibc-devel - -%description -%{summary}. - -%package devel -Summary: Files for development using the library for XZ and LZMA compression -Requires: %{name} - -%description devel -%{summary}. - -%prep -%setup -n xz-%{version} - -%build -%cross_configure \ - --disable-doc \ - --disable-lzma-links \ - --disable-lzmadec \ - --disable-lzmainfo \ - --disable-scripts \ - --disable-xz \ - --disable-xzdec -%make_build - -%install -%make_install - -%files -%license COPYING -%{_cross_attribution_file} -%{_cross_libdir}/*.so.* -%exclude %{_cross_localedir} - -%files devel -%{_cross_includedir}/*.h -%{_cross_includedir}/lzma/*.h -%{_cross_libdir}/*.a -%{_cross_libdir}/*.so -%{_cross_pkgconfigdir}/*.pc -%exclude %{_cross_libdir}/*.la