From d772e286e7cd3c6af9027f946dbdb731395ed36f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 2 Apr 2024 00:20:13 -0400 Subject: [PATCH] Compress test data with zstd instead of xz The result is a moderate size increase (~8%), but also tremendously faster decompression, which results in a modest but noticeable improvement in overall build time. The real basis for the change is the relative upstream healths of the two projects. --- .gitignore | 1 + get_test_data.sh | 6 +++--- python-pymapvbvd.rpmlintrc | 4 +++- python-pymapvbvd.spec | 2 +- sources | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 21f69e7..12f6815 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /pyMapVBVD-test-data.tar.xz /pyMapVBVD-0.5.6.tar.gz /pyMapVBVD-0.5.7.tar.gz +/pyMapVBVD-test-data.tar.zst diff --git a/get_test_data.sh b/get_test_data.sh index a43c1ee..b732e29 100755 --- a/get_test_data.sh +++ b/get_test_data.sh @@ -11,7 +11,7 @@ Usage: $1 VERSION Generate a source archive containing the test data files for pyMapVBVD that are tracked in git LFS and are not included in the default source archive. The -result will be named pyMapVBVD-test-data.tar.xz and will be written +result will be named pyMapVBVD-test-data.tar.zst and will be written into the current working directory. The script attempts to produce a reproducible archive to avoid uploading @@ -46,7 +46,7 @@ GITDIR="$(echo "${FORGEURL}" | sed -r 's@.*/@@')" #SOURCE0="${FORGEURL}/archive/${VERSION}/pdfminer.six-${VERSION}.tar.gz" #TARNAME="$(basename "${SOURCE0}")" TARDIR="pyMapVBVD-${VERSION}" -NEWTAR='pyMapVBVD-test-data.tar.xz' +NEWTAR='pyMapVBVD-test-data.tar.zst' SAVEDIR="${PWD}" XDIR="$(mktemp -d)" @@ -79,7 +79,7 @@ TZ=UTC LC_ALL=C tar \ --pax-option='delete=atime,delete=ctime' \ --clamp-mtime --mtime='@0' \ . | - xz -9e > "${XDIR}/${NEWTAR}" + zstdmt --ultra -22 > "${XDIR}/${NEWTAR}" cd "${SAVEDIR}" mv -v "${XDIR}/${NEWTAR}" . diff --git a/python-pymapvbvd.rpmlintrc b/python-pymapvbvd.rpmlintrc index 3eb93a5..89c2d18 100644 --- a/python-pymapvbvd.rpmlintrc +++ b/python-pymapvbvd.rpmlintrc @@ -4,4 +4,6 @@ addFilter(r" spelling-error \('(dat|twix)',") # This source cannot be a URL because we must use a script to download its # contents from git-lfs. -addFilter(r" invalid-url Source1: pyMapVBVD-test-data\.tar\.") +addFilter(r" invalid-url Source[0-9]+: pyMapVBVD-test-data\.tar\.zst$") +# Bogus; it is a perfectly fine zstandard file. +addFilter(r" inconsistent-file-extension pyMapVBVD-test-data\.tar\.zst$") diff --git a/python-pymapvbvd.spec b/python-pymapvbvd.spec index 836ac8c..d88cbc7 100644 --- a/python-pymapvbvd.spec +++ b/python-pymapvbvd.spec @@ -11,7 +11,7 @@ License: MIT AND Unlicense URL: https://github.com/wtclarke/pymapvbvd Source0: %{pypi_source pyMapVBVD} # Generated with Source2: ./get_test_data.sh %%{version} -Source1: pyMapVBVD-test-data.tar.xz +Source1: pyMapVBVD-test-data.tar.zst Source2: get_test_data.sh BuildArch: noarch diff --git a/sources b/sources index 2cc74d1..0935064 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pyMapVBVD-0.5.7.tar.gz) = 0efd2d12ec48ae7f825095edf440d14064cf0f1690ab7dee63f247a923d359f633d057086a1d3defd2bd1606dbba0d1fabe2f6360f3658d04c78f347b61771ce -SHA512 (pyMapVBVD-test-data.tar.xz) = e082c5c296c67d62dbfaa631a8507427ac74375902b2038bf5de58aed39f3ce71dd013318cb262d66bc3ab7bb0c560ea7228b52da09ed7361a0396b16e71b974 +SHA512 (pyMapVBVD-test-data.tar.zst) = 1b8106a2f0cde214eb545e09803ec042e7b40c93d9fbfcbe4d2b189b8d7146dc3ba4e63b53f9084bbee289e0bdcdd4f570453642b5553da9d70bdcdaf2ecd426