[devscripts] 01/01: cowpoke: Add --sign and --upload command line overrides
Ron Lee
ron at moszumanska.debian.org
Fri Oct 3 20:04:18 UTC 2014
This is an automated email from the git hooks/post-receive script.
ron pushed a commit to branch master
in repository devscripts.
commit 0676f4bc9a7c91133a0d553fabffba8145d992a0
Author: Ron <ron at debian.org>
Date: Sat Oct 4 05:27:38 2014 +0930
cowpoke: Add --sign and --upload command line overrides
Now that gitpkg allows overriding cowpoke options per-invocation, it is
more useful to have these too for people building branches for backports
or local package repositories. This is the logical extension of the
changes in 396671470242827a73dc55f71cee9714df00d5d0, which allowed these
options to be set per arch/dist in the configuration file.
---
scripts/cowpoke.1 | 22 ++++++++++++++++++----
scripts/cowpoke.sh | 22 +++++++++++++++++-----
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/scripts/cowpoke.1 b/scripts/cowpoke.1
index 79fb053..7d5177b 100644
--- a/scripts/cowpoke.1
+++ b/scripts/cowpoke.1
@@ -119,6 +119,16 @@ This option will override any \fBBUILD_OPTS\fP specified for a chroot in the
cowpoke configuration files.
.TP
+.BI \-\-sign= keyid
+Specify the key to sign packages with. This will override any \fBSIGN_KEYID\fP
+specified for a chroot in the cowpoke configuration files.
+
+.TP
+.BI \-\-upload= queue
+Specify the dput queue to upload signed packages to. This will override any
+\fBUPLOAD_QUEUE\fP specified for a chroot in the cowpoke configuration files.
+
+.TP
.B \-\-help
Display a brief summary of the available options and current configuration.
@@ -179,7 +189,8 @@ If this option is unset or an empty string, no attempt to sign packages will be
made. It may be overridden on an \fIarch\fP and \fIdist\fP specific basis using
the
.IB arch _ dist _SIGN_KEYID
-option described below.
+option described below, or per-invocation with the \fB\-\-sign\fP command line
+option.
.TP
.B UPLOAD_QUEUE
@@ -190,7 +201,8 @@ signed. If this option is unset or an empty string, no attempt to upload packag
will be made. If \fBSIGN_KEYID\fP is not set, this option will be ignored entirely.
It may be overridden on an \fIarch\fP and \fIdist\fP specific basis using the
.IB arch _ dist _UPLOAD_QUEUE
-option described below.
+option described below, or per-invocation with the \fB\-\-upload\fP command line
+option.
.TP
@@ -294,11 +306,13 @@ except that it acts during the build phase of \fBcowbuilder\fP.
.TP
.IB arch _ dist _SIGN_KEYID
-An optional arch and dist specific override for the global SIGN_KEYID option.
+An optional arch and dist specific override for the global \fBSIGN_KEYID\fP
+option.
.TP
.IB arch _ dist _UPLOAD_QUEUE
-An optional arch and dist specific override for the global UPLOAD_QUEUE option.
+An optional arch and dist specific override for the global \fBUPLOAD_QUEUE\fP
+option.
.SH CONFIGURATION FILES
diff --git a/scripts/cowpoke.sh b/scripts/cowpoke.sh
index 4624930..9531658 100755
--- a/scripts/cowpoke.sh
+++ b/scripts/cowpoke.sh
@@ -92,11 +92,11 @@ get_archdist_vars()
display_override_vars()
{
- _OVERRIDE_OPTIONS="CREATE_OPTS UPDATE_OPTS BUILD_OPTS"
+ _OVERRIDE_OPTIONS="CREATE_OPTS UPDATE_OPTS BUILD_OPTS SIGN_KEYID UPLOAD_QUEUE"
for var in $_OVERRIDE_OPTIONS; do
eval "override=( \"\${OVERRIDE_${var}[@]}\" )"
- [ ${#override[@]} -eq 0 ] || echo " $var =$(printf " '%s'" "${override[@]}")"
+ [ ${#override[@]} -eq 0 ] || echo " override: $var =$(printf " '%s'" "${override[@]}")"
done
}
@@ -132,6 +132,8 @@ cowpoke [options] package.dsc
not specified, return them to the current directory.
--no-return Do not copy results of the build to RETURN_DIR
(overriding a path set for it in the config files).
+ --sign="keyid" Specify the key to sign packages with.
+ --upload="queue" Specify the dput queue to upload signed packages to.
The current default configuration is:
@@ -218,7 +220,7 @@ for arg; do
# then combine back into a single argument at the final point of use.
#
# Which _should_ DTRT for anyone who isn't trying to blow this up deliberately
- # any maybe will still do it for them too in spite of their efforts. But unless
+ # and maybe will still do it for them too in spite of their efforts. But unless
# someone finds a sensible case this fails on, I'm not going to cry over people
# who want to stuff up their own system with input they created themselves.
val=${arg#*=}
@@ -238,6 +240,14 @@ for arg; do
OVERRIDE_BUILD_OPTS+=( "${arg#*=}" )
;;
+ --sign=*)
+ OVERRIDE_SIGN_KEYID=${arg#*=}
+ ;;
+
+ --upload=*)
+ OVERRIDE_UPLOAD_QUEUE=${arg#*=}
+ ;;
+
*.dsc)
DSC="$arg"
;;
@@ -443,7 +453,8 @@ for arch in $BUILDD_ARCH; do
CHANGES="$arch.changes"
for dist in $BUILDD_DIST; do
- eval "sign_keyid=\"\$${arch}_${dist}_SIGN_KEYID\""
+ sign_keyid=$OVERRIDE_SIGN_KEYID
+ [ -n "$sign_keyid" ] || eval "sign_keyid=\"\$${arch}_${dist}_SIGN_KEYID\""
[ -n "$sign_keyid" ] || sign_keyid="$SIGN_KEYID"
[ -n "$sign_keyid" ] || continue
@@ -460,7 +471,8 @@ for arch in $BUILDD_ARCH; do
YES | yes)
debsign "-k$sign_keyid" -r "$BUILDD_USER$BUILDD_HOST" "$RESULT_DIR/${PACKAGE}_$CHANGES"
- eval "upload_queue=\"\$${arch}_${dist}_UPLOAD_QUEUE\""
+ upload_queue=$OVERRIDE_UPLOAD_QUEUE
+ [ -n "$upload_queue" ] || eval "upload_queue=\"\$${arch}_${dist}_UPLOAD_QUEUE\""
[ -n "$upload_queue" ] || upload_queue="$UPLOAD_QUEUE"
if [ -n "$upload_queue" ]; then
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list