Source: pampi
Version: 1.3+dfsg1-4
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: filesytem
X-Debbugs-Cc: [email protected]

Hi,

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

This is because two parts of upstream's build system iterates over the
filesystem in "filesystem naive" order, without sorting.

Patch attached. Note that $(wildcard ...) sorts by default.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1969-12-31 16:00:00.000000000 
-0800
--- b/debian/patches/reproducible-build.patch   2026-05-14 12:40:24.891186333 
-0700
@@ -0,0 +1,25 @@
+Description: Make the build reproducible
+Author: Chris Lamb <[email protected]>
+Last-Update: 2026-05-14
+
+--- pampi-1.3+dfsg1.orig/pampi/libs/Makefile
++++ pampi-1.3+dfsg1/pampi/libs/Makefile
+@@ -1,5 +1,5 @@
+-UIFILES = $(shell ls *.ui)
+-RCFILES = $(shell ls *.rc)
++UIFILES = $(wildcard *.ui)
++RCFILES = $(wildcard *.rc)
+ PyUIFILES = $(patsubst %.ui, ui_%.py, $(UIFILES))
+ PyRCFILES = $(patsubst %.rc, rc_%.py, $(RCFILES))
+ 
+--- pampi-1.3+dfsg1.orig/pampi/translations/make_pampi.pro.py
++++ pampi-1.3+dfsg1/pampi/translations/make_pampi.pro.py
+@@ -7,7 +7,7 @@ if __name__ == "__main__":
+     with open(infileName) as infile, open("pampi.pro", "w") as outfile:
+         # ajout de toutes les sources de plugins
+         pluginFiles =  os.scandir("../libs/plugins")
+-        for p in pluginFiles:
++        for p in sorted(pluginFiles, key=lambda x: x.path):
+             if p.path.endswith(".py"):
+                 outfile.write("SOURCES      += " + p.path + "\n")
+         outfile.write("\n")
--- a/debian/patches/series     2026-05-14 12:31:11.552121381 -0700
--- b/debian/patches/series     2026-05-14 12:32:55.393062303 -0700
@@ -4,3 +4,4 @@
 change-font-path.patch
 script-nonfree.patch
 pampi-nonfree.patch
+reproducible-build.patch

Reply via email to