Bug 517875

Summary: the same line lenght ok in one case, not ok in another case
Product: [Fedora] Fedora Reporter: Karel Volný <kvolny>
Component: rpmlintAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: manuel.wolfshant, tmz, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-17 17:59:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
lingot.spec none

Description Karel Volný 2009-08-17 16:00:29 UTC
Description of problem:
I'm trying to package LINGOT. While tuning the .spec, I have found that rpmlint passes when checking the .spec, and it fails when checking the resulting rpms.

The rule described at http://fedoraproject.org/wiki/Packaging/Guidelines#Summary_and_description -
"Also, please make sure that there are no lines in the description longer than 80 characters." is ambiguous. Is it meant including the EOL character or not? - But rpmlint should be consistent, either count it or do not count it, but please don't report pass in one case and fail in the other case with the same input.

Version-Release number of selected component (if applicable):
rpmlint-0.90-1.fc11.noarch

How reproducible:
always

Steps to Reproduce:
try to rebuild the attached .spec, then check the files

Actual results:
[makerpm@dhcp-lab-151 SPECS]$ rpmlint -v lingot.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
[makerpm@dhcp-lab-151 SRPMS]$ rpmlint -v lingot-0.7.6-1.fc11.src.rpm
lingot.src: I: checking
lingot.src: E: description-line-too-long configurable. Originally conceived to tune electric guitars, its configurability
1 packages and 0 specfiles checked; 1 errors, 0 warnings.
[makerpm@dhcp-lab-151 x86_64]$ rpmlint -v lingot-0.7.6-1.fc11.x86_64.rpm
lingot.x86_64: I: checking
lingot.x86_64: E: description-line-too-long configurable. Originally conceived to tune electric guitars, its configurability
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

Expected results:
[makerpm@dhcp-lab-151 SPECS]$ rpmlint -v lingot.spec
0 packages and 1 specfiles checked; 0 errors, 0 warnings.
[makerpm@dhcp-lab-151 SRPMS]$ rpmlint -v lingot-0.7.6-1.fc11.src.rpm
lingot.src: I: checking
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[makerpm@dhcp-lab-151 x86_64]$ rpmlint -v lingot-0.7.6-1.fc11.x86_64.rpm
lingot.x86_64: I: checking
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

OR

[makerpm@dhcp-lab-151 SPECS]$ rpmlint -v lingot.spec
lingot.spec: E: description-line-too-long configurable. Originally conceived to tune electric guitars, its configurability
0 packages and 1 specfiles checked; 1 error, 0 warnings.
[makerpm@dhcp-lab-151 SRPMS]$ rpmlint -v lingot-0.7.6-1.fc11.src.rpm
lingot.src: I: checking
1 packages and 0 specfiles checked; 1 errors, 0 warnings.
[makerpm@dhcp-lab-151 x86_64]$ rpmlint -v lingot-0.7.6-1.fc11.x86_64.rpm
lingot.x86_64: I: checking
lingot.x86_64: E: description-line-too-long configurable. Originally conceived to tune electric guitars, its configurability
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

Comment 1 Karel Volný 2009-08-17 16:01:49 UTC
Created attachment 357667 [details]
lingot.spec

Comment 2 Ville Skyttä 2009-08-17 17:59:54 UTC
(In reply to comment #0)
> While tuning the .spec, I have found that 
> rpmlint passes when checking the .spec, and it fails when checking the 
> resulting rpms.

This is expected behavior, see CAVEATS in the rpmlint man page.  In this particular case, line length checks are not done when checking spec files.

> "Also, please make sure that there are no lines in the description longer than
> 80 characters." is ambiguous. Is it meant including the EOL character or not?

I suppose it's excluding the EOL character but you can ask fedora-packaging if unsure - this is not related to rpmlint.  Well, except that rpmlint currently has a hardcoded max line length of 79, I'll make it configurable for the next upstream version.

> But rpmlint should be consistent, either count it or do not count it, but
> please don't report pass in one case and fail in the other case with the same
> input.

The input in your reproducer is _not_ the same for the two runs.  The first runs rpmlint on a *.spec, the other on a *.src.rpm.

Comment 3 Ville Skyttä 2009-08-17 18:06:30 UTC
(In reply to comment #2)
> the other on a *.src.rpm.  

...and the third on a binary rpm.

Comment 4 Karel Volný 2009-09-07 10:45:07 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > While tuning the .spec, I have found that 
> > rpmlint passes when checking the .spec, and it fails when checking the 
> > resulting rpms.
> 
> This is expected behavior, see CAVEATS in the rpmlint man page.  In this
> particular case, line length checks are not done when checking spec files.

thankyou for the explanation

however, I see no way how to tell what is going to be run from the documentation, therefore I filed the bug #521622

also, I consider the situation quite unfortunate, not to check for things like these in standalone .spec check but do this as part of e.g. the srpm check => bug #521624

I also mark this as duplicate of the bug #521624, as this is just specific case of the more generic problem described there

and it would be much easier to see the problem if a "superverbose" output would be available => bug #521628

> Well, except that rpmlint currently has a hardcoded max line length of 79,
> I'll make it configurable for the next upstream version.

thankyou; so I filed the bug #521630 to track this

> > But rpmlint should be consistent, either count it or do not count it, but
> > please don't report pass in one case and fail in the other case with the
> > same input.
> 
> The input in your reproducer is _not_ the same for the two runs.  The first
> runs rpmlint on a *.spec, the other on a *.src.rpm.  

but the file in question should not differ, the difference is just whether it is standalone or packed inside of an archive ... I do not know how rpmlint works internally, but I'd expect to have some routine to do specfile checks, and to feed it with the file, either standalone or extracted from the archive, not to have two different routines - what is the purpose of it?

*** This bug has been marked as a duplicate of bug 521624 ***

Comment 5 Ville Skyttä 2009-09-07 20:25:06 UTC
(In reply to comment #4)
> but the file in question should not differ, the difference is just whether it
> is standalone or packed inside of an archive ...

It doesn't differ but it doesn't currently matter either as this check is never run against specfiles at all (whether standalone or inside source rpms), but against description retrieved from rpm package headers.

Comment 6 Karel Volný 2009-09-09 09:34:43 UTC
again, thanks for being patient and explaining - sometimes how the things work internally is quite different from what it seem on first, uninformed, sight

... also thanks for dealing with the other bugs