======= This is a PoC of using a subversion infrastructure to build (staged) RPM's with mock. I was inspired from http://yadt-project.org and see it as extension in integrated system management with YADT.
- svnmock.sh: SVN post-commit hook
- post.sh: post hook used by svnmock.sh to take care of RPM repos (createrepo...)
- schema.txt and packages/: show you how to organize the SVN repo. Simply create a directory for each RPM package with SPECS and SOURCES subdirs as you would do it with rpmbuild. Doesn't know if we actually need these subdirs, but it feels comfortable. Still a PoC :o)
yum install subversion mock createrepo
- add the svn user to mock group. If you use mod_dav_svn:
/usr/sbin/usermod -a -G mock apache
- Download svnmock.sh to /usr/local/bin/svnmock.sh
- Create /etc/svnmock.conf:
RESULTDIR="/opt/svnmock/result"
MOCKCONFDIR="/etc/mock"
BASEURL="http://$(hostname --fqdn)/svnmock"
* (maybe) modify your local mock configuration
* svnadmin create /opt/svn/testrepo
* ln -s /usr/local/bin/svnmock.sh /opt/svn/testrepo/hooks/post-commit
* checkout the new repo
* create directories mkdir mypackage/testing/{SPECS,SOURCES}
* put in your .spec file and sources
* commit your stuff
* look at /opt/svnmock/result/{repos,testing}
Logging via syslog and via $RESULTDIR/{repos,$YOUR_STAGES}/LOGS/*