From c3ca9027562dd1fdc63ec9bf34c36b6bad41cb3b Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 4 Dec 2024 13:29:24 +0100 Subject: [PATCH] Set v6 default payload compression to w19T0.zstdio Keep the compression for source packages untouched to keep maximum forward compatibility for those. This also enables multi-threaded compression per default. Resolves: #3312 --- macros.in | 5 +++-- tests/rpmquery.at | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/macros.in b/macros.in index 613ed5756a..cb07970e13 100644 --- a/macros.in +++ b/macros.in @@ -370,7 +370,7 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ #%packager # Compression type and level for source/binary package payloads. -# "w9.gzdio" gzip level 9 (default). +# "w9.gzdio" gzip level 9 (v4 and srpm default) # "w9.bzdio" bzip2 level 9. # "w6.xzdio" xz level 6, xz's default. # "w7T16.xzdio" xz level 7 using 16 threads @@ -380,10 +380,11 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\ # "w3.zstdio" zstd level 3, zstd's default # "w19T8.zstdio" zstd level 19 using 8 threads # "w7T0.zstdio" zstd level 7 using %{getncpus} threads +# "w19.zstdio" zstd level 19 (v6 default) # "w.ufdio" uncompressed # #%_source_payload w9.gzdio -#%_binary_payload w9.gzdio +%_binary_payload %[ %_rpmformat >=6 ? "w19.zstdio" : "w9.gzdio" ] # Algorithm to use for generating file checksum digests on build. # If not specified or 0, MD5 is used. diff --git a/tests/rpmquery.at b/tests/rpmquery.at index 25d698e8da..32bc5ac5f8 100644 --- a/tests/rpmquery.at +++ b/tests/rpmquery.at @@ -1382,6 +1382,16 @@ runroot rpm -qp --filemime /build/RPMS/noarch/filetypes-1.0-1.noarch.rpm | sed - ], []) +RPMTEST_CHECK([ +runroot rpm -qp --requires /build/RPMS/noarch/filetypes-1.0-1.noarch.rpm +], +[0], +[rpmlib(CompressedFileNames) <= 3.0.4-1 +rpmlib(FileDigests) <= 4.6.0-1 +rpmlib(PayloadFilesHavePrefix) <= 4.0-1 +], +[]) + # v6 variants of the same RPMTEST_CHECK([[ runroot rpmbuild -bb --quiet \ @@ -1407,6 +1417,18 @@ runroot rpm -qp --filemime /build/RPMS/noarch/filetypes-1.0-1.noarch.rpm | sed - /opt/myscript.sh text/x-shellscript ], []) + +RPMTEST_CHECK([ +runroot rpm -qp --requires /build/RPMS/noarch/filetypes-1.0-1.noarch.rpm +], +[0], +[rpmlib(CompressedFileNames) <= 3.0.4-1 +rpmlib(FileDigests) <= 4.6.0-1 +rpmlib(LargeFiles) <= 4.12.0-1 +rpmlib(PayloadFilesHavePrefix) <= 4.0-1 +rpmlib(PayloadIsZstd) <= 5.4.18-1 +], +[]) RPMTEST_CLEANUP AT_SETUP([info query output])