[Buildd-tools-devel] Bug#520158: Bug#520158: sbuild: Please document how to avoid changing maintainer/uploader or signing the build
Roger Leigh
rleigh at codelibre.net
Tue Mar 17 21:16:58 UTC 2009
On Tue, Mar 17, 2009 at 07:43:13PM +0000, Simon McVittie wrote:
> used to be able to operate without altering the maintainer or uploader name
> in the .changes file, or signing the resulting build. This made it useful for
> a workflow in which I build the package, then sign the .changes separately
> after testing it; it also made it possible to perform sponsored uploads
> (without overriding the maintainer or uploader name).
>
> In older versions of sbuild, this configuration worked:
>
> # Don't override the maintainer or uploader name, just the key
> # with which to sign the package...
> #$maintainer_name='';
> #$uploader_name='';
> $key_id='0x5530ec76';
>
> # ... but actually, don't sign the package anyway - I'll use
> # debsign
> $pgp_options = '-us -uc';
>
> However, I can't get this to work in the current version of sbuild. I've tried
> removing DEBEMAIL and DEBFULLNAME from the environment, setting
> $pgp_options to qw(-us -uc), and setting various combinations of
> $maintainer_name and $key_id.
I think this is due to defaulting the maintainer name to $DEBEMAIL
if unset, since this then prevents us from looking at KEY_ID instead.
Could you try the following patch and let me know if this fixes
things?
Thanks,
Roger
diff --git a/bin/sbuild b/bin/sbuild
index e5c5e9a..1e26a3f 100755
--- a/bin/sbuild
+++ b/bin/sbuild
@@ -95,6 +95,10 @@ sub main () {
die "A maintainer name, uploader name or key ID must be specified in .sbuildrc,\nor use -m, -e or -k, when performing a binNMU\n";
}
+ if (!defined($conf->get('MAINTAINER_NAME'))) {
+ $conf->set('MAINTAINER_NAME', $ENV{'DEBEMAIL'});
+ }
+
# variables for scripts:
open_log($conf->get('DISTRIBUTION'), $conf);
$SIG{'INT'} = \&shutdown;
diff --git a/lib/Sbuild/Conf.pm b/lib/Sbuild/Conf.pm
index 97eee4a..27c42c6 100644
--- a/lib/Sbuild/Conf.pm
+++ b/lib/Sbuild/Conf.pm
@@ -311,7 +311,7 @@ sub init_allowed_keys {
DEFAULT => undef
},
'MAINTAINER_NAME' => {
- DEFAULT => $ENV{'DEBEMAIL'}
+ DEFAULT => undef
},
'UPLOADER_NAME' => {
DEFAULT => undef
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
More information about the Buildd-tools-devel
mailing list