[med-svn] [genometools] 01/03: work on reproducibility issues

Sascha Steinbiss sascha at steinbiss.name
Fri Mar 11 18:50:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository genometools.

commit 0cd9f9f7e3ffef8109afe4b897f72ff3186bd29e
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Fri Mar 11 16:10:20 2016 +0000

    work on reproducibility issues
---
 debian/changelog                     |  9 ++++++++
 debian/patches/gtdoc-traverse-sorted | 40 ++++++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 debian/rules                         |  6 ++----
 debian/strip-nondeterminism/pdflatex |  6 +++++-
 5 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 89cc031..29c0bad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+genometools (1.5.8+ds-2) UNRELEASED; urgency=medium
+
+  * Fix locale (LC_PAPER) for LaTeX runs (reproducibility).
+  * Patch documentation generation to gather API symbols in
+    deterministic order.
+  * Do not delete two docu files in clean step.
+
+ -- Sascha Steinbiss <sascha at steinbiss.name>  Fri, 11 Mar 2016 16:08:09 +0000
+
 genometools (1.5.8+ds-1) unstable; urgency=medium
 
   * Make sure external headers are used for compilation.
diff --git a/debian/patches/gtdoc-traverse-sorted b/debian/patches/gtdoc-traverse-sorted
new file mode 100644
index 0000000..8e15488
--- /dev/null
+++ b/debian/patches/gtdoc-traverse-sorted
@@ -0,0 +1,40 @@
+Description: gather API information by sorted traversal
+ lfs.dir() is not guaranteed to deliver files reproducibly.
+Author: Sascha Steinbiss <sascha at steinbiss.name>
+--- a/gtscripts/gtdoc.lua
++++ b/gtscripts/gtdoc.lua
+@@ -104,6 +104,25 @@
+   end
+ end
+ 
++local function iter (a, i) -- taken from PiL, page 59
++  i = i + 1
++  local v = a[i]
++  if v then
++    return i, v
++  end
++end
++
++function sorted_dir(dir)
++  local entries = {}
++  local i = 0
++  for name in lfs.dir(dir) do
++    i = i + 1
++    entries[i] = name
++  end
++  table.sort(entries)
++  return iter, entries, 0
++end
++
+ local export = nil
+ local is_lua = nil
+ 
+@@ -127,7 +146,7 @@
+   for _, v in ipairs(export) do
+     local filename = gt_home .. "/" .. v
+     if is_dir(filename) then
+-      for f in lfs.dir(filename) do
++      for _, f in sorted_dir(filename) do
+         local filename = filename .. "/" .. f
+         process_file(filename, be_verbose, is_lua)
+       end
diff --git a/debian/patches/series b/debian/patches/series
index 47c4757..4b330ba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ remove-gitignores
 fix-exports
 split-manuals
 use-mx32
+gtdoc-traverse-sorted
diff --git a/debian/rules b/debian/rules
index 8a4f38e..c30e9a0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,10 +46,8 @@ override_dh_auto_clean:
 	      www/genometools.org/htdocs/images/parsed.png    \
 	      www/genometools.org/htdocs/images/constructed.png \
 	      doc/manuals/annotationsketch.pdf
-	rm -f www/genometools.org/htdocs/docs.html \
-	      www/genometools.org/htdocs/examples.html \
-	      www/genometools.org/htdocs/libgenometools.html \
-	      www/genometools.org/htdocs/tools/gt.html
+	rm -f www/genometools.org/htdocs/examples.html \
+	      www/genometools.org/htdocs/libgenometools.html
 	rm -rf gtpython/build
 	rm -rf obj
 
diff --git a/debian/strip-nondeterminism/pdflatex b/debian/strip-nondeterminism/pdflatex
index 2158696..a713488 100755
--- a/debian/strip-nondeterminism/pdflatex
+++ b/debian/strip-nondeterminism/pdflatex
@@ -2,6 +2,10 @@
 # Depends: faketime
 # Eventually the upstream tool should support SOURCE_DATE_EPOCH internally.
 
+export TZ=UTC
+export LC_ALL=C
+export LC_PAPER="en_GB.UTF-8"
+
 test -n "$SOURCE_DATE_EPOCH" || { echo >&2 "$0: SOURCE_DATE_EPOCH not set"; exit 255; }
 
 if faketime 'last friday' date > /dev/null 2> /dev/null; then
@@ -9,4 +13,4 @@ if faketime 'last friday' date > /dev/null 2> /dev/null; then
     /usr/bin/pdflatex "$@"
 else
   exec /usr/bin/pdflatex "$@"
-fi
\ No newline at end of file
+fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/genometools.git



More information about the debian-med-commit mailing list