[Reproducible-builds] [misc] 01/03: diffp: look up tar files more thoroughly
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Feb 14 12:34:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository misc.
commit 4cf416b1ce63394f162d643e3dbcabf4b5f4824f
Author: Jérémy Bobbio <lunar at debian.org>
Date: Fri Feb 14 13:32:46 2014 +0100
diffp: look up tar files more thoroughly
See https://wiki.debian.org/ReproducibleBuilds/TimestampInLongLinkTarMembers
---
diffp | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/diffp b/diffp
index cf22722..056957b 100755
--- a/diffp
+++ b/diffp
@@ -3,7 +3,7 @@
# Copyright © 2013 Lunar <lunar at debian.org>
# Licensed under WTFPL — http://www.wtfpl.net/txt/copying/
#
-# Depends: bash, binutils, unzip
+# Depends: bash, binutils, unzip, python-hachoir-metadata
CHANGES_A="$1"
CHANGES_B="$2"
@@ -46,8 +46,8 @@ get_ops() {
diffc() {
local diff
- diff="$(diff -u0 <(echo "$@" | sed -e "s,PACKAGE,$PACKAGE_A," | sh) \
- <(echo "$@" | sed -e "s,PACKAGE,$PACKAGE_B," | sh))"
+ diff="$(diff -u0 <(echo "$@" | sed -e "s,PACKAGE,$PACKAGE_A," | bash) \
+ <(echo "$@" | sed -e "s,PACKAGE,$PACKAGE_B," | bash))"
[ "$diff" ] || return 0
echo "$diff" | trim_diff
return 1
@@ -63,8 +63,6 @@ paste <(dcmd "$CHANGES_A" | sort | grep '\.deb$') <(dcmd "$CHANGES_B" | sort | g
diffc "sha1sum < PACKAGE | sed -e 's,-$,$PACKAGE,'" && continue
- diffc 'ar tv PACKAGE' && continue
-
MISMATCH=
for file in debian-binary control.tar.gz data.tar.xz; do
if diffc "ar p PACKAGE $file | sha1sum | sed -e s/-$/$file/"; then
@@ -75,19 +73,19 @@ paste <(dcmd "$CHANGES_A" | sort | grep '\.deb$') <(dcmd "$CHANGES_B" | sort | g
echo "===== control.tar.gz"
- diffc 'ar p PACKAGE control.tar.gz | tar -ztvf -'
+ diffc 'hachoir-metadata --raw --quality=1 --maxlen=0 <(ar p PACKAGE control.tar.gz | zcat)'
ar p $PACKAGE_A control.tar.gz | tar -zvtf - | grep '^-' | while read flags user size date time file; do
echo "----- $file"
diffc "ar p PACKAGE control.tar.gz | tar -zxOf - $file"
done
echo "===== data.tar.xz"
- if ar p "$PACKAGE_A" control.tar.gz | tar -ztf - ./md5sums; then
+ diffc 'hachoir-metadata --raw --quality=1 --maxlen=0 <(ar p PACKAGE data.tar.xz | xzcat)'
+ if ar p "$PACKAGE_A" control.tar.gz | tar -ztf - ./md5sums >/dev/null; then
FILES="$(diffc "ar p PACKAGE control.tar.gz | tar -zxOf - ./md5sums" | awk '/^-/ { print "./" $2 }')"
else
FILES="$(ar p $PACKAGE_A data.tar.xz | tar -Jvtf - | awk '/^-/ { print $6 }')"
fi
- diffc 'ar p PACKAGE data.tar.xz | tar -Jtvf -'
echo "$FILES" | while read file; do
echo "----- $file"
diffc "ar p PACKAGE data.tar.xz | tar -JxOf - $file" |
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-builds
mailing list