Thanks a lot for the thorough response Mathieu!&nbsp; I have the rpmbuild side of things running well now, and have focused on mock tonight with some success.&nbsp; I'll give your el6 testing config a try and see how it goes.&nbsp; I've got SL6 running fine, so should be good to go.&nbsp; <br><br>More tomorrow night, thanks!<br>Tyler<br><br><br>----- Original Message -----<br>From: Mathieu Baudier &lt;mbaudier@argeo.org&gt;<br>Date: Wednesday, November 9, 2011 10:35 pm<br>Subject: Re: [ELGIS] Getting started with mock..<br>To: "Hatzopoulos, Nikolaos" &lt;hatzopou@chapman.edu&gt;<br>Cc: "Tyler Mitchell (OSGeo)" &lt;tmitchell@osgeo.org&gt;, "el@lists.osgeo.org" &lt;el@lists.osgeo.org&gt;<br><br>&gt; &gt; On the ELGIS wiki page it says to ask for tips for starting <br>&gt; with mock - here I am :) &nbsp;I found the config file examples but <br>&gt; am currently digging for tutorials. &nbsp;I'm sure I'll find <br>&gt; something soon, but wanted to ask here first.<br>&gt; <br>&gt; # RPMBUILD<br>&gt; If you want to develop new packages, you can start by setting up an<br>&gt; RPM build environment without mock, as Nikolaos has described in his<br>&gt; previous mail.<br>&gt; You will get a better feeling of what building/rebuilding RPMs is<br>&gt; about, and you can iterate more quickly than with mock when developing<br>&gt; the spec file and the necessary patches on the code.<br>&gt; <br>&gt; There is also an interesting reference on the CentOS wiki:<br>&gt; http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment<br>&gt; (and http://wiki.centos.org/HowTos/RebuildSRPM)<br>&gt; <br>&gt; # MOCK<br>&gt; When building in mock the same mechanism with rpmbuild etc. is used,<br>&gt; but a new chrooted environment is created where only the packages<br>&gt; required for the build will be installed and the build is started<br>&gt; within this environment.<br>&gt; This ensures that the spec files define all dependencies and <br>&gt; makes for<br>&gt; reproducible builds.<br>&gt; <br>&gt; 1. Install mock from EPEL<br>&gt; yum install mock<br>&gt; (doesn't work on RHEL Desktop, because it lacks some dependencies)<br>&gt; <br>&gt; 2. Add you regular user to the mock group<br>&gt; sudo usermod -a -G mock myusername<br>&gt; (log out / log in in order to make sure that this change is <br>&gt; taken into account)<br>&gt; <br>&gt; 3. You then need to define a mock configuration with the repositories<br>&gt; you want to use.<br>&gt; <br>&gt; You will find the mock configuration files used for ELGIS here:<br>&gt; https://projects.argeo.org/elgis/svn/factory/trunk/modules/org.argeo.elgis.rpmfactory/files/etc/mock<br>&gt; (use the elgis-6-testing* ones)<br>&gt; <br>&gt; Copy them to /etc/mock (or to a separate directory that you will pass<br>&gt; to mock as argument).<br>&gt; <br>&gt; 4. To rebuild an SRPM<br>&gt; mock -r elgis-6-testing-x86_64 --rebuild /path/to/srpm<br>&gt; <br>&gt; Tip: use the --debug option to see all the build information, or tail<br>&gt; /var/lib/mock/elgis-6-testing-x86_64/result/build.log<br>&gt; <br>&gt; In order to create the SRPM from file, you can either put the<br>&gt; SPEC/SOURCES file in the rpmbuild environment (cf. Nikolaos <br>&gt; mail) and<br>&gt; run:<br>&gt; rpmbuild --nodeps -bs /path/to/myspecfile.spec<br>&gt; <br>&gt; or use mock --buildsrpm<br>&gt; (I haven't tested it yet, because it was not available in the mock<br>&gt; from CentOS that we used for ELGIS5, but it seems more <br>&gt; consistent and<br>&gt; there is no reason why it shouldn't work)<br>&gt; <br>&gt; 5. When the build is completed your RPMs are available here:<br>&gt; /var/lib/mock/elgis-6-testing-x86_64/result/<br>&gt; <br>&gt; while the related rpmbuild top dir is here:<br>&gt; /var/lib/mock/elgis-6-testing-x86_64/root/builddir/build/<br>&gt; <br>&gt; If something went wrong, you can switch to the chroot <br>&gt; environment in a shell:<br>&gt; mock -r elgis-6-testing-x86_64 --shell<br>&gt; <br>&gt; and work on the RPM just as described by Nikolaos with rpmbuild but<br>&gt; within the chrooted environment.<br>&gt; <br>&gt; # NOTES<br>&gt; - if you want to contribute new packages, building them in mock first<br>&gt; is not "mandatory" as such, but I *very* much appreciate it.<br>&gt; Tracking down each missing dependency by relaunching the whole mock<br>&gt; build is not the funniest part and if you don't do it in mock before<br>&gt; contributing, I will be the one who will have to do it before<br>&gt; publishing.<br>&gt; <br>&gt; - the ELGIS spec files are here:<br>&gt; https://projects.argeo.org/elgis/svn/factory/trunk/rpmbuild<br>&gt; <br>&gt; You can check out them somewhere with subversion:<br>&gt; svn co https://projects.argeo.org/elgis/svn/factory/trunk elgis-<br>&gt; testing<br>&gt; The directory structure may soon change to be more in line with other<br>&gt; spec files repositories (e.g. Volker's one on GitHub), but the<br>&gt; information is here and versioned.<br>&gt; If you want to improve existing packages, please provide diffs against<br>&gt; the latest version of trunk.<br>&gt; <br>&gt; Cheers,<br>&gt; <br>&gt; Mathieu<br>&gt;