Accepting request 1132811 from home:bmwiedemann:branches:devel:languages:python

Add reproducible.patch for reproducible builds (boo#1062303)

There might be other/better ways to solve this,
but upstream moved pretty far already.

OBS-URL: https://build.opensuse.org/request/show/1132811
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rdflib?expand=0&rev=61
This commit is contained in:
Markéta Machová 2023-12-15 12:22:24 +00:00 committed by Git OBS Bridge
parent e9620768b3
commit 6575ff7ecd
3 changed files with 42 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Dec 13 08:40:59 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch for reproducible builds (boo#1062303)
-------------------------------------------------------------------
Mon Feb 7 23:38:10 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -26,6 +26,7 @@ Summary: A Python library for working with RDF
License: BSD-3-Clause
URL: http://rdflib.net/
Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
Patch0: reproducible.patch
BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module isodate}
BuildRequires: %{python_module pyparsing}
@ -66,6 +67,7 @@ The library also contains both in-memory and persistent Graph backends.
%prep
%setup -q -n rdflib-%{version}
%patch0 -p1
# remove unwanted shebang
find rdflib -name "*.py" | xargs sed -i '1 { /^#!/ d }'

35
reproducible.patch Normal file
View File

@ -0,0 +1,35 @@
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Wed Dec 13 09:28:20 2023 +0100
Mark Restriction and Individual as private
Fixes https://github.com/RDFLib/rdflib/issues/2645
Without this patch, the graph's random identifier leaked into
html/apidocs/rdflib.extras.html
See https://reproducible-builds.org/ for why this matters.
This patch was done while working on reproducible builds for openSUSE.
Index: rdflib-6.1.1/rdflib/extras/infixowl.py
===================================================================
--- rdflib-6.1.1.orig/rdflib/extras/infixowl.py
+++ rdflib-6.1.1/rdflib/extras/infixowl.py
@@ -365,6 +365,8 @@ class TermDeletionHelper:
class Individual(object):
"""
A typed individual
+
+ :meta private:
"""
factoryGraph = Graph()
@@ -1606,6 +1608,7 @@ class Restriction(Class):
individualRestrictionComponent
{ individualRestrictionComponent } ')'
+ :meta private:
"""
restrictionKinds = [