[virt-tools-list] rpm spec file problem

Gene Czarcinski gene at czarc.net
Tue Apr 2 17:48:31 UTC 2013


As I stated in a previous message, I have a problem doing rpmbuild -ts 
with the tarball created for virt-manager.  This problem predates the 
gtk3.2 branch since it also occurs with RELEASE-0.9.4-1.  I know what 
the problem is but not why it is happening or how to (acceptably) fix it.

I have my own rpm build tree (like most folks do).  However, I like my 
source and spec files grouped and not in one big pile. Therefore, I have 
an .rpmmacros file with the following specified:
     # %_sourcedir is where the source code tarballs, patches, etc. will be
     # placed after you do an "rpm -ivh somepackage.1.0-1.src.rpm"
     %_sourcedir     %{_topdir}/%{name}-%{version}

     # %_specdir is where the specfile gets placed when installing a 
src.rpm. I
     # prefer the specfile to be in the same directory as the source 
tarballs, etc.
     %_specdir       %{_sourcedir}

and the problem is that I specify %{_topdir}/%{name}-%{version} although 
it could have also been
     %{_topdir}/SOURCE/%{name}-%{version}
with the same results:
> rpmbuild -ts virt-manager-0.9.4.tar.gz
> error: Unable to open 
> /home/gc/devel/rpmbuild/SOURCE/virt-manager/virt-manager.spec: No such 
> file or directory
with %_sourcedir     %{_topdir}/SOURCE/%{name}

or
> rpmbuild -ts virt-manager-0.9.4.tar.gz
> error: Unable to open 
> /home/gc/devel/rpmbuild/SOURCE/virt-manager-0.9.4/virt-manager.spec: 
> No such file or directory
with %_sourcedir     %{_topdir}/%{name}-%{version}

I have run this way for years and have never had a problem with any 
other package so I must conclude that it is something about the 
virt-manager.spec file that is causing the problem.  It may be a problem 
with rpmbuild it it is only with the virt-manager.spec file.

Anybody have any ideas?

One solution that is not acceptable is to remove %{name}-%{version}

Gene





More information about the virt-tools-list mailing list