Bug#353040: patch to fullfill wish

2009-03-27 Thread Raphael Hertzog
On Wed, 25 Mar 2009, Nils Rennebarth wrote:
> Raphael Hertzog wrote:
> > On Tue, 24 Mar 2009, Raphael Hertzog wrote:
> > So I guess the request is that dpkg-deb doesn't complain about
> > X-* fields created with XB-X-* in debian/control.
> > 
> > That looks reasonable indeed. Should that be documented somewhere ?
> I'd suggest section 5.7 "User-defined fields" of the debian policy manual.
> Something like the following:
> 
> Usually, unknown fields are iggnored by the debian packaging system. To
> avoid conflicts of user defined fields with field that may be used by
> debian in the future, we suggest to use field names starting with X- (so
> you need to put X[BCS]-X-foo into the control file) which are guaranteed
> to never conflict with future official fields. That has the added bonus
> that dpkg-gencontrol will not issue warnings about user defined fields
> at package build time. 

s/dpkg-gencontrol/dpkg-deb/ but yes it looks a good idea, can you submit
it as bug against the debian-policy package ?

> It may be documented in the dpkg-gencontrol manpage as well, because it
> has the -D option to include or change fields of the control file.

Hum, dpkg-gencontrol needs to be expanded yes, but that warning change is
of no interest there.

Anyway, your patch is applied in the git repo.

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#353040: patch to fullfill wish

2009-03-25 Thread Nils Rennebarth
Raphael Hertzog wrote:
> On Tue, 24 Mar 2009, Raphael Hertzog wrote:
> So I guess the request is that dpkg-deb doesn't complain about
> X-* fields created with XB-X-* in debian/control.
> 
> That looks reasonable indeed. Should that be documented somewhere ?
I'd suggest section 5.7 "User-defined fields" of the debian policy manual.
Something like the following:

Usually, unknown fields are iggnored by the debian packaging system. To avoid 
conflicts of user defined fields with field that may be used by debian in the 
future, we suggest to use field names starting with X- (so you need to put 
X[BCS]-X-foo into the control file) which are guaranteed to never conflict with 
future official fields. That has the added bonus that dpkg-gencontrol will not 
issue warnings about user defined fields at package build time. 

It may be documented in the dpkg-gencontrol manpage as well, because it has the 
-D option to include or change fields of the control file.

At work we add a buildinfo field, recording what branch and revision a package 
has been built from, and my motivation for the patch was to avoid dpkg-deb's 
warnings which generate noise that may hide real problems. And yes, we add 
these fields via arguments to dpkg-gencontrol, not via XB-X-* fields in the 
original control file, having the advantage that we don't need to touch the 
control files of originial sources.


-- 

Mit freundlichen Grüßen / with kind regards

Nils Rennebarth, Software Developer

--
Funkwerk IP-Appliances GmbH
Mönchhaldenstraße 28
D-70191 Stuttgart

Tel: +49 711 900300 - 0
Fax: +49 711 900300 - 90

E-Mail: nils.renneba...@funkwerk-ec.com

Location: GmbH Neu-Ulm, Local Court Memmingen, HRB 13043
Managing Directors: Michael Marsanu, Steffen Herrmann


The information contained in this e-mail has been carefully researched,
but the possibility of it being inapplicable in individual cases cannot
be ruled out. We therefore regret that we cannot accept responsibility
or liability of any kind whatsoever for the correctness of the
information given. Please notify us if you discover that information is
inapplicable.




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#353040: patch to fullfill wish

2009-03-25 Thread Raphael Hertzog
On Tue, 24 Mar 2009, Jari Aalto wrote:
> > The right way to include a field in the .deb is to use
> > fields named "XB-*". What doesn't work with such fields that would
> > require this patch ?
> 
> Let me put it this way:
> 
> Make the X- default to mean the same as XB-,
> where field is included in the binary package.

I don't think it's a good idea. Surely the X*- prefix need to be
documented (that's already requested in another bugreport) but
I'm not convinced that X-* should default to XB-*, what does it
bring ? On the contrary, we already had fields that we did not want
forwarded anywhere (X-Package-Type) and we would loose that possibility
if we make X-* default to XB-*.

We might want to add a warning however so that the user is informed that
X-* is not propagated anywhere.

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#353040: patch to fullfill wish

2009-03-24 Thread Jari Aalto
Raphael Hertzog  writes:

> On Tue, 24 Mar 2009, Nils Rennebarth wrote:
>> Apparently noone objected to the wish itself.
>
> Well, not all bugs have proper response/analysis due to the high number of
> bugs that we handle. Sorry for that, it doesn't mean that every wishlist is
> correct and makes sense.
>
>> The attached patch implements it. Could it be incorporated into the next 
>> dpkg?
>
> Not until you have explained what this would be used for.
>
> The right way to include a field in the .deb is to use
> fields named "XB-*". What doesn't work with such fields that would
> require this patch ?

Let me put it this way:

Make the X- default to mean the same as XB-,
where field is included in the binary package.

Jari




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#353040: patch to fullfill wish

2009-03-24 Thread Raphael Hertzog
On Tue, 24 Mar 2009, Raphael Hertzog wrote:
> > The attached patch implements it. Could it be incorporated into the next 
> > dpkg?
> 
> Not until you have explained what this would be used for.
> 
> The right way to include a field in the .deb is to use
> fields named "XB-*". What doesn't work with such fields that would
> require this patch ?

Sorry, I think I have misparsed the request (and the patch). The bug has
been renamed from "Allow user defined X-* fields in debian/control file"
to "[DPKG-DEB] don't be so noisy about user defined fields in
DEBIAN/control"

So I guess the request is that dpkg-deb doesn't complain about
X-* fields created with XB-X-* in debian/control.

That looks reasonable indeed. Should that be documented somewhere ?

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#353040: patch to fullfill wish

2009-03-24 Thread Raphael Hertzog
On Tue, 24 Mar 2009, Nils Rennebarth wrote:
> Apparently noone objected to the wish itself.

Well, not all bugs have proper response/analysis due to the high number of
bugs that we handle. Sorry for that, it doesn't mean that every wishlist is
correct and makes sense.

> The attached patch implements it. Could it be incorporated into the next dpkg?

Not until you have explained what this would be used for.

The right way to include a field in the .deb is to use
fields named "XB-*". What doesn't work with such fields that would
require this patch ?

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#353040: patch to fullfill wish

2009-03-24 Thread Nils Rennebarth
Apparently noone objected to the wish itself.

The attached patch implements it. Could it be incorporated into the next dpkg?


-- 

Mit freundlichen Grüßen / with kind regards

Nils Rennebarth, Software Developer

--
Funkwerk IP-Appliances GmbH
Mönchhaldenstraße 28
D-70191 Stuttgart

Tel: +49 711 900300 - 0
Fax: +49 711 900300 - 90

E-Mail: nils.renneba...@funkwerk-ec.com

Location: GmbH Neu-Ulm, Local Court Memmingen, HRB 13043
Managing Directors: Michael Marsanu, Steffen Herrmann


The information contained in this e-mail has been carefully researched,
but the possibility of it being inapplicable in individual cases cannot
be ruled out. We therefore regret that we cannot accept responsibility
or liability of any kind whatsoever for the correctness of the
information given. Please notify us if you discover that information is
inapplicable.
Index: dpkg-1.14.25/dpkg-deb/build.c
===
--- dpkg-1.14.25.orig/dpkg-deb/build.c	2009-03-24 11:45:24.0 +
+++ dpkg-1.14.25/dpkg-deb/build.c	2009-03-24 11:47:13.0 +
@@ -69,6 +69,9 @@
 static int known_arbitrary_field(const struct arbitraryfield *field) {
   const char **known;
 
+  /* always accept fields starting with x- */
+  if (strncasecmp(field->name, "x-", 2) == 0)
+return 1;
   for (known= arbitrary_fields; *known; known++)
 if (strcasecmp(field->name, *known) == 0)
   return 1;