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.
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)?
Created attachment 156730 [details] spec
Created attachment 156731 [details] stderr
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
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?
(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?
(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?
(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).
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.
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.
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.