Re: using rpmbuild with cvs sources

[email protected] (Bob Proulx)
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
Bruce Pennypacker wrote:
> 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:[email protected]:/cvsroot/project checkout -d %{name}-${version} %{name}

Bob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.