Bug#1068795: pympress: please make the build reproducible

2026-05-14 Thread Vagrant Cascadian
On 2026-05-02, Vagrant Cascadian wrote:
> On 2025-01-24, Vagrant Cascadian wrote:
>> On 2024-04-11, Chris Lamb wrote:
>>> Whilst working on the Reproducible Builds effort [0], we noticed that
>>> pympress could not be built reproducibly.
>>>
>>> This is because the generated documentation included memory references
>>> such as the following:
>>>
>>>   pointer = >> 0x1d4cf90)>
>>>
>>> A patch attached that uses Python's "default = None […] if default is
>>> None: default = realdefault" pattern.
>>
>> I found two more issues:
>>
>> The documentation is afffected by LANGUAGE and LC_ALL environment
>> variables.
>>
>> The kernel version is embeded in the documentation.
>>
>> With the two additional patches applied and the original patch submitted
>> by Chris, I think pympress should build reproducibly!
>
> I have confirmed that the patches are still needed and still fix the
> issues. An updated diff attached.
>
> I would like to fix this with an NMU sometime in the coming week or two,
> please let me know if there are any outstanding concerns!

I have uploaded an NMU to DELAYED/10. Debdiff attached!

live well,
  vagrant
diff -Nru pympress-1.8.5/debian/changelog pympress-1.8.5/debian/changelog
--- pympress-1.8.5/debian/changelog 2025-05-09 21:19:22.0 -0700
+++ pympress-1.8.5/debian/changelog 2026-05-14 10:08:25.0 -0700
@@ -1,3 +1,17 @@
+pympress (1.8.5-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Chris Lamb ]
+  * Make the build reproducible (Closes: #1068795)
+
+  [ Vagrant Cascadian ]
+  * pympress/app.py: Redact platform.release and platform.version for
+reproducible builds.
+  * debian/rules: Force locale for documentation generation.
+
+ -- Vagrant Cascadian   Thu, 14 May 2026 
10:08:25 -0700
+
 pympress (1.8.5-4) unstable; urgency=medium
 
   * Team upload.
diff -Nru 
pympress-1.8.5/debian/patches/make-the-build-reproducible-closes-10687.patch 
pympress-1.8.5/debian/patches/make-the-build-reproducible-closes-10687.patch
--- 
pympress-1.8.5/debian/patches/make-the-build-reproducible-closes-10687.patch
1969-12-31 16:00:00.0 -0800
+++ 
pympress-1.8.5/debian/patches/make-the-build-reproducible-closes-10687.patch
2026-05-14 10:08:25.0 -0700
@@ -0,0 +1,49 @@
+From: Chris Lamb 
+Date: Thu, 11 Apr 2024 17:33:55 -0700
+X-Dgit-Generated: 1.8.5-4 aa7e3587e4dbd812b31a72c314b9685ef01a20ed
+Subject: Make the build reproducible (Closes: #1068795)
+
+
+---
+
+diff --git a/pympress/app.py b/pympress/app.py
+index 7f5e3b7..70dd42c 100644
+--- a/pympress/app.py
 b/pympress/app.py
+@@ -150,11 +150,14 @@ class Pympress(Gtk.Application):
+ Gtk.Application.do_startup(self)
+ 
+ 
+-def do_activate(self, timestamp=GLib.get_current_time()):
++def do_activate(self, timestamp=None):
+ """ Activate: show UI windows.
+ 
+ Build them if they do not exist, otherwise bring to front.
+ """
++if timestamp is None:
++timestamp = GLib.get_current_time()
++
+ if self.gui is None:
+ if self.auto_log_level:
+ self.activate_action('log-level', logging.INFO)
+diff --git a/pympress/pointer.py b/pympress/pointer.py
+index 1e02b40..98ab58a 100644
+--- a/pympress/pointer.py
 b/pympress/pointer.py
+@@ -57,7 +57,7 @@ class Pointer(object):
+ builder (:class:`~pympress.builder.Builder`): A builder from which to 
load widgets
+ """
+ #: :class:`~GdkPixbuf.Pixbuf` to read XML descriptions of GUIs and load 
them.
+-pointer = GdkPixbuf.Pixbuf()
++pointer = None
+ #: `(float, float)` of position relative to slide, where the pointer 
should appear
+ pointer_pos = (.5, .5)
+ #: `bool` indicating whether we should show the pointer
+@@ -84,6 +84,7 @@ class Pointer(object):
+ 
+ def __init__(self, config, builder):
+ super(Pointer, self).__init__()
++self.pointer = GdkPixbuf.Pixbuf()
+ self.config = config
+ 
+ builder.load_widgets(self)
diff -Nru 
pympress-1.8.5/debian/patches/pympressapp.py-redact-platform.release-a.patch 
pympress-1.8.5/debian/patches/pympressapp.py-redact-platform.release-a.patch
--- 
pympress-1.8.5/debian/patches/pympressapp.py-redact-platform.release-a.patch
1969-12-31 16:00:00.0 -0800
+++ 
pympress-1.8.5/debian/patches/pympressapp.py-redact-platform.release-a.patch
2026-05-14 10:08:25.0 -0700
@@ -0,0 +1,22 @@
+From: Vagrant Cascadian 
+Date: Fri, 24 Jan 2025 14:53:44 -0800
+X-Dgit-Generated: 1.8.5-4 6bbd467f18ec43b22862edb8dd90e2f820ef799d
+Subject: pympress/app.py: Redact platform.release and platform.version for
+
+reproducible builds.
+
+---
+
+diff --git a/pympress/app.py b/pympress/app.py
+index 70dd42c..9d9b882 100644
+--- a/pympress/app.py
 b/pympress/app.py
+@@ -91,7 +91,7 @@ class Pympress(Gtk.Application):
+ version_string = ' '.join([
+ 'Pympress:', util.get_pympress_meta()['version'],
+ '; Python:', platform.python_ver

Bug#1068795: pympress: please make the build reproducible

2026-05-02 Thread Vagrant Cascadian
On 2025-01-24, Vagrant Cascadian wrote:
> On 2024-04-11, Chris Lamb wrote:
>> Whilst working on the Reproducible Builds effort [0], we noticed that
>> pympress could not be built reproducibly.
>>
>> This is because the generated documentation included memory references
>> such as the following:
>>
>>   pointer = > 0x1d4cf90)>
>>
>> A patch attached that uses Python's "default = None […] if default is
>> None: default = realdefault" pattern.
>
> I found two more issues:
>
> The documentation is afffected by LANGUAGE and LC_ALL environment
> variables.
>
> The kernel version is embeded in the documentation.
>
> With the two additional patches applied and the original patch submitted
> by Chris, I think pympress should build reproducibly!

I have confirmed that the patches are still needed and still fix the
issues. An updated diff attached.

I would like to fix this with an NMU sometime in the coming week or two,
please let me know if there are any outstanding concerns!

live well,
  vagrant
diff --git a/debian/patches/make-the-build-reproducible-closes-10687.patch b/debian/patches/make-the-build-reproducible-closes-10687.patch
new file mode 100644
index 000..c834d23
--- /dev/null
+++ b/debian/patches/make-the-build-reproducible-closes-10687.patch
@@ -0,0 +1,49 @@
+From: Chris Lamb 
+Date: Thu, 11 Apr 2024 17:33:55 -0700
+X-Dgit-Generated: 1.8.5-4 aa7e3587e4dbd812b31a72c314b9685ef01a20ed
+Subject: Make the build reproducible (Closes: #1068795)
+
+
+---
+
+diff --git a/pympress/app.py b/pympress/app.py
+index 7f5e3b7..70dd42c 100644
+--- a/pympress/app.py
 b/pympress/app.py
+@@ -150,11 +150,14 @@ class Pympress(Gtk.Application):
+ Gtk.Application.do_startup(self)
+ 
+ 
+-def do_activate(self, timestamp=GLib.get_current_time()):
++def do_activate(self, timestamp=None):
+ """ Activate: show UI windows.
+ 
+ Build them if they do not exist, otherwise bring to front.
+ """
++if timestamp is None:
++timestamp = GLib.get_current_time()
++
+ if self.gui is None:
+ if self.auto_log_level:
+ self.activate_action('log-level', logging.INFO)
+diff --git a/pympress/pointer.py b/pympress/pointer.py
+index 1e02b40..98ab58a 100644
+--- a/pympress/pointer.py
 b/pympress/pointer.py
+@@ -57,7 +57,7 @@ class Pointer(object):
+ builder (:class:`~pympress.builder.Builder`): A builder from which to load widgets
+ """
+ #: :class:`~GdkPixbuf.Pixbuf` to read XML descriptions of GUIs and load them.
+-pointer = GdkPixbuf.Pixbuf()
++pointer = None
+ #: `(float, float)` of position relative to slide, where the pointer should appear
+ pointer_pos = (.5, .5)
+ #: `bool` indicating whether we should show the pointer
+@@ -84,6 +84,7 @@ class Pointer(object):
+ 
+ def __init__(self, config, builder):
+ super(Pointer, self).__init__()
++self.pointer = GdkPixbuf.Pixbuf()
+ self.config = config
+ 
+ builder.load_widgets(self)
diff --git a/debian/patches/pympressapp.py-redact-platform.release-a.patch b/debian/patches/pympressapp.py-redact-platform.release-a.patch
new file mode 100644
index 000..401c945
--- /dev/null
+++ b/debian/patches/pympressapp.py-redact-platform.release-a.patch
@@ -0,0 +1,22 @@
+From: Vagrant Cascadian 
+Date: Fri, 24 Jan 2025 14:53:44 -0800
+X-Dgit-Generated: 1.8.5-4 6bbd467f18ec43b22862edb8dd90e2f820ef799d
+Subject: pympress/app.py: Redact platform.release and platform.version for
+
+reproducible builds.
+
+---
+
+diff --git a/pympress/app.py b/pympress/app.py
+index 70dd42c..9d9b882 100644
+--- a/pympress/app.py
 b/pympress/app.py
+@@ -91,7 +91,7 @@ class Pympress(Gtk.Application):
+ version_string = ' '.join([
+ 'Pympress:', util.get_pympress_meta()['version'],
+ '; Python:', platform.python_version(),
+-'; OS:', platform.system(), platform.release(), platform.version(),
++'; OS:', platform.system(), 'REDACTED', 'REDACTED',
+ '; Gtk {}.{}.{}'.format(Gtk.get_major_version(), Gtk.get_minor_version(), Gtk.get_micro_version()),
+ '; GLib {}.{}.{}'.format(GLib.MAJOR_VERSION, GLib.MINOR_VERSION, GLib.MICRO_VERSION),
+ '; Poppler', document.Poppler.get_version(), document.Poppler.get_backend().value_nick,
diff --git a/debian/patches/series b/debian/patches/series
index 1aa021e..909f4c2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,5 @@
 fix-docs-build.patch
 setup.cfg-underscore.patch
 0006-Work-around-pygobject-iterator.patch
+make-the-build-reproducible-closes-10687.patch
+pympressapp.py-redact-platform.release-a.patch
diff --git a/debian/rules b/debian/rules
index 08aef4f..c804539 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,9 @@ export PYBUILD_DESTDIR_python3 = debian/pympress/
 # Needed by sphinx build
 export HOME=$(CURDIR)/debian/fakehome/
 
+export LANGUAGE=en
+export LC_ALL=C.UTF-8
+
 %:
 	dh $@ --with sphinxdoc --buildsystem=pybuild
 



Bug#1068795: pympress: please make the build reproducible

2025-01-24 Thread Vagrant Cascadian
On 2024-04-11, Chris Lamb wrote:
> Whilst working on the Reproducible Builds effort [0], we noticed that
> pympress could not be built reproducibly.
>
> This is because the generated documentation included memory references
> such as the following:
>
>   pointer =  0x1d4cf90)>
>
> A patch attached that uses Python's "default = None […] if default is
> None: default = realdefault" pattern.

I found two more issues:

The documentation is afffected by LANGUAGE and LC_ALL environment
variables.

The kernel version is embeded in the documentation.

With the two additional patches applied and the original patch submitted
by Chris, I think pympress should build reproducibly!

live well,
  vagrant
From 9d0ea933d092b674903ce1b9c2e95e35753b7274 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian 
Date: Fri, 24 Jan 2025 14:43:00 -0800
Subject: [PATCH 1/2] debian/rules: Force locale for documentation generation.

---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 08aef4f..c804539 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,9 @@ export PYBUILD_DESTDIR_python3 = debian/pympress/
 # Needed by sphinx build
 export HOME=$(CURDIR)/debian/fakehome/
 
+export LANGUAGE=en
+export LC_ALL=C.UTF-8
+
 %:
 	dh $@ --with sphinxdoc --buildsystem=pybuild
 
-- 
2.39.5

From 21f3b58bc8849b160bf139ba62804a1b81668065 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian 
Date: Fri, 24 Jan 2025 14:53:44 -0800
Subject: [PATCH 2/2] pympress/app.py: Redact platform.release and
 platform.version for reproducible builds.

---
 pympress/app.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pympress/app.py b/pympress/app.py
index 70dd42c..9d9b882 100644
--- a/pympress/app.py
+++ b/pympress/app.py
@@ -91,7 +91,7 @@ class Pympress(Gtk.Application):
 version_string = ' '.join([
 'Pympress:', util.get_pympress_meta()['version'],
 '; Python:', platform.python_version(),
-'; OS:', platform.system(), platform.release(), platform.version(),
+'; OS:', platform.system(), 'REDACTED', 'REDACTED',
 '; Gtk {}.{}.{}'.format(Gtk.get_major_version(), Gtk.get_minor_version(), Gtk.get_micro_version()),
 '; GLib {}.{}.{}'.format(GLib.MAJOR_VERSION, GLib.MINOR_VERSION, GLib.MICRO_VERSION),
 '; Poppler', document.Poppler.get_version(), document.Poppler.get_backend().value_nick,
-- 
2.39.5



signature.asc
Description: PGP signature


Bug#1068795: pympress: please make the build reproducible

2024-04-11 Thread Chris Lamb
Source: pympress
Version: 1.8.5-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
pympress could not be built reproducibly.

This is because the generated documentation included memory references
such as the following:

  pointer = 

A patch attached that uses Python's "default = None […] if default is
None: default = realdefault" pattern.

 [0] https://reproducible-builds.org/


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  [email protected] / chris-lamb.co.uk
   `-


--- a/debian/patches/0005-Reproducible-build.patch  1970-01-01 
01:00:00.0 +0100
--- b/debian/patches/0005-Reproducible-build.patch  2024-04-11 
09:53:13.602746588 +0100
@@ -0,0 +1,41 @@
+Description: Make the build reproducible
+Author: Chris Lamb 
+Last-Update: 2024-04-11
+
+--- pympress-1.8.5.orig/pympress/app.py
 pympress-1.8.5/pympress/app.py
+@@ -150,11 +150,14 @@ class Pympress(Gtk.Application):
+ Gtk.Application.do_startup(self)
+ 
+ 
+-def do_activate(self, timestamp=GLib.get_current_time()):
++def do_activate(self, timestamp=None):
+ """ Activate: show UI windows.
+ 
+ Build them if they do not exist, otherwise bring to front.
+ """
++if timestamp is None:
++timestamp = GLib.get_current_time()
++
+ if self.gui is None:
+ if self.auto_log_level:
+ self.activate_action('log-level', logging.INFO)
+--- pympress-1.8.5.orig/pympress/pointer.py
 pympress-1.8.5/pympress/pointer.py
+@@ -57,7 +57,7 @@ class Pointer(object):
+ builder (:class:`~pympress.builder.Builder`): A builder from which to 
load widgets
+ """
+ #: :class:`~GdkPixbuf.Pixbuf` to read XML descriptions of GUIs and load 
them.
+-pointer = GdkPixbuf.Pixbuf()
++pointer = None
+ #: `(float, float)` of position relative to slide, where the pointer 
should appear
+ pointer_pos = (.5, .5)
+ #: `bool` indicating whether we should show the pointer
+@@ -84,6 +84,7 @@ class Pointer(object):
+ 
+ def __init__(self, config, builder):
+ super(Pointer, self).__init__()
++self.pointer = GdkPixbuf.Pixbuf()
+ self.config = config
+ 
+ builder.load_widgets(self)
--- a/debian/patches/series 2024-04-11 09:37:21.205740724 +0100
--- b/debian/patches/series 2024-04-11 09:48:11.045127589 +0100
@@ -1,3 +1,4 @@
 0002-intersphinx.patch
 0003-README-privacy.patch
 0004-Options-privacy.patch
+0005-Reproducible-build.patch