Bug 461421 - rpmlint erroneously appear of warning: configure-without-libdir-spec
Summary: rpmlint erroneously appear of warning: configure-without-libdir-spec
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-07 19:34 UTC by Pavel Alexeev
Modified: 2008-11-22 16:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-31 10:25:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Buggy spec-file (13.58 KB, text/x-java)
2008-09-07 20:25 UTC, Pavel Alexeev
no flags Details

Description Pavel Alexeev 2008-09-07 19:34:19 UTC
Description of problem:
In several cases rpmlint erroneously fire warning configure-without-libdir-spec.

1) This warning fire on string:
NOCONFIGURE=true sh ./autogen.sh
but autogen.sh is not configure. Furthermore, with defined NOCONFIGURE variable will not call configure as well.

2) Second case is more strange IMHO.
It does: mysql-gui-tools.spec:186: W: configure-without-libdir-spec
But line 186 contains only comment: "#fi". Before and after it also only comments:

# workbench
#cd ../mysql-workbench
#if [ ! -f configure ]; then
#  CFLAGS="$RPM_OPT_FLAGS" sh ./autogen.sh --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} 
#else
#  CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} 
#fi <<<<<<<< Line 186 in SPEC file.
#if [ "$SMP" != "" ]; then
#  (make "MAKE=make -k -j $SMP"; exit 0)
#  make
#else
#  make
#fi

Version-Release number of selected component (if applicable):
$ rpm -q rpmlint
rpmlint-0.84-2.fc10.noarch

I special update from rawhide in Fedora 9. Stable conducts themselves do the same.

Comment 1 Pavel Alexeev 2008-09-07 19:37:02 UTC
Hmmm. Bugzilla add line breaks where it has not.
So, in example listing in both cases "--sysconfdir=%{_sysconfdir}" is continuation of previous line. So, we have one big block of comments.

Comment 2 Ville Skyttä 2008-09-07 20:11:27 UTC
1) That should not result in this warning.  It's hard to say anything more without seeing the specfile - could you attach it to this bug?

2) Note that above your "#fi" line 186 there _is_ a ./configure without --libdir ("./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir}" - no --libdir there).  It might be that either that your and rpmlint's way of counting line numbers differs (rpmlint treats first line as number 1), or that there's a bug that results in rpmlint counting the lines wrong.  But again, it's hard to say more without seeing the specfile.  Based on looking into Fedora's CVS, the mysql-gui-tools.spec you're running rpmlint against is not that one.

Comment 3 Pavel Alexeev 2008-09-07 20:24:11 UTC
(In reply to comment #2)
> Based on looking into
> Fedora's CVS, the mysql-gui-tools.spec you're running rpmlint against is not
> that one.
mysql-gui0tools presented in CVS is FTBFS very long time. I'm working on it now.

>could you attach it to this bug?
Off course!

Comment 4 Pavel Alexeev 2008-09-07 20:25:00 UTC
Created attachment 315974 [details]
Buggy spec-file

Comment 5 Pavel Alexeev 2008-09-07 20:27:49 UTC
(In reply to comment #2)
> 2) Note that above your "#fi" line 186 there _is_ a ./configure without
> --libdir
Why? It is in comment and will not executed!

Comment 6 Ville Skyttä 2008-09-07 22:05:14 UTC
Thanks for the attachment.  rpmlint was indeed reporting wrong line numbers, this has been fixed in upstream svn, will be in the next rpmlint release:
http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1455

These warnings will still be reported for the attached specfile though at the moment:

mysql-gui-tools.spec:130: W: configure-without-libdir-spec
mysql-gui-tools.spec:185: W: configure-without-libdir-spec

The first because rpmlint is not smart enough to understand that "rm ./configure" means that ./configure is deleted, not run (workaround: "rm configure").  The second because rpmlint does not even try to understand comments in this context.

I suppose both are more or less fixable.  But then again the first might need more code and thought than worth it to be robust in all cases.  And in the second case, comment lines cannot just be discarded because things that one thinks are commented out might actually be not, for example unescaped rpm macros following shell style # comments, so fixing this robustly might also require more work and thought than it seems on first sight.

So, I'm not sure when/if these will be fixed; in the meantime, you can just ignore those warnings for this particular specfile.  The first one can be pretty easily silenced by doing "rm configure" instead of "rm ./configure".

Comment 7 Pavel Alexeev 2008-09-07 22:26:32 UTC
(In reply to comment #6)
>rpmlint was indeed reporting wrong line numbers,
> this has been fixed in upstream svn, will be in the next rpmlint release:
> http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1455
Thank you.


> The first because rpmlint is not smart enough to understand that "rm
> ./configure" means that ./configure is deleted, not run (workaround: "rm
> configure").
Oh. Another words this means what rpmlint search exactly string "./configure"? And will silent if I run it on this like: "sh configure" or "bash configure" or other same manner?

> And in the
> second case, comment lines cannot just be discarded because things that one
> thinks are commented out might actually be not, for example unescaped rpm
> macros following shell style # comments, so fixing this robustly might also
> require more work and thought than it seems on first sight.
I suppose what your can just check comment, and if it is contains (may be non escaped like %%) always warn like: W: possible-macros-in-comment


> The first one can be
> pretty easily silenced by doing "rm configure" instead of "rm ./configure".
Ok, thanks for this workaround, I'm do that.

Comment 8 Ville Skyttä 2008-09-08 05:47:24 UTC
(In reply to comment #7)
> Oh. Another words this means what rpmlint search exactly string "./configure"?
> And will silent if I run it on this like: "sh configure" or "bash configure" or
> other same manner?

Yes.

Comment 9 Pavel Alexeev 2008-09-08 07:23:09 UTC
It is clear. And it is not best behaviour :( IMHO. By the way it is not subject initially reported.

Thanks again, Ville Skyttä.

Comment 10 Fedora Update System 2008-10-23 20:54:20 UTC
rpmlint-0.85-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/rpmlint-0.85-1.fc9

Comment 11 Fedora Update System 2008-10-24 23:49:30 UTC
rpmlint-0.85-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpmlint'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-9125

Comment 12 Fedora Update System 2008-10-31 10:25:04 UTC
rpmlint-0.85-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2008-11-04 17:37:08 UTC
rpmlint-0.85-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/rpmlint-0.85-2.fc10

Comment 14 Fedora Update System 2008-11-22 16:55:34 UTC
rpmlint-0.85-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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