🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6261

Bug#1069907: dh_apache2: please output reproducible module package pre/post scripts.

#6261
From: James McCoy
Date: Thu, 26 Nov 2026 03:30
60 lines
4026 bytes
--n2bwrc7dtjn3qdgu
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline

On Wed, Nov 25, 2026 at 03:05:04PM -0800, Vagrant Cascadian wrote:
>Looks close! Thanks for working on it! ... but triggers FTBFS in
>subversion:
>
>make[1]: Leaving directory '/build/reproducible-path/subversion-1.15.0'
>   dh_apache2 -a -O--builddirectory=BUILD
>Not enough arguments for sort at /usr/bin/dh_apache2 line 465, near "sort }"

Oops, updated patch attached.

Cheers,
-- 
James (he/him)
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

--n2bwrc7dtjn3qdgu
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="0001-dh_apache2-Sort-File-Find-results.patch"

From a0316dd0a91b2e4ede0f87e5ac8f240dda9f2266 Mon Sep 17 00:00:00 2001
From: James McCoy <jamessan@debian.org>
Date: Mon, 23 Nov 2026 22:12:26 -0500
Subject: [PATCH] dh_apache2: Sort File::Find results

When no .apache2 file is present, the has_a_* arrays are populated by
using File::Find::find() to gather relevant files and pushing the
garnered data into the has_a_* arrays. Since the order the files are fed
to find() can vary, this produces non-reproducible results.

Use find()'s preprocess key to sort the files first.

Closes: #1069907
Signed-off-by: James McCoy <jamessan@debian.org>
---
 debian/debhelper/dh_apache2.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/debhelper/dh_apache2.in b/debian/debhelper/dh_apache2.in
index 862d2f85..cabfd5bd 100755
--- a/debian/debhelper/dh_apache2.in
+++ b/debian/debhelper/dh_apache2.in
@@ -462,6 +462,7 @@ foreach my $package ((@{$dh{DOPACKAGES}}))
 	{
 		# do black magic only if there is no .apache2 configuration file
 		find({  no_chdir => 1,
+			preprocess => sub { sort @_ },
 			wanted => sub
 			{
 				my ($dir, $file) = (dirname($File::Find::name), basename($File::Find::name));
-- 
2.53.0


--n2bwrc7dtjn3qdgu--
Technical Details
Message-ID: <O3ylj-ebXw-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <IxBiN-9c5j-1@gated-at.bofh.it> <IxBiN-9c5j-1@gated-at.bofh.it> <O37O9-dXH2-7@gated-at.bofh.it> <O3sSC-e8Tb-17@gated-at.bofh.it> <O3uhI-e9Ih-5@gated-at.bofh.it> <IxBiN-9c5j-1@gated-at.bofh.it> <O3uhI-e9Ih-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: James McCoy <jamessan@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1069907: dh_apache2: please output reproducible module package pre/post scripts.
Date: Thu, 26 Nov 2026 04:30:01 +0100
Message-ID: <O3ylj-ebXw-1@gated-at.bofh.it>
References: <IxBiN-9c5j-1@gated-at.bofh.it> <IxBiN-9c5j-1@gated-at.bofh.it> <O37O9-dXH2-7@gated-at.bofh.it> <O3sSC-e8Tb-17@gated-at.bofh.it> <O3uhI-e9Ih-5@gated-at.bofh.it> <IxBiN-9c5j-1@gated-at.bofh.it> <O3uhI-e9Ih-5@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Nov 26 03:21:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: James McCoy <jamessan@debian.org>, 1069907@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-apache@lists.debian.org
X-Debian-Pr-Message: followup 1069907
X-Debian-Pr-Package: apache2-dev
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: apache2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="n2bwrc7dtjn3qdgu"
Content-Disposition: inline
X-Debian-User: jamessan
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005134
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 60
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: 1069907@bugs.debian.org, James Addison <jay@jp-hosting.net>
X-Original-Date: Wed, 25 Nov 2026 22:19:52 -0500
X-Original-Message-ID: <awehFsv8Ve5cQoft@localhost>
X-Original-References: <171416628730.3394.11446425578811945454.reportbug@frontier> <171416628730.3394.11446425578811945454.reportbug@frontier> <87wlq1u94i.fsf@wireframe> <awdTa5-kOvd2eMCq@localhost> <87pkvsh5r3.fsf@wireframe> <171416628730.3394.11446425578811945454.reportbug@frontier> <87pkvsh5r3.fsf@wireframe>