Ask Your Question
0

Packaging RPM where SOURCE0 basename != source archive name.

asked 2012-06-18 22:50:55 -0500

vamega gravatar image

I'm trying to package subversion 1.6 for fedora 17, and I've created the specfile and everything builds fine under mock, however in order to avoid conflicts with the subversion version in the fedora repositories, I'd like to name my package subverion16.

I can't seem to do this, as rpmbuild complains that the basename of the url (the svn upstream location) in my SOURCE0 is subversion-1.6.18.tar.bz2 while it is expecting subversiontr-1.6-18.tar.bz2.

Is there a better alternative to simply removing the URL, and pointing to a local archive?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-10-12 14:19:26 -0500

dmalcolm gravatar image

Where exactly does rpmbuild complain?

I'm not sure if I'm reading your question correctly, but it sounds like you might be running into a common "gotcha" with the %setup macro.

By default %setup assumes that the top-level directory within the source tarball is the "Name-Version" of the package, for example "subversion-1.6.18". If the "Name" attribute of the package is non-standard (e.g. "subversion16"), this macro's default will get confused and erroneously look for a directory called e.g. subversion16-1.6.18 (note that extra "16")

The way to fix it is to pass the "-n" parameter to %setup, for something like this:

%setup -n subversion-%{version}

See http://www.rpm.org/max-rpm/s1-rpm-inside-macros.html for more information

Hope this is helpful

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-18 22:50:55 -0500

Seen: 516 times

Last updated: Oct 12 '12