On Mon, Jul 02, 2007 at 06:27:11PM +0200, Frank Lichtenheld wrote: > On Wed, May 30, 2007 at 03:32:59PM -0600, Bruce Sass wrote: > > On Wed May 30 2007 12:42:07 pm you wrote: > > > If you have any comments regarding our approach we'd of course be > > > happy to hear about them. > > > > I don't think it is a good idea to hard-code "downstream" specific bits > > into the source... > > I tend to agree. There are also already packages in the archive like > update-manager that use the string "ubuntu" in their version.
Note that Ubuntu's sync process uses the presence of "ubuntu" in the version number to inhibit automatic syncing, so the version check is not quite so arbitrary as it looks. Debian packages containing "ubuntu" in their version number will never be automatically synced into Ubuntu, and will require manual attention. Fortunately, this problem is very rare. > > How about creating a framework for hooking code into the build process. > > Perhaps running/sourcing scripts out of a dir, trigerred by a setting > > in the environment---anyone could use it (mitigates any `why should > > Ubuntu get special treatment' arguments), everyone using it can work at > > their own pace (never be out-of-sync or behind), couldn't lead to > > source bloat disease. > > In this specific case, adding a check to Ubuntu's version of lintian > might be way easier... We found, FWIW, that having dpkg-source refuse to build the erroneous packages was a *much* quicker way to get everyone to make this source change to their packages than a lintian change, and we didn't regard it as a problem to enforce the change like this. If we had taken the latter approach, I suspect we would still be failing to comply with Debian's request of us today, which wouldn't do either project any good. I've attached an updated version of the patch Ian sent, adjusted for the changes in dpkg-source in the intervening time and with a stricter check on DEBEMAIL before promoting this from a warning to an error. Thanks, -- Colin Watson [cjwat...@ubuntu.com]
diff -Nru dpkg-1.14.22/scripts/dpkg-source.pl dpkg-1.14.22ubuntu1/scripts/dpkg-source.pl --- dpkg-1.14.22/scripts/dpkg-source.pl 2008-08-26 14:52:08.000000000 +0100 +++ dpkg-1.14.22ubuntu1/scripts/dpkg-source.pl 2008-11-01 01:50:50.000000000 +0000 @@ -248,6 +248,22 @@ $fields->{'Binary'} = join(', ', @binarypackages); + # check that Maintainer/XSBC-Original-Maintainer comply to + # https://wiki.ubuntu.com/DebianMaintainerField + if (defined($fields->{Version}) and defined($fields->{Maintainer}) and + $fields->{Version} =~ /ubuntu/) { + if ($fields->{'Maintainer'} !~ /ubuntu/i) { + if (defined ($ENV{'DEBEMAIL'}) and $ENV{'DEBEMAIL'} =~ /\...@ubuntu\.com/) { + error(_g('Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address')); + } else { + warning(_g('Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address')); + } + } + unless ($fields->{'Original-Maintainer'}) { + warning(_g('Version number suggests Ubuntu changes, but there is no XSBC-Original-Maintainer field')); + } + } + # Generate list of formats to try my @try_formats; push @try_formats, $fields->{'Format'} if exists $fields->{'Format'};