[packagers] Setting up an rpmforge/rpmrepo dev environment

J Robinson jrobinson852 at gmail.com
Thu Nov 29 16:45:40 CET 2007


Hello, Dag and everyone:

OK I'm going to document my steps to set up an rpmforge dev environment.
I'm especially interested in what is conventionally done, ie, what the
directories are called, and what other conventions packagers typically
follow. My understanding is that I should work with rpmforge, which will
become rpmrepo later.

This is what I've done so far:

1) Mirror the rpmforge,  FC6 and Centos5 yum repos onto my local machines.
(I wrote perl scripts that use rsync to do this and can share them if
there's interest) Then set up the webserver on the mirrror machine so that I
can access the mirrors via
http://mirror.mydomainhere.com/[centos|fedora|rpmforge]

2) fetch the rpmforge spec files (what Dag called the repository) into
~/src/rpms_local/rpms by issuing:
   mkdir ~/src/rpms_local/; cd ~/src/rpms_local; svn co
http://svn.rpmforge.net/svn/trunk/rpms/

3) Make a mock configuration file for my target system. I did this by:
3A) in /etc/mock, copying centos-5-x86_64.cfg   to centos-5-x86_64-
rpmforge.cfg
3B) making default.cfg a symlink to centos-5-x86_64-rpmforge.cfg
3C) adding the following lines to centos-5-x86_64-rpmforge.cfg:

[rpmforge]
name=rpmforge
baseurl=
http://freshrpms.mirrors.lug.ro/freshrpms/dag/redhat/el5/en/x86_64/dag

I also changed the baseurls for [os] and [updates] to use my local yum repos
mirror (from step 1).

4) This is where I get stuck.

Now, suppose I wanted to build RPMs for swish-e, which does provide a .spec
file? I know I need to start with either the swish-e tarball and the right
spec file, or an existing swish-e .src.rpm. In this case I have a tarball
and the .spec file it contains. But here are my questions:

a) Where should I place the tarball to make the .src.rpm from?  Where should
I place the .spec file?
b) Also, I want to alter the .spec file to add large file support to swish-e
(which means I need to add "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" to
the build, which I know how to do using swish-e's configure script, but not
via the spec file. Tips?
c) Then it seems like I'm supposed to make a .src.rpm file and pass it to
mock to rebuild.  From other posts, it seems like I should keep the .spec
file in my source code tree (IE cvs or svn), and have the tarball somewhere
else, and create a temporary .src.rpm with rpmbuild to pass to mock. Can
someone provide guidance here? I'll summarize and repost the results if
there's interest.

Thanks, jrobinson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rpmforge.net/pipermail/packagers/attachments/20071129/ac018edc/attachment.html


More information about the packagers mailing list