From be4242ddcd3cff92b5a8c6deb9b4188423b24419 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 26 May 2010 17:34:03 +0000 Subject: [PATCH] notes and instructions to build postgresql database Former-commit-id: c59e439e355ab6c19f82c846b7db43d7beebced6 --- AIX/xcat-Pg/Build-notes | 66 ++++++++++++++++++++++++++++++++++++++++ AIX/xcat-Pg/xcat-Pg.spec | 37 ++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 AIX/xcat-Pg/Build-notes create mode 100644 AIX/xcat-Pg/xcat-Pg.spec diff --git a/AIX/xcat-Pg/Build-notes b/AIX/xcat-Pg/Build-notes new file mode 100644 index 0000000..bd3cfb8 --- /dev/null +++ b/AIX/xcat-Pg/Build-notes @@ -0,0 +1,66 @@ +Notes to build, install and create rpms for Postgresql for AIX 6.1 + +Get from the Linux toolbox and install: +zlib-1.2.3-4.aix5.2.ppc.rpm +zlib-devel-1.2.3-4.aix5.2.ppc.rpm +gcc-4.2.0-3.aix6.1.ppc.rpm +make-3.80-1.aix5.1.ppc.rpm +readline* ( did not work for me) + +Download postgresql source tarball recent release ( we had 8.4.4) +/www.postgresql.com +put in /postgres directory ( make sure you have plenty of / and /var space) +cd /postgres + +unzip and untar the file +gunzip postgresql-8.4.4.tar* +tar -xvf postgresql-8.4.4.tar +cd postgresql-8.4.4 +read INSTALL for all instructions, what follows is from that file + +Setup to build on the machine and install in /var/lib/pgsql directory +./configure --prefix=/var/lib/pgsql --with-openssl --without-readline +gmake + +If the build complete ok then: + +su - lissa ( any non-root user) +cd /postgres/postgresql-8.4.4 +gmake check + +Should come back with: + +============== shutting down postmaster ============== +server stopped + +======================= + All 120 tests passed. +======================= + +If check is ok, then return to root + +As root: +cd /postgres/postgresql-8.4.4 +gmake install + +When the install is complete, build a tarball out of the compiles installed pg +tar -cvf postgresql-8.4.4-aix6.1.tar.gz /var/lib/pgsql + +Build the rpm + +Remove any old RPMs +rm -f /opt/freeware/src/packages/SRPMS/postgresql*rpm /opt/freeware/src/packages/RPMS/ppc/postgresql*rpm + + + +Put the tarball in +/opt/freeware/src/packages/SOURCES/postgresql-8.4.4-aix6.1.tar.gz + +Get the shipped xCAT spec file : xcat-Pg.spec + +Run rpm -ba xcat-Pg.spec + +Should build the following rpm: + +/opt/freeware/src/packages/RPMS/ppc/xcat-Pg-8.4.4.aix6.1.ppc.rpm + diff --git a/AIX/xcat-Pg/xcat-Pg.spec b/AIX/xcat-Pg/xcat-Pg.spec new file mode 100644 index 0000000..03e2c07 --- /dev/null +++ b/AIX/xcat-Pg/xcat-Pg.spec @@ -0,0 +1,37 @@ +Summary: Package for Postgresql on AIX +Name:xcat-postgresql +Version: 5 +Release: 1 +License: GPL +Group: Applications/System +Vendor: postgresql +Packager: IBM Corp. +Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} +Prefix: / +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root +#BuildRoot: /var/tmp/postgresql-root +BuildArch: ppc +Source: postgresql-8.4.4-aix6.1.tar.gz +Provides: xcat-postgresql = %{version} + +%description +postgresql-8.4.4 (64-bit). + +%prep +%setup -q -n postgresql-8.4.4 +%build + +%install + +mkdir -p $RPM_BUILD_ROOT/var/lib/pgsql +cp -rp /opt/freeware/src/packages/BUILD/postgresql-8.4.4/* $RPM_BUILD_ROOT/var/lib/pgsql + + +%post + +%clean + +%files +%defattr(-,root,root) +/var/lib/pgsql +