Bug 243731 - spectool doesn't show anything with no buildtree setuped
Summary: spectool doesn't show anything with no buildtree setuped
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-11 15:24 UTC by Michał Bentkowski
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version: 5.4-1.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-20 19:36:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
spec (1.07 KB, application/octet-stream)
2007-06-11 15:54 UTC, Michał Bentkowski
no flags Details
stderr (248 bytes, application/octet-stream)
2007-06-11 15:54 UTC, Michał Bentkowski
no flags Details

Description Michał Bentkowski 2007-06-11 15:24:09 UTC
Hi!
Recently I wanted to use spectool to give me addresses from specfile but it 
gave me nothing. After a small searching I found that it was caused due to no 
buildtree setuped. After rpmdev-setuptree everything works fine.

I'm reporting this problem since I think there should be a note that buildtree 
has to be setuped or just spectool could work without it.

Comment 1 Ville Skyttä 2007-06-11 15:47:33 UTC
Interesting, I can't reproduce on FC6 or F7.  What I did find out that if
rpm-build is not installed, spectool indeed fails silently.  But rpm-build is a
dependency of rpmdevtools, so that shouldn't be the case.

Could you run spectool with the -D option for some specfile, and look at the
generated files it outputs if they contain some clues what's wrong (or attach
them here)?

Comment 2 Michał Bentkowski 2007-06-11 15:54:41 UTC
Created attachment 156730 [details]
spec

Comment 3 Michał Bentkowski 2007-06-11 15:54:59 UTC
Created attachment 156731 [details]
stderr

Comment 4 Michał Bentkowski 2007-06-11 15:57:21 UTC
According to second attachment I made a small test:

[ecik@ecik ~]$ rm -rf rpmbuild/BUILD/
[ecik@ecik ~]$ spectool cvs/bygfoot/devel/bygfoot.spec
[ecik@ecik ~]$ mkdir -p rpmbuild/BUILD
[ecik@ecik ~]$ spectool cvs/bygfoot/devel/bygfoot.spec
Source0: http://heanet.dl.sourceforge.net/sourceforge/bygfoot/bygfoot-2.2.0-
source.tar.bz2
Source3: bygfoot.desktop


Comment 5 Nils Philippsen 2007-06-11 16:04:42 UTC
Without any further configuration, users don't have their private build tree but
use /usr/src/redhat which is contained in rpm-build (which explains why
rpm-build missing causes spectool to fail). If you change the root of the
buildtree by way of redefining things in ~/.rpmmacros and if these directories
don't exist, that's just the same symptom.

I'm not sure how spectool should handle this, though:

1) if RPM fails, then dump the contents of the stderr file so the user can
repair things?

or

2) silently call rpmdev-setuptree to ensure that it exists -- and if that fails,
dump the stderr file?

Comment 6 Michał Bentkowski 2007-06-11 16:07:25 UTC
(In reply to comment #5)
> I'm not sure how spectool should handle this, though:

Why not just to create a temporary directory for rpmbuild if it doesn't exist?

Comment 7 Ville Skyttä 2007-06-11 16:17:25 UTC
(In reply to comment #5)
> 2) silently call rpmdev-setuptree to ensure that it exists

Somehow this doesn't sound good to me.  Just reporting the error or using a
tmpdir if that's sanely doable would sound better.

Or perhaps add a bunch of --defines to set _topdir, _builddir, _sourcedir,
_srcrpmdir and _specdir (are there more?) to let's say / or /tmp when running
rpmbuild - we're not actually interested in those dirs or their contents at all
but just want to appease rpmbuild, right?


Comment 8 Michał Bentkowski 2007-06-11 16:25:24 UTC
(In reply to comment #7)
> we're not actually interested in those dirs or their contents at all
> but just want to appease rpmbuild, right?

That's why I proposed to create a temp directory if rpmbuild dir doesn't exist 
(spectool may create it even if rpmbuild dir does exist).

Comment 9 Nils Philippsen 2007-06-14 07:53:47 UTC
I've fixed this in spectool-1.0.9, which is on my people page. It just uses the
temporary directory it already has and passes a couple of "--define '_bladir
...'" to rpmbuild.

Comment 10 Fedora Update System 2007-07-09 15:45:41 UTC
rpmdevtools-5.4-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2007-07-20 19:36:31 UTC
rpmdevtools-5.4-1.fc7 has been pushed to the Fedora 7 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.