Discussion:
using rpmbuild with cvs sources
Bruce Pennypacker
2007-12-14 21:14:22 UTC
Permalink
Hi all,

We have an environment where we have a number of applications being
stored in CVS. They're historically for Solaris, designed for Solaris
package management. I'm in the process of starting to set up some of
this to build for our growing linux base. I can build the packages
manually, and I'd like to wrap them up as RPM's, but I'm stuck on the
proper way of identifying the sources in my .spec file. I really don't
want to have to write wrappers for each project to simply do a cvs
checkout and gzip it just so rpmbuild can then unzip it and build it. Is
there a good (preferably simple) way of having rpmbuild simply check out
an entire cvs project tree as the source rather than trying to grab and
unzip a package?

-Bruce
Bob Proulx
2007-12-14 22:24:53 UTC
Permalink
I'm in the process of starting to set up some of this to build for
our growing linux base. ... I'm stuck on the proper way of
identifying the sources in my .spec file. I really don't want to
have to write wrappers for each project to simply do a cvs checkout
and gzip it just so rpmbuild can then unzip it and build it.
Why not? There are a lot of advantages. Then rpmbuild can create
true .src.rpm files. Then the process flow falls into a normal flow
the same as other rpm build steps. I personally would (and have)
build a tar.gz file and then build from it.
Is there a good (preferably simple) way of having rpmbuild simply
check out an entire cvs project tree as the source rather than
trying to grab and unzip a package?
The "%prep" script is a script. You can put any commands you wish
there. Of course the common thing is to use a "%setup" macro but that
is not required. You can instead of "%setup" simply checkout the
sources from cvs. Something like this (UNTESTED):

%prep
%setup -q -c -T
cvs -d :pserver:***@example.com:/cvsroot/project checkout -d %{name}-${version} %{name}

Bob
Michael Jennings
2007-12-14 22:42:59 UTC
Permalink
On Friday, 14 December 2007, at 16:14:22 (-0500),
Post by Bruce Pennypacker
We have an environment where we have a number of applications being
stored in CVS. They're historically for Solaris, designed for
Solaris package management. I'm in the process of starting to set up
some of this to build for our growing linux base. I can build the
packages manually, and I'd like to wrap them up as RPM's, but I'm
stuck on the proper way of identifying the sources in my .spec
file. I really don't want to have to write wrappers for each project
to simply do a cvs checkout and gzip it just so rpmbuild can then
unzip it and build it. Is there a good (preferably simple) way of
having rpmbuild simply check out an entire cvs project tree as the
source rather than trying to grab and unzip a package?
Mezzanine (http://beta.kainx.org/wiki/view/Mezzanine) was originally
designed to pull sources out of CVS and build them using an external
configuration file (called a "product" file) as its only guide. It
can even generate source tarballs for you if given appropriate
instructions.

If you're interested, we can speak off-list.

Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <***@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"Happiness is the exercise of vital powers along lines of excellence
in a life affording them scope." -- Aristotle
Loading...