[Pkg-privacy-commits] [flashproxy] 60/65: build documentation reproducibly with the help of faketime
Ximin Luo
infinity0 at moszumanska.debian.org
Fri Aug 21 13:49:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch _volatile-rc
in repository flashproxy.
commit 8f7d498ac729086cc9dddac3940ef2b3492ffc90
Author: Ximin Luo <infinity0 at pwned.gg>
Date: Mon Mar 30 13:19:23 2015 +0200
build documentation reproducibly with the help of faketime
---
debian/control | 1 +
debian/rules | 4 ++++
debian/strip-nondeterminism/a2x | 5 +++++
debian/strip-nondeterminism/dpkg-sourcedate | 3 +++
debian/strip-nondeterminism/help2man | 5 +++++
5 files changed, 18 insertions(+)
diff --git a/debian/control b/debian/control
index 7c4464b..8d91dba 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 9),
docbook-xsl,
dh-autoreconf,
dh-python,
+ faketime,
help2man,
nodejs,
node-optimist,
diff --git a/debian/rules b/debian/rules
index 6412cda..de50736 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,10 @@ DH_facilitator = -S autoconf -D facilitator --
DH_proxy = -S makefile -D proxy --
DH_nodeproxy = -S makefile -D proxy/modules/nodejs --
+# reproducible documentation
+export SOURCEDATE := $(shell debian/strip-nondeterminism/dpkg-sourcedate)
+export PATH := $(CURDIR)/debian/strip-nondeterminism:$(PATH)
+
# TODO(infinity0): handle setup-common.py better; currently we symlink it as a
# hack. Ideally, we would fix dh_python to support custom setup.py filenames.
diff --git a/debian/strip-nondeterminism/a2x b/debian/strip-nondeterminism/a2x
new file mode 100755
index 0000000..81ec1bc
--- /dev/null
+++ b/debian/strip-nondeterminism/a2x
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Depends: faketime
+# Eventually the upstream tool should support SOURCEDATE internally.
+test -n "$SOURCEDATE" || { echo >&2 "$0: SOURCEDATE not set"; exit 255; }
+exec faketime -f "$SOURCEDATE" /usr/bin/a2x "$@"
diff --git a/debian/strip-nondeterminism/dpkg-sourcedate b/debian/strip-nondeterminism/dpkg-sourcedate
new file mode 100755
index 0000000..31799da
--- /dev/null
+++ b/debian/strip-nondeterminism/dpkg-sourcedate
@@ -0,0 +1,3 @@
+#!/bin/sh
+export TZ=UTC # faketime uses UTC
+exec date -d "$(dpkg-parsechangelog --count 1 -SDate)" +'%Y-%m-%d %H:%M:%S'
diff --git a/debian/strip-nondeterminism/help2man b/debian/strip-nondeterminism/help2man
new file mode 100755
index 0000000..726af14
--- /dev/null
+++ b/debian/strip-nondeterminism/help2man
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Depends: faketime
+# Eventually the upstream tool should support SOURCEDATE internally.
+test -n "$SOURCEDATE" || { echo >&2 "$0: SOURCEDATE not set"; exit 255; }
+exec faketime -f "$SOURCEDATE" /usr/bin/help2man "$@"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/flashproxy.git
More information about the Pkg-privacy-commits
mailing list