summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorClive Lin <clive@FreeBSD.org>2001-03-15 07:23:08 +0000
committerClive Lin <clive@FreeBSD.org>2001-03-15 07:23:08 +0000
commit429d8d4a8862eebc560d47df2314cf48c25f1ac6 (patch)
tree88df9b4de8e8d165e31ae97b31b1dafdfb2fc242 /databases
parentfix non-interactive build and pkg-plist (diff)
Fix problems when installing postgresql7 with pkg_add:
- pkg-install used wrong uid# - chown lib dir *after* it is created - pkg-install created data dir where Makefile didn't - add pkg-deinstall and remove user & group - don't chown data dir, since we don't create it anymore - spell and documentation fixes in the rc.d script PR: ports/25817 Submitted by: MAINTAINER
Notes
Notes: svn path=/head/; revision=39873
Diffstat (limited to 'databases')
-rw-r--r--databases/postgresql-devel-server/files/dot.profile.in4
-rw-r--r--databases/postgresql-devel-server/pkg-deinstall12
-rw-r--r--databases/postgresql-devel-server/pkg-install10
-rw-r--r--databases/postgresql-devel-server/pkg-plist3
-rw-r--r--databases/postgresql-devel/files/dot.profile.in4
-rw-r--r--databases/postgresql-devel/pkg-deinstall12
-rw-r--r--databases/postgresql-devel/pkg-install10
-rw-r--r--databases/postgresql-devel/pkg-plist3
-rw-r--r--databases/postgresql7/files/dot.profile.in4
-rw-r--r--databases/postgresql7/pkg-deinstall12
-rw-r--r--databases/postgresql7/pkg-install10
-rw-r--r--databases/postgresql7/pkg-plist3
-rw-r--r--databases/postgresql73-server/files/dot.profile.in4
-rw-r--r--databases/postgresql73-server/pkg-deinstall12
-rw-r--r--databases/postgresql73-server/pkg-install10
-rw-r--r--databases/postgresql73-server/pkg-plist3
-rw-r--r--databases/postgresql73/files/dot.profile.in4
-rw-r--r--databases/postgresql73/pkg-deinstall12
-rw-r--r--databases/postgresql73/pkg-install10
-rw-r--r--databases/postgresql73/pkg-plist3
-rw-r--r--databases/postgresql74-server/files/dot.profile.in4
-rw-r--r--databases/postgresql74-server/pkg-deinstall12
-rw-r--r--databases/postgresql74-server/pkg-install10
-rw-r--r--databases/postgresql74-server/pkg-plist3
-rw-r--r--databases/postgresql80-server/files/dot.profile.in4
-rw-r--r--databases/postgresql80-server/pkg-deinstall12
-rw-r--r--databases/postgresql80-server/pkg-install10
-rw-r--r--databases/postgresql80-server/pkg-plist3
-rw-r--r--databases/postgresql81-server/files/dot.profile.in4
-rw-r--r--databases/postgresql81-server/pkg-deinstall12
-rw-r--r--databases/postgresql81-server/pkg-install10
-rw-r--r--databases/postgresql81-server/pkg-plist3
-rw-r--r--databases/postgresql82-server/files/dot.profile.in4
-rw-r--r--databases/postgresql82-server/pkg-deinstall12
-rw-r--r--databases/postgresql82-server/pkg-install10
-rw-r--r--databases/postgresql82-server/pkg-plist3
-rw-r--r--databases/postgresql83-server/files/dot.profile.in4
-rw-r--r--databases/postgresql83-server/pkg-deinstall12
-rw-r--r--databases/postgresql83-server/pkg-install10
-rw-r--r--databases/postgresql83-server/pkg-plist3
-rw-r--r--databases/postgresql84-server/files/dot.profile.in4
-rw-r--r--databases/postgresql84-server/pkg-deinstall12
-rw-r--r--databases/postgresql84-server/pkg-install10
-rw-r--r--databases/postgresql84-server/pkg-plist3
-rw-r--r--databases/postgresql90-server/files/dot.profile.in4
-rw-r--r--databases/postgresql90-server/pkg-deinstall12
-rw-r--r--databases/postgresql90-server/pkg-install10
-rw-r--r--databases/postgresql90-server/pkg-plist3
-rw-r--r--databases/postgresql91-server/files/dot.profile.in4
-rw-r--r--databases/postgresql91-server/pkg-deinstall12
-rw-r--r--databases/postgresql91-server/pkg-install10
-rw-r--r--databases/postgresql91-server/pkg-plist3
-rw-r--r--databases/postgresql92-server/files/dot.profile.in4
-rw-r--r--databases/postgresql92-server/pkg-deinstall12
-rw-r--r--databases/postgresql92-server/pkg-install10
-rw-r--r--databases/postgresql92-server/pkg-plist3
56 files changed, 280 insertions, 126 deletions
diff --git a/databases/postgresql-devel-server/files/dot.profile.in b/databases/postgresql-devel-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql-devel-server/files/dot.profile.in
+++ b/databases/postgresql-devel-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql-devel-server/pkg-deinstall b/databases/postgresql-devel-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql-devel-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql-devel-server/pkg-install b/databases/postgresql-devel-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql-devel-server/pkg-install
+++ b/databases/postgresql-devel-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql-devel-server/pkg-plist b/databases/postgresql-devel-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql-devel-server/pkg-plist
+++ b/databases/postgresql-devel-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql-devel/files/dot.profile.in b/databases/postgresql-devel/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql-devel/files/dot.profile.in
+++ b/databases/postgresql-devel/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql-devel/pkg-deinstall b/databases/postgresql-devel/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql-devel/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql-devel/pkg-install b/databases/postgresql-devel/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql-devel/pkg-install
+++ b/databases/postgresql-devel/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql-devel/pkg-plist b/databases/postgresql-devel/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql-devel/pkg-plist
+++ b/databases/postgresql-devel/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql7/files/dot.profile.in b/databases/postgresql7/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql7/files/dot.profile.in
+++ b/databases/postgresql7/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql7/pkg-deinstall b/databases/postgresql7/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql7/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql7/pkg-install b/databases/postgresql7/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql7/pkg-install
+++ b/databases/postgresql7/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql7/pkg-plist b/databases/postgresql7/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql7/pkg-plist
+++ b/databases/postgresql7/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql73-server/files/dot.profile.in b/databases/postgresql73-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql73-server/files/dot.profile.in
+++ b/databases/postgresql73-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql73-server/pkg-deinstall b/databases/postgresql73-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql73-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql73-server/pkg-install b/databases/postgresql73-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql73-server/pkg-install
+++ b/databases/postgresql73-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql73-server/pkg-plist b/databases/postgresql73-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql73-server/pkg-plist
+++ b/databases/postgresql73-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql73/files/dot.profile.in b/databases/postgresql73/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql73/files/dot.profile.in
+++ b/databases/postgresql73/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql73/pkg-deinstall b/databases/postgresql73/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql73/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql73/pkg-install b/databases/postgresql73/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql73/pkg-install
+++ b/databases/postgresql73/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql73/pkg-plist b/databases/postgresql73/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql73/pkg-plist
+++ b/databases/postgresql73/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql74-server/files/dot.profile.in b/databases/postgresql74-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql74-server/files/dot.profile.in
+++ b/databases/postgresql74-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql74-server/pkg-deinstall b/databases/postgresql74-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql74-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql74-server/pkg-install b/databases/postgresql74-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql74-server/pkg-install
+++ b/databases/postgresql74-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql74-server/pkg-plist b/databases/postgresql74-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql74-server/pkg-plist
+++ b/databases/postgresql74-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql80-server/files/dot.profile.in b/databases/postgresql80-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql80-server/files/dot.profile.in
+++ b/databases/postgresql80-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql80-server/pkg-deinstall b/databases/postgresql80-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql80-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql80-server/pkg-install b/databases/postgresql80-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql80-server/pkg-install
+++ b/databases/postgresql80-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql80-server/pkg-plist b/databases/postgresql80-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql80-server/pkg-plist
+++ b/databases/postgresql80-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql81-server/files/dot.profile.in b/databases/postgresql81-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql81-server/files/dot.profile.in
+++ b/databases/postgresql81-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql81-server/pkg-deinstall b/databases/postgresql81-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql81-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql81-server/pkg-install b/databases/postgresql81-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql81-server/pkg-install
+++ b/databases/postgresql81-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql81-server/pkg-plist b/databases/postgresql81-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql81-server/pkg-plist
+++ b/databases/postgresql81-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql82-server/files/dot.profile.in b/databases/postgresql82-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql82-server/files/dot.profile.in
+++ b/databases/postgresql82-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql82-server/pkg-deinstall b/databases/postgresql82-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql82-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql82-server/pkg-install b/databases/postgresql82-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql82-server/pkg-install
+++ b/databases/postgresql82-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql82-server/pkg-plist b/databases/postgresql82-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql82-server/pkg-plist
+++ b/databases/postgresql82-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql83-server/files/dot.profile.in b/databases/postgresql83-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql83-server/files/dot.profile.in
+++ b/databases/postgresql83-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql83-server/pkg-deinstall b/databases/postgresql83-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql83-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql83-server/pkg-install b/databases/postgresql83-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql83-server/pkg-install
+++ b/databases/postgresql83-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql83-server/pkg-plist b/databases/postgresql83-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql83-server/pkg-plist
+++ b/databases/postgresql83-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql84-server/files/dot.profile.in b/databases/postgresql84-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql84-server/files/dot.profile.in
+++ b/databases/postgresql84-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql84-server/pkg-deinstall b/databases/postgresql84-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql84-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql84-server/pkg-install b/databases/postgresql84-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql84-server/pkg-install
+++ b/databases/postgresql84-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql84-server/pkg-plist b/databases/postgresql84-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql84-server/pkg-plist
+++ b/databases/postgresql84-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql90-server/files/dot.profile.in b/databases/postgresql90-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql90-server/files/dot.profile.in
+++ b/databases/postgresql90-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql90-server/pkg-deinstall b/databases/postgresql90-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql90-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql90-server/pkg-install b/databases/postgresql90-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql90-server/pkg-install
+++ b/databases/postgresql90-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql90-server/pkg-plist b/databases/postgresql90-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql90-server/pkg-plist
+++ b/databases/postgresql90-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql91-server/files/dot.profile.in b/databases/postgresql91-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql91-server/files/dot.profile.in
+++ b/databases/postgresql91-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql91-server/pkg-deinstall b/databases/postgresql91-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql91-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql91-server/pkg-install b/databases/postgresql91-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql91-server/pkg-install
+++ b/databases/postgresql91-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql91-server/pkg-plist b/databases/postgresql91-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql91-server/pkg-plist
+++ b/databases/postgresql91-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true
diff --git a/databases/postgresql92-server/files/dot.profile.in b/databases/postgresql92-server/files/dot.profile.in
index bd7ec45043be..3d8ca9ac4641 100644
--- a/databases/postgresql92-server/files/dot.profile.in
+++ b/databases/postgresql92-server/files/dot.profile.in
@@ -1,14 +1,14 @@
PATH=${PATH}:%%PREFIX%%/pgsql/bin
PGLIB=%%PREFIX%%/pgsql/lib
-# note: PGDATA overwrites the -D startup option
+# note: PGDATA can be overridden by the -D startup option
PGDATA=%%PREFIX%%/pgsql/data
export PATH MANPATH PGLIB PGDATA
#You might want to set some locale stuff here
#PGDATESTYLE=ISO
-#LC_ALL=sv_SE.ISO_88591-1
+#LC_ALL=sv_SE.ISO_8859-1
#export PGDATESTYLE LC_ALL
# if you want to make regression tests use this TZ
diff --git a/databases/postgresql92-server/pkg-deinstall b/databases/postgresql92-server/pkg-deinstall
new file mode 100644
index 000000000000..9e1fa3121dc0
--- /dev/null
+++ b/databases/postgresql92-server/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# remove postgresql users
+
+case $2 in
+
+POST-DEINSTALL)
+ pw groupdel pgsql
+ pw userdel pgsql
+ ;;
+
+esac
diff --git a/databases/postgresql92-server/pkg-install b/databases/postgresql92-server/pkg-install
index c55c0ebb161f..edd4f36830d5 100644
--- a/databases/postgresql92-server/pkg-install
+++ b/databases/postgresql92-server/pkg-install
@@ -4,15 +4,13 @@
PATH=/bin:/usr/sbin
-if [ -z "${DB_DIR}" ]; then
- DB_DIR=${PKG_PREFIX}/pgsql/data
-fi
+DB_DIR=${PKG_PREFIX}/pgsql
case $2 in
-POST-INSTALL)
+PRE-INSTALL)
USER=pgsql
GROUP=${USER}
- UID=89
+ UID=70
GID=${UID}
if pw group show "${GROUP}" 2>/dev/null; then
@@ -39,6 +37,6 @@ POST-INSTALL)
fi
fi
- chown -R ${USER}.${GROUP} ${DB_DIR}
;;
+
esac
diff --git a/databases/postgresql92-server/pkg-plist b/databases/postgresql92-server/pkg-plist
index fd2bd41937f1..4cf31ebc5bc6 100644
--- a/databases/postgresql92-server/pkg-plist
+++ b/databases/postgresql92-server/pkg-plist
@@ -55,7 +55,6 @@ pgsql/include/utils/elog.h
pgsql/include/utils/geo_decls.h
pgsql/include/utils/mcxt.h
pgsql/include/utils/palloc.h
-@exec chown root:wheel %D/pgsql/lib
pgsql/lib/global1.bki.source
pgsql/lib/global1.description
pgsql/lib/libecpg.a
@@ -78,6 +77,7 @@ pgsql/lib/pg_ident.conf.sample
pgsql/lib/pg_options.sample
pgsql/lib/plpgsql.so
pgsql/lib/postmaster.opts.default.sample
+@exec chown -R root:wheel %D/pgsql/lib
pgsql/post-install-notes
@dirrm pgsql/bin
@dirrm pgsql/include/access
@@ -92,4 +92,5 @@ pgsql/post-install-notes
@dirrm pgsql/man/man1
@dirrm pgsql/man/manl
@dirrm pgsql/man
+@unexec rmdir %D/pgsql/data 2>/dev/null || true
@unexec rmdir %D/pgsql 2>/dev/null || true