Re: Comments+blank line in debian/control: Clarification in policy or MBF?
On Wed, 2012-10-03 at 11:48:10 +0200, Niels Thykier wrote: > On 2012-10-03 11:01, Michael Tautschnig wrote: > > But then either all build infrastructure (and also lintian) don't use > > debian/control, or all these tools tolerate that blank line (with the > > exception > > of pbuilder). > > Lintian's parser ignores empty lines before/between paragraphs. As dpkg itself and dpkg-dev scripts do and have done (at least) as long as the git repository goes (dpkg 1.1.4). regards, guillem -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2012100351.gb25...@gaara.hadrons.org
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
On 2012-10-03 12:02, Michael Tautschnig wrote: >> On 2012-10-03 11:01, Michael Tautschnig wrote: >>> [...] >>> >>> But then either all build infrastructure (and also lintian) don't use >>> debian/control, or all these tools tolerate that blank line (with the >>> exception >>> of pbuilder). >>> >>> Best, >>> Michael >>> >> >> Lintian's parser ignores empty lines before/between paragraphs. >> > > I suppose that piece of code is quite dated. Is there a way to figure out why > lintian does this, i.e., who decided to interpret policy in this way? > > Best, > Michael > The code basically the same now as it was in Oct 1998. From the Lintian changelog, I am guessing the code was written in the 0.3.0 upload (from March 1st, 1998) or in the 0.4.0 (April 6th, same year). However, neither change have a bug associated with the changes[1] and I not aware of any copy of either of those versions still existing. While I cannot say for certain, I am guessing it is side effect and not intentional[2]. ~Niels [1] 0.3.0 entry: * Internal changes: [...] - implemented dpkg_read_control to parse all controls 0.4.0 entry * Internal: fixed bug in read_dpkg_control() utility function: empty tags have not been handled correctly If you go hunting for you, it will probably appear in lib/util.pl (source) or /usr/share/lintian/lib/util.pl (binary). [2] My guess is based on the following observation. The parser is used for signed (and unsigned) control files, so it has code for handling the presence of the signature. More specifically, it checks for a line starting with "-BEGIN PGP" (that isn't "BEGIN PGP SIGNATURE"). FTR the parser has never enforced that the marker appears on the first line if at all. In the current versions it will ignore lines up to the first empty line after the PGP marker, but in the 0.9.3 version it doesn't. So the 0.9.3 parser would pick up the the "Hash: SHA256" field as the first paragraph in the following: """ -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Format: ... """ Assuming GPG/PGP was not adding fields after the "SIGNED MESSAGE" marker back then, it would make sense for the code to ignore an empty line before the first paragraph as a way to handle the empty line after the "SIGNED MESSAGE" marker. Indeed, if you look at the Lintian 0.9.3 dsc[LDSC] it does not have any "GPG fields" in it at the first marker. Instead they appear after the "SIGNATURE" marker, so that /could/ be the logic behind it. [LDSC] http://snapshot.debian.org/archive/debian-archive/20090802T004153Z/debian/dists/slink/main/source/devel/lintian_0.9.3.dsc Oh look, no Build-Depends... XD -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/506c1ab9.2060...@thykier.net
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
> On 2012-10-03 11:01, Michael Tautschnig wrote: > > [...] > > > > But then either all build infrastructure (and also lintian) don't use > > debian/control, or all these tools tolerate that blank line (with the > > exception > > of pbuilder). > > > > Best, > > Michael > > > > Lintian's parser ignores empty lines before/between paragraphs. > I suppose that piece of code is quite dated. Is there a way to figure out why lintian does this, i.e., who decided to interpret policy in this way? Best, Michael pgpl1qb3gDWFc.pgp Description: PGP signature
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
On 2012-10-03 11:01, Michael Tautschnig wrote: > [...] > > But then either all build infrastructure (and also lintian) don't use > debian/control, or all these tools tolerate that blank line (with the > exception > of pbuilder). > > Best, > Michael > Lintian's parser ignores empty lines before/between paragraphs. ~Niels -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/506c09da.7020...@thykier.net
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
> Le Mon, Oct 01, 2012 at 11:00:54PM +0200, Jakub Wilk a écrit : > > * Michael Tautschnig , 2012-10-01, 14:25: > > >>By policy, blank lines separate paragraphs, comments are > > >>discarded, so we end up with an empty first paragraph. Policy, > > >>however, requires that the *first* paragraph contains essential > > >>package information (Policy 5.2). > > > > I'm not convinced by this interpretation the Policy. Common sense > > tells me that there's no such thing as "empty paragraph". So the > > question is: are empty liens allowed at the beginning of a control > > file? I don't see an answer to that question in the Policy, > > unfortunately. > > Indeed, the Policy does not consider that case. > > This said, the format of the control data files is inspired from the RFC822, > which contains the following in its section 4.1: > > message = fields *( CRLF *text ) ; Everything after > ; first null line > ; is message body > If there is consent that we stay close to RFC822, then I read this as "there must not be a blank line (CRLF) before the essential package information. > Another important factor for the Policy is the "current practice". Before > proposing that empty lines are allowed or disallowed in control data files, I > think that we would need to survey what is done in Debian. For instnace, is > gnome-pkg-tools an outlier, are there tools tolerating initial empty lines on > purpose, what is the situation for other control data files, etc. > [...] I do not yet have data covering the entire archive, only arch:any packages for letters a-p have been rebuilt so far. For that fraction (12915 out of 17369 packages), we have 184 packages broken by gnome-pkg-tools (including gnome-pkg-tools itself) and only 3 other packages that have comments and a blank line in there. But then either all build infrastructure (and also lintian) don't use debian/control, or all these tools tolerate that blank line (with the exception of pbuilder). Best, Michael pgpJ8RPP1GSRs.pgp Description: PGP signature
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
Le Mon, Oct 01, 2012 at 11:00:54PM +0200, Jakub Wilk a écrit : > * Michael Tautschnig , 2012-10-01, 14:25: > >>By policy, blank lines separate paragraphs, comments are > >>discarded, so we end up with an empty first paragraph. Policy, > >>however, requires that the *first* paragraph contains essential > >>package information (Policy 5.2). > > I'm not convinced by this interpretation the Policy. Common sense > tells me that there's no such thing as "empty paragraph". So the > question is: are empty liens allowed at the beginning of a control > file? I don't see an answer to that question in the Policy, > unfortunately. Indeed, the Policy does not consider that case. This said, the format of the control data files is inspired from the RFC822, which contains the following in its section 4.1: message = fields *( CRLF *text ) ; Everything after ; first null line ; is message body Another important factor for the Policy is the "current practice". Before proposing that empty lines are allowed or disallowed in control data files, I think that we would need to survey what is done in Debian. For instnace, is gnome-pkg-tools an outlier, are there tools tolerating initial empty lines on purpose, what is the situation for other control data files, etc. Have a nice day, -- Charles Plessy Tsurumi, Kanagawa, Japan -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20121001234804.ga12...@falafel.plessy.net
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
> Le lundi 01 octobre 2012 à 14:43 +0100, Ian Jackson a écrit : > > This wouldn't help people doing backports or whatever. I think this > > should be fixed in the packages involved. > > Changing gnome-pkg-tools to replace the blank line with an empty comment > is trivial. In unstable. > > How does that help with backports? > If gnome-pkg-tools were backported, any further backport build-depending on gnome-pkg-tools would get fixed. I think it is fair to say that this is a policy violation, but it clearly isn't a *serious* policy violation, given its limited practical effect. I would ask GNOME maintainers to get this fixed and uploaded, ideally also into t-p-u. I'm going to file bugs against those packages not build-depending on gnome-pkg-tools, but still containing comment+blank line at the start of debian/control. For all those packages build-depending on gnome-pkg-tools, I could then liaise with the GNOME team to determine the best way forward. Best, Michael pgpeJZMmzoRBc.pgp Description: PGP signature
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
* Michael Tautschnig , 2012-10-01, 14:25: By policy, blank lines separate paragraphs, comments are discarded, so we end up with an empty first paragraph. Policy, however, requires that the *first* paragraph contains essential package information (Policy 5.2). I'm not convinced by this interpretation the Policy. Common sense tells me that there's no such thing as "empty paragraph". So the question is: are empty liens allowed at the beginning of a control file? I don't see an answer to that question in the Policy, unfortunately. - it seems only pbuilder is really strict in its interpretation of policy here, but effectively that means that all our other build infrastructure doing parsing of debian/control is *not* policy-compliant Couldn't pbuilder parse .dsc instead of debian/control? .dsc is guaranteed not to contain comments. Taking a pragmatic position, it would be best to have policy acknowledge the fact that empty paragraphs don't count, and get the parser in pbuilder fixed. ACK. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20121001210054.ga6...@jwilk.net
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
Le lundi 01 octobre 2012 à 14:43 +0100, Ian Jackson a écrit : > This wouldn't help people doing backports or whatever. I think this > should be fixed in the packages involved. Changing gnome-pkg-tools to replace the blank line with an empty comment is trivial. In unstable. How does that help with backports? -- .''`. Josselin Mouette : :' : `. `' `- -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1349115458.13315.0.camel@tomoyo
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
On Mon, Oct 01, 2012 at 02:25:36PM +0100, Michael Tautschnig wrote: > - the problem affects all packages *build-depending* on gnome-pkg-tools, thus > I'd actually have to do an MBF (it's more than 160 packages) It would be worth looking at a) whether those 160 packages have a common maintainer, e.g. the Debian GNOME team, and b) whether those 160 packages have a VCS in common. It might be something that can be simply fixed with a single commit, in which case the beaurocracy of 160 bugs filed and then closed again would not be worth it IMHO. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20121001152555.GA21752@debian
Re: Comments+blank line in debian/control: Clarification in policy or MBF?
Michael Tautschnig writes ("Comments+blank line in debian/control: Clarification in policy or MBF?"): > Taking a pragmatic position, it would be best to have policy acknowledge the > fact that empty paragraphs don't count, and get the parser in pbuilder fixed. This wouldn't help people doing backports or whatever. I think this should be fixed in the packages involved. If we want to relax the spec we should do that as a separate exercise. Ian. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20585.40468.324999.906...@chiark.greenend.org.uk