From 13a8099fba2d5beafbecb1c0b37c670a98bbaaae Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 24 Jul 2023 11:41:24 -0400 Subject: [PATCH 1/5] Drop versioneer conditionals and let the dist-git branches diverge --- python-pymapvbvd.spec | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/python-pymapvbvd.spec b/python-pymapvbvd.spec index aba8ec0..c4b5f73 100644 --- a/python-pymapvbvd.spec +++ b/python-pymapvbvd.spec @@ -1,12 +1,3 @@ -# In the releases mentioned in the expression, the system versioneer is too old -# for the generated _version.py to have the get_version() function, and too old -# for the License tag to be accurate. We must use the bundled, amalgamated -# versioneer.py to generate _version.py. -# -# Otherwise, we can use the system versioneer to generate _version.py, and can -# remove the bundled, amaglamated versioneer.py to indicate we aren’t using it. -%bcond bundled_versioneer %{expr:0%{?fc37} || 0%{?fc38} || 0%{?el9}} - Name: python-pymapvbvd Version: 0.5.4 Release: %autorelease @@ -52,11 +43,14 @@ Summary: %{summary} # The generated _version.py has the same license as python3dist(versioneer), # but we do not consider it to be bundled from Versioneer. -%if %{with bundled_versioneer} +# +# The system versioneer is too old for the generated _version.py to have the +# get_version() function, and too old for the License tag to be accurate. We +# must use the bundled, amalgamated versioneer.py to generate _version.py. +# # While versioneer.py is a bundled copy of python3dist(versioneer) = 0.28, it # is not included in the binary RPMs, so we still do not treat it as bundled, # and there is no corresponding virtual Provides. -%endif %description -n python3-pymapvbvd %{common_description} @@ -64,24 +58,17 @@ Summary: %{summary} %prep %autosetup -n pyMapVBVD-%{version} -p1 %setup -q -T -D -b 1 -n pyMapVBVD-%{version} -%if %{without bundled_versioneer} -rm -v versioneer.py -%endif %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' -%if %{with bundled_versioneer} export PYTHONPATH="${PWD}" -%endif %pyproject_buildrequires -x tests %build export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' -%if %{with bundled_versioneer} export PYTHONPATH="${PWD}" -%endif %pyproject_wheel From 4279bf582046eab65edc1cf00edf8b0a794c3a71 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 25 Jul 2023 09:01:27 -0400 Subject: [PATCH 2/5] Add mandatory ExcludeArch bug link --- python-pymapvbvd.spec | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/python-pymapvbvd.spec b/python-pymapvbvd.spec index c4b5f73..c97fef2 100644 --- a/python-pymapvbvd.spec +++ b/python-pymapvbvd.spec @@ -14,15 +14,8 @@ Source1: pyMapVBVD-%{version}-test-data.tar.xz Source2: get_test_data.sh BuildArch: noarch -# The library assumes that the host and the file format are both little-endian. -# The necessary patch would not be trivial. Queried upstream: -# -# Big-endian host support? -# https://github.com/wtclarke/pymapvbvd/issues/35 -# -# A bug will be filed blocking F-ExcludeArch-s390x, per -# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_build_failures, -# once the package is imported. +# PyMapVBVD assumes the platform is little-endian +# https://bugzilla.redhat.com/show_bug.cgi?id=2225518 ExcludeArch: s390x BuildRequires: python3-devel From 0d84d5efd19da452a51fa221017a70965243ec0e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 10 Oct 2023 19:32:55 -0400 Subject: [PATCH 3/5] Update to 0.5.5 (close RHBZ#2243111) --- .gitignore | 2 ++ python-pymapvbvd.spec | 2 +- sources | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6087923..32ff9af 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /pyMapVBVD-0.5.3.tar.gz /pyMapVBVD-0.5.4.tar.gz /pyMapVBVD-0.5.4-test-data.tar.xz +/pyMapVBVD-0.5.5.tar.gz +/pyMapVBVD-0.5.5-test-data.tar.xz diff --git a/python-pymapvbvd.spec b/python-pymapvbvd.spec index c97fef2..8247205 100644 --- a/python-pymapvbvd.spec +++ b/python-pymapvbvd.spec @@ -1,5 +1,5 @@ Name: python-pymapvbvd -Version: 0.5.4 +Version: 0.5.5 Release: %autorelease Summary: Python twix file reader diff --git a/sources b/sources index 87b5987..4562551 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pyMapVBVD-0.5.4.tar.gz) = 1512db1aa15dcac460b87f100ecd9539a274f6b740f4024aee283cbc7fe3a0f466accd01e76bc393492c0088a797adaa0ae158c58ee36310ff6b0bac1666fb30 -SHA512 (pyMapVBVD-0.5.4-test-data.tar.xz) = c29bcd449fb39d2449a1c3e555d4d61f80bc09102156d2103366bad610fe70e3c0152e417899db4e51879faec61a6d087576332c16f82bb30eedc2296026bef6 +SHA512 (pyMapVBVD-0.5.5.tar.gz) = 7757d9963879efd4e69c6d61ec3e6fcd98153118f891b958351c720705c57cf48ec3dfc459ab0f69fe00b5d9bddc53621340f7b1f6bb88385408932b9fd32b19 +SHA512 (pyMapVBVD-0.5.5-test-data.tar.xz) = 8b0d548e1100b15942158e240e795b05a82a3c62ae44f4ccaea84977d4373c19d9ae6b93cd42f49823c4fbf113c3470e72431889d6aff870c4c6fed7202befa8 From 45d8b00a4e8233a73684c6db5f80b4ca90ed10c4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 11 Oct 2023 12:25:00 -0400 Subject: [PATCH 4/5] Make the test data source archive mostly-reproducible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should keep us from having to upload a fresh archive to the lookaside cache for a new version when the data hasn’t actually changed. --- .gitignore | 1 + get_test_data.sh | 25 +++++++++++++++++++++---- python-pymapvbvd.spec | 4 ++-- sources | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 32ff9af..3216808 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /pyMapVBVD-0.5.4-test-data.tar.xz /pyMapVBVD-0.5.5.tar.gz /pyMapVBVD-0.5.5-test-data.tar.xz +/pyMapVBVD-test-data.tar.xz diff --git a/get_test_data.sh b/get_test_data.sh index ab40fbd..a43c1ee 100755 --- a/get_test_data.sh +++ b/get_test_data.sh @@ -11,8 +11,13 @@ 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-\${VERSION}-test-data.tar.xz and will be written +result will be named pyMapVBVD-test-data.tar.xz and will be written into the current working directory. + +The script attempts to produce a reproducible archive to avoid uploading +near-duplicate archives to the lookaside cache when the test data does not +change from one version to the next. Accordingly, the top-level directory +pyMapVBVD-\${VERSION}/ is omitted from the archived paths. EOF } @@ -41,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="${TARDIR}-test-data.tar.xz" +NEWTAR='pyMapVBVD-test-data.tar.xz' SAVEDIR="${PWD}" XDIR="$(mktemp -d)" @@ -61,8 +66,20 @@ git lfs ls-files -n | ln "${fn}" "${DESTDIR}/$(basename "${fn}")" done -cd "${XDIR}" -tar -cv "${TARDIR}/" | xz -9e > "${NEWTAR}" +cd "${XDIR}/${TARDIR}" +# https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html +# We discard mtimes entirely, since git doesn’t store mtimes and they are just +# the time we did the git clone. +TZ=UTC LC_ALL=C tar \ + --create --verbose \ + --sort=name \ + --format=posix \ + --numeric-owner --owner=0 --group=0 \ + --mode=go+u,go-w \ + --pax-option='delete=atime,delete=ctime' \ + --clamp-mtime --mtime='@0' \ + . | + xz -9e > "${XDIR}/${NEWTAR}" cd "${SAVEDIR}" mv -v "${XDIR}/${NEWTAR}" . diff --git a/python-pymapvbvd.spec b/python-pymapvbvd.spec index 8247205..df555bd 100644 --- a/python-pymapvbvd.spec +++ b/python-pymapvbvd.spec @@ -10,7 +10,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-%{version}-test-data.tar.xz +Source1: pyMapVBVD-test-data.tar.xz Source2: get_test_data.sh BuildArch: noarch @@ -50,7 +50,7 @@ Summary: %{summary} %prep %autosetup -n pyMapVBVD-%{version} -p1 -%setup -q -T -D -b 1 -n pyMapVBVD-%{version} +%setup -q -T -D -a 1 -c -n pyMapVBVD-%{version} %generate_buildrequires diff --git a/sources b/sources index 4562551..bc0690d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pyMapVBVD-0.5.5.tar.gz) = 7757d9963879efd4e69c6d61ec3e6fcd98153118f891b958351c720705c57cf48ec3dfc459ab0f69fe00b5d9bddc53621340f7b1f6bb88385408932b9fd32b19 -SHA512 (pyMapVBVD-0.5.5-test-data.tar.xz) = 8b0d548e1100b15942158e240e795b05a82a3c62ae44f4ccaea84977d4373c19d9ae6b93cd42f49823c4fbf113c3470e72431889d6aff870c4c6fed7202befa8 +SHA512 (pyMapVBVD-test-data.tar.xz) = 9fa0530f68b02a8ff26fad1c463db217260c2f31a039b96f30a1fa6bb8b044ab8304edfd06abcaf5e9980ed355f29f0339c6e87e8dbddd67ae85457f384d45dd From d90fd702c2c639fe0a6dd894e5f6fb896e0c575d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 11 Oct 2023 13:12:11 -0400 Subject: [PATCH 5/5] Update to 0.5.6 (close RHBZ#2243258) --- .gitignore | 1 + python-pymapvbvd.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3216808..16ef41a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /pyMapVBVD-0.5.5.tar.gz /pyMapVBVD-0.5.5-test-data.tar.xz /pyMapVBVD-test-data.tar.xz +/pyMapVBVD-0.5.6.tar.gz diff --git a/python-pymapvbvd.spec b/python-pymapvbvd.spec index df555bd..0eff282 100644 --- a/python-pymapvbvd.spec +++ b/python-pymapvbvd.spec @@ -1,5 +1,5 @@ Name: python-pymapvbvd -Version: 0.5.5 +Version: 0.5.6 Release: %autorelease Summary: Python twix file reader diff --git a/sources b/sources index bc0690d..6457ba0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pyMapVBVD-0.5.5.tar.gz) = 7757d9963879efd4e69c6d61ec3e6fcd98153118f891b958351c720705c57cf48ec3dfc459ab0f69fe00b5d9bddc53621340f7b1f6bb88385408932b9fd32b19 +SHA512 (pyMapVBVD-0.5.6.tar.gz) = 72f22bf9c8fe8d8e4e4bc476312bacb83a434861b1f6ddd6ae0bf4a834da9a489547c5a90c49aeaf54dcd64d7695bb013019b413c828e7404c71ec15eb13699f SHA512 (pyMapVBVD-test-data.tar.xz) = 9fa0530f68b02a8ff26fad1c463db217260c2f31a039b96f30a1fa6bb8b044ab8304edfd06abcaf5e9980ed355f29f0339c6e87e8dbddd67ae85457f384d45dd