Article View: linux.debian.bugs.dist
Article #6028Bug#1069907: dh_apache2: please output reproducible module package pre/post scripts.
From: Vagrant Cascadian
Date: Tue, 24 Nov 2026 23:10
Date: Tue, 24 Nov 2026 23:10
112 lines
5959 bytes
5959 bytes
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Control: affects 1069907 subversion
On 2024-04-26, James Addison wrote:
> I'm an occasional volunteer contributor to the Reproducible Builds[1] pro=
ject,
> and noticed recently that an Apache webserver module, mod-mono, that depe=
nds[2]
> on the dh_apache2 debhelper utility from apache2-dev at build-time, faile=
d an
> automated Debian reproducibility test[3].
>
> The problem appears to be related to the substitution of a NAMES variable
> that appears in the templated pre/post scripts evaluated by dh_apache2; t=
he
> templates[4][5][6] are found in the 'apache2' source package.
>
> I don't yet know exactly how the non-deterministic ordering of entries in=
the
> NAMES variable occurs; however the replacement parameters[7] in the
> dh_apache2.in script seem relevant, and tracing the creation of those may=
help.
This is also occurring in subversion, which has only two modules, so a
high chance of flipping back and forth between reproducible or not:
https://reproduce.debian.net/arm64/api/v1/builds/547174/artifacts/1423172/d=
iffoscope
=2D-- /srv/rebuilderd/tmp/rebuilderd4BrIIh/inputs/libapache2-mod-svn_1.15.0=
-2_arm64.deb
+++ /srv/rebuilderd/tmp/rebuilderd4BrIIh/out/libapache2-mod-svn_1.15.0-2_ar=
m64.deb
=E2=94=9C=E2=94=80=E2=94=80 control.tar.xz
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 control.tar
=E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 ./postinst
=E2=94=82 =E2=94=82 =E2=94=82 @@ -1,12 +1,12 @@
=E2=94=82 =E2=94=82 =E2=94=82 #!/bin/sh
=E2=94=82 =E2=94=82 =E2=94=82 set -e
=E2=94=82 =E2=94=82 =E2=94=82 # Automatically added by dh_apache2/UNDECLAR=
ED
=E2=94=82 =E2=94=82 =E2=94=82 if true; then
=E2=94=82 =E2=94=82 =E2=94=82 if [ -e /usr/share/apache2/apache2-maintscr=
ipt-helper ] ; then
=E2=94=82 =E2=94=82 =E2=94=82 . /usr/share/apache2/apache2-maintscript-h=
elper
=E2=94=82 =E2=94=82 =E2=94=82 - for conf in dav_svn authz_svn ; do
=E2=94=82 =E2=94=82 =E2=94=82 + for conf in authz_svn dav_svn ; do
=E2=94=82 =E2=94=82 =E2=94=82 apache2_invoke enmod $conf || exit 1
=E2=94=82 =E2=94=82 =E2=94=82 done
=E2=94=82 =E2=94=82 =E2=94=82 fi
=E2=94=82 =E2=94=82 =E2=94=82 fi
=E2=94=82 =E2=94=82 =E2=94=82 # End automatically added section
This seems to match debian/debhelper/postinst-apache2:
if #CONDITIONAL_VARIABLE#; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
for conf in #NAMES# ; do
apache2_invoke #HELPER# $conf #ACTION# || #ERROR_HANDLER#
done
fi
fi
Which is apparently set in debian/debhelper/dh_apache2.in:
my %replacements =3D (
HELPER =3D> $ref->[0],
NAMES =3D> $ref->[1],
ERROR_HANDLER =3D> $PACKAGE_TYPE{handler},
CONDITIONAL_VARIABLE =3D> $PACKAGE_TYPE{conditional},
ACTION =3D> $dh{RESTART},
);
if ($script_type eq "prerm" || $script_type eq "postrm")
{
$replacements{'HELPER'} =3D~ s/en/dis/;
}
my $sed_command =3D "";
foreach my $key (sort keys %replacements)
{
my $val =3D $replacements{$key};
# Use a control char as separator for sed, to
# reduce escaping issues. Everything else is
# passed verbatim, i.e. it must not contain any
# shell or sed special characters.
my $sep =3D "\x17";
$sed_command .=3D "s" . $sep . "#$key#" .
It appears to call sort, but perhaps it is sorting the wrong things, or
at the wrong timing?
live well,
vagrant
--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCawYXTQAKCRDcUY/If5cW
quPFAQD2G3/5NT10m70UMP6q25yIBQtek4vh4oRfWZYH0wl5bgEAuapdt7Qo2L51
jSnMVjQSq2dYmbgCzeAg0DAfBYLPKw0=
=ZTH4
-----END PGP SIGNATURE-----
--=-=-=--
Technical Details
Message-ID:
<O37O9-dXH2-7@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<IxBiN-9c5j-1@gated-at.bofh.it> <IxBiN-9c5j-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Vagrant Cascadian <vagrant@reproducible-builds.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1069907: dh_apache2: please output reproducible module package pre/post scripts. Date: Wed, 25 Nov 2026 00:10:01 +0100 Message-ID: <O37O9-dXH2-7@gated-at.bofh.it> References: <IxBiN-9c5j-1@gated-at.bofh.it> <IxBiN-9c5j-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 24 23:03:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Vagrant Cascadian <vagrant@reproducible-builds.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-Source: apache2 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004807 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 112 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 24 Nov 2026 15:01:33 -0800 X-Original-Message-ID: <87wlq1u94i.fsf@wireframe> X-Original-References: <171416628730.3394.11446425578811945454.reportbug@frontier> <171416628730.3394.11446425578811945454.reportbug@frontier>