Bug 243731 - spectool doesn't show anything with no buildtree setuped
spectool doesn't show anything with no buildtree setuped
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpmdevtools (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-11 11:24 EDT by Michał Bentkowski
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 5.4-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-20 15:36:42 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)
spec (1.07 KB, application/octet-stream)
2007-06-11 11:54 EDT, Michał Bentkowski
no flags Details
stderr (248 bytes, application/octet-stream)
2007-06-11 11:54 EDT, Michał Bentkowski
no flags Details

  None (edit)
Description Michał Bentkowski 2007-06-11 11:24:09 EDT
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 11:47:33 EDT
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 11:54:41 EDT
Created attachment 156730 [details]
spec
Comment 3 Michał Bentkowski 2007-06-11 11:54:59 EDT
Created attachment 156731 [details]
stderr
Comment 4 Michał Bentkowski 2007-06-11 11:57:21 EDT
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 12:04:42 EDT
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 12:07:25 EDT
(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 12:17:25 EDT
(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 12:25:24 EDT
(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 03:53:47 EDT
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 11:45:41 EDT
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 15:36:31 EDT
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.