On 2026-11-25, James McCoy wrote:
> From 979654bae43fe845e6a748543a4b5059b0a80409 Mon Sep 17 00:00:00 2001
> From: James McCoy <[email protected]>
> 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 <[email protected]>
> ---
>  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..8e5dbaf6 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

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 }"
Execution of /usr/bin/dh_apache2 aborted due to compilation errors.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to