Discussion:
Using rpmbuild -ta with nightly CVS snapshots
Philip Prindeville
2007-10-05 01:45:18 UTC
Permalink
I'm trying to use a simple cron script to grab the nightly CVS tarball
from a project and do an "rpmbuild -ta" on it to ensure that no one has
checked in code that either breaks the .spec file or hasn't been built
on multiple platforms (I run this script on a farm).

Unfortunately, the script fails because %{SOURCE0} isn't being set to
the argument passed into rpmbuild -ta ...

Shouldn't the behavior of "rpmbuild -t..." be to ignore SOURCE0 and use
the tarball from the command line???
Bob Proulx
2007-10-05 15:16:54 UTC
Permalink
Post by Philip Prindeville
I'm trying to use a simple cron script to grab the nightly CVS tarball
from a project and do an "rpmbuild -ta" on it to ensure that no one has
checked in code that either breaks the .spec file or hasn't been built
on multiple platforms (I run this script on a farm).
Excellent! I like to hear that people are going automated regression
builds. It is an important process step.
Post by Philip Prindeville
Unfortunately, the script fails because %{SOURCE0} isn't being set to
the argument passed into rpmbuild -ta ...
Shouldn't the behavior of "rpmbuild -t..." be to ignore SOURCE0 and use
the tarball from the command line???
This won't help you at all but... This works for me. I build my
project using -ta fine.

What does your Source: lines in your spec file look like?

grep -i ^Source.*: yourfile.spec

I like using the macros and so mine looks like this:

Source: %{name}-%{version}.tar.gz

Perhaps your Source: line is not being set correctly in your spec
file?

Bob
Philip Prindeville
2007-10-05 18:13:58 UTC
Permalink
Post by Bob Proulx
Post by Philip Prindeville
Unfortunately, the script fails because %{SOURCE0} isn't being set to
the argument passed into rpmbuild -ta ...
Shouldn't the behavior of "rpmbuild -t..." be to ignore SOURCE0 and use
the tarball from the command line???
This won't help you at all but... This works for me. I build my
project using -ta fine.
What does your Source: lines in your spec file look like?
grep -i ^Source.*: yourfile.spec
Source: %{name}-%{version}.tar.gz
Perhaps your Source: line is not being set correctly in your spec
file?
Bob
The file in question is:

http://proftp.cvs.sourceforge.net/*checkout*/proftp/proftpd/contrib/dist/rpm/proftpd.spec
Bob Proulx
2007-10-07 03:35:13 UTC
Permalink
Post by Philip Prindeville
Post by Bob Proulx
Perhaps your Source: line is not being set correctly in your spec
file?
http://proftp.cvs.sourceforge.net/*checkout*/proftp/proftpd/contrib/dist/rpm/proftpd.spec
I don't see why that would not work. I am probably missing something
obvious. Sorry.

Bob

Loading...