docker: add CentOS 5
There is no official CentOS 5 docker template so we use one from saltstack.
--- a/Makefile Sun Aug 31 13:41:09 2014 +0200
+++ b/Makefile Thu May 15 01:48:37 2014 +0200
@@ -155,6 +155,16 @@
mkdir -p packages/fedora20
contrib/dockerrpm fedora20
+centos5:
+ mkdir -p packages/centos5
+ contrib/buildrpm --withpython
+ cp rpmbuild/RPMS/*/* packages/centos5
+ cp rpmbuild/SRPMS/* packages/centos5
+
+docker-centos5:
+ mkdir -p packages/centos5
+ contrib/dockerrpm centos5 --withpython
+
centos6:
mkdir -p packages/centos6
contrib/buildrpm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/docker/centos5 Thu May 15 01:48:37 2014 +0200
@@ -0,0 +1,4 @@
+FROM saltstack/centos-5-minimal
+RUN yum install -y gcc make rpm-build gettext tar
+RUN yum install -y python-devel python-docutils
+RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel
--- a/contrib/dockerrpm Sun Aug 31 13:41:09 2014 +0200
+++ b/contrib/dockerrpm Thu May 15 01:48:37 2014 +0200
@@ -18,6 +18,7 @@
PLATFORM="$1"
[ "$PLATFORM" ] || { echo "Error: platform name must be specified"; exit 1; }
+shift # extra params are passed to buildrpm
DFILE="$ROOTDIR/contrib/docker/$PLATFORM"
[ -f "$DFILE" ] || { echo "Error: docker file $DFILE not found"; exit 1; }
@@ -32,7 +33,7 @@
) | $DOCKER build --tag $CONTAINER -
RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
-contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare
+contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
DSHARED=/mnt/shared
$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \