[Reproducible-commits] [debhelper] 03/05: dh_strip: make stripping static libraries deterministic
Jérémy Bobbio
lunar at moszumanska.debian.org
Sun Sep 28 15:36:49 UTC 2014
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository debhelper.
commit a461c16e5fa40722f4df57ce0b4a8408d952778f
Author: Andrew Ayer <agwa at andrewayer.name>
Date: Thu Sep 25 10:07:41 2014 -0700
dh_strip: make stripping static libraries deterministic
Previously, calling strip on a static library would reset the timestamp
of every file in the archive to the current time, and reset the permissions
of every file based on the umask.
Now, existing timestamps are preserved by passing --preserve-dates to
strip, and permissions are kept deterministic by setting a umask of 0022
when calling strip.
---
dh_strip | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dh_strip b/dh_strip
index 516b6f2..9e84aa8 100755
--- a/dh_strip
+++ b/dh_strip
@@ -234,9 +234,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
attach_debug($_, $debug_path) if defined $debug_path;
}
+ # strip uses the umask to determine permissions of files inside the .a file.
+ # Set a umask of 0022 so builds are deterministic.
+ my $orig_umask=umask 0022;
foreach (@static_libs) {
- doit($strip,"--strip-debug",$_);
+ doit($strip,"--preserve-dates","--strip-debug",$_);
}
+ umask $orig_umask;
}
=head1 SEE ALSO
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git
More information about the Reproducible-commits
mailing list