Bug 461421 - rpmlint erroneously appear of warning: configure-without-libdir-spec
rpmlint erroneously appear of warning: configure-without-libdir-spec
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: rpmlint (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-07 15:34 EDT by Pavel Alexeev
Modified: 2008-11-22 11:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-31 06:25:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Pavel Alexeev 2008-09-07 15:34:19 EDT
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 15:37:02 EDT
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 16:11:27 EDT
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 16:24:11 EDT
(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 16:25:00 EDT
Created attachment 315974 [details]
Buggy spec-file
Comment 5 Pavel Alexeev 2008-09-07 16:27:49 EDT
(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 18:05:14 EDT
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 18:26:32 EDT
(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 01:47:24 EDT
(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 03:23:09 EDT
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 16:54:20 EDT
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 19:49:30 EDT
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 06:25:04 EDT
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 12:37:08 EST
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 11:55:34 EST
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.