diff options
author | agc <agc> | 1998-02-17 15:29:55 +0000 |
---|---|---|
committer | agc <agc> | 1998-02-17 15:29:55 +0000 |
commit | 458798170496a9d657000bc4283b8370bfdc873c (patch) | |
tree | d68df52a58370ca2b4d673f04221ee7643ff3a7d /databases | |
parent | 07560ff2fdf666a62ff6f473e19abe8cf0c8b7c1 (diff) | |
download | pkgsrc-458798170496a9d657000bc4283b8370bfdc873c.tar.gz |
Initial import of Postgresql 6.2.1, an Object Relational Database
Management System, into the NetBSD packages collection, from the
FreeBSD port.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/postgresql/Makefile | 114 | ||||
-rw-r--r-- | databases/postgresql/files/md5 | 1 | ||||
-rw-r--r-- | databases/postgresql/files/pgsql.sh.tmpl | 25 | ||||
-rw-r--r-- | databases/postgresql/files/post-install-notes | 13 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ab | 10 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ac | 20 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ad | 14 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ae | 26 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-af | 47 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ag | 11 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ah | 11 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-ai | 27 | ||||
-rw-r--r-- | databases/postgresql/patches/patch-aj | 69 | ||||
-rw-r--r-- | databases/postgresql/pkg/COMMENT | 1 | ||||
-rw-r--r-- | databases/postgresql/pkg/DESCR | 24 | ||||
-rw-r--r-- | databases/postgresql/pkg/PLIST | 228 | ||||
-rw-r--r-- | databases/postgresql/scripts/createuser | 50 |
17 files changed, 691 insertions, 0 deletions
diff --git a/databases/postgresql/Makefile b/databases/postgresql/Makefile new file mode 100644 index 00000000000..082111d99ad --- /dev/null +++ b/databases/postgresql/Makefile @@ -0,0 +1,114 @@ +# New ports collection makefile for: PostgreSQL +# Version required: 6.2.1 +# Date created: April 2, 1997 +# Whom: Marc G. Fournier <scrappy@FreeBSD.ORG> +# +# FreeBSD Id: Makefile,v 1.22 1997/12/24 01:21:37 alex Exp + +DISTNAME= postgresql-6.2.1 +CATEGORIES= databases +MASTER_SITES= ftp://ftp.PostgreSQL.org/pub/ \ + ftp://ftp.jaist.ac.jp/pub/dbms/postgres95/ + +MAINTAINER= andreas@FreeBSD.ORG + +# if you want to use the tcl/tk frontend pgaccess, then you need to build +# postgresql with tcl support by typing: make USE_TCL=yes +.if defined(USE_TCL) +MAKE_ENV= USE_TCL=true TCL_INCDIR=${PREFIX}/include/tcl8.0 +LIB_DEPENDS= tcl80\\.1\\.:${PORTSDIR}/lang/tcl80 +.endif + +NO_PACKAGE= "Requires pgsql uid" +WRKSRC= ${WRKDIR}/${DISTNAME}/src + +USE_GMAKE= YES +MAKEFILE= GNUmakefile +HAS_CONFIGURE= YES +CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ + --enable-locale \ + --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` + +MAN1= cleardbdir.1 createdb.1 createuser.1 destroydb.1 \ + destroyuser.1 initdb.1 ipcclean.1 monitor.1 pg_dump.1 \ + pg_dumpall.1 pg_passwd.1 pgintro.1 postgres.1 \ + postmaster.1 psql.1 +MAN3= catalogs.3 large_objects.3 libpq.3 oracle_compat.3 pgbuiltin.3 +MAN5= bki.5 page.5 pg_hba.conf.5 +MANL= abort.l alter_table.l begin.l close.l cluster.l \ + commit.l copy.l create_aggregate.l create_database.l \ + create_function.l create_index.l create_operator.l \ + create_rule.l create_sequence.l create_table.l \ + create_trigger.l create_type.l create_version.l \ + create_view.l declare.l delete.l drop.l drop_aggregate.l \ + drop_database.l drop_function.l drop_index.l drop_operator.l \ + drop_rule.l drop_sequence.l drop_table.l drop_trigger.l \ + drop_type.l drop_view.l end.l explain.l fetch.l grant.l \ + insert.l listen.l load.l move.l notify.l purge.l rename.l \ + reset.l revoke.l rollback.l select.l set.l show.l sql.l \ + update.l vacuum.l + +MANPREFIX= ${PREFIX}/pgsql + +pre-fetch: +.if !defined(USE_TCL) + @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" + @${ECHO_MSG} " make USE_TCL=yes" +.else + @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." +.endif + +post-build: + @ ${ECHO} "------------------------------------------------------------" + @ ${ECHO} "Dump existing databases, before installing new db version !!" + @ ${ECHO} "Detailed instructions, see INSTALL file under ${WRKDIR}... " + @ ${ECHO} "------------------------------------------------------------" + +pre-install: +.if defined(PACKAGE_BUILDING) + /bin/rm -rf ${PREFIX}/pgsql +.endif + @ ${MKDIR} ${PREFIX}/pgsql + @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser + +post-install: + @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ + ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + > ${PREFIX}/pgsql/.profile; \ + ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/bin" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "# note: PGDATA overwrites the -D startup option" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "DISPLAY=:0" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "# if you want to make regression tests use this TZ" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "#TZ=PST8PDT" \ + >> ${PREFIX}/pgsql/.profile; \ + ${ECHO} "#export TZ" \ + >> ${PREFIX}/pgsql/.profile; \ + fi + @ chown -R pgsql:pgsql ${PREFIX}/pgsql + @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' + @ ${LDCONFIG} -m ${PREFIX}/pgsql/lib + @ su -l pgsql -c '${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' + @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ + > ${PREFIX}/etc/rc.d/pgsql.sh + @ chmod 554 ${PREFIX}/etc/rc.d/pgsql.sh + @ chown root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh + @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql +.if !defined(NOPORTDOCS) + ${MKDIR} ${PREFIX}/share/doc/pgsql + ${CP} -r ${WRKDIR}/${DISTNAME}/doc/* ${PREFIX}/share/doc/pgsql +.endif +.if !defined(BATCH) + @ more -e ${FILESDIR}/post-install-notes +.endif + +.include <bsd.port.mk> diff --git a/databases/postgresql/files/md5 b/databases/postgresql/files/md5 new file mode 100644 index 00000000000..5d42f88c853 --- /dev/null +++ b/databases/postgresql/files/md5 @@ -0,0 +1 @@ +MD5 (postgresql-6.2.1.tar.gz) = bd606dcab6b09a3a3d276d88b504a1d3 diff --git a/databases/postgresql/files/pgsql.sh.tmpl b/databases/postgresql/files/pgsql.sh.tmpl new file mode 100644 index 00000000000..1d3333789f9 --- /dev/null +++ b/databases/postgresql/files/pgsql.sh.tmpl @@ -0,0 +1,25 @@ +#!/bin/sh + +# FreeBSD Id: pgsql.sh.tmpl,v 1.3 1997/10/05 21:00:49 andreas Exp + +# pgsql.sh - postgresql startup file for FreeBSD and possibly *BSD (untested) + +# Changes: +# - renamed startup script to be in sync with INSTALL file +# - merged ldconfig start sequence from former postgrsql.sh script (andreas) +# - modified the postmaster startup sequence as suggested in the +# INSTALL file which was given as example for FreeBSD 2.2 (andreas) +# - removed the commandline option +# -D!!PREFIX!!/pgsql/data \ +# because the postmaster process, which starts up under the +# environment of the pgsql user, sets this with the PGDATA +# environment variable in !!PREFIX!!/pgsql/.profile +# + +[ -d !!PREFIX!!/pgsql/lib ] && /sbin/ldconfig -m !!PREFIX!!/pgsql/lib + +[ -x !!PREFIX!!/pgsql/bin/postmaster ] && { + su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/postmaster \ + -S -o -F > !!PREFIX!!/pgsql/errlog' + echo -n ' pgsql' +} diff --git a/databases/postgresql/files/post-install-notes b/databases/postgresql/files/post-install-notes new file mode 100644 index 00000000000..a57562fe871 --- /dev/null +++ b/databases/postgresql/files/post-install-notes @@ -0,0 +1,13 @@ + +Now that PostgreSQL is installed, you should read the documentation and +implementation guides. These can be found at: + + http://www.PostgreSQL.org/docs + +You may wish to subscribe to the PostgreSQL user-support mailing list. +Send an e-mail to pgsql-questions-request@postgresql.org with the +text "subscribe" in the message body. + +If you build PostgreSQL with TCL support, then you can use the +TCL/TK based database frontend "pgaccess" for database operations. + diff --git a/databases/postgresql/patches/patch-ab b/databases/postgresql/patches/patch-ab new file mode 100644 index 00000000000..bbb6c6edc66 --- /dev/null +++ b/databases/postgresql/patches/patch-ab @@ -0,0 +1,10 @@ +--- bin/initdb/initdb.sh.orig Wed Apr 2 07:09:13 1997 ++++ bin/initdb/initdb.sh Wed Apr 2 07:09:33 1997 +@@ -344,6 +344,5 @@ + + if [ $debug -eq 0 ]; then + echo "vacuuming template1" +- echo "vacuum" | postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\ +- grep -v "^DEBUG:" ++ echo "vacuum" | postgres -o /dev/null -F -Q -D$PGDATA template1 > /dev/null + fi diff --git a/databases/postgresql/patches/patch-ac b/databases/postgresql/patches/patch-ac new file mode 100644 index 00000000000..351699eff7f --- /dev/null +++ b/databases/postgresql/patches/patch-ac @@ -0,0 +1,20 @@ +--- configure.orig Sat Jun 14 20:05:55 1997 ++++ configure Sat Jun 14 20:06:34 1997 +@@ -685,7 +685,7 @@ + echo "enter 'none' or new directories to override default" + echo "" + $ECHO_N "Additional directories to search for include files { $SRCH_INC }: $ECHO_C" +-read a ++a=$SRCH_INC + if test "$a." = "none." + then + SRCH_INC= +@@ -702,7 +702,7 @@ + echo "- setting CPPFLAGS=$CPPFLAGS" + + $ECHO_N "Additional directories to search for library files { $SRCH_LIB }: $ECHO_C" +-read a ++a=$SRCH_LIB + if test "$a." = "none." + then + SRCH_LIB= diff --git a/databases/postgresql/patches/patch-ad b/databases/postgresql/patches/patch-ad new file mode 100644 index 00000000000..3529936565a --- /dev/null +++ b/databases/postgresql/patches/patch-ad @@ -0,0 +1,14 @@ +--- template/freebsd.orig Sat Jun 14 20:12:51 1997 ++++ template/freebsd Sat Jun 14 20:13:06 1997 +@@ -1,9 +1,9 @@ + AROPT:cq + SHARED_LIB:-fpic -DPIC +-CFLAGS:-O2 -m486 -pipe ++CFLAGS:-pipe -O2 + SRCH_INC:/usr/local/include + SRCH_LIB:/usr/local/lib +-USE_LOCALE:no ++USE_LOCALE:yes + DLSUFFIX:.so + YFLAGS:-d + YACC:bison -y diff --git a/databases/postgresql/patches/patch-ae b/databases/postgresql/patches/patch-ae new file mode 100644 index 00000000000..b313473e231 --- /dev/null +++ b/databases/postgresql/patches/patch-ae @@ -0,0 +1,26 @@ +--- Makefile.global.in.orig Sat Oct 4 23:21:46 1997 ++++ Makefile.global.in Sat Oct 4 23:27:22 1997 +@@ -162,15 +162,15 @@ + # USE_TCL= true + # customize these to your site's needs + # +-TCL_INCDIR= /home/tools/include +-TCL_LIBDIR= /home/tools/lib +-TCL_LIB= -ltcl7.5 +-TK_INCDIR= /home/tools/include +-TK_LIBDIR= /home/tools/lib +-TK_LIB= -ltk4.1 ++TCL_INCDIR= /usr/local/include/tcl8.0 ++TCL_LIBDIR= /usr/local/lib ++TCL_LIB= -ltcl80 ++TK_INCDIR= /usr/local/include/tk8.0 ++TK_LIBDIR= /usr/local/lib ++TK_LIB= -ltk80 + +-X11_INCDIR= /usr/include +-X11_LIBDIR= /usr/lib ++X11_INCDIR= /usr/X11R6/include ++X11_LIBDIR= /usr/X11R6/lib + X11_LIB= -lX11 @SOCKET_LIB@ @NSL_LIB@ + + diff --git a/databases/postgresql/patches/patch-af b/databases/postgresql/patches/patch-af new file mode 100644 index 00000000000..17fa9b470ce --- /dev/null +++ b/databases/postgresql/patches/patch-af @@ -0,0 +1,47 @@ +--- interfaces/libpgtcl/Makefile.orig Mon Sep 29 23:02:46 1997 ++++ interfaces/libpgtcl/Makefile Sun Oct 5 02:12:00 1997 +@@ -39,6 +39,14 @@ + endif + endif + ++ifeq ($(PORTNAME), BSD44_derived) ++ CFLAGS += $(CFLAGS_SL) ++ shlib := libpgtcl.so.1.0 ++ install-shlib-dep := install-shlib ++ LDFLAGS_SL = -x -Bshareable -Bforcearchive ++ LDFLAGS += -L $(SRCDIR)/interfaces/libpq -lpq ++endif ++ + ifeq ($(PORTNAME), i386_solaris) + CFLAGS+= -fPIC + endif +@@ -56,10 +64,10 @@ + endif + $(RANLIB) libpgtcl.a + +-libpgtcl.so.1: $(OBJS) +- $(CC) $(LDFLAGS) -shared $(OBJS) -o libpgtcl.so.1 ++libpgtcl.so.1.0: $(OBJS) ++ $(CC) $(LDFLAGS) -shared $(OBJS) -o libpgtcl.so.1.0 + rm -f libpgtcl.so +- ln -s libpgtcl.so.1 libpgtcl.so ++ ln -s libpgtcl.so.1.0 libpgtcl.so + + .PHONY: beforeinstall-headers install-headers + .PHONY: install install-libpgtcl +@@ -75,11 +83,11 @@ + install-libpgtcl: libpgtcl.a + $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(DESTDIR)$(LIBDIR)/libpgtcl.a + +-install-shlib: libpgtcl.so.1 +- $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.so.1 \ +- $(DESTDIR)$(LIBDIR)/libpgtcl.so.1 ++install-shlib: libpgtcl.so.1.0 ++ $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.so.1.0 \ ++ $(DESTDIR)$(LIBDIR)/libpgtcl.so.1.0 + rm -f $(DESTDIR)$(LIBDIR)/libpgtcl.so +- ln -s libpgtcl.so.1 $(DESTDIR)$(LIBDIR)/libpgtcl.so ++ ln -s libpgtcl.so.1.0 $(DESTDIR)$(LIBDIR)/libpgtcl.so + + .PHONY: clean + clean: diff --git a/databases/postgresql/patches/patch-ag b/databases/postgresql/patches/patch-ag new file mode 100644 index 00000000000..182772671c1 --- /dev/null +++ b/databases/postgresql/patches/patch-ag @@ -0,0 +1,11 @@ +--- interfaces/libpq/Makefile.orig Sun Oct 5 02:00:11 1997 ++++ interfaces/libpq/Makefile Sun Oct 5 02:00:31 1997 +@@ -151,7 +151,7 @@ + install-shlib: $(shlib) + $(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(DESTDIR)$(LIBDIR)/$(shlib) + rm -f $(DESTDIR)$(LIBDIR)/libpq.so +- ln -s libpq.so.1 $(DESTDIR)$(LIBDIR)/libpq.so ++ ln -s libpq.so.1.0 $(DESTDIR)$(LIBDIR)/libpq.so + + depend dep: + $(CC) -MM $(INCLUDE_OPT) *.c >depend diff --git a/databases/postgresql/patches/patch-ah b/databases/postgresql/patches/patch-ah new file mode 100644 index 00000000000..9f6e3027330 --- /dev/null +++ b/databases/postgresql/patches/patch-ah @@ -0,0 +1,11 @@ +--- GNUmakefile.in.orig Wed Oct 8 22:30:13 1997 ++++ GNUmakefile.in Wed Oct 8 22:31:14 1997 +@@ -65,7 +65,7 @@ + ifneq ($(wildcard man), ) + $(MAKE) -C man install + endif +- more -e ../register.txt ++ cat ../register.txt + + clean: + @if test $(PORTNAME) = UNDEFINED; then \ diff --git a/databases/postgresql/patches/patch-ai b/databases/postgresql/patches/patch-ai new file mode 100644 index 00000000000..c610380890a --- /dev/null +++ b/databases/postgresql/patches/patch-ai @@ -0,0 +1,27 @@ +--- backend/libpq/password.c.orig Sat Sep 13 07:20:14 1997 ++++ backend/libpq/password.c Sat Jan 31 17:02:42 1998 +@@ -24,7 +24,7 @@ + char *p, + *test_user, + *test_pw; +- char salt[3]; ++ char salt[10]; + + find_hba_entry(DataDir, port->raddr.sin_addr, database, + &host_ok, &userauth, pw_file_name, true); +@@ -90,7 +90,14 @@ + if (test_pw[strlen(test_pw) - 1] == '\n') + test_pw[strlen(test_pw) - 1] = '\0'; + +- strNcpy(salt, test_pw, 2); ++ if (strncmp(test_pw, "$1$", 3)) { ++ /* DES */ ++ strNcpy(salt, test_pw, 2); ++ } ++ else { ++ /* MD5 */ ++ strncpy(salt, test_pw, 9); ++ } + + if (strcmp(user, test_user) == 0) + { diff --git a/databases/postgresql/patches/patch-aj b/databases/postgresql/patches/patch-aj new file mode 100644 index 00000000000..0f7dc20db53 --- /dev/null +++ b/databases/postgresql/patches/patch-aj @@ -0,0 +1,69 @@ +--- bin/pg_passwd/pg_passwd.c.orig Sat Jan 31 19:09:26 1998 ++++ bin/pg_passwd/pg_passwd.c Sat Jan 31 19:15:43 1998 +@@ -23,12 +23,16 @@ + + #endif + ++#ifndef _POSIX_SOURCE ++# define _PASSWORD_LEN 128 /* max length, not containing NULL */ ++#endif ++ + char *comname; + void usage(FILE *stream); + void read_pwd_file(char *filename); + void write_pwd_file(char *filename, char *bkname); +-void encrypt_pwd(char key[9], char salt[3], char passwd[14]); +-int check_pwd(char key[9], char passwd[14]); ++void encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]); ++int check_pwd(char key[9], char passwd[_PASSWORD_LEN+1]); + void prompt_for_username(char *username); + void prompt_for_password(char *prompt, char *password); + +@@ -148,7 +152,7 @@ + + if (q != NULL) + *(q++) = '\0'; +- if (strlen(p) != 13) ++ if (strlen(p) > _PASSWORD_LEN) + { + fprintf(stderr, "WARNING: %s: line %d: illegal password length.\n", + filename, npwds + 1); +@@ -208,7 +212,7 @@ + } + + void +-encrypt_pwd(char key[9], char salt[3], char passwd[14]) ++encrypt_pwd(char key[9], char salt[3], char passwd[_PASSWORD_LEN+1]) + { + int n; + +@@ -242,9 +246,9 @@ + } + + int +-check_pwd(char key[9], char passwd[14]) ++check_pwd(char key[9], char passwd[_PASSWORD_LEN+1]) + { +- char shouldbe[14]; ++ char shouldbe[_PASSWORD_LEN+1]; + char salt[3]; + + salt[0] = passwd[0]; +@@ -252,7 +256,7 @@ + salt[2] = '\0'; + encrypt_pwd(key, salt, shouldbe); + +- return strncmp(shouldbe, passwd, 13) == 0 ? 1 : 0; ++ return strncmp(shouldbe, passwd, _PASSWORD_LEN) == 0 ? 1 : 0; + } + + void +@@ -326,7 +330,7 @@ + char salt[3]; + char key[9], + key2[9]; +- char e_passwd[14]; ++ char e_passwd[_PASSWORD_LEN+1]; + int i; + + comname = argv[0]; diff --git a/databases/postgresql/pkg/COMMENT b/databases/postgresql/pkg/COMMENT new file mode 100644 index 00000000000..85dbe3e67c4 --- /dev/null +++ b/databases/postgresql/pkg/COMMENT @@ -0,0 +1 @@ +a robust, next generation, object-relational DBMS diff --git a/databases/postgresql/pkg/DESCR b/databases/postgresql/pkg/DESCR new file mode 100644 index 00000000000..f0283be0cd6 --- /dev/null +++ b/databases/postgresql/pkg/DESCR @@ -0,0 +1,24 @@ +PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS), +derived from the Berkeley Postgres database management system. While +PostgreSQL retains the powerful object-relational data model, rich data types +and easy extensibility of Postgres, it replaces the PostQuel query language +with an extended subset of SQL. + +The original Postgres code was the effort of many graduate students, +undergraduate students, and staff programmers working under the direction of +Professor Michael Stonebraker at the University of California, Berkeley. In +1995, Andrew Yu and Jolly Chen took on the task of converting the DBMS query +language to SQL and created a new database system which came to known as +Postgres95. Many others contributed to the porting, testing, debugging and +enhancement of the Postgres95 code. As the code improved, and 1995 faded into +memory, PostgreSQL was born. + +PostgreSQL development is presently being performed by a team of Internet +developers who are now responsible for all current and future development. The +development team coordinator is Marc G. Fournier (scrappy@PostgreSQL.ORG). +Support is available from the PostgreSQL developer/user community through the +support mailing list (questions@PostgreSQL.ORG). + +PostgreSQL is free and the complete source is available. + +More information and documentation, visit: http://www.PostgreSQL.ORG/ diff --git a/databases/postgresql/pkg/PLIST b/databases/postgresql/pkg/PLIST new file mode 100644 index 00000000000..985c0a47ac3 --- /dev/null +++ b/databases/postgresql/pkg/PLIST @@ -0,0 +1,228 @@ +etc/rc.d/pgsql.sh +pgsql/.profile +pgsql/bin/cleardbdir +pgsql/bin/createdb +pgsql/bin/createuser +pgsql/bin/destroydb +pgsql/bin/destroyuser +pgsql/bin/initdb +pgsql/bin/pg_dump +pgsql/bin/pg_dumpall +pgsql/bin/pg_id +pgsql/bin/pg_passwd +pgsql/bin/pg_version +pgsql/bin/pgtclsh +pgsql/bin/pgtksh +pgsql/bin/postgres +pgsql/bin/postmaster +pgsql/bin/psql +pgsql/data/PG_VERSION +pgsql/data/base/template1/PG_VERSION +pgsql/data/base/template1/pg_aggregate +pgsql/data/base/template1/pg_am +pgsql/data/base/template1/pg_amop +pgsql/data/base/template1/pg_amproc +pgsql/data/base/template1/pg_attnameind +pgsql/data/base/template1/pg_attnumind +pgsql/data/base/template1/pg_attrdef +pgsql/data/base/template1/pg_attrdefind +pgsql/data/base/template1/pg_attrelidind +pgsql/data/base/template1/pg_attribute +pgsql/data/base/template1/pg_class +pgsql/data/base/template1/pg_classnameind +pgsql/data/base/template1/pg_classoidind +pgsql/data/base/template1/pg_index +pgsql/data/base/template1/pg_inheritproc +pgsql/data/base/template1/pg_inherits +pgsql/data/base/template1/pg_internal.init +pgsql/data/base/template1/pg_ipl +pgsql/data/base/template1/pg_language +pgsql/data/base/template1/pg_listener +pgsql/data/base/template1/pg_opclass +pgsql/data/base/template1/pg_operator +pgsql/data/base/template1/pg_parg +pgsql/data/base/template1/pg_proc +pgsql/data/base/template1/pg_procidind +pgsql/data/base/template1/pg_procnameind +pgsql/data/base/template1/pg_procsrcind +pgsql/data/base/template1/pg_relcheck +pgsql/data/base/template1/pg_relcheckind +pgsql/data/base/template1/pg_rewrite +pgsql/data/base/template1/pg_statistic +pgsql/data/base/template1/pg_trigger +pgsql/data/base/template1/pg_trigrelidind +pgsql/data/base/template1/pg_type +pgsql/data/base/template1/pg_typeidind +pgsql/data/base/template1/pg_typenameind +pgsql/data/base/template1/pg_version +pgsql/data/pg_database +pgsql/data/pg_defaults +pgsql/data/pg_demon +pgsql/data/pg_geqo.sample +pgsql/data/pg_group +pgsql/data/pg_hba.conf +pgsql/data/pg_hosts +pgsql/data/pg_log +pgsql/data/pg_magic +pgsql/data/pg_server +pgsql/data/pg_time +pgsql/data/pg_user +pgsql/data/pg_variable +pgsql/include/access/attnum.h +pgsql/include/c.h +pgsql/include/config.h +pgsql/include/fmgr.h +pgsql/include/lib/dllist.h +pgsql/include/libpgtcl.h +pgsql/include/libpq-fe.h +pgsql/include/libpq/libpq-fs.h +pgsql/include/libpq/pqcomm.h +pgsql/include/os.h +pgsql/include/postgres.h +pgsql/include/postgres_ext.h +pgsql/include/utils/elog.h +pgsql/include/utils/geo_decls.h +pgsql/include/utils/palloc.h +pgsql/lib/global1.bki.source +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.1.0 +pgsql/lib/libpq.a +pgsql/lib/libpq.so +pgsql/lib/libpq.so.1.0 +pgsql/lib/local1_template1.bki.source +pgsql/lib/pg_geqo.sample +pgsql/lib/pg_hba.conf.sample +pgsql/man/man1/cleardbdir.1.gz +pgsql/man/man1/createdb.1.gz +pgsql/man/man1/createuser.1.gz +pgsql/man/man1/destroydb.1.gz +pgsql/man/man1/destroyuser.1.gz +pgsql/man/man1/initdb.1.gz +pgsql/man/man1/ipcclean.1.gz +pgsql/man/man1/monitor.1.gz +pgsql/man/man1/pg_dump.1.gz +pgsql/man/man1/pg_dumpall.1.gz +pgsql/man/man1/pg_passwd.1.gz +pgsql/man/man1/pgintro.1.gz +pgsql/man/man1/postgres.1.gz +pgsql/man/man1/postmaster.1.gz +pgsql/man/man1/psql.1.gz +pgsql/man/man3/catalogs.3.gz +pgsql/man/man3/large_objects.3.gz +pgsql/man/man3/libpq.3.gz +pgsql/man/man3/oracle_compat.3.gz +pgsql/man/man3/pgbuiltin.3.gz +pgsql/man/man5/bki.5.gz +pgsql/man/man5/page.5.gz +pgsql/man/man5/pg_hba.conf.5.gz +pgsql/man/manl/abort.l.gz +pgsql/man/manl/alter_table.l.gz +pgsql/man/manl/begin.l.gz +pgsql/man/manl/close.l.gz +pgsql/man/manl/cluster.l.gz +pgsql/man/manl/commit.l.gz +pgsql/man/manl/copy.l.gz +pgsql/man/manl/create_aggregate.l.gz +pgsql/man/manl/create_database.l.gz +pgsql/man/manl/create_function.l.gz +pgsql/man/manl/create_index.l.gz +pgsql/man/manl/create_operator.l.gz +pgsql/man/manl/create_rule.l.gz +pgsql/man/manl/create_sequence.l.gz +pgsql/man/manl/create_table.l.gz +pgsql/man/manl/create_trigger.l.gz +pgsql/man/manl/create_type.l.gz +pgsql/man/manl/create_version.l.gz +pgsql/man/manl/create_view.l.gz +pgsql/man/manl/declare.l.gz +pgsql/man/manl/delete.l.gz +pgsql/man/manl/drop.l.gz +pgsql/man/manl/drop_aggregate.l.gz +pgsql/man/manl/drop_database.l.gz +pgsql/man/manl/drop_function.l.gz +pgsql/man/manl/drop_index.l.gz +pgsql/man/manl/drop_operator.l.gz +pgsql/man/manl/drop_rule.l.gz +pgsql/man/manl/drop_sequence.l.gz +pgsql/man/manl/drop_table.l.gz +pgsql/man/manl/drop_trigger.l.gz +pgsql/man/manl/drop_type.l.gz +pgsql/man/manl/drop_view.l.gz +pgsql/man/manl/end.l.gz +pgsql/man/manl/explain.l.gz +pgsql/man/manl/fetch.l.gz +pgsql/man/manl/grant.l.gz +pgsql/man/manl/insert.l.gz +pgsql/man/manl/listen.l.gz +pgsql/man/manl/load.l.gz +pgsql/man/manl/move.l.gz +pgsql/man/manl/notify.l.gz +pgsql/man/manl/purge.l.gz +pgsql/man/manl/rename.l.gz +pgsql/man/manl/reset.l.gz +pgsql/man/manl/revoke.l.gz +pgsql/man/manl/rollback.l.gz +pgsql/man/manl/select.l.gz +pgsql/man/manl/set.l.gz +pgsql/man/manl/show.l.gz +pgsql/man/manl/sql.l.gz +pgsql/man/manl/update.l.gz +pgsql/man/manl/vacuum.l.gz +pgsql/post-install-notes +share/doc/pgsql/FAQ +share/doc/pgsql/FAQ-Irix +share/doc/pgsql/FAQ-Linux +share/doc/pgsql/README.GEQO +share/doc/pgsql/README.fsync +share/doc/pgsql/README.support +share/doc/pgsql/TODO +share/doc/pgsql/TODO.GEQO +share/doc/pgsql/bug.template +share/doc/pgsql/libpgtcl.doc +share/doc/pgsql/manual/admin.html +share/doc/pgsql/manual/advanced.html +share/doc/pgsql/manual/appenda.html +share/doc/pgsql/manual/architec.html +share/doc/pgsql/manual/copy.html +share/doc/pgsql/manual/extend.html +share/doc/pgsql/manual/figure01.gif +share/doc/pgsql/manual/figure02.gif +share/doc/pgsql/manual/figure03.gif +share/doc/pgsql/manual/intro.html +share/doc/pgsql/manual/libpq.html +share/doc/pgsql/manual/lobj.html +share/doc/pgsql/manual/pg95user.html +share/doc/pgsql/manual/query.html +share/doc/pgsql/manual/refs.html +share/doc/pgsql/manual/rules.html +share/doc/pgsql/manual/start.html +share/doc/pgsql/manual/xaggr.html +share/doc/pgsql/manual/xfunc.html +share/doc/pgsql/manual/xindex.html +share/doc/pgsql/manual/xoper.html +share/doc/pgsql/manual/xtypes.html +share/doc/pgsql/spi.txt +share/doc/pgsql/trigger.txt +share/doc/pgsql/userguide.ps +@dirrm share/doc/pgsql/manual +@dirrm share/doc/pgsql +@dirrm pgsql/bin +@dirrm pgsql/data/base/template1 +@dirrm pgsql/data/base +@dirrm pgsql/data +@dirrm pgsql/include/access +@dirrm pgsql/include/include +@dirrm pgsql/include/lib +@dirrm pgsql/include/libpq +@dirrm pgsql/include/port/BSD44_derived +@dirrm pgsql/include/port +@dirrm pgsql/include/utils +@dirrm pgsql/include +@dirrm pgsql/lib +@dirrm pgsql/man/man1 +@dirrm pgsql/man/man3 +@dirrm pgsql/man/man5 +@dirrm pgsql/man/manl +@dirrm pgsql/man +@dirrm pgsql diff --git a/databases/postgresql/scripts/createuser b/databases/postgresql/scripts/createuser new file mode 100644 index 00000000000..ceb99626e64 --- /dev/null +++ b/databases/postgresql/scripts/createuser @@ -0,0 +1,50 @@ +#!/usr/bin/perl +# + +eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' +& eval 'exec /usr/bin/perl -S $0 $argv:q' +if 0; + +if( $> ) { + print "\nYou must be root to run this step!\n\n"; + exit 1; +} + +if( getpwnam( "pgsql" ) ) { + ( $null, $null, $pgUID ) = getpwnam( "pgsql" ); +} else { + $pgUID = 70; + while( getpwuid( $pgUID ) ) { + $pgUID++; + } +} + +if( getgrnam( "pgsql" ) ) { + ( $null, $null, $pgGID ) = getgrnam( "pgsql" ); +} else { + $pgGID = 70; + while( getgrgid( $pgGID ) ) { + $pgGID++; + } + &append_file( "/etc/group", "pgsql:*:$pgGID:" ); +} + +print "pgsql user using uid $pgUID\n"; +print "pgsql user using gid $pgGID\n"; + +system( "/usr/bin/chpass -a \"pgsql:*:$pgUID:$pgGID::0:0:PostgreSQL pseudo-user:$ENV{'PREFIX'}/pgsql:/bin/sh\"" ); + +sub append_file { + local($file,@list) = @_; + local($LOCK_EX) = 2; + local($LOCK_NB) = 4; + local($LOCK_UN) = 8; + + open(F, ">> $file") || die "$file: $!\n"; + while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) { + exit 1; + } + print F join( "\n", @list) . "\n"; + close F; + flock( F, $LOCK_UN ); +} |