[Pkg-samba-maint] [samba] 01/01: Run xsltproc under faketime
Ivo De Decker
idd-guest at alioth.debian.org
Sat Oct 19 16:41:13 UTC 2013
This is an automated email from the git hooks/post-receive script.
idd-guest pushed a commit to branch master
in repository samba.
commit 1c014ac6432e65dd495f007fff93a1e73e4e89e0
Author: Ivo De Decker <ivo.dedecker at ugent.be>
Date: Tue Oct 15 21:06:19 2013 +0200
Run xsltproc under faketime
Get the same date for manpages on different architectures in Multi-Arch: same
packages.
Closes: #726314
---
debian/bin/xsltproc | 19 +++++++++++++++++++
debian/changelog | 3 +++
debian/control | 1 +
debian/get_source_changedate.pl | 21 +++++++++++++++++++++
debian/rules | 4 ++++
5 files changed, 48 insertions(+)
diff --git a/debian/bin/xsltproc b/debian/bin/xsltproc
new file mode 100755
index 0000000..d5eb004
--- /dev/null
+++ b/debian/bin/xsltproc
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+# This is an ugly workaround to get the manpages on every architecture to be
+# identical. This hack forces the date in all of the builds to be the date of
+# the latest source change in the changelog.
+# see http://bugs.debian.org/726314
+
+export TZ=UTC
+
+FAKETIME=`which faketime`
+
+if [ -x "$FAKETIME" -a -n "$SOURCE_DATE" ]
+then
+ $FAKETIME "$SOURCE_DATE" /usr/bin/xsltproc "$@"
+else
+ /usr/bin/xsltproc "$@"
+fi
+
+
diff --git a/debian/changelog b/debian/changelog
index 804b1f7..9573266 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
samba (2:4.0.10+dfsg-3) UNRELEASED; urgency=low
+ [ Ivo De Decker ]
* Remove Sesse from uploaders. Thanks for your work on samba4.
* Include /etc/pam.d/samba in samba-common. It got lost somewhere in the
samba4 merge. Closes: #726183
@@ -8,6 +9,8 @@ samba (2:4.0.10+dfsg-3) UNRELEASED; urgency=low
* Fix umask in make_shlibs to avoid lintian error
control-file-has-bad-permissions.
* Enable verbose build log.
+ * Run xsltproc under faketime to get the same date for manpages on different
+ architectures in Multi-Arch: same packages. Closes: #726314
[ Steve Langasek ]
* Don't fail on errors from testparm in the samba init script.
diff --git a/debian/control b/debian/control
index 6832395..780dfca 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends: bison,
debhelper (>> 9),
docbook-xml,
docbook-xsl,
+ faketime,
flex,
heimdal-multidev (>= 1.6~),
libacl1-dev,
diff --git a/debian/get_source_changedate.pl b/debian/get_source_changedate.pl
new file mode 100755
index 0000000..72b24c8
--- /dev/null
+++ b/debian/get_source_changedate.pl
@@ -0,0 +1,21 @@
+#! /usr/bin/perl
+
+use strict;
+use Dpkg::Changelog::Parse;
+use Data::Dumper;
+
+my %opts = ("file" => 'debian/changelog');
+
+# get last changelog entry
+my $entry = changelog_parse(%opts);
+
+# if binnmu: get previous entry, which is the source entry
+if ($entry->{"Binary-Only"}) {
+ $opts{"count"} = 1;
+ $opts{"offset"} = 1;
+ $entry = changelog_parse(%opts);
+}
+
+# get the last change date for the source entry
+my $source_date = $entry->{"Date"};
+print "$source_date\n";
diff --git a/debian/rules b/debian/rules
index 09327b3..985a34c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,10 @@ WAF = $(PYTHON) ./buildtools/bin/waf -v
d_b_o:=$(shell echo "$$DEB_BUILD_OPTIONS"|sed 's/[^-[:alnum:]]/ /g'|tr a-z A-Z)
$(foreach o, $(d_b_o), $(eval DEB_BUILD_OPT_$o := 1))
+# for xsltproc wrapper
+export PATH:=$(CURDIR)/debian/bin:$(PATH)
+export SOURCE_DATE=$(shell debian/get_source_changedate.pl)
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
WAF += -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list