upgrade base version 8.4.3 -> 9.0.0beta1

This commit is contained in:
KaiGai Kohei 2010-05-24 12:52:13 +00:00
commit 3b2f53bb58
7 changed files with 19653 additions and 22930 deletions

View file

@ -1 +1 @@
postgresql-8.4.3.tar.bz2
postgresql-9.0beta1.tar.gz

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

19565
sepostgresql-9.0-fullset.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
Index: sepgsql/src/Makefile.global.in
===================================================================
--- sepgsql/src/Makefile.global.in (revision 2237)
+++ sepgsql/src/Makefile.global.in (working copy)
@@ -75,14 +75,14 @@
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 0e3bed5..aee6064 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -74,14 +74,14 @@ bindir := @bindir@
datadir := @datadir@
ifeq "$(findstring pgsql, $(datadir))" ""
ifeq "$(findstring postgres, $(datadir))" ""
@ -19,7 +19,7 @@ Index: sepgsql/src/Makefile.global.in
endif
endif
@@ -91,7 +91,7 @@
@@ -90,7 +90,7 @@ libdir := @libdir@
pkglibdir = $(libdir)
ifeq "$(findstring pgsql, $(pkglibdir))" ""
ifeq "$(findstring postgres, $(pkglibdir))" ""
@ -28,7 +28,7 @@ Index: sepgsql/src/Makefile.global.in
endif
endif
@@ -100,7 +100,7 @@
@@ -99,7 +99,7 @@ includedir := @includedir@
pkgincludedir = $(includedir)
ifeq "$(findstring pgsql, $(pkgincludedir))" ""
ifeq "$(findstring postgres, $(pkgincludedir))" ""
@ -37,7 +37,7 @@ Index: sepgsql/src/Makefile.global.in
endif
endif
@@ -109,7 +109,7 @@
@@ -108,7 +108,7 @@ mandir := @mandir@
docdir := @docdir@
ifeq "$(findstring pgsql, $(docdir))" ""
ifeq "$(findstring postgres, $(docdir))" ""
@ -46,37 +46,55 @@ Index: sepgsql/src/Makefile.global.in
endif
endif
Index: sepgsql/src/bin/pg_ctl/pg_ctl.c
===================================================================
--- sepgsql/src/bin/pg_ctl/pg_ctl.c (revision 2237)
+++ sepgsql/src/bin/pg_ctl/pg_ctl.c (working copy)
@@ -643,7 +643,7 @@
postmaster_path = pg_malloc(MAXPGPATH);
- if ((ret = find_other_exec(argv0, "postgres", PG_BACKEND_VERSIONSTR,
+ if ((ret = find_other_exec(argv0, "sepostgres", PG_BACKEND_VERSIONSTR,
postmaster_path)) < 0)
{
char full_path[MAXPGPATH];
Index: sepgsql/src/bin/initdb/initdb.c
===================================================================
--- sepgsql/src/bin/initdb/initdb.c (revision 2237)
+++ sepgsql/src/bin/initdb/initdb.c (working copy)
@@ -2763,7 +2763,7 @@
sprintf(pgdenv, "PGDATA=%s", pg_data);
putenv(pgdenv);
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 497bdf0..54908f8 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2722,7 +2722,7 @@ main(int argc, char *argv[])
*/
putenv("TZ=GMT");
- if ((ret = find_other_exec(argv[0], "postgres", PG_BACKEND_VERSIONSTR,
+ if ((ret = find_other_exec(argv[0], "sepostgres", PG_BACKEND_VERSIONSTR,
backend_exec)) < 0)
{
char full_path[MAXPGPATH];
Index: sepgsql/src/bin/pg_dump/pg_dumpall.c
===================================================================
--- sepgsql/src/bin/pg_dump/pg_dumpall.c (revision 2237)
+++ sepgsql/src/bin/pg_dump/pg_dumpall.c (working copy)
@@ -157,7 +157,7 @@
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 814ce97..2550e57 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -654,7 +654,7 @@ do_init(void)
char cmd[MAXPGPATH];
if (exec_path == NULL)
- exec_path = find_other_exec_or_die(argv0, "initdb", "initdb (PostgreSQL) " PG_VERSION "\n");
+ exec_path = find_other_exec_or_die(argv0, "initdb.sepgsql", "initdb (PostgreSQL) " PG_VERSION "\n");
if (pgdata_opt == NULL)
pgdata_opt = "";
@@ -699,7 +699,7 @@ do_start(void)
pgdata_opt = "";
if (exec_path == NULL)
- exec_path = find_other_exec_or_die(argv0, "postgres", PG_BACKEND_VERSIONSTR);
+ exec_path = find_other_exec_or_die(argv0, "sepostgres", PG_BACKEND_VERSIONSTR);
#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE)
if (allow_core_files)
@@ -1069,7 +1069,7 @@ pgwin32_CommandLine(bool registration)
}
else
{
- ret = find_other_exec(argv0, "postgres", PG_BACKEND_VERSIONSTR,
+ ret = find_other_exec(argv0, "sepostgres", PG_BACKEND_VERSIONSTR,
cmdLine);
if (ret != 0)
{
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 83f1678..a0a9444 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -156,7 +156,7 @@ main(int argc, char *argv[])
}
}

View file

@ -8,22 +8,24 @@
%define selinux_policy_stores targeted mls
%{!?ssl:%define ssl 1}
%{!?beta:%define beta .beta1}
Summary: Security Enhanced PostgreSQL
Name: sepostgresql
Version: 8.4.3
Release: 2582%{?dist}
License: BSD
Version: 9.0.0
Release: 20100511%{?beta}%{?dist}
License: PostgreSQL
Group: Applications/Databases
Url: http://code.google.com/p/sepgsql/
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
#XXX - to be revert later
#Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
Source0: postgresql-9.0beta1.tar.gz
Source1: sepostgresql.init
Source2: sepostgresql.8
Source3: sepostgresql.logrotate
Patch0: sepostgresql-fedora-prefix.patch
Patch1: pgsql-01-8.4-blobs.patch
Patch2: pgsql-02-8.4-sepgsql.patch
Patch1: sepostgresql-9.0-fullset.patch
BuildRequires: perl glibc-devel bison flex readline-devel zlib-devel >= 1.0.4
BuildRequires: checkpolicy libselinux-devel >= 2.0.80
BuildRequires: selinux-policy >= 3.6.8
@ -34,7 +36,6 @@ Requires(pre): shadow-utils
Requires(post): policycoreutils /sbin/chkconfig
Requires(preun): /sbin/chkconfig /sbin/service
Requires(postun): policycoreutils
Requires: postgresql-server = %{version}
Requires: policycoreutils >= 2.0.16 libselinux >= 2.0.80
Requires: selinux-policy >= 3.6.8
Requires: tzdata logrotate
@ -48,10 +49,11 @@ the operating system. SE-PostgreSQL works as a userspace
reference monitor to check any SQL query.
%prep
%setup -q -n postgresql-%{version}
#XXX - to be revert later
#%setup -q -n postgresql-%{version}
%setup -q -n postgresql-9.0beta1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
@ -65,36 +67,39 @@ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
%endif
--enable-debug \
--enable-cassert \
--libdir=%{_libdir}/pgsql \
--datadir=%{_datadir}/sepgsql \
--with-system-tzdata=/usr/share/zoneinfo
# parallel build, if possible
rm -f src/Makefile.custom
make %{?_smp_mflags}
touch src/backend/security/sepgsql/policy/sepostgresql-devel.fc
make -C src/backend/security/sepgsql/policy
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
install -d %{buildroot}%{_datadir}/selinux/packages
install -p -m 644 src/backend/security/sepgsql/policy/sepostgresql-devel.pp \
%{buildroot}%{_datadir}/selinux/packages
# avoid to conflict with native postgresql package
mv %{buildroot}%{_bindir} %{buildroot}%{_bindir}.orig
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_bindir}/
mv %{buildroot}%{_bindir}.orig/initdb %{buildroot}%{_bindir}/initdb.sepgsql
mv %{buildroot}%{_bindir}.orig/pg_ctl %{buildroot}%{_bindir}/sepg_ctl
mv %{buildroot}%{_bindir}.orig/postgres %{buildroot}%{_bindir}/sepostgres
mv %{buildroot}%{_bindir}.orig/pg_dump %{buildroot}%{_bindir}/sepg_dump
mv %{buildroot}%{_bindir}.orig/pg_dumpall %{buildroot}%{_bindir}/sepg_dumpall
mv %{buildroot}%{_bindir}.orig/pg_restore %{buildroot}%{_bindir}/sepg_restore
mv %{buildroot}%{_libdir} %{buildroot}%{_libdir}.orig
install -d %{buildroot}%{_libdir}/sepgsql
mv %{buildroot}%{_libdir}.orig/sepgsql/dict_snowball.so \
%{buildroot}%{_libdir}.orig/sepgsql/plpgsql.so \
%{buildroot}%{_libdir}.orig/sepgsql/*_and_*.so \
%{buildroot}%{_libdir}.orig/sepgsql/euc2004_sjis2004.so \
%{buildroot}%{_libdir}.orig/sepgsql/libpqwalreceiver.so \
%{buildroot}%{_libdir}/sepgsql
# remove unnecessary files
rm -rf %{buildroot}%{_bindir}.orig
rm -rf %{buildroot}%{_libdir}
rm -rf %{buildroot}%{_libdir}.orig
rm -rf %{buildroot}%{_includedir}
rm -rf %{buildroot}%{_datadir}/doc
rm -rf %{buildroot}%{_datadir}/sepgsql/timezone
@ -123,24 +128,13 @@ rm -rf %{buildroot}
%pre
getent group sepgsql >/dev/null || groupadd -r sepgsql
getent passwd sepgsql >/dev/null || \
useradd -r -g sepgsql -d %{_localstatedir}/lib/sepgsql -s /bin/bash \
-c "SE-PostgreSQL server" sepgsql
useradd -r -g sepgsql -s /bin/bash -c "SE-PostgreSQL" sepgsql
exit 0
%post
/sbin/chkconfig --add %{name}
/sbin/ldconfig
for store in %{selinux_policy_stores}
do
# clean up legacy policy module (now it is unnecessary)
%{_sbindir}/semodule -s ${store} -r sepostgresql >& /dev/null || :
if %{_sbindir}/semodule -s ${store} -l 2>/dev/null | grep -Eq "^sepostgresql-devel"; then
%{_sbindir}/semodule -s ${store} \
-i %{_datadir}/selinux/packages/sepostgresql-devel.pp >& /dev/null || :
fi
done
# Fix up non-standard file contexts
/sbin/fixfiles -R %{name} restore || :
/sbin/restorecon -R %{_localstatedir}/lib/sepgsql || :
@ -157,12 +151,9 @@ if [ $1 -ge 1 ]; then # rpm -U case
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
if [ $1 -eq 0 ]; then # rpm -e case
for store in %{selinux_policy_stores}
do
%{_sbindir}/semodule -s ${store} -r sepostgresql-devel >& /dev/null || :
done
/sbin/fixfiles -R %{name} restore || :
test -d %{_localstatedir}/lib/sepgsql && /sbin/restorecon -R %{_localstatedir}/lib/sepgsql || :
test -d %{_localstatedir}/lib/sepgsql && \
/sbin/restorecon -R %{_localstatedir}/lib/sepgsql || :
fi
%files
@ -175,6 +166,8 @@ fi
%{_bindir}/sepostgres
%{_bindir}/sepg_dump
%{_bindir}/sepg_dumpall
%{_bindir}/sepg_restore
%{_libdir}/sepgsql/*.so
%{_mandir}/man8/sepostgresql.*
%dir %{_datadir}/sepgsql
%{_datadir}/sepgsql/postgres.bki
@ -188,12 +181,17 @@ fi
%{_datadir}/sepgsql/conversion_create.sql
%{_datadir}/sepgsql/information_schema.sql
%{_datadir}/sepgsql/sql_features.txt
%attr(644,root,root) %{_datadir}/selinux/packages/sepostgresql-devel.pp
%attr(700,sepgsql,sepgsql) %dir %{_localstatedir}/lib/sepgsql
%attr(700,sepgsql,sepgsql) %dir %{_localstatedir}/lib/sepgsql/data
%attr(700,sepgsql,sepgsql) %dir %{_localstatedir}/lib/sepgsql/backups
%changelog
* Tue May 11 2010 KaiGai Kohei <kaigai@kaigai.gr.jp> - 9.0.0-20100511
- upgrade base version to 9.0beta1
* Sun Apr 4 2010 KaiGai Kohei <kaigai@kaigai.gr.jp> - 9.0.0-20100404
- upgrade base version 8.4.3->9.0alpha5
* Thu Mar 18 2010 KaiGai Kohei <kaigai@ak.jp.nec.com> - 8.4.3-2582
- upgrade base version 8.4.2->8.4.3

View file

@ -1 +1 @@
7f70e7b140fb190f268837255582b07e postgresql-8.4.3.tar.bz2
acaa0852b970524b91ea9a2fd0fa61c8 postgresql-9.0beta1.tar.gz