From 063ea1adce9bc6f815a7aa34198e48eac9df36c3 Mon Sep 17 00:00:00 2001 From: Jérémy Bobbio Date: Sat, 10 Jan 2015 10:11:31 +0000 Subject: dh_usrlocal: output dir list in a stable order We now sort the directory lists in order to guarantee a stable output. This was preventing some packages to build reproducibly. Signed-off-by: Niels Thykier --- debian/changelog | 2 ++ dh_usrlocal | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 68bf6ce9..3e8489e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -72,6 +72,8 @@ debhelper (9.20150101.1) UNRELEASED; urgency=medium * dh_installdocs.1: Document that --link-doc may in some cases require a dir to symlink (or symlink to dir) migration. (Closes: #659044) + * dh_usrlocal: Apply patch from Jérémy Bobbio to generate + deterministic output. (Closes: #775020) [ Bernhard R. Link ] * Dh_lib: apply patch from Guillem Jover to support case-insensitive diff --git a/dh_usrlocal b/dh_usrlocal index 3d5571eb..193d70d9 100755 --- a/dh_usrlocal +++ b/dh_usrlocal @@ -101,9 +101,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $ebs = $bs x 2; # Escape the backslash from the shell # This constructs the body of a 'sed' c\ expression which # is parsed by the shell in double-quotes - my $dirs = join("$ebs\n", @dirs); + my $dirs = join("$ebs\n", sort @dirs); pop @justdirs; # don't remove directories directly in /usr/local - my $justdirs = join("$ebs\n", @justdirs); + my $justdirs = join("$ebs\n", sort @justdirs); if (! $dh{NOSCRIPTS}) { autoscript($package,"postinst", "postinst-usrlocal", "/#DIRS#/ c${ebs}\n${dirs}"); -- cgit v1.2.3