Thanks Bob. I was going to send a similar mail to the list. The one thing that you didn't mention (but alluded to) that I will explicitly is that one of the paramount principles of packaging in RPM is that of reproducible builds - anyone that you give the SRPM to should be capable of producing an identical binary RPM. When you introdice dynamic sources such as svn, CVS, git, etc., that becomes impossible, and thus defeats the design principles of RPM.
----- Original Message -----
From: rpm-list-bounces redhat com <rpm-list-bounces redhat com>
To: rpm-list redhat com <rpm-list redhat com>
Sent: Fri Aug 10 20:44:50 2007
Subject: Re: Building from Subversion instead of tarball
Jeff Johnson wrote:
> Kenneth Porter wrote:
> >All the packages I've built to date use a tarball as the base
That is considered the best practice.
> >A lot of open source projects are going to Subversion for
> >version control
Your question would apply equally to CVS or Git or any of the other
version control systems too though. It is not svn specific.
> >and I'm wondering if anyone's created a spec file
> >that can serve as an example for using a repository tag instead of
> >a tarball as a source?
Note that when you do this source rpm files become relatively
worthless. Normally the package can be rebuilt entirely from the
.src.rpm file. But if the source must be checked out from an online
vcs then the .src.rpm file no longer contains the source. Also the
rebuild requires a live network connection to the version control
server. Also if the version control server ever disappears for
whatever reason then you can't rebuild the rpm files. If none of
those things are important to you then there is no problem with
building from version control source.
> >Would one need to do much more than replace a "tar xfz" with a "svn
> >co" in the %prep? Anything else I should worry about?
> About all you have to worry about is whether you want a persistent
> checkout, in which case you need to test whether check-out exists
> (or not), and update instead of initial checkout.
In subversion the 'svn checkout' and 'svn update' operations are the
same after the initial invokation. The only difference is that one
gets the URL from the command line and the other gets the URL from the
working copy. You can avoid worrying about one or the other and
*always* do a checkout operation. That will work fine if the is an
existing working copy already. Always doing an 'svn checkout' avoids
the problem nicely.
Rpm-list mailing list
Rpm-list redhat com