[Buildd-tools-devel] Bug#520158: 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 23:30:19 UTC 2009


On Tue, Mar 17, 2009 at 10:46:41PM +0000, Simon McVittie wrote:
> On Tue, 17 Mar 2009 at 21:16:58 +0000, Roger Leigh wrote:
> > On Tue, Mar 17, 2009 at 07:43:13PM +0000, Simon McVittie wrote:
> > > 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';
> 
> It appears that setting $pgp_options = ['-us', '-uc'] is now the magic rune
> to not do signing, and '-us -uc' does not work (and indeed actively breaks
> my configuration, since ['-us', '-uc'] is now the default so deleting the
> $pgp_options line entirely is sufficient).

Yes.  We changed this so that we could use execve() directly without
needing to use a shell and running into horrible quoting issues.

What I can do is add a check to cope with scalar or arrayref as input
and convert or abort if it's a scalar.

> Is there a better way than this to use sbuild as a super-debuild, i.e. just
> run dpkg-buildpackage without any special options? With my current setup
> I can do "sbuild -As foo_bar.dsc" to do any maintainer or sponsored upload.

That's exactly how I use it for most work, occasionally with -d to
build on different distributions.

> Perhaps sbuild could even operate like this by default (i.e. when
> unconfigured), which would be consistent with dpkg-buildpackage and friends?
> I can see that this would make the default configuration wrong for buildds,
> which *do* want to override the maintainer, but there are fewer buildds than
> Debian developers!

We do in fact have a $sbuild_mode to select between "user" and "buildd"
use.  I would like to make it as user-friendly as possible, and so it
would be possible to arrange the defaults for user mode to mimic
dpkg-buildpackage behaviour as much as possible.

Ideally, I would like to support all the dpkg-buildpackage options
directly.  Now that we are also working on buildd as well, we have
the change to alter the options if we want to.

The entire reason for the existence of this option is to allow us
to improve things for users while at the same time keeping a
backward compatibility mode for buildd use, so I'm not averse to
making use of it for things like this.

> In this respect I think using $ENV{DEBEMAIL} is a bit of a backward step -
> as I understand it, buildds want to set $maintainer_name per-machine, and
> mere developers like me want to leave it unset so we can sponsor, so taking it
> from the environment for each user doesn't seem right for anyone.

OK.  If this is painful rather than useful (as intended!), I can remove
it and leave it undefined.

> (I build all my packages in sbuild as per
> <http://www.pseudorandom.co.uk/2008/sbuild-dm/> - if you can suggest a good
> man page or readme in the sbuild package where I should explain this, I'm
> happy to provide similar text as a patch against sbuild)

It's as simple as removing the patch to bin/sbuild I provided
in my first mail.  i.e. this is all you need:

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


Regards,
Roger

-- 
  .''`.  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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20090317/c8811408/attachment.pgp 


More information about the Buildd-tools-devel mailing list