Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new builder for 3.6 and change some download url. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CentOS6/lib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;;
Expand Down
2 changes: 2 additions & 0 deletions CentOS6/lib/rpmbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 6 additions & 4 deletions CentOS6/pgpool-II-33/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ FROM centos:centos6

MAINTAINER Tatsuo Ishii <[email protected]>

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

Expand Down
4 changes: 2 additions & 2 deletions CentOS6/pgpool-II-33/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions CentOS6/pgpool-II-34/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ FROM centos:centos6

MAINTAINER Tatsuo Ishii <[email protected]>

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

Expand Down
4 changes: 2 additions & 2 deletions CentOS6/pgpool-II-34/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions CentOS6/pgpool-II-35/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ FROM centos:centos6

MAINTAINER Tatsuo Ishii <[email protected]>

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
Expand Down
4 changes: 2 additions & 2 deletions CentOS6/pgpool-II-35/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions CentOS6/pgpool-II-36/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Docker file to create pgpool-II rpm

FROM centos:centos6

MAINTAINER Tatsuo Ishii <[email protected]>

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
14 changes: 14 additions & 0 deletions CentOS6/pgpool-II-36/REAMDME.md
Original file line number Diff line number Diff line change
@@ -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
```
51 changes: 51 additions & 0 deletions CentOS6/pgpool-II-36/make.sh
Original file line number Diff line number Diff line change
@@ -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."
25 changes: 25 additions & 0 deletions CentOS6/pgpool-II-release36/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Docker file to create pgpool-II rpm

FROM centos:centos6

MAINTAINER Bo Peng <[email protected]>

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
15 changes: 15 additions & 0 deletions CentOS6/pgpool-II-release36/README.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions CentOS6/pgpool-II-release36/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
su rpmuser < /tmp/rpmbuild.sh
cp -rp /tmp/rpmbuild/RPMS /var/volum
cp -rp /tmp/rpmbuild/SRPMS /var/volum
14 changes: 14 additions & 0 deletions CentOS6/pgpool-II-release36/pgpool-II-release-35.repo
Original file line number Diff line number Diff line change
@@ -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
49 changes: 49 additions & 0 deletions CentOS6/pgpool-II-release36/pgpool-II-release-35.spec
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> 3.6-1
* Tue Dec 15 2015 Yugo Nagata <[email protected]> 3.5-1
* Thu Dec 4 2014 Yugo Nagata <[email protected]> - 3.4-1
- Initial Package
11 changes: 11 additions & 0 deletions CentOS6/pgpool-II-release36/rpmbuild.sh
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion CentOS6/pgpoolAdmin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM centos:centos6

MAINTAINER Tatsuo Ishii <[email protected]>

ENV PGPOOL_ADMIN_VERSION 3.5.1
ENV PGPOOL_ADMIN_VERSION 3.5.3
ENV POSTGRESQL_VERSION 9.4
ENV POSTGRESQL_VERSION2 94

Expand Down
9 changes: 5 additions & 4 deletions CentOS7/lib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions CentOS7/lib/rpmbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading