diff --git a/no-store-btime-gzip.patch b/no-store-btime-gzip.patch new file mode 100644 index 0000000..47aefe1 --- /dev/null +++ b/no-store-btime-gzip.patch @@ -0,0 +1,25 @@ +From 2e0fc9b9da0227b146258aa3831a416c7b023234 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Wed, 17 Jul 2024 07:50:46 +0200 +Subject: [PATCH] Avoid storing build time in gzip headers + +This allows to create bit-reproducible Python3.12/Python.devhelp.gz output. + +See https://reproducible-builds.org/ for why this is good. +--- + sphinxcontrib/devhelp/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sphinxcontrib/devhelp/__init__.py b/sphinxcontrib/devhelp/__init__.py +index bc99016..fc441d0 100644 +--- a/sphinxcontrib/devhelp/__init__.py ++++ b/sphinxcontrib/devhelp/__init__.py +@@ -124,7 +124,7 @@ def write_index(title: str, refs: list[Any], subitems: Any) -> None: + + # Dump the XML file + xmlfile = path.join(outdir, outname + '.devhelp.gz') +- with gzip.open(xmlfile, 'w') as f: ++ with gzip.GzipFile(filename=xmlfile, mode='w', mtime=0) as f: + tree.write(f, 'utf-8') # type: ignore + + diff --git a/python-sphinxcontrib-devhelp.changes b/python-sphinxcontrib-devhelp.changes index 4b6e97f..3dbaab1 100644 --- a/python-sphinxcontrib-devhelp.changes +++ b/python-sphinxcontrib-devhelp.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Fri Jul 19 17:56:18 UTC 2024 - Matej Cepl + +- Add no-store-btime-gzip.patch to fix bsc#1227999 by not storing + build time in gzip headers so as to make building documentation + reproducible +- Add rpmlintrc + +------------------------------------------------------------------- +Sun Jan 14 10:42:57 UTC 2024 - Dirk Müller + +- update to 1.0.6: + * Remove Sphinx as a required dependency, as circular + dependencies may cause failure with package managers that + expect a directed acyclic graph (DAG) of dependencies. + ------------------------------------------------------------------- Thu Sep 7 11:17:56 UTC 2023 - Dirk Müller diff --git a/python-sphinxcontrib-devhelp.rpmlintrc b/python-sphinxcontrib-devhelp.rpmlintrc new file mode 100644 index 0000000..cf2462c --- /dev/null +++ b/python-sphinxcontrib-devhelp.rpmlintrc @@ -0,0 +1,2 @@ +addFilter("hidden-file-or-dir /usr/lib/python.*/sphinxcontrib/devhelp/locales/.tx") +addFilter("file-not-in-%lang /usr/lib/python.*/site-packages/sphinxcontrib/devhelp/locales/.*\.mo") diff --git a/python-sphinxcontrib-devhelp.spec b/python-sphinxcontrib-devhelp.spec index eb635ab..ff35d8b 100644 --- a/python-sphinxcontrib-devhelp.spec +++ b/python-sphinxcontrib-devhelp.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-sphinxcontrib-devhelp # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,13 +26,17 @@ %endif %{?sle15_python_module_pythons} Name: python-sphinxcontrib-devhelp%{psuffix} -Version: 1.0.5 +Version: 1.0.6 Release: 0 Summary: Sphinx extension which outputs Devhelp documents License: BSD-2-Clause Group: Development/Languages/Python URL: https://github.com/sphinx-doc/sphinxcontrib-devhelp -Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-devhelp/sphinxcontrib_devhelp-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-devhelp/sphinxcontrib_devhelp-%{version}.tar.gz +Source99: python-sphinxcontrib-devhelp.rpmlintrc +# PATCH-FIX-UPSTREAM no-store-btime-gzip.patch bsc#1227999 mcepl@suse.com +# don't store build time in gzip headers to make building documentation reproducible +Patch0: no-store-btime-gzip.patch %if %{with test} BuildRequires: %{python_module Sphinx >= 5.0} BuildRequires: %{python_module pytest} @@ -43,7 +47,6 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-Sphinx >= 5.0 BuildArch: noarch %python_subpackages @@ -51,13 +54,13 @@ BuildArch: noarch sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. %prep -%setup -q -n sphinxcontrib_devhelp-%{version} +%autosetup -p1 -n sphinxcontrib_devhelp-%{version} %build %pyproject_wheel %install -%if !%{with test} +%if %{without test} %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -67,11 +70,13 @@ sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. %pytest %endif -%if !%{with test} +%if %{without test} %files %{python_files} %doc README.rst CHANGES %license LICENSE -%{python_sitelib}/* +%dir %{python_sitelib}/sphinxcontrib +%{python_sitelib}/sphinxcontrib/devhelp +%{python_sitelib}/sphinxcontrib_devhelp-%{version}*-info %endif %changelog diff --git a/sphinxcontrib_devhelp-1.0.5.tar.gz b/sphinxcontrib_devhelp-1.0.5.tar.gz deleted file mode 100644 index 0490be3..0000000 --- a/sphinxcontrib_devhelp-1.0.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63b41e0d38207ca40ebbeabcf4d8e51f76c03e78cd61abe118cf4435c73d4212 -size 12343 diff --git a/sphinxcontrib_devhelp-1.0.6.tar.gz b/sphinxcontrib_devhelp-1.0.6.tar.gz new file mode 100644 index 0000000..51bf1d4 --- /dev/null +++ b/sphinxcontrib_devhelp-1.0.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9893fd3f90506bc4b97bdb977ceb8fbd823989f4316b28c3841ec128544372d3 +size 12480