summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:41:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:41:09 +0000
commit77cbe979e2d594b90490d738456e9018373f111f (patch)
treeeda456b4d9bb193a8e730e436c6f9ae3ccec4ef9 /debian/patches
parentAdding upstream version 3.1.7. (diff)
downloadpsycopg3-77cbe979e2d594b90490d738456e9018373f111f.tar.xz
psycopg3-77cbe979e2d594b90490d738456e9018373f111f.zip
Adding debian version 3.1.7-4.debian/3.1.7-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/disable-postgresql-documentation-download.patch19
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/use-local-documentation.patch52
3 files changed, 73 insertions, 0 deletions
diff --git a/debian/patches/disable-postgresql-documentation-download.patch b/debian/patches/disable-postgresql-documentation-download.patch
new file mode 100644
index 0000000..b91e91f
--- /dev/null
+++ b/debian/patches/disable-postgresql-documentation-download.patch
@@ -0,0 +1,19 @@
+Description: Disable linking to PostgreSQL libpq documentation
+ Commented-out Sphinx module fetches PostgreSQL source SGML file.
+ I don't know yet how to fix it, so disabling for now; it could
+ be enabled again if we had a doc/src/sgml/libpq.sgml available.
+Forwarded: not-needed
+Author: Tomasz Rybak <serpent@debian.org>
+Last-Update: 2022-12-28
+Index: psycopg3/docs/conf.py
+===================================================================
+--- psycopg3.orig/docs/conf.py
++++ psycopg3/docs/conf.py
+@@ -43,7 +43,6 @@ extensions = [
+ "sql_role",
+ "ticket_role",
+ "pg3_docs",
+- "libpq_docs",
+ ]
+
+ # Add any paths that contain templates here, relative to this directory.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8505b25
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+use-local-documentation.patch
+disable-postgresql-documentation-download.patch
diff --git a/debian/patches/use-local-documentation.patch b/debian/patches/use-local-documentation.patch
new file mode 100644
index 0000000..25c0808
--- /dev/null
+++ b/debian/patches/use-local-documentation.patch
@@ -0,0 +1,52 @@
+Description: Ensure reproducible documentation
+ Do not fetch external Sphinx inverntory but use one from Debian packages.
+Forwarded: not-needed
+Author: Tomasz Rybak <serpent@debian.org>
+Last-Update: 2022-12-28
+Index: psycopg3/docs/conf.py
+===================================================================
+--- psycopg3.orig/docs/conf.py
++++ psycopg3/docs/conf.py
+@@ -96,8 +96,10 @@ html_static_path = ["_static"]
+ default_role = "obj"
+
+ intersphinx_mapping = {
+- "py": ("https://docs.python.org/3", None),
+- "pg2": ("https://www.psycopg.org/docs/", None),
++ "py": ("file:///usr/share/doc/python3-doc/html/",
++ "/usr/share/doc/python3-doc/html/objects.inv"),
++ "pg2": ("file:///usr/share/doc/python-psycopg2-doc/html/",
++ "/usr/share/doc/python-psycopg2-doc/html/objects.inv"),
+ }
+
+ autodoc_member_order = "bysource"
+
+ # PostgreSQL docs version to link libpq functions to
+-libpq_docs_version = "14"
++libpq_docs_version = "15"
+
+ # Where to point on :ticket: role
+ ticket_url = "https://github.com/psycopg/psycopg/issues/%s"
+Index: psycopg3/docs/lib/libpq_docs.py
+===================================================================
+--- psycopg3.orig/docs/lib/libpq_docs.py
++++ psycopg3/docs/lib/libpq_docs.py
+@@ -7,6 +7,8 @@ Add the ``:pq:`` role, to create a link
+
+ will link to::
+
++ file:///usr/share/doc/postgresql-doc-13/html/libpq-misc.html #LIBPQ-PQLIBVERSION
++previously to:
+ https://www.postgresql.org/docs/current/libpq-misc.html #LIBPQ-PQLIBVERSION
+
+ """
+@@ -89,8 +91,7 @@ class LibpqReader:
+ app = None
+
+ _url_pattern = (
+- "https://raw.githubusercontent.com/postgres/postgres/REL_{ver}_STABLE"
+- "/doc/src/sgml/libpq.sgml"
++ "file:///usr/share/doc/postgresql-doc-{version}/html/{section}.html#{func_id}"
+ )
+
+ data = None