Skip to content

Commit

Permalink
Set v6 default payload compression to w19.zstdio
Browse files Browse the repository at this point in the history
Keep the compression for source packages untouched to keep maximum
forward compatibility for those.

Resolves: #3312
  • Loading branch information
ffesti authored and pmatilai committed Dec 5, 2024
1 parent aa72243 commit 581a961
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
5 changes: 3 additions & 2 deletions macros.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
22 changes: 22 additions & 0 deletions tests/rpmquery.at
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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])
Expand Down

0 comments on commit 581a961

Please sign in to comment.