Comments
Patch
@@ -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
@@ -5,3 +5,5 @@ RUN yum install -y make
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
@@ -4,3 +4,5 @@ RUN yum install -y python-devel python-d
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
@@ -38,3 +38,20 @@ contrib/buildrpm --rpmbuilddir $RPMBUILD
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"