rpms/postgresql/F-11 postgresql.init, 1.24, 1.25 postgresql.spec, 1.112, 1.113
Tom Lane
tgl at fedoraproject.org
Tue Sep 22 01:15:13 UTC 2009
- Previous message (by thread): rpms/libwnck/devel .cvsignore, 1.76, 1.77 libwnck.spec, 1.114, 1.115 sources, 1.76, 1.77
- Next message (by thread): rpms/libsoup/devel .cvsignore, 1.56, 1.57 libsoup.spec, 1.101, 1.102 sources, 1.56, 1.57
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: tgl
Update of /cvs/pkgs/rpms/postgresql/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22167
Modified Files:
postgresql.init postgresql.spec
Log Message:
Ensure pgstartup.log gets the right ownership/permissions during initdb
Index: postgresql.init
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-11/postgresql.init,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- postgresql.init 2 Nov 2008 18:23:29 -0000 1.24
+++ postgresql.init 22 Sep 2009 01:15:12 -0000 1.25
@@ -101,13 +101,7 @@ fi
# Set defaults for configuration variables
PGENGINE=/usr/bin
PGPORT=5432
-PGDATA=/var/lib/pgsql
-if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base/template1" ]
-then
- echo "Using old-style directory structure"
-else
- PGDATA=/var/lib/pgsql/data
-fi
+PGDATA=/var/lib/pgsql/data
PGLOG=/var/lib/pgsql/pgstartup.log
# Override defaults from /etc/sysconfig/pgsql if file is present
@@ -133,7 +127,7 @@ start(){
touch "$PGLOG" || exit 1
chown postgres:postgres "$PGLOG"
chmod go-rwx "$PGLOG"
- [ -x /usr/bin/chcon ] && /usr/bin/chcon -u system_u -r object_r -t postgresql_log_t "$PGLOG" 2>/dev/null
+ [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG"
fi
# Check for the PGDATA structure
@@ -244,8 +238,19 @@ initdb(){
fi
# Clean up SELinux tagging for PGDATA
[ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
+
+ # Make sure the startup-time log file is OK, too
+ if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]
+ then
+ touch "$PGLOG" || exit 1
+ chown postgres:postgres "$PGLOG"
+ chmod go-rwx "$PGLOG"
+ [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG"
+ fi
+
# Initialize the database
$SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident sameuser'" >> "$PGLOG" 2>&1 < /dev/null
+
# Create directory for postmaster log
mkdir "$PGDATA/pg_log"
chown postgres:postgres "$PGDATA/pg_log"
Index: postgresql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/postgresql/F-11/postgresql.spec,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -p -r1.112 -r1.113
--- postgresql.spec 9 Sep 2009 15:57:29 -0000 1.112
+++ postgresql.spec 22 Sep 2009 01:15:12 -0000 1.113
@@ -84,7 +84,7 @@
Summary: PostgreSQL client programs and libraries
Name: postgresql
Version: 8.3.8
-Release: 1%{?dist}
+Release: 2%{?dist}
# PG considers their license to be simplified BSD, but it's more nearly MIT
License: MIT
Group: Applications/Databases
@@ -874,6 +874,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Mon Sep 21 2009 Tom Lane <tgl at redhat.com> 8.3.8-2
+- Ensure pgstartup.log gets the right ownership/permissions during initdb
+Resolves: #498959
+
* Wed Sep 9 2009 Tom Lane <tgl at redhat.com> 8.3.8-1
- Update to PostgreSQL 8.3.8, for various fixes described at
http://www.postgresql.org/docs/8.3/static/release-8-3-8.html
- Previous message (by thread): rpms/libwnck/devel .cvsignore, 1.76, 1.77 libwnck.spec, 1.114, 1.115 sources, 1.76, 1.77
- Next message (by thread): rpms/libsoup/devel .cvsignore, 1.56, 1.57 libsoup.spec, 1.101, 1.102 sources, 1.56, 1.57
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list