[pbuilder] 01/01: buildpackage: allow to specify the timestamp for a binNMU changelog

Mattia Rizzolo mattia at debian.org
Thu Nov 10 14:03:08 UTC 2016


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

mattia pushed a commit to branch master
in repository pbuilder.

commit 7bf862d1d040372101aa0fee329fcdfef57efe81
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Nov 10 14:01:27 2016 +0000

    buildpackage: allow to specify the timestamp for a binNMU changelog
    
    Closes: #843867
---
 pbuilder-buildpackage-funcs |  2 +-
 pbuilder-checkparams        |  4 ++++
 pbuilder.8                  | 10 ++++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs
index 1b20053..9e1629d 100644
--- a/pbuilder-buildpackage-funcs
+++ b/pbuilder-buildpackage-funcs
@@ -171,7 +171,7 @@ function binNMU() {
         BINNMU_VERSION=1
     fi
     local arch=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH)
-    local date=$(date -R)
+    local date=$(date -R ${BINNMU_TIMESTAMP:+-d "${BINNMU_TIMESTAMP}})
     log.i "Doing a binNMU, version $BINNMU_VERSION for $DISTRIBUTION/$arch to '$BINNMU_MESSAGE'"
     local cl=$(ls "$BUILDPLACE"/"$BUILDDIR"/*/debian/changelog)
     local tmpcl=$(mktemp pbuilder.tmpchangelog.XXXXXXXXXXX)
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index db0eb22..39139a9 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -233,6 +233,10 @@ while [ -n "$1" ]; do
         BINNMU_VERSION="$2"
         shift; shift;
         ;;
+    --bin-nmu-timestamp)
+        BINNMU_TIMESTAMP="$2"
+        shift 2
+        ;;
     --preserve-buildplace)
         PRESERVE_BUILDPLACE="yes"
         shift;
diff --git a/pbuilder.8 b/pbuilder.8
index 37b05bf..23adfcd 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -466,6 +466,16 @@ Specify the number to append to the version in the binary-NMU package.
 If no number is provided, it defaults to 1.
 
 .TP
+.BI "\-\-bin\-nmu\-timestamp [" "timestamp" "]"
+Specify the timestamp to use in the generated chagnelog entry.
+If no timestamp is provided, it defaults to current time.
+If you want to specify the time as a number of seconds since 1970-01-01 00:00:00 UTC,
+prepend an at sign
+.RB ( @ )
+like
+.BR @1478786376 .
+
+.TP
 .BI "\-\-bindmounts " "bind-mount-points"
 Bind-mount the specified directories to inside the chroot.
 .I "bind-mount-points"

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



More information about the Pbuilder-maint mailing list