From be25609845bff428cc1ffe2d2ae790d4add86302 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 4 Apr 2024 22:40:44 -0400 Subject: [PATCH] Use zstd instead of xz for filtered source archive compression This is based on the relative health of the upstream projects. --- .gitignore | 1 + get_source | 2 +- python-chardet.rpmlintrc | 4 +++- python-chardet.spec | 2 +- sources | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9a81b57..39daced 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /chardet-5.0.0-filtered.tar.xz /chardet-5.1.0-filtered.tar.xz /chardet-5.2.0-filtered.tar.xz +/chardet-5.2.0-filtered.tar.zst diff --git a/get_source b/get_source index 7b8cede..6ca292e 100755 --- a/get_source +++ b/get_source @@ -33,7 +33,7 @@ rm -rvf "${TARDIR}/tests/" # Restore the original mtime even though we modified the base directory by # removing the tests. touch -d @"${MTIME}" "${TARDIR}" -FILTERED="$(basename "${ARCHIVE}" .tar.gz)-filtered.tar.xz" +FILTERED="$(basename "${ARCHIVE}" .tar.gz)-filtered.tar.zst" echo "--> Re-archiving: ${FILTERED}" 1>&2 # https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html TZ=UTC LC_ALL=C tar \ diff --git a/python-chardet.rpmlintrc b/python-chardet.rpmlintrc index 9abf571..e12cd89 100644 --- a/python-chardet.rpmlintrc +++ b/python-chardet.rpmlintrc @@ -1,4 +1,6 @@ # Not a real spelling error: addFilter(r" spelling-error \('([Pp]rober)s?',") # This Source cannot be a URL because we must filter out certain files. -addFilter(r" invalid-url Source[0-9]+: chardet-.*-filtered\.tar\.xz") +addFilter(r" invalid-url Source[0-9]+: chardet-.*-filtered\.tar\.zst") +# Bogus; it is a perfectly fine zstandard file. +addFilter(r" inconsistent-file-extension chardet-.*-filtered\.tar\.zst$") diff --git a/python-chardet.spec b/python-chardet.spec index 268d02f..9fb3cab 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -22,7 +22,7 @@ URL: https://github.com/chardet/chardet # # problematic licensing of /tests? # https://github.com/chardet/chardet/issues/231 -Source0: chardet-%{version}-filtered.tar.xz +Source0: chardet-%{version}-filtered.tar.zst Source1: get_source # Hand-written for Fedora in groff_man(7) format based on --help output Source2: chardetect.1 diff --git a/sources b/sources index 92192b4..9250f6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (chardet-5.2.0-filtered.tar.xz) = 4ed51684c86bab8f4822035d180e375c7f4817e29b172363d1d5183043f0022f2c2245958a4b00064e6dda756c0c1d283bed9c41026c1be93fe87b13940e455c +SHA512 (chardet-5.2.0-filtered.tar.zst) = 4ed51684c86bab8f4822035d180e375c7f4817e29b172363d1d5183043f0022f2c2245958a4b00064e6dda756c0c1d283bed9c41026c1be93fe87b13940e455c