Author: adam-guest
Date: 2008-03-23 19:41:50 +0000 (Sun, 23 Mar 2008)
New Revision: 1185
Modified:
trunk/debian/changelog
trunk/scripts/debuild.1
trunk/scripts/debuild.pl
Log:
debuild:
+ Add a --username option to allow debrsign to be used instead of debsign
(Closes: #262253)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-03-23 18:55:27 UTC (rev 1184)
+++ trunk/debian/changelog 2008-03-23 19:41:50 UTC (rev 1185)
@@ -32,9 +32,12 @@
+ Strip single change commit messages by default
* debdiff: Escape package names when normalising path names
(Closes: #471282)
- * debuild: Add a --prepend-path option allowing $PATH to have directories
- added to it once it has been sanitised, for example to add /usr/lib/ccache.
- Based on a patch by Matt T. Proud (Closes: #460719)
+ * debuild:
+ + Add a --prepend-path option allowing $PATH to have directories added
+ to it once it has been sanitised, for example to add /usr/lib/ccache.
+ Based on a patch by Matt T. Proud (Closes: #460719)
+ + Add a --username option to allow debrsign to be used instead of debsign
+ (Closes: #262253)
* uscan: Correctly handle an explicit upstream-version of 0
(Closes: #471503)
Modified: trunk/scripts/debuild.1
===================================================================
--- trunk/scripts/debuild.1 2008-03-23 18:55:27 UTC (rev 1184)
+++ trunk/scripts/debuild.1 2008-03-23 19:41:50 UTC (rev 1185)
@@ -255,6 +255,10 @@
Debian revision, check that the .orig.tar.gz file or .orig directory
exists before starting the build. This is the default behaviour.
.TP
+\fB\-\-username\fR \fIusername\fR
+When signing, use \fBdebrsign\fR instead of \fBdebsign\fR.
+\fIusername\fR specifies the credentials to be used.
+.TP
\fB\-\-\fIfoo\fB\-hook\fR=\fIhook\fR
Set a hook as described above. If \fIhook\fR is blank, this unsets
the hook.
@@ -308,6 +312,10 @@
Setting this variable to \fIno\fR is the same as the
\fB\-\-no\-tgz\-check\fR command line option.
.TP
+.B DEBUILD_SIGNING_USERNAME
+Setting this variable is the same as using the \-\-username
+command line option.
+.TP
.B DEBUILD_DPKG_BUILDPACKAGE_OPTS
These are options which should be passed to the invocation of
\fBdpkg-buildpackage\fR. They are given before any command-line
Modified: trunk/scripts/debuild.pl
===================================================================
--- trunk/scripts/debuild.pl 2008-03-23 18:55:27 UTC (rev 1184)
+++ trunk/scripts/debuild.pl 2008-03-23 19:41:50 UTC (rev 1185)
@@ -121,6 +121,8 @@
--[no-]tgz-check Do [not] check for an .orig.tar.gz before running
dpkg-buildpackage if we have a Debian revision
(Default: check)
+ --username Run debrsign instead of debsign, using the
+ supplied credentials
--dpkg-buildpackage-hook=HOOK
--clean-hook=HOOK
@@ -181,6 +183,7 @@
my $logging=0;
my $tgz_check=1;
my $prepend_path='';
+my $username='';
my @hooks = (qw(dpkg-buildpackage clean dpkg-source build binary final-clean
lintian signing post-dpkg-buildpackage));
my %hook;
@@ -246,8 +249,9 @@
'DEBUILD_FINAL_CLEAN_HOOK' => '',
'DEBUILD_LINTIAN_HOOK' => '',
'DEBUILD_SIGNING_HOOK' => '',
- 'DEBUILD_PREPEND_PATH' => '',
+ 'DEBUILD_PREPEND_PATH' => '',
'DEBUILD_POST_DPKG_BUILDPACKAGE_HOOK' => '',
+ 'DEBUILD_SIGNING_USERNAME' => '',
'DEVSCRIPTS_CHECK_DIRNAME_LEVEL' => 1,
'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.*)?',
);
@@ -320,6 +324,7 @@
$root_command = $config_vars{'DEBUILD_ROOTCMD'};
$tgz_check = $config_vars{'DEBUILD_TGZ_CHECK'} eq 'yes' ? 1 : 0;
$prepend_path = $config_vars{'DEBUILD_PREPEND_PATH'};
+ $username = $config_vars{'DEBUILD_SIGNING_USERNAME'};
$check_dirname_level = $config_vars{'DEVSCRIPTS_CHECK_DIRNAME_LEVEL'};
$check_dirname_regex = $config_vars{'DEVSCRIPTS_CHECK_DIRNAME_REGEX'};
for my $hookname (@hooks) {
@@ -533,6 +538,18 @@
next;
}
+ if ($arg eq '--username') {
+ unless (defined ($opt = shift)) {
+ fatal "--username requires an argument,\nrun $progname --help
for usage information";
+ }
+ $username = $opt;
+ next;
+ }
+ if ($arg =~ /^--username=(.*)$/) {
+ $username = $1;
+ next;
+ }
+
if ($arg =~ /^--no-?conf$/) {
fatal "$arg is only acceptable as the first command-line option!";
}
@@ -1161,13 +1178,23 @@
$ENV{$var} = $store_vars{$var};
}
print "Now signing changes and any dsc files...\n";
- system('debsign', @debsign_opts, $changes) == 0
- or fatal "running debsign failed";
+ if ($username) {
+ system('debrsign', $username, @debsign_opts, $changes) == 0
+ or fatal "running debrsign failed";
+ } else {
+ system('debsign', @debsign_opts, $changes) == 0
+ or fatal "running debsign failed";
+ }
}
elsif (! $sourceonly and $signsource) {
print "Now signing dsc file...\n";
- system('debsign', @debsign_opts, $dsc) == 0
- or fatal "running debsign failed";
+ if ($username) {
+ system('debrsign', $username, @debsign_opts, $dsc) == 0
+ or fatal "running debrsign failed";
+ } else {
+ system('debsign', @debsign_opts, $dsc) == 0
+ or fatal "running debsign failed";
+ }
}
run_hook('post-dpkg-buildpackage', 1);
--
To unsubscribe, send mail to [EMAIL PROTECTED]