dockerrpm: create a yum/dnf repo from the generated rpms
This gives "PPA" functionality where users easily can stay uptodate with latest
nightly build.
--- a/contrib/docker/centos5 Thu May 15 01:48:37 2014 +0200
+++ b/contrib/docker/centos5 Sun Aug 31 13:41:09 2014 +0200
@@ -1,4 +1,6 @@
FROM saltstack/centos-5-minimal
RUN yum install -y gcc make rpm-build gettext tar
RUN yum install -y python-devel python-docutils
+# For creating repo meta data
+RUN yum install -y createrepo
RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel
--- a/contrib/docker/centos6 Thu May 15 01:48:37 2014 +0200
+++ b/contrib/docker/centos6 Sun Aug 31 13:41:09 2014 +0200
@@ -5,3 +5,5 @@
RUN yum install -y rpm-build
RUN yum install -y gettext
RUN yum install -y tar
+# For creating repo meta data
+RUN yum install -y createrepo
--- a/contrib/docker/fedora20 Thu May 15 01:48:37 2014 +0200
+++ b/contrib/docker/fedora20 Sun Aug 31 13:41:09 2014 +0200
@@ -4,3 +4,5 @@
RUN yum install -y make
RUN yum install -y rpm-build
RUN yum install -y gettext
+# For creating repo meta data
+RUN yum install -y createrepo
--- a/contrib/dockerrpm Thu May 15 01:48:37 2014 +0200
+++ b/contrib/dockerrpm Sun Aug 31 13:41:09 2014 +0200
@@ -38,3 +38,20 @@
DSHARED=/mnt/shared
$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean
+
+$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
+ createrepo $DSHARED
+
+cat << EOF > $RPMBUILDDIR/mercurial.repo
+# Place this file in /etc/yum.repos.d/mercurial.repo
+[mercurial]
+name=Mercurial packages for $NAME
+# baseurl=file://$RPMBUILDDIR/
+baseurl=http://hg.example.com/build/$NAME/
+skip_if_unavailable=True
+gpgcheck=0
+enabled=1
+EOF
+
+echo
+echo "Build complete - results can be found in $RPMBUILDDIR"