Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Comments+blank line in debian/control: Clarification in policy or MBF? (http://www.linux-archive.org/debian-development/708795-comments-blank-line-debian-control-clarification-policy-mbf.html)

Jon Dowland 10-01-2012 03:25 PM

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20121001152555.GA21752@debian

Jakub Wilk 10-01-2012 09:00 PM

Comments+blank line in debian/control: Clarification in policy or MBF?
 
* Michael Tautschnig <mt@debian.org>, 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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121001210054.GA6125@jwilk.net">http://lists.debian.org/20121001210054.GA6125@jwilk.net

Charles Plessy 10-01-2012 11:48 PM

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 <mt@debian.org>, 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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121001234804.GA12747@falafel.plessy.net">http://lists.debian.org/20121001234804.GA12747@falafel.plessy.net

Michael Tautschnig 10-03-2012 09:01 AM

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 <mt@debian.org>, 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

Niels Thykier 10-03-2012 09:48 AM

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506C09DA.7020807@thykier.net">http://lists.debian.org/506C09DA.7020807@thykier.net

Michael Tautschnig 10-03-2012 10:02 AM

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

Niels Thykier 10-03-2012 11:00 AM

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506C1AB9.2060008@thykier.net">http://lists.debian.org/506C1AB9.2060008@thykier.net

Guillem Jover 10-03-2012 11:11 AM

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121003111151.GB25606@gaara.hadrons.org">http://lists.debian.org/20121003111151.GB25606@gaara.hadrons.org


All times are GMT. The time now is 12:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.