From 2fe492c10fbc478c1e749e34060b40e713dbc54e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Jul 2015 19:31:07 +0000 Subject: [PATCH] linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man page date svn path=/dists/trunk/linux-tools/; revision=22835 --- debian/changelog | 7 ++++++ debian/patches/series | 1 + debian/patches/tools-perf-man-date.patch | 32 ++++++++++++++++++++++++ debian/rules.real | 1 + 4 files changed, 41 insertions(+) create mode 100644 debian/patches/tools-perf-man-date.patch diff --git a/debian/changelog b/debian/changelog index 1f1f36761..6b132e8ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (4.1.2-1~exp2) UNRELEASED; urgency=medium + + * linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man + page date + + -- Ben Hutchings Mon, 13 Jul 2015 19:52:17 +0100 + linux-tools (4.1.2-1~exp1) experimental; urgency=medium * New upstream release diff --git a/debian/patches/series b/debian/patches/series index cd239c608..144996d2d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ tools-perf-install.patch usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch +tools-perf-man-date.patch diff --git a/debian/patches/tools-perf-man-date.patch b/debian/patches/tools-perf-man-date.patch new file mode 100644 index 000000000..e4f30d4fd --- /dev/null +++ b/debian/patches/tools-perf-man-date.patch @@ -0,0 +1,32 @@ +From: Ben Hutchings +Date: Mon, 13 Jul 2015 20:29:20 +0100 +Subject: perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date + +This allows man pages to be built reproducibly. + +Signed-off-by: Ben Hutchings +--- +--- a/tools/perf/Documentation/Makefile ++++ b/tools/perf/Documentation/Makefile +@@ -120,6 +120,9 @@ endif + ifdef DOCBOOK_SUPPRESS_SP + XMLTO_EXTRA += -m manpage-suppress-sp.xsl + endif ++ifdef KBUILD_BUILD_TIMESTAMP ++ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) ++endif + + SHELL_PATH ?= $(SHELL) + # Shell quote; +--- a/tools/perf/Documentation/asciidoc.conf ++++ b/tools/perf/Documentation/asciidoc.conf +@@ -71,6 +71,9 @@ ifdef::backend-docbook[] + [header] + template::[header-declarations] + ++ ++template::[docinfo] ++ + + {mantitle} + {manvolnum} diff --git a/debian/rules.real b/debian/rules.real index ee176abd4..6a83b40c0 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -1,4 +1,5 @@ export DH_OPTIONS +export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: ,,p') include debian/rules.defs