Bug 8605 - rpmlint gives false warnings when %setup_compile_flags is used
Summary: rpmlint gives false warnings when %setup_compile_flags is used
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Richard Houser
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 22:23 CET by Barry Jackson
Modified: 2015-01-16 09:33 CET (History)
2 users (show)

See Also:
Source RPM: rpmlint-mageia-policy-0.2.25-1.mga3.src.rpm
CVE:
Status comment:


Attachments
patch for rpmlint attached (1.11 KB, patch)
2015-01-11 02:27 CET, Richard Houser
Details | Diff
rpmlint-1.5-mga-fix_setup_compile_flags.patch (781 bytes, patch)
2015-01-12 09:13 CET, Richard Houser
Details | Diff
rpmlint-1.5-mga-fix_setup_compile_flags.patch (783 bytes, patch)
2015-01-16 07:18 CET, Richard Houser
Details | Diff
existing patch, but against the RPM package itself (1.73 KB, patch)
2015-01-16 07:22 CET, Richard Houser
Details | Diff

Description Barry Jackson 2013-01-05 22:23:53 CET
Description of problem:
rpmlint warns :
 W: setup-not-quiet
 W: setup-not-in-prep
when %setup_compile_flags macro is used.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Richard Houser 2015-01-11 01:57:17 CET

CC: (none) => rick

Richard Houser 2015-01-11 02:16:59 CET

Assignee: bugsquad => rick

Comment 1 Richard Houser 2015-01-11 02:27:57 CET
Created attachment 5802 [details]
patch for rpmlint attached

patch for rpmlint attached
Comment 2 Shlomi Fish 2015-01-11 10:09:48 CET
(In reply to Richard Houser from comment #1)
> Created attachment 5802 [details]
> patch for rpmlint attached
> 
> patch for rpmlint attached

The problem with this patch and the one here: http://paste.debian.net/140124/ (which like I told you previously, should really be attached to this bug report) is that it won't match lines like «%setup» or «%setup\t». Please convert it to use a regex like «^%setup\b».

Regards,

-- Shlomi Fish

CC: (none) => shlomif

Comment 3 Richard Houser 2015-01-12 09:13:40 CET
Created attachment 5803 [details]
rpmlint-1.5-mga-fix_setup_compile_flags.patch

Updated to account for tabs in the line and calls without arguments

Attachment 5802 is obsolete: 0 => 1

Comment 4 Richard Houser 2015-01-12 09:22:37 CET
A new patch has been submitted, and I obsoleted the one that was already attached to this ticket.

I explicitly did not include the start of string anchor, as the lines in question might not start with the setup macro.  I attempted to use "\b" at the start, but that results in the string always failing to match, with or without leading space.  I don't really see that lack of a boundary at the start a problem though, and the previous code didn't have anything of the sort, either.
Comment 5 Shlomi Fish 2015-01-12 17:19:45 CET
(In reply to Richard Houser from comment #4)
> A new patch has been submitted, and I obsoleted the one that was already
> attached to this ticket.
> 
> I explicitly did not include the start of string anchor, as the lines in
> question might not start with the setup macro.  I attempted to use "\b" at
> the start, but that results in the string always failing to match, with or
> without leading space.  I don't really see that lack of a boundary at the
> start a problem though, and the previous code didn't have anything of the
> sort, either.

Sorry for the late response, Richard, but I got distracted with other problems here. Some comments about the patch:
 
1. https://docs.python.org/2/library/re.html#re.search - re.search should be re.match (or maybe use r'^\s*%setup\b' .)

2. I want the patch against the "mgarepo checkout" checkout.

3. Please also submit the patch (against the source tarball) upstream - http://sourceforge.net/projects/rpmlint/ .

Regards,

-- Shlomi Fish
Comment 6 Richard Houser 2015-01-16 07:18:27 CET
Created attachment 5817 [details]
rpmlint-1.5-mga-fix_setup_compile_flags.patch

Stop setup macro warnings on macros that only start with setup.  Also, allow those macros to work with leading whitespace.
Richard Houser 2015-01-16 07:20:16 CET

Attachment 5817 description: Stop setup macro warnings on macros that only start with setup => rpmlint-1.5-mga-fix_setup_compile_flags.patch

Richard Houser 2015-01-16 07:20:40 CET

Attachment 5803 is obsolete: 0 => 1

Comment 7 Richard Houser 2015-01-16 07:22:40 CET
Created attachment 5818 [details]
existing patch, but against the RPM package itself

Patch against the mga subversion for the while package (not for upstream)
Comment 8 Shlomi Fish 2015-01-16 08:28:55 CET
(In reply to Richard Houser from comment #7)
> Created attachment 5818 [details]
> existing patch, but against the RPM package itself
> 
> Patch against the mga subversion for the while package (not for upstream)

That patch is not against the "mgarepo checkout". Please add an "svn diff" patch that includes the patch against the source package.

I've explained that several times already.

Please reach me on IM and I will explain it interactively:

http://www.shlomifish.org/me/contact-me/

Regards,

-- Shlomi Fish
Comment 9 Richard Houser 2015-01-16 09:33:32 CET
The existing patch 5818 was accepted unchanged, committed, and sent upstream.

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.