diff options
Diffstat (limited to 'databases/postgresql84-server/files')
-rw-r--r-- | databases/postgresql84-server/files/502.pgsql | 88 | ||||
-rw-r--r-- | databases/postgresql84-server/files/dot.cshrc.in | 13 | ||||
-rw-r--r-- | databases/postgresql84-server/files/dot.profile.in | 18 | ||||
-rw-r--r-- | databases/postgresql84-server/files/patch-aj | 118 | ||||
-rw-r--r-- | databases/postgresql84-server/files/pgsql.sh.tmpl | 40 | ||||
-rw-r--r-- | databases/postgresql84-server/files/post-install-notes | 54 |
6 files changed, 0 insertions, 331 deletions
diff --git a/databases/postgresql84-server/files/502.pgsql b/databases/postgresql84-server/files/502.pgsql deleted file mode 100644 index 32d473826f40..000000000000 --- a/databases/postgresql84-server/files/502.pgsql +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -# -# $Id: 502.pgsql.in,v 1.17 2001/10/29 10:12:32 henrik Exp $ -# -# Maintenance shell script to vacuum and backup database -# Put this in /usr/local/etc/periodic/daily, and it will be run -# every night -# -# Written by Palle Girgensohn <girgen@partitur.se> -# -# In public domain, do what you like with it, -# and use it at your own risk... :) -# -############################ - -# arguments to pg_dump -PGDUMP_ARGS="-b -F c" - -# the directory where the backups will reside -# ${HOME} is pgsql's home directory -PGBACKUPDIR=${HOME}/backups - -# some data is amazingly more compressed with bzip2, esp. blobs, it seems -# if your're short on diskspace, give it a try and set USEBZIP=yes -USEBZIP=no - -############################ - -DIR=`dirname $0` -progname=`basename $0` -PRG=`cd $DIR; pwd `/$progname - -# Run as user pgsql -if [ `id -un` != pgsql ]; then - su -l pgsql -c ${PRG} - exit $? -fi - -if [ X${USEBZIP} = Xyes ]; then - BZIP=`which bzip2 || echo true` -else - BZIP=true -fi - -# PGBACKUPDIR must be writeable by user pgsql -# ~pgsql is just that under normal circumstances, -# but this might not be where you want the backups... -if [ ! -d ${PGBACKUPDIR} ] ; then - echo Creating ${PGBACKUPDIR} - mkdir ${PGBACKUPDIR} - chmod 700 ${PGBACKUPDIR} -fi - -echo -echo "PostgreSQL maintenance" - -# Protect the data -umask 077 -dbnames=`psql -q -t -A -d template1 -c "SELECT datname FROM pg_database WHERE datname != 'template0'"` -rc=$? -for db in ${dbnames}; do - echo -n " $db" - file=${PGBACKUPDIR}/pgdump_${db}_`date "+%Y%m%d"` - pg_dump ${PGDUMP_ARGS} -d $db -f ${file} - [ $? -gt 0 ] && rc=3 - ${BZIP} ${file} -done - -if [ $rc -gt 0 ]; then - echo - echo "Errors were reported during backup." -fi - -echo -echo "vacuuming..." -vacuumdb -a -z -q -if [ $? -gt 0 ] -then - echo - echo "Errors were reported vacuum." - rc=3 -fi - -# cleaning up old data -find ${PGBACKUPDIR} \( -name 'pgdump_*'.${GZIPEXT} -o -name 'pgdumpall_*'.${GZIPEXT} \) \ - -a -atime +7 -delete - -exit $rc diff --git a/databases/postgresql84-server/files/dot.cshrc.in b/databases/postgresql84-server/files/dot.cshrc.in deleted file mode 100644 index 724212c70b23..000000000000 --- a/databases/postgresql84-server/files/dot.cshrc.in +++ /dev/null @@ -1,13 +0,0 @@ -set path = ( %%PREFIX%%/bin $path ) - -setenv PGLIB %%PREFIX%%/lib - -# note: PGDATA can be overridden by the -D startup option -setenv PGDATA $HOME/data - -#You might want to set some locale stuff here -#setenv PGDATESTYLE ISO -#setenv LC_ALL sv_SE.ISO_8859-1 - -# if you want to make regression tests use this TZ -#setenv TZ PST8PDT diff --git a/databases/postgresql84-server/files/dot.profile.in b/databases/postgresql84-server/files/dot.profile.in deleted file mode 100644 index 96344d533921..000000000000 --- a/databases/postgresql84-server/files/dot.profile.in +++ /dev/null @@ -1,18 +0,0 @@ -# both new and old layout's paths, but new path first... -PATH=%%PREFIX%%/bin:${PATH} - -PGLIB=%%PREFIX%%/lib - -# note: PGDATA can be overridden by the -D startup option -PGDATA=${HOME}/data - -export PATH PGLIB PGDATA - -#You might want to set some locale stuff here -#PGDATESTYLE=ISO -#LC_ALL=sv_SE.ISO_8859-1 -#export PGDATESTYLE LC_ALL - -# if you want to make regression tests use this TZ -#TZ=PST8PDT -#export TZ diff --git a/databases/postgresql84-server/files/patch-aj b/databases/postgresql84-server/files/patch-aj deleted file mode 100644 index 94c0d6d79991..000000000000 --- a/databases/postgresql84-server/files/patch-aj +++ /dev/null @@ -1,118 +0,0 @@ ---- src/bin/pg_passwd/pg_passwd.c.orig Sat Mar 24 01:54:55 2001 -+++ src/bin/pg_passwd/pg_passwd.c Wed Apr 18 04:54:14 2001 -@@ -7,6 +7,12 @@ - #include <errno.h> - #include <time.h> - #include <ctype.h> -+ -+#if defined(__FreeBSD__) -+#include <pwd.h> /* defines _PASSWORD_LEN, max # of characters in a password */ -+#include <sys/time.h> /* gettimeofday for password salt */ -+#endif -+ - #define issaltchar(c) (isalnum((unsigned char) (c)) || (c) == '.' || (c) == '/') - - #ifdef HAVE_TERMIOS_H -@@ -23,18 +29,31 @@ - * We assume that the output of crypt(3) is always 13 characters, - * and that at most 8 characters can usefully be sent to it. - * -+ * For FreeBSD, take these values from /usr/include/pwd.h - * Postgres usernames are assumed to be less than NAMEDATALEN chars long. - */ -+#if defined(__FreeBSD__) -+#define CLEAR_PASSWD_LEN _PASSWORD_LEN -+#define CRYPTED_PASSWD_LEN _PASSWORD_LEN /* max length, not containing NULL */ -+#define SALT_LEN 10 -+#else - #define CLEAR_PASSWD_LEN 8 /* not including null */ - #define CRYPTED_PASSWD_LEN 13 /* not including null */ -+#define SALT_LEN 3 -+#endif -+ -+static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ -+ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -+ - - const char *progname; - - static void usage(void); -+static void to64(char *s, long v, int n); - static void read_pwd_file(char *filename); - static void write_pwd_file(char *filename, char *bkname); - static void encrypt_pwd(char key[CLEAR_PASSWD_LEN + 1], -- char salt[3], -+ char salt[SALT_LEN], - char passwd[CRYPTED_PASSWD_LEN + 1]); - static void prompt_for_username(char *username); - static void prompt_for_password(char *prompt, char *password); -@@ -47,6 +66,15 @@ - printf("Report bugs to <pgsql-bugs@postgresql.org>.\n"); - } - -+static void -+to64(char *s, long v, int n) -+{ -+ while (--n >= 0) { -+ *s++ = itoa64[v&0x3f]; -+ v >>= 6; -+ } -+} -+ - typedef struct - { - char *uname; -@@ -154,7 +182,7 @@ - if (q != NULL) - *(q++) = '\0'; - -- if (strlen(p) != CRYPTED_PASSWD_LEN && strcmp(p, "+") != 0) -+ if (strlen(p) > CRYPTED_PASSWD_LEN && strcmp(p, "+") != 0) - { - fprintf(stderr, "%s:%d: warning: invalid password length\n", - filename, npwds + 1); -@@ -221,15 +249,25 @@ - - static void - encrypt_pwd(char key[CLEAR_PASSWD_LEN + 1], -- char salt[3], -+ char salt[SALT_LEN], - char passwd[CRYPTED_PASSWD_LEN + 1]) - { -+#if !defined(__FreeBSD__) - int n; -- -+#endif - /* select a salt, if not already given */ - if (salt[0] == '\0') - { -+#if defined(__FreeBSD__) -+ struct timeval tv; -+ srandomdev(); -+ gettimeofday(&tv,0); -+ to64(&salt[0], random(), 3); -+ to64(&salt[3], tv.tv_usec, 3); -+ to64(&salt[6], tv.tv_sec, 2); -+ salt[8] = '\0'; - srand(time(NULL)); -+#else - do - { - n = rand() % 256; -@@ -241,6 +279,7 @@ - } while (!issaltchar(n)); - salt[1] = n; - salt[2] = '\0'; -+#endif - } - - /* get encrypted password */ -@@ -335,7 +374,7 @@ - char *filename; - char bkname[MAXPGPATH]; - char username[NAMEDATALEN]; -- char salt[3]; -+ char salt[SALT_LEN]; - char key[CLEAR_PASSWD_LEN + 1], - key2[CLEAR_PASSWD_LEN + 1]; - char e_passwd[CRYPTED_PASSWD_LEN + 1]; diff --git a/databases/postgresql84-server/files/pgsql.sh.tmpl b/databases/postgresql84-server/files/pgsql.sh.tmpl deleted file mode 100644 index d67d9b642f1b..000000000000 --- a/databases/postgresql84-server/files/pgsql.sh.tmpl +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# $FreeBSD$ -# -# For postmaster startup options, edit $PGDATA/postgresql.conf - -PREFIX=%%PREFIX%% -PGBIN=${PREFIX}/bin - -case $1 in -start) - [ -d ${PREFIX}/lib ] && /sbin/ldconfig -m ${PREFIX}/lib - touch /var/log/pgsql - chmod 600 /var/log/pgsql - chown pgsql:pgsql /var/log/pgsql - [ -x ${PGBIN}/pg_ctl ] && { - su -l pgsql -c \ - '[ -d ${PGDATA} ] && exec %%PREFIX%%/bin/pg_ctl start -s -w -l /var/log/pgsql' - echo -n ' pgsql' - } - ;; - -stop) - [ -x ${PGBIN}/pg_ctl ] && { - su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl stop -s -m fast' - echo -n ' pgsql' - } - ;; - -status) - [ -x ${PGBIN}/pg_ctl ] && { - exec su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl status' - } - ;; - -*) - echo "usage: `basename $0` {start|stop|status}" >&2 - exit 64 - ;; -esac diff --git a/databases/postgresql84-server/files/post-install-notes b/databases/postgresql84-server/files/post-install-notes deleted file mode 100644 index 55816362579b..000000000000 --- a/databases/postgresql84-server/files/post-install-notes +++ /dev/null @@ -1,54 +0,0 @@ -The PostgreSQL port has a collection of "side orders": - -p5-Pg - A perl5 API for client access to PostgreSQL databases. - -postgresql-tcltk - If you want tcl/tk client support. You get a neat GUI, pgaccess, as - a bonus! - -postgresql-jdbc - For Java JDBC support. - -postgresql-odbc - For client access from unix applications using ODBC as access - method. Not needed to access unix PostgreSQL servers from Win32 - using ODBC. See below. - -ruby-postgres, py-PyGreSQL - For client access to PostgreSQL databases using the ruby & python - languages. - -postgresql-plperl, postgresql-pltcl & postgresql-plruby - For using perl5, tcl & ruby as procedural languages. - -etc etc... - -Note that many files have moved around compared to previous versions -of PostgreSQL. For example, plpgsql.so and all other language modules -are now in /usr/local/lib/postgresql. - -If you have many tables and many clients running, consider raising -kern.maxfiles using sysctl(8), or reconfigure your kernel -appropriately. - -You should vacuum and backup your database regularly. There is a -periodic script, /usr/local/share/postgresql/502.pgsql, that you may -find useful. - -To allow many simultaneous connections to your PostgreSQL server, you -should raise the SystemV shared memory limits in your kernel. Here are -example values for allowing up to 180 clients (tinkering in -postgresql.conf also needed, of course): - options SYSVSHM - options SYSVSEM - options SYSVMSG - options SHMMAXPGS=65536 - options SEMMNI=40 - options SEMMNS=240 - options SEMUME=40 - options SEMMNU=120 - -If you plan to access your PostgreSQL server using ODBC, please -consider running the SQL script /usr/local/share/postgresql/odbc.sql -to get the functions required for ODBC compliance. |