[Reproducible-builds] [misc] 01/01: Add tools to sort the massive rebuild of 2014-01-26

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Jan 31 22:55:35 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 04b0ebee9799921275ba26ccd68a83cdc0b1e04e
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Fri Jan 31 23:55:18 2014 +0100

    Add tools to sort the massive rebuild of 2014-01-26
---
 sort-logs/README              |  11 +++
 sort-logs/get-popcon.sh       |   5 ++
 sort-logs/get-reproducible.sh |   5 ++
 sort-logs/get-sources.rb      |  10 +++
 sort-logs/guess-why.rb        | 197 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 228 insertions(+)

diff --git a/sort-logs/README b/sort-logs/README
new file mode 100644
index 0000000..79f4f9c
--- /dev/null
+++ b/sort-logs/README
@@ -0,0 +1,11 @@
+Tools to sort the massive rebuild of 2014-01-26
+===============================================
+
+./get-sources.rb ../../logs-20140126 > sources
+
+./get-popcon.sh sources
+
+./get-reproducible ../../logs-20140126 > reproducible
+./get-popcon.sh reproducible
+
+./guess-why.rb ../../logs-20140126/9mount_1.3-10_unstable_build.diffp
diff --git a/sort-logs/get-popcon.sh b/sort-logs/get-popcon.sh
new file mode 100755
index 0000000..d844003
--- /dev/null
+++ b/sort-logs/get-popcon.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+scp "$1" ullmann.debian.org:sources
+ssh ullmann.debian.org './get-popcon.rb < sources | sort -n -k2 -r | column -t > popcon-insts'
+scp ullmann.debian.org:popcon-insts "$1.popcon-insts"
diff --git a/sort-logs/get-reproducible.sh b/sort-logs/get-reproducible.sh
new file mode 100755
index 0000000..fc32dba
--- /dev/null
+++ b/sort-logs/get-reproducible.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+LOG_DIR="$1"
+
+find "$LOG_DIR" -maxdepth 1 -type f -name '*.diffp' -print0 | xargs -0 grep --files-without-match '^-' | sed -E 's/^.*\/([^_]+)_.*$/\1/'
diff --git a/sort-logs/get-sources.rb b/sort-logs/get-sources.rb
new file mode 100755
index 0000000..52dc584
--- /dev/null
+++ b/sort-logs/get-sources.rb
@@ -0,0 +1,10 @@
+#!/usr/bin/ruby
+#
+# -*- coding: utf-8 -*-
+
+LOG_DIR = ARGV[0]
+
+sources = Dir.glob("#{LOG_DIR}/*.diffp").each do |log|
+  # zoneminder_1.26.5-2_unstable_build.diffp → zoneminder
+  puts log.gsub(/\A.*\/([^_]+)_.*\z/, '\1')
+end
diff --git a/sort-logs/guess-why.rb b/sort-logs/guess-why.rb
new file mode 100755
index 0000000..127135b
--- /dev/null
+++ b/sort-logs/guess-why.rb
@@ -0,0 +1,197 @@
+#!/usr/bin/ruby
+
+SPECIFIC = <<END_OF_SPECIFIC.split("\n").collect { |l| l.gsub(/ .*/, '') }
+aft # aft-compiler
+ardour # mo files
+auto-07p # varying .o
+babelfish # same content different order in entry_points.txt
+castle-game-engine # fpunits.cfg
+colord # icc profiles
+gcl # multiple things, it's a LISP compiler
+gdbm # .a issue
+geoclue # encode buildpath in example makefile
+graphviz # pdfs in doc
+gtkdataboxmm # encode build path in example
+hershey-fonts # .a issue
+quickfix # encode build path in examples
+gnutls26 # weird binaries
+goffice # .a issues
+hdf-eos4 # encode build path in examples
+ikarus # weird binary ikarus.boot
+lacheck # encode timestamp in README.Debian
+libphone-ui-shr # mo files
+libterm-readline-zoid-perl # encode build path
+libterm-size-perl-perl # timestamp in ./usr/share/perl5/Term/Size/Perl/Params.pm
+libunwind # .a issues
+miaviewit # .a issues
+microbiomeutil # data file
+nagios-plugins # weird binaries
+netxx # timestamp in file autogerated genconfig
+papyrus # .a issues
+pear-channels # php registry shit
+plinth # timestamp in generated file
+pppconfig # .mo files
+probabel # pdf file
+retext # png files
+xscreensaver # weird binaries
+skycat # encode build path in shell scripts
+tcl8.6-tdbc # encode build path in config script
+ui-auto # timestamp in manpages
+vit # timestamp in main script
+xen # .a issues
+END_OF_SPECIFIC
+
+FALSE_NEGATIVE = <<END_OF_FALSE_NEGATIVE.split("\n").collect { |l| l.gsub(/ .*/, '') }
+ekiga # libnss changed in between the builds
+mate-desktop # different version for libglib2.0-0
+rlvm # libglib2.0-0 changed
+x42-plugins # libglib2.0-0 changed
+END_OF_FALSE_NEGATIVE
+
+require 'set'
+
+diffp = File.read(ARGV[0])
+source = ARGV[0].gsub(/\A.*\/([^_]+)_.*\z/, '\1')
+
+print "#{source}: "
+
+if diffp !~ /^-/ || FALSE_NEGATIVE.include?(source)
+  puts 'reproducible'
+  exit 0
+end
+
+reasons = Set.new
+
+if SPECIFIC.include?(source)
+  reasons << 'specific'
+end
+
+lines = diffp.lines
+i = 0
+loop do
+  break if i > 1000
+  line = lines.next.strip
+  i += 1
+
+  if line =~ /\ABinary file .*\.jar differ\z/
+    reasons << 'jar-file'
+  end
+
+  if line =~ /\A-    Build ID:/
+    reasons << 'build-id-mismatch'
+    lines.next
+  end
+
+  if line =~ /\A-    <.*>   DW_.* : \(indirect string, offset:/
+    reasons << 'do-not-use-dpkg-buildflags'
+  end
+
+  if line =~ /\A-    <.*>   DW_AT_.* : [^(]*\/.*/
+    reasons << 'debugedit-not-run-or-failed'
+  end
+
+  if line =~ /\A-(.*)gzip compressed data(, was ".*", from Unix, last modified: )([^,]+)(,?.*)\z/
+    before = $1; filename = $2; last_modified = $3; after = $4
+    other = lines.next.strip
+    if other =~ /\A\+(.*)gzip compressed data(, was ".*", from Unix, last modified: )([^,]+)(,?.*)\z/
+      if before == $1 && filename == $2 && after == $4
+        if last_modified != $3
+          reasons << 'gzip-timestamp'
+        end
+      end
+    end
+  end
+
+  if line =~ /\A----- .*\.html\z/
+    reasons << 'html-mismatch'
+  end
+
+  if line =~ /\A----- .\/usr\/share\/php\/.registry\//
+    reasons << 'php-registry'
+  end
+
+  if line =~ /\ABinary file .*\.zip differ\z/
+    reasons << 'zip-file'
+  end
+
+  if line =~ /\A----- .\/usr\/lib\/.*\.dll\z/
+    reasons << 'mono'
+  end
+
+  if line =~ /\ABinary file .\/usr\/share\/doc\/kde\/.*\/index.cache.bz2 differ\z/
+    reasons << 'kde-doc-index'
+  end
+
+  if line =~ /\A-Depends: (.*)\z/
+    deps = $1.split(',').collect { |d| d.strip }.sort
+    other = lines.next.strip
+    if other =~ /\A\+Depends: (.*)\z/
+      other_deps = $1.split(',').collect { |d| d.strip }.sort
+      if deps == other_deps
+        reasons << 'same-depends-different-order'
+      end
+    end
+  end
+
+  if line =~ /\A-.*created by instant \/ docbook-to-man/
+    reasons << 'docbook-to-man-timestamp'
+  end
+
+  if line =~ /\A-.*Generated from file .* by tcllib\/doctools/
+    reasons << 'tcllib-doctool-build-path'
+  end
+
+  if line =~ /\ABinary file .\/usr\/lib\/erlang\/.*\.beam differ\z/
+    reasons << 'erlang'
+  end
+
+  if line =~ /\ABinary file .*\.[ot]tf differ\z/
+    reasons << 'fonts'
+  end
+
+  if line =~ /\ABinary file .\/usr\/lib\/girepository-1.0\/.*\.typelib differ\z/
+    reasons << 'gir-typelib'
+  end
+
+  if line =~ /\A-[^ ]*  libghc-.*-prof_.*\.deb\z/
+    reasons << 'haskell-prof'
+  end
+
+  if line =~ /\A-[^ ]*  libghc-.*-dev_.*\.deb\z/
+    reasons << 'haskell-dev'
+  end
+
+  if line =~ /\ABinary file .\/usr\/share\/man\/man.*pm.gz differ\z/
+    reasons << 'perl-manpage'
+  end
+
+  if line =~ /\A----- .\/usr\/share\/perl5\/.*\/ConfigData\.pm\z/
+    reasons << 'perl-configdata'
+  end
+
+  if line =~ /\ABinary file .*\.oct differ\z/
+    reasons << 'octave'
+  end
+
+  if line =~ /\A----- .\/var\/lib\/ocaml\/md5sums\/.*\.md5sums\z/
+    reasons << 'ocaml-md5sums'
+  end
+
+  if line =~ /\A----- .*\.pd_linux\z/
+    reasons << 'puredata'
+  end
+
+  if line =~ /\ABinary file .\/usr\/lib\/R\/site-library\/.*\.rds differ\z/
+    reasons << 'r-rds'
+  end
+
+  if line =~ /\A----- .\/usr\/share\/doc\/.*\/created.rid\z/
+    reasons << 'rdoc-timestamp'
+  end
+end
+
+if reasons.empty?
+  puts 'unknown'
+else
+  puts reasons.to_a.join(' ')
+end

-- 
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