From e28d7b1be1571a31ad687ee3677b4acea6d79ec7 Mon Sep 17 00:00:00 2001 From: pengbo Date: Wed, 19 Jul 2017 10:00:40 +0900 Subject: [PATCH] Add new builder for 3.6 and change some download url. --- CentOS6/lib/build.sh | 7 +-- CentOS6/lib/rpmbuild.sh | 2 + CentOS6/pgpool-II-33/Dockerfile | 10 ++-- CentOS6/pgpool-II-33/make.sh | 4 +- CentOS6/pgpool-II-34/Dockerfile | 10 ++-- CentOS6/pgpool-II-34/make.sh | 4 +- CentOS6/pgpool-II-35/Dockerfile | 7 ++- CentOS6/pgpool-II-35/make.sh | 4 +- CentOS6/pgpool-II-36/Dockerfile | 26 ++++++++++ CentOS6/pgpool-II-36/REAMDME.md | 14 +++++ CentOS6/pgpool-II-36/make.sh | 51 +++++++++++++++++++ CentOS6/pgpool-II-release36/Dockerfile | 25 +++++++++ CentOS6/pgpool-II-release36/README.md | 15 ++++++ CentOS6/pgpool-II-release36/build.sh | 3 ++ .../pgpool-II-release-35.repo | 14 +++++ .../pgpool-II-release-35.spec | 49 ++++++++++++++++++ CentOS6/pgpool-II-release36/rpmbuild.sh | 11 ++++ CentOS6/pgpoolAdmin/Dockerfile | 2 +- CentOS7/lib/build.sh | 9 ++-- CentOS7/lib/rpmbuild.sh | 2 + CentOS7/pgpool-II-33/Dockerfile | 9 ++-- CentOS7/pgpool-II-33/make.sh | 4 +- CentOS7/pgpool-II-34/Dockerfile | 8 +-- CentOS7/pgpool-II-34/make.sh | 4 +- CentOS7/pgpool-II-35/Dockerfile | 4 +- CentOS7/pgpool-II-35/make.sh | 2 +- CentOS7/pgpool-II-36/Dockerfile | 27 ++++++++++ CentOS7/pgpool-II-36/REAMDME.md | 14 +++++ CentOS7/pgpool-II-36/make.sh | 51 +++++++++++++++++++ CentOS7/pgpool-II-release36/Dockerfile | 25 +++++++++ CentOS7/pgpool-II-release36/README.md | 15 ++++++ CentOS7/pgpool-II-release36/build.sh | 3 ++ .../pgpool-II-release-36.repo | 14 +++++ .../pgpool-II-release-36.spec | 51 +++++++++++++++++++ CentOS7/pgpool-II-release36/rpmbuild.sh | 11 ++++ CentOS7/pgpoolAdmin/Dockerfile | 2 +- 36 files changed, 475 insertions(+), 38 deletions(-) create mode 100644 CentOS6/pgpool-II-36/Dockerfile create mode 100644 CentOS6/pgpool-II-36/REAMDME.md create mode 100644 CentOS6/pgpool-II-36/make.sh create mode 100644 CentOS6/pgpool-II-release36/Dockerfile create mode 100644 CentOS6/pgpool-II-release36/README.md create mode 100755 CentOS6/pgpool-II-release36/build.sh create mode 100644 CentOS6/pgpool-II-release36/pgpool-II-release-35.repo create mode 100644 CentOS6/pgpool-II-release36/pgpool-II-release-35.spec create mode 100755 CentOS6/pgpool-II-release36/rpmbuild.sh create mode 100644 CentOS7/pgpool-II-36/Dockerfile create mode 100644 CentOS7/pgpool-II-36/REAMDME.md create mode 100644 CentOS7/pgpool-II-36/make.sh create mode 100644 CentOS7/pgpool-II-release36/Dockerfile create mode 100644 CentOS7/pgpool-II-release36/README.md create mode 100755 CentOS7/pgpool-II-release36/build.sh create mode 100644 CentOS7/pgpool-II-release36/pgpool-II-release-36.repo create mode 100644 CentOS7/pgpool-II-release36/pgpool-II-release-36.spec create mode 100755 CentOS7/pgpool-II-release36/rpmbuild.sh diff --git a/CentOS6/lib/build.sh b/CentOS6/lib/build.sh index bc46356..504adca 100755 --- a/CentOS6/lib/build.sh +++ b/CentOS6/lib/build.sh @@ -7,9 +7,10 @@ export POSTGRESQL_VERSION2=`echo $POSTGRESQL_VERSION|sed s/\\\\.//` # install PostgreSQL rpms case $POSTGRESQL_VERSION in - "9.5") YUMPG=pgdg-centos95-9.5-1.noarch.rpm;; - "9.4") YUMPG=pgdg-centos94-9.4-1.noarch.rpm;; - "9.3") YUMPG=pgdg-centos93-9.3-1.noarch.rpm;; + "9.6") YUMPG=pgdg-centos96-9.6-3.noarch.rpm;; + "9.5") YUMPG=pgdg-centos95-9.5-3.noarch.rpm;; + "9.4") YUMPG=pgdg-centos94-9.4-3.noarch.rpm;; + "9.3") YUMPG=pgdg-centos93-9.3-3.noarch.rpm;; "9.2") YUMPG=pgdg-centos92-9.2-6.noarch.rpm;; "9.1") YUMPG=pgdg-centos91-9.1-4.noarch.rpm;; "*") echo wrong postgresql version \"$POSTGRESQL_VERSION\";exit 1;; diff --git a/CentOS6/lib/rpmbuild.sh b/CentOS6/lib/rpmbuild.sh index 4f64366..ac04658 100755 --- a/CentOS6/lib/rpmbuild.sh +++ b/CentOS6/lib/rpmbuild.sh @@ -11,6 +11,8 @@ cp /tmp/pgpool-II-$PGPOOL_VERSION.tar.gz rpmbuild/SOURCES # checkout branch case $PGPOOL_VERSION in + 3.6*) PGPOOL_BRANCH="V3_6_STABLE" + dir="src/";; 3.5*) PGPOOL_BRANCH="V3_5_STABLE" dir="src/";; 3.4.*) PGPOOL_BRANCH="V3_4_STABLE" diff --git a/CentOS6/pgpool-II-33/Dockerfile b/CentOS6/pgpool-II-33/Dockerfile index afc1df7..ae3159a 100644 --- a/CentOS6/pgpool-II-33/Dockerfile +++ b/CentOS6/pgpool-II-33/Dockerfile @@ -4,15 +4,17 @@ FROM centos:centos6 MAINTAINER Tatsuo Ishii -ENV PGPOOL_VERSION 3.3.9 +ENV PGPOOL_VERSION 3.3.16 RUN yum update -y RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ - libmemcached-devel wget + libmemcached-devel wget make jade libxslt docbook-dtds docbook-style-xsl \ + docbook-style-dsssl docbook docbook-dsssl docbook-sgml docbook-xsl openjade + +RUN sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog # this is neccessary for "su postgres" -RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm -RUN yum install -y postgresql94-server +RUN yum install -y postgresql-server RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres diff --git a/CentOS6/pgpool-II-33/make.sh b/CentOS6/pgpool-II-33/make.sh index e804cf3..9d40c71 100644 --- a/CentOS6/pgpool-II-33/make.sh +++ b/CentOS6/pgpool-II-33/make.sh @@ -10,7 +10,7 @@ myvol=$HOME/volum # Docker image file name. -image=pgpool2_33_rpm +image=pgpool2_33_rhel6_rpm if [ $# -gt 1 ];then if [ $1 = "-p" ];then @@ -41,7 +41,7 @@ if [ $proxy_set = "y" ];then cp Dockerfile.orig Dockerfile fi -for i in 9.5 9.4 9.3 9.2 +for i in 9.6 9.5 9.4 9.3 do echo "======= Start rpm build for PostgreSQL $i =======" sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum $image diff --git a/CentOS6/pgpool-II-34/Dockerfile b/CentOS6/pgpool-II-34/Dockerfile index 1370af2..3733035 100644 --- a/CentOS6/pgpool-II-34/Dockerfile +++ b/CentOS6/pgpool-II-34/Dockerfile @@ -4,15 +4,17 @@ FROM centos:centos6 MAINTAINER Tatsuo Ishii -ENV PGPOOL_VERSION 3.4.5 +ENV PGPOOL_VERSION 3.4.9 RUN yum update -y RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ - libmemcached-devel wget + libmemcached-devel wget make jade libxslt docbook-dtds docbook-style-xsl \ + docbook-style-dsssl docbook docbook-dsssl docbook-sgml docbook-xsl openjade + +RUN sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog # this is neccessary for "su postgres" -RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm -RUN yum install -y postgresql94-server +RUN yum install -y postgresql-server RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres diff --git a/CentOS6/pgpool-II-34/make.sh b/CentOS6/pgpool-II-34/make.sh index f6d0a7f..c653a2a 100644 --- a/CentOS6/pgpool-II-34/make.sh +++ b/CentOS6/pgpool-II-34/make.sh @@ -10,7 +10,7 @@ myvol=$HOME/volum # Docker image file name. -image=pgpool2_34_rpm +image=pgpool2_34_rhel6_rpm if [ $# -gt 1 ];then if [ $1 = "-p" ];then @@ -41,7 +41,7 @@ if [ $proxy_set = "y" ];then cp Dockerfile.orig Dockerfile fi -for i in 9.5 9.4 9.3 9.2 +for i in 9.6 9.5 9.4 9.3 do echo "======= Start rpm build for PostgreSQL $i =======" sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum $image diff --git a/CentOS6/pgpool-II-35/Dockerfile b/CentOS6/pgpool-II-35/Dockerfile index a61e18a..46da3e3 100644 --- a/CentOS6/pgpool-II-35/Dockerfile +++ b/CentOS6/pgpool-II-35/Dockerfile @@ -4,11 +4,14 @@ FROM centos:centos6 MAINTAINER Tatsuo Ishii -ENV PGPOOL_VERSION 3.5.1 +ENV PGPOOL_VERSION 3.5.5 RUN yum update -y RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ - libmemcached-devel wget + libmemcached-devel wget make jade libxslt docbook-dtds docbook-style-xsl \ + docbook-style-dsssl docbook docbook-dsssl docbook-sgml docbook-xsl openjade + +RUN sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog # this is neccessary for "su postgres" RUN yum install -y postgresql-server diff --git a/CentOS6/pgpool-II-35/make.sh b/CentOS6/pgpool-II-35/make.sh index 17fb03d..091f9eb 100644 --- a/CentOS6/pgpool-II-35/make.sh +++ b/CentOS6/pgpool-II-35/make.sh @@ -10,7 +10,7 @@ myvol=$HOME/volum # Docker image file name. -image=pgpool2_35_rpm +image=pgpool2_35_rhel6_rpm if [ $# -gt 1 ];then if [ $1 = "-p" ];then @@ -41,7 +41,7 @@ if [ $proxy_set = "y" ];then cp Dockerfile.orig Dockerfile fi -for i in 9.5 9.4 9.3 +for i in 9.6 9.5 9.4 9.3 do echo "======= Start rpm build for PostgreSQL $i =======" sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum $image diff --git a/CentOS6/pgpool-II-36/Dockerfile b/CentOS6/pgpool-II-36/Dockerfile new file mode 100644 index 0000000..2b4bb40 --- /dev/null +++ b/CentOS6/pgpool-II-36/Dockerfile @@ -0,0 +1,26 @@ +# Docker file to create pgpool-II rpm + +FROM centos:centos6 + +MAINTAINER Tatsuo Ishii + +ENV PGPOOL_VERSION 3.6.1 + +RUN yum update -y +RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ + libmemcached-devel wget make jade libxslt docbook-dtds docbook-style-xsl \ + docbook-style-dsssl docbook docbook-dsssl docbook-sgml docbook-xsl openjade + +RUN sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog + +# this is neccessary for "su postgres" +RUN yum install -y postgresql-server + +RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres + +# download pgpool-II tar ball +RUN wget http://www.pgpool.net/download.php?f=pgpool-II-$PGPOOL_VERSION.tar.gz -O /tmp/pgpool-II-$PGPOOL_VERSION.tar.gz + +ADD rpmbuild.sh /tmp/ +ADD build.sh /tmp/ +CMD /tmp/build.sh diff --git a/CentOS6/pgpool-II-36/REAMDME.md b/CentOS6/pgpool-II-36/REAMDME.md new file mode 100644 index 0000000..3709ad1 --- /dev/null +++ b/CentOS6/pgpool-II-36/REAMDME.md @@ -0,0 +1,14 @@ +How to build pgpool-II 3.5.x rpms with PostgreSQL 9.* +================== + +``` + sh make.sh +``` +will create pgpool-II 3.5 rpm + PostgreSQL 9.3, 9.4 rpms/srpms under +$HOME/volum. If you want to change this, edit "myvol=..." line in make.sh. + +If you need to use proxy, type: + +``` + sh make.sh -p proxy_address +``` diff --git a/CentOS6/pgpool-II-36/make.sh b/CentOS6/pgpool-II-36/make.sh new file mode 100644 index 0000000..e124315 --- /dev/null +++ b/CentOS6/pgpool-II-36/make.sh @@ -0,0 +1,51 @@ +#! /bin/bash +# +# Main driver to generate rpms +# $0: [-p proxy_address] +# if "-p" is specifed, proxy setting used. +# + +# Directory to place result rpms/srpms. Default to +# your_home_directory/volum. +myvol=$HOME/volum + +# Docker image file name. +image=pgpool2_36_rhel6_rpm + +if [ $# -gt 1 ];then + if [ $1 = "-p" ];then + proxy=$2 + proxy_set=y + echo "inserting proxy address $2." + else + echo "wrong parameter $1". + exit 1 + fi +else + proxy_set=n +fi + +echo "======= Start docker build =======" +cp ../lib/build.sh . +cp ../lib/rpmbuild.sh . +if [ $proxy_set = "y" ];then + cp Dockerfile Dockerfile.orig + cat Dockerfile|sed -e "/ENV/ aENV http_proxy $proxy" -e "/ENV/ aENV https_proxy $proxy" > Dockerfile.proxy + cp Dockerfile.proxy Dockerfile +fi +sudo docker build --no-cache -t $image . + +echo "======= End docker build =======" + +if [ $proxy_set = "y" ];then + cp Dockerfile.orig Dockerfile +fi + +for i in 9.6 9.5 9.4 9.3 +do + echo "======= Start rpm build for PostgreSQL $i =======" + sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum $image + echo "======= End rpm build for PostgreSQL $i =======" +done + +echo "Done. RPMS/SRPS are placed on $myvol." diff --git a/CentOS6/pgpool-II-release36/Dockerfile b/CentOS6/pgpool-II-release36/Dockerfile new file mode 100644 index 0000000..679eb37 --- /dev/null +++ b/CentOS6/pgpool-II-release36/Dockerfile @@ -0,0 +1,25 @@ +# Docker file to create pgpool-II rpm + +FROM centos:centos6 + +MAINTAINER Bo Peng + +ENV http_proxy http://www-proxy:80/ + +ENV RPM_USER rpmuser + +RUN yum -y install yum-plugin-fastestmirror +RUN echo "include_only=.jp" >> /etc/yum/pluginconf.d/fastestmirror.conf +RUN yum update -y + +RUN yum install -y rpm-build + +RUN useradd rpmuser + +ADD rpmbuild.sh /tmp/rpmbuild.sh +ADD build.sh /tmp/build.sh +ADD pgpool-II-release-36.spec /tmp/pgpool-II-release-36.spec +ADD pgpool-II-release-36.repo /tmp/pgpool-II-release-36.repo +ADD http://www.pgpool.net/yum/RPM-GPG-KEY-PGPOOL2 /tmp/RPM-GPG-KEY-PGPOOL2 +RUN chown rpmuser /tmp/RPM-GPG-KEY-PGPOOL2 +CMD /tmp/build.sh diff --git a/CentOS6/pgpool-II-release36/README.md b/CentOS6/pgpool-II-release36/README.md new file mode 100644 index 0000000..2cd9dd4 --- /dev/null +++ b/CentOS6/pgpool-II-release36/README.md @@ -0,0 +1,15 @@ +How to build pgpool-II 3.6.x repository rpm. +================== + +### 1. Build docker image + +``` + sudo docker build -t pgpool_release_36_rpm . +``` + +### 2. Run docker container + +``` + sudo docker run -v /home/yourname/volum:/var/volum pgpool_release_36_rpm +``` +### 3. You will find RPMs and SRPMs under /home/yourname/volum. diff --git a/CentOS6/pgpool-II-release36/build.sh b/CentOS6/pgpool-II-release36/build.sh new file mode 100755 index 0000000..8f389e8 --- /dev/null +++ b/CentOS6/pgpool-II-release36/build.sh @@ -0,0 +1,3 @@ +su rpmuser < /tmp/rpmbuild.sh +cp -rp /tmp/rpmbuild/RPMS /var/volum +cp -rp /tmp/rpmbuild/SRPMS /var/volum diff --git a/CentOS6/pgpool-II-release36/pgpool-II-release-35.repo b/CentOS6/pgpool-II-release36/pgpool-II-release-35.repo new file mode 100644 index 0000000..efeadee --- /dev/null +++ b/CentOS6/pgpool-II-release36/pgpool-II-release-35.repo @@ -0,0 +1,14 @@ +[pgpool36] +name=pgpool-II 3.6 $releasever - $basearch +baseurl=http://www.pgpool.net/yum/rpms/3.6/redhat/rhel-$releasever-$basearch +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 + +[pgpool36-source] +name=pgpool-II 3.6 $releasever - $basearch - Source +failovermethod=priority +baseurl=http://www.pgpool.net/yum/srpms/3.6/redhat/rhel-$releasever-$basearch +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 diff --git a/CentOS6/pgpool-II-release36/pgpool-II-release-35.spec b/CentOS6/pgpool-II-release36/pgpool-II-release-35.spec new file mode 100644 index 0000000..33e44ed --- /dev/null +++ b/CentOS6/pgpool-II-release36/pgpool-II-release-35.spec @@ -0,0 +1,49 @@ +Name: pgpool-II-release +Version: 3.6 +Release: 1 +Summary: pgpool-II 3.6.x official RPMs for RHEL - Yum Repository Configuration +Vendor: PgPool Global Development Group +Group: System Environment/Base +License: BSD +URL: http://www.pgpool.net/ +Source0: http://www.pgpool.net/yum/RPM-GPG-KEY-PGPOOL2 +Source1: pgpool-II-release-36.repo +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +%description +This package contains yum configuration, and also the GPG +key for pgpool-II official RPMs. + +%prep +%setup -q -c -T + +%build + +%install +rm -rf %{buildroot} + +install -Dpm 644 %{SOURCE0} \ + %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 + +install -dm 755 %{buildroot}%{_sysconfdir}/yum.repos.d +install -pm 644 %{SOURCE1} \ + %{buildroot}%{_sysconfdir}/yum.repos.d/ + +%clean +rm -rf %{buildroot} + +%post +/bin/rpm --import %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 + +%files +%defattr(-,root,root,-) +%config %{_sysconfdir}/yum.repos.d/* +%dir %{_sysconfdir}/pki/rpm-gpg +%{_sysconfdir}/pki/rpm-gpg/* + +%changelog +* Mon Nov 21 2016 Bo Peng 3.6-1 +* Tue Dec 15 2015 Yugo Nagata 3.5-1 +* Thu Dec 4 2014 Yugo Nagata - 3.4-1 +- Initial Package diff --git a/CentOS6/pgpool-II-release36/rpmbuild.sh b/CentOS6/pgpool-II-release36/rpmbuild.sh new file mode 100755 index 0000000..bec4bfb --- /dev/null +++ b/CentOS6/pgpool-II-release36/rpmbuild.sh @@ -0,0 +1,11 @@ +#! /bin/sh +# Script to create pgpool-II release RPMs +TOPDIR=/tmp/rpmbuild +mkdir -p $TOPDIR/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} + +cp /tmp/pgpool-II-release-36.spec $TOPDIR/SPECS +cp /tmp/pgpool-II-release-36.repo $TOPDIR/SOURCES +cp /tmp/RPM-GPG-KEY-PGPOOL2 $TOPDIR/SOURCES + +cd $TOPDIR/SPECS +rpmbuild -ba pgpool-II-release-36.spec --define="dist rhel6" --define="_topdir $TOPDIR" diff --git a/CentOS6/pgpoolAdmin/Dockerfile b/CentOS6/pgpoolAdmin/Dockerfile index 324b934..92ef589 100644 --- a/CentOS6/pgpoolAdmin/Dockerfile +++ b/CentOS6/pgpoolAdmin/Dockerfile @@ -4,7 +4,7 @@ FROM centos:centos6 MAINTAINER Tatsuo Ishii -ENV PGPOOL_ADMIN_VERSION 3.5.1 +ENV PGPOOL_ADMIN_VERSION 3.5.3 ENV POSTGRESQL_VERSION 9.4 ENV POSTGRESQL_VERSION2 94 diff --git a/CentOS7/lib/build.sh b/CentOS7/lib/build.sh index c71c9a5..72237fc 100755 --- a/CentOS7/lib/build.sh +++ b/CentOS7/lib/build.sh @@ -7,10 +7,11 @@ export POSTGRESQL_VERSION2=`echo $POSTGRESQL_VERSION|sed s/\\\\.//` # install PostgreSQL rpms case $POSTGRESQL_VERSION in - "9.5") YUMPG=pgdg-centos95-9.5-1.noarch.rpm;; - "9.4") YUMPG=pgdg-centos94-9.4-1.noarch.rpm;; - "9.3") YUMPG=pgdg-centos93-9.3-1.noarch.rpm;; - "9.2") YUMPG=pgdg-centos92-9.2-2.noarch.rpm;; + "9.6") YUMPG=pgdg-centos96-9.6-3.noarch.rpm;; + "9.5") YUMPG=pgdg-centos95-9.5-3.noarch.rpm;; + "9.4") YUMPG=pgdg-centos94-9.4-3.noarch.rpm;; + "9.3") YUMPG=pgdg-centos93-9.3-3.noarch.rpm;; + "9.2") YUMPG=pgdg-centos92-9.2-3.noarch.rpm;; "*") echo wrong postgresql version \"$POSTGRESQL_VERSION\";exit 1;; esac diff --git a/CentOS7/lib/rpmbuild.sh b/CentOS7/lib/rpmbuild.sh index 8956261..33354b6 100755 --- a/CentOS7/lib/rpmbuild.sh +++ b/CentOS7/lib/rpmbuild.sh @@ -11,6 +11,8 @@ cp /tmp/pgpool-II-$PGPOOL_VERSION.tar.gz rpmbuild/SOURCES # checkout branch case $PGPOOL_VERSION in + 3.6*) PGPOOL_BRANCH="V3_6_STABLE" + dir="src/";; 3.5*) PGPOOL_BRANCH="V3_5_STABLE" dir="src/";; 3.4.*) PGPOOL_BRANCH="V3_4_STABLE" diff --git a/CentOS7/pgpool-II-33/Dockerfile b/CentOS7/pgpool-II-33/Dockerfile index dee2fd0..64463b9 100644 --- a/CentOS7/pgpool-II-33/Dockerfile +++ b/CentOS7/pgpool-II-33/Dockerfile @@ -4,15 +4,18 @@ FROM centos:centos7 MAINTAINER Tatsuo Ishii -ENV PGPOOL_VERSION 3.3.9 +ENV PGPOOL_VERSION 3.3.16 RUN yum install -y deltarpm RUN yum update -y; exit 0 RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ - libmemcached-devel wget make + libmemcached-devel wget make jade libxslt docbook-dtds docbook-style-xsl \ + docbook-style-dsssl docbook docbook-dsssl docbook-sgml docbook-xsl openjade + +RUN sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog # this is neccessary for "su postgres" -RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-1.noarch.rpm +RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm RUN yum install -y postgresql94-server RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres diff --git a/CentOS7/pgpool-II-33/make.sh b/CentOS7/pgpool-II-33/make.sh index 16c92a4..4df2cfe 100644 --- a/CentOS7/pgpool-II-33/make.sh +++ b/CentOS7/pgpool-II-33/make.sh @@ -10,7 +10,7 @@ myvol=$HOME/volum # Docker image file name. -image=pgpool2_33_rpm +image=pgpool2_33_rhel7_rpm if [ $# -gt 1 ];then if [ $1 = "-p" ];then @@ -40,7 +40,7 @@ if [ $proxy_set = "y" ];then cp Dockerfile.orig Dockerfile fi -for i in 9.5 9.4 9.3 9.2 +for i in 9.6 9.5 9.4 9.3 do echo "======= Start rpm build for PostgreSQL $i =======" sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum -t $image diff --git a/CentOS7/pgpool-II-34/Dockerfile b/CentOS7/pgpool-II-34/Dockerfile index 9724826..525afa8 100644 --- a/CentOS7/pgpool-II-34/Dockerfile +++ b/CentOS7/pgpool-II-34/Dockerfile @@ -4,15 +4,17 @@ FROM centos:centos7 MAINTAINER Tatsuo Ishii -ENV PGPOOL_VERSION 3.4.5 +ENV PGPOOL_VERSION 3.4.12 RUN yum install -y deltarpm RUN yum update -y; exit 0 RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ - libmemcached-devel wget make + libmemcached-devel wget make jade libxslt docbook-dtds docbook-style-xsl docbook-style-dsssl docbook docbook-dsssl docbook-sgml docbook-xsl openjade + +RUN sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog # this is neccessary for "su postgres" -RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-1.noarch.rpm +RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm RUN yum install -y postgresql94-server RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres diff --git a/CentOS7/pgpool-II-34/make.sh b/CentOS7/pgpool-II-34/make.sh index 5a96a94..d3b08de 100644 --- a/CentOS7/pgpool-II-34/make.sh +++ b/CentOS7/pgpool-II-34/make.sh @@ -10,7 +10,7 @@ myvol=$HOME/volum # Docker image file name. -image=pgpool2_34_rpm +image=pgpool2_34_rhel7_rpm if [ $# -gt 1 ];then if [ $1 = "-p" ];then @@ -42,7 +42,7 @@ if [ $proxy_set = "y" ];then cp Dockerfile.orig Dockerfile fi -for i in 9.5 9.4 9.3 9.2 +for i in 9.6 9.5 9.4 9.3 do echo "======= Start rpm build for PostgreSQL $i =======" sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum -t $image diff --git a/CentOS7/pgpool-II-35/Dockerfile b/CentOS7/pgpool-II-35/Dockerfile index fa6bcd5..6dde14c 100644 --- a/CentOS7/pgpool-II-35/Dockerfile +++ b/CentOS7/pgpool-II-35/Dockerfile @@ -4,14 +4,14 @@ FROM centos:centos7 MAINTAINER Tatsuo Ishii -ENV PGPOOL_VERSION 3.5.1 +ENV PGPOOL_VERSION 3.5.9 RUN yum update -y; exit 0 RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ libmemcached-devel wget make # this is neccessary for "su postgres" -RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-1.noarch.rpm +RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm RUN yum install -y postgresql-server RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres diff --git a/CentOS7/pgpool-II-35/make.sh b/CentOS7/pgpool-II-35/make.sh index 73b5dfc..822fddd 100644 --- a/CentOS7/pgpool-II-35/make.sh +++ b/CentOS7/pgpool-II-35/make.sh @@ -41,7 +41,7 @@ if [ $proxy_set = "y" ];then cp Dockerfile.orig Dockerfile fi -for i in 9.5 9.4 9.3 +for i in 9.6 9.5 9.4 9.3 do echo "======= Start rpm build for PostgreSQL $i =======" sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum $image diff --git a/CentOS7/pgpool-II-36/Dockerfile b/CentOS7/pgpool-II-36/Dockerfile new file mode 100644 index 0000000..8c96ce3 --- /dev/null +++ b/CentOS7/pgpool-II-36/Dockerfile @@ -0,0 +1,27 @@ +# Docker file to create pgpool-II rpm + +FROM centos:centos7 + +MAINTAINER Tatsuo Ishii + +ENV PGPOOL_VERSION 3.6.5 + +RUN yum update -y; exit 0 +RUN yum install -y tar rpm-build pam-devel gcc git openssl-devel \ + libmemcached-devel wget make docbook docbook-dsssl docbook-sgml docbook-xsl openjade \ + jade libxslt docbook-dtds docbook-style-xsl docbook-style-dsssl + +sed -i -e 's/^SGMLDECL "docbook.dcl"/ -- SGMLDECL "docbook.dcl" --/' /usr/share/sgml/docbook/sgml-dtd-*/catalog + +# this is neccessary for "su postgres" +RUN rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm +RUN yum install -y postgresql-server + +RUN su -c 'cd /var/lib/pgsql && git clone http://git.postgresql.org/git/pgpool2.git' postgres + +# download pgpool-II tar ball +RUN wget http://www.pgpool.net/download.php?f=pgpool-II-$PGPOOL_VERSION.tar.gz -O /tmp/pgpool-II-$PGPOOL_VERSION.tar.gz + +ADD rpmbuild.sh /tmp/ +ADD build.sh /tmp/ +CMD /tmp/build.sh diff --git a/CentOS7/pgpool-II-36/REAMDME.md b/CentOS7/pgpool-II-36/REAMDME.md new file mode 100644 index 0000000..3709ad1 --- /dev/null +++ b/CentOS7/pgpool-II-36/REAMDME.md @@ -0,0 +1,14 @@ +How to build pgpool-II 3.5.x rpms with PostgreSQL 9.* +================== + +``` + sh make.sh +``` +will create pgpool-II 3.5 rpm + PostgreSQL 9.3, 9.4 rpms/srpms under +$HOME/volum. If you want to change this, edit "myvol=..." line in make.sh. + +If you need to use proxy, type: + +``` + sh make.sh -p proxy_address +``` diff --git a/CentOS7/pgpool-II-36/make.sh b/CentOS7/pgpool-II-36/make.sh new file mode 100644 index 0000000..aec351a --- /dev/null +++ b/CentOS7/pgpool-II-36/make.sh @@ -0,0 +1,51 @@ +#! /bin/bash +# +# Main driver to generate rpms +# $0: [-p proxy_address] +# if "-p" is specifed, proxy setting used. +# + +# Directory to place result rpms/srpms. Default to +# your_home_directory/volum. +myvol=$HOME/volum + +# Docker image file name. +image=pgpool2_36_rhel7_rpm + +if [ $# -gt 1 ];then + if [ $1 = "-p" ];then + proxy=$2 + proxy_set=y + echo "inserting proxy address $2." + else + echo "wrong parameter $1". + exit 1 + fi +else + proxy_set=n +fi + +echo "======= Start docker build =======" +cp ../lib/build.sh . +cp ../lib/rpmbuild.sh . +if [ $proxy_set = "y" ];then + cp Dockerfile Dockerfile.orig + cat Dockerfile|sed -e "/ENV/ aENV http_proxy $proxy" -e "/ENV/ aENV https_proxy $proxy" > Dockerfile.proxy + cp Dockerfile.proxy Dockerfile +fi +sudo docker build -t $image . + +echo "======= End docker build =======" + +if [ $proxy_set = "y" ];then + cp Dockerfile.orig Dockerfile +fi + +for i in 9.6 9.5 9.4 9.3 +do + echo "======= Start rpm build for PostgreSQL $i =======" + sudo docker run --rm -e POSTGRESQL_VERSION=$i -v $myvol:/var/volum $image + echo "======= End rpm build for PostgreSQL $i =======" +done + +echo "Done. RPMS/SRPS are placed on $myvol." diff --git a/CentOS7/pgpool-II-release36/Dockerfile b/CentOS7/pgpool-II-release36/Dockerfile new file mode 100644 index 0000000..35fdfe5 --- /dev/null +++ b/CentOS7/pgpool-II-release36/Dockerfile @@ -0,0 +1,25 @@ +# Docker file to create pgpool-II rpm + +FROM centos:centos7 + +MAINTAINER Yugo Nagata + +ENV http_proxy http://www-proxy.:80/ + +ENV RPM_USER rpmuser + +RUN yum -y install yum-plugin-fastestmirror +RUN echo "include_only=.jp" >> /etc/yum/pluginconf.d/fastestmirror.conf +RUN yum update -y; exit 0 + +RUN yum install -y rpm-build + +RUN useradd rpmuser + +ADD rpmbuild.sh /tmp/rpmbuild.sh +ADD build.sh /tmp/build.sh +ADD pgpool-II-release-36.spec /tmp/pgpool-II-release-36.spec +ADD pgpool-II-release-36.repo /tmp/pgpool-II-release-36.repo +ADD http://www.pgpool.net/yum/RPM-GPG-KEY-PGPOOL2 /tmp/RPM-GPG-KEY-PGPOOL2 +RUN chown rpmuser /tmp/RPM-GPG-KEY-PGPOOL2 +CMD /tmp/build.sh diff --git a/CentOS7/pgpool-II-release36/README.md b/CentOS7/pgpool-II-release36/README.md new file mode 100644 index 0000000..2cd9dd4 --- /dev/null +++ b/CentOS7/pgpool-II-release36/README.md @@ -0,0 +1,15 @@ +How to build pgpool-II 3.6.x repository rpm. +================== + +### 1. Build docker image + +``` + sudo docker build -t pgpool_release_36_rpm . +``` + +### 2. Run docker container + +``` + sudo docker run -v /home/yourname/volum:/var/volum pgpool_release_36_rpm +``` +### 3. You will find RPMs and SRPMs under /home/yourname/volum. diff --git a/CentOS7/pgpool-II-release36/build.sh b/CentOS7/pgpool-II-release36/build.sh new file mode 100755 index 0000000..8f389e8 --- /dev/null +++ b/CentOS7/pgpool-II-release36/build.sh @@ -0,0 +1,3 @@ +su rpmuser < /tmp/rpmbuild.sh +cp -rp /tmp/rpmbuild/RPMS /var/volum +cp -rp /tmp/rpmbuild/SRPMS /var/volum diff --git a/CentOS7/pgpool-II-release36/pgpool-II-release-36.repo b/CentOS7/pgpool-II-release36/pgpool-II-release-36.repo new file mode 100644 index 0000000..efeadee --- /dev/null +++ b/CentOS7/pgpool-II-release36/pgpool-II-release-36.repo @@ -0,0 +1,14 @@ +[pgpool36] +name=pgpool-II 3.6 $releasever - $basearch +baseurl=http://www.pgpool.net/yum/rpms/3.6/redhat/rhel-$releasever-$basearch +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 + +[pgpool36-source] +name=pgpool-II 3.6 $releasever - $basearch - Source +failovermethod=priority +baseurl=http://www.pgpool.net/yum/srpms/3.6/redhat/rhel-$releasever-$basearch +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 diff --git a/CentOS7/pgpool-II-release36/pgpool-II-release-36.spec b/CentOS7/pgpool-II-release36/pgpool-II-release-36.spec new file mode 100644 index 0000000..df29b27 --- /dev/null +++ b/CentOS7/pgpool-II-release36/pgpool-II-release-36.spec @@ -0,0 +1,51 @@ +Name: pgpool-II-release +Version: 3.6 +Release: 1 +Summary: pgpool-II 3.6.x official RPMs for RHEL - Yum Repository Configuration +Vendor: PgPool Global Development Group +Group: System Environment/Base +License: BSD +URL: http://www.pgpool.net/ +Source0: http://www.pgpool.net/yum/RPM-GPG-KEY-PGPOOL2 +Source1: pgpool-II-release-36.repo +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +%description +This package contains yum configuration, and also the GPG +key for pgpool-II official RPMs. + +%prep +%setup -q -c -T + +%build + +%install +rm -rf %{buildroot} + +install -Dpm 644 %{SOURCE0} \ + %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 + +install -dm 755 %{buildroot}%{_sysconfdir}/yum.repos.d +install -pm 644 %{SOURCE1} \ + %{buildroot}%{_sysconfdir}/yum.repos.d/ + +%clean +rm -rf %{buildroot} + +%post +/bin/rpm --import %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-PGPOOL2 + +%files +%defattr(-,root,root,-) +%config %{_sysconfdir}/yum.repos.d/* +%dir %{_sysconfdir}/pki/rpm-gpg +%{_sysconfdir}/pki/rpm-gpg/* + +%changelog +* Mon Nov 21 2016 Bo Peng - 3.6-1 +- Initial Package +* Wed Dec 16 2015 Yugo Nagata - 3.5-1 +- Initial Package +* Thu Dec 4 2014 Yugo Nagata - 3.4-1 +- Initial Package diff --git a/CentOS7/pgpool-II-release36/rpmbuild.sh b/CentOS7/pgpool-II-release36/rpmbuild.sh new file mode 100755 index 0000000..7135c52 --- /dev/null +++ b/CentOS7/pgpool-II-release36/rpmbuild.sh @@ -0,0 +1,11 @@ +#! /bin/sh +# Script to create pgpool-II release RPMs +TOPDIR=/tmp/rpmbuild +mkdir -p $TOPDIR/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} + +cp /tmp/pgpool-II-release-36.spec $TOPDIR/SPECS +cp /tmp/pgpool-II-release-36.repo $TOPDIR/SOURCES +cp /tmp/RPM-GPG-KEY-PGPOOL2 $TOPDIR/SOURCES + +cd $TOPDIR/SPECS +rpmbuild -ba pgpool-II-release-36.spec --define="dist rhel7" --define="_topdir $TOPDIR" diff --git a/CentOS7/pgpoolAdmin/Dockerfile b/CentOS7/pgpoolAdmin/Dockerfile index e5092e1..911c4d9 100644 --- a/CentOS7/pgpoolAdmin/Dockerfile +++ b/CentOS7/pgpoolAdmin/Dockerfile @@ -4,7 +4,7 @@ FROM centos:centos7 MAINTAINER Tatsuo Ishii -ENV PGPOOL_ADMIN_VERSION 3.5.1 +ENV PGPOOL_ADMIN_VERSION 3.5.3 ENV POSTGRESQL_VERSION 9.4 ENV POSTGRESQL_VERSION2 94