Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/database In directory vz-cvs-3.sog:/tmp/cvs-serv24379/10.7/stable/main/finkinfo/database
Modified Files: iplike-pg.info Added Files: postgresql91.info postgresql91.patch Log Message: PostgreSQL 9.1 Index: iplike-pg.info =================================================================== RCS file: /cvsroot/fink/dists/10.7/stable/main/finkinfo/database/iplike-pg.info,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- iplike-pg.info 20 Jul 2011 22:02:27 -0000 1.1 +++ iplike-pg.info 12 Sep 2011 19:11:44 -0000 1.2 @@ -2,8 +2,9 @@ Package: iplike-pg%type_pkg[pg] Version: 2.0.2 Revision: 32 +Distribution: 10.7 Description: PostgreSQL IP address query interface -Type: pg(9.0) +Type: pg(9.0 9.1) License: GPL Maintainer: Benjamin Reed <ipl...@fink.raccoonfink.com> @@ -11,7 +12,7 @@ BuildDepends: << autoconf2.6, automake1.11, - fink (>= 0.30.0-1), + fink (>= 0.30.2-1), libtool2, postgresql%type_pkg[pg]-dev << --- NEW FILE: postgresql91.patch --- diff -Nurd postgresql-9.0.4/pgsql.sh postgresql-9.0.4-new/pgsql.sh --- postgresql-9.0.4/pgsql.sh 1969-12-31 19:00:00.000000000 -0500 +++ postgresql-9.0.4-new/pgsql.sh 2011-07-21 11:38:27.000000000 -0400 @@ -0,0 +1,83 @@ +#!/bin/sh + +die () { + echo "failed" + echo "" + echo "*** bailing because an error ocurred:" + echo "" + echo "$*" + exit 1 +} + +PREFIX="@INSTPREFIX@/opt/postgresql-@PGVERSION@" +DATADIR="@INSTPREFIX@/var/postgresql-@PGVERSION@/data" +LOGFILE="@INSTPREFIX@/var/postgresql-@PGVERSION@/pgsql.log" + +export LANG=C +unset LC_ALL + +export PATH="$PREFIX/bin:@INSTPREFIX@/bin:$PATH" + +SHMMAX=`sysctl kern.sysv.shmmax | cut -d' ' -f2-` +SHMMNI=`sysctl kern.sysv.shmmni | cut -d' ' -f2-` +SHMALL=`sysctl kern.sysv.shmall | cut -d' ' -f2-` + +if [ "$SHMMAX" -lt "8388608" ] || [ "$SHMMNI" -lt "64" ] || [ "$SHMALL" -lt "32768" ]; then + echo "WARNING: You probably need to set your shared memory resources higher for" + echo " PostgreSQL to function. For more information on raising your shared" + echo " memory settings, see:" + echo " http://wiki.finkproject.org/index.php/Shared_Memory_Regions_on_Darwin" + echo "" + echo " I am also creating a default configuration in /etc/sysctl.conf.pg" + echo " that contains values that will work with the default PostgreSQL " + echo " memory settings. To use it, rename it to /etc/sysctl.conf (if you" + echo " don't have one already) and reboot." + echo "" + echo " For now, I'll try setting your sysctl to something higher and then" + echo " running things anyways. Good luck! =)" + echo "" + sysctl -w kern.sysv.shmmax=8388608 + sysctl -w kern.sysv.shmmin=1 + sysctl -w kern.sysv.shmmni=64 + sysctl -w kern.sysv.shmseg=8 + sysctl -w kern.sysv.shmall=32768 + echo "" + cat <<END >/etc/sysctl.conf.pg +kern.sysv.shmmax=8388608 +kern.sysv.shmmin=1 +kern.sysv.shmmni=64 +kern.sysv.shmseg=8 +kern.sysv.shmall=32768 +END +fi + +if [ ! -d "$DATADIR" ]; then + printf -- "- making postgresql directories: " + sudo mkdir -p "$DATADIR" + sudo chown -R postgres "$DATADIR/.." + echo "ok" + + printf -- "- initializing database in $DATADIR: " + sudo -u postgres ${PREFIX}/bin/initdb -E UNICODE -D "$DATADIR" >/tmp/pgsql-init-@PGVERSION@.log 2>&1 || die "couldn't initialize database" + echo "ok" +fi + +PG_COMMAND="sudo -u postgres env" +if [ -n "$PGPORT" ]; then + PG_COMMAND="$PG_COMMAND PGPORT=$PGPORT" +fi +PG_COMMAND="$PG_COMMAND ${PREFIX}/bin/pg_ctl" + +case "$1" in + init) + ;; + start) + $PG_COMMAND -D "$DATADIR" -l "$LOGFILE" start + ;; + restart) + $PG_COMMAND -D "$DATADIR" -m fast restart + ;; + stop) + $PG_COMMAND -D "$DATADIR" -m fast stop + ;; +esac diff -Nurd postgresql-9.0.4/src/Makefile.global.in postgresql-9.0.4-new/src/Makefile.global.in --- postgresql-9.0.4/src/Makefile.global.in 2011-04-14 23:15:53.000000000 -0400 +++ postgresql-9.0.4-new/src/Makefile.global.in 2011-07-21 11:39:12.000000000 -0400 @@ -196,7 +196,7 @@ # Compilers -CPP = @CPP@ +CPP = $(CC) -E CPPFLAGS = @CPPFLAGS@ ifdef PGXS @@ -243,7 +243,7 @@ ifdef PGXS LDFLAGS = -L$(libdir) else - LDFLAGS = -L$(top_builddir)/src/port + LDFLAGS = -L$(top_builddir)/src/port -L$(top_builddir)/src/interfaces/libpq -L$(top_builddir)/src/interfaces/ecpg/ecpglib -L$(top_builddir)/src/interfaces/ecpg/pgtypeslib -L$(top_builddir)/src/interfaces/ecpg/compatlib endif LDFLAGS += @LDFLAGS@ diff -Nurd postgresql-9.0.4/src/backend/utils/misc/postgresql.conf.sample postgresql-9.0.4-new/src/backend/utils/misc/postgresql.conf.sample --- postgresql-9.0.4/src/backend/utils/misc/postgresql.conf.sample 2011-04-14 23:15:53.000000000 -0400 +++ postgresql-9.0.4-new/src/backend/utils/misc/postgresql.conf.sample 2011-07-21 11:38:27.000000000 -0400 @@ -77,7 +77,7 @@ # - Security and Authentication - #authentication_timeout = 1min # 1s-600s -#ssl = off # (change requires restart) +ssl = off # (change requires restart) #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers # (change requires restart) #ssl_renegotiation_limit = 512MB # amount of data between renegotiations diff -Nurd postgresql-9.0.4/src/bin/initdb/initdb.c postgresql-9.0.4-new/src/bin/initdb/initdb.c --- postgresql-9.0.4/src/bin/initdb/initdb.c 2011-04-14 23:15:53.000000000 -0400 +++ postgresql-9.0.4-new/src/bin/initdb/initdb.c 2011-07-21 11:38:27.000000000 -0400 @@ -114,7 +114,7 @@ /* defaults */ static int n_connections = 10; -static int n_buffers = 50; +static int n_buffers = 20; /* * Warning messages for authentication methods diff -Nurd postgresql-9.0.4/src/interfaces/ecpg/compatlib/Makefile postgresql-9.0.4-new/src/interfaces/ecpg/compatlib/Makefile --- postgresql-9.0.4/src/interfaces/ecpg/compatlib/Makefile 2011-04-14 23:15:53.000000000 -0400 +++ postgresql-9.0.4-new/src/interfaces/ecpg/compatlib/Makefile 2011-07-21 11:38:27.000000000 -0400 @@ -21,6 +21,7 @@ -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) override CFLAGS += $(PTHREAD_CFLAGS) +LDFLAGS := -L../ecpglib -L../pgtypeslib $(LDFLAGS) SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ $(filter -lintl -lm, $(LIBS)) $(PTHREAD_LIBS) diff -Nurd postgresql-9.0.4/src/interfaces/ecpg/ecpglib/Makefile postgresql-9.0.4-new/src/interfaces/ecpg/ecpglib/Makefile --- postgresql-9.0.4/src/interfaces/ecpg/ecpglib/Makefile 2011-04-14 23:15:53.000000000 -0400 +++ postgresql-9.0.4-new/src/interfaces/ecpg/ecpglib/Makefile 2011-07-21 11:38:27.000000000 -0400 @@ -33,6 +33,7 @@ OBJS += thread.o endif +LDFLAGS := -L../pgtypeslib $(LDFLAGS) SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) $(filter -lintl -lm, $(LIBS)) $(PTHREAD_LIBS) SHLIB_EXPORTS = exports.txt diff -Nurd postgresql-9.0.4/src/makefiles/Makefile.darwin postgresql-9.0.4-new/src/makefiles/Makefile.darwin --- postgresql-9.0.4/src/makefiles/Makefile.darwin 2011-04-14 23:15:53.000000000 -0400 +++ postgresql-9.0.4-new/src/makefiles/Makefile.darwin 2011-07-21 11:38:27.000000000 -0400 @@ -10,4 +10,4 @@ # Rule for building a shared library from a single .o file %.so: %.o - $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -bundle $(BE_DLLLIBS) -o $@ $< + $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -bundle $(BE_DLLLIBS) -undefined dynamic_lookup -o $@ $< --- NEW FILE: postgresql91.info --- Info4: << Package: postgresql91 Version: 9.1.0 Revision: 31 Description: PostgreSQL open-source database License: BSD Maintainer: Benjamin Reed <postgresq...@fink.raccoonfink.com> Depends: << daemonic (>= 20010902-1), libxml2-shlibs, libxslt-shlibs, passwd-postgres | passwd (>= 20030906-1), readline5-shlibs, %N-shlibs (>= %v-%r) << BuildDepends: << bison, fink (>= 0.30.2-1), fink-mirrors (>= 0.28.7.1-2), libxml2, libxslt, passwd-postgres | passwd (>= 20030906-1), readline5, system-openssl-dev, system-perl, tcltk, tcltk-dev << Provides: postgresql-server GCC: 4.0 Source: mirror:postgresql:source/v%v/postgresql-%v.tar.bz2 Source-MD5: 0497b9da1d7c380c340a9a87ba5500fe PatchScript: sed -e 's|@BUILDDIR@|%b|g' -e 's|@INSTPREFIX@|%p|g' -e 's|@PGVERSION@|9.1|g' < %{PatchFile} | patch -p1 PatchFile: %n.patch PatchFile-MD5: ca800eba11497ef264f1ca93f9509f46 SetCPPFLAGS: -I%p/lib/system-openssl/include -DHAVE_OPTRESET -fno-common SetLDFLAGS: -L%p/lib/system-openssl/lib -F/System/Library/Frameworks UseMaxBuildJobs: true CompileScript: << #!/bin/sh -xe if [[ $(sw_vers -productVersion | cut -d. -f1-2) > 10.6 ]]; then export CC=clang export CXX=clang++ elif [ -x /usr/bin/gcc-4.2 ]; then export CC=gcc-4.2 export CXX=g++-4.2 fi export PERL=/usr/bin/perl export PYTHON=/usr/bin/python ./configure \ --prefix='%p/opt/postgresql-9.1' \ --docdir='%p/share/doc/%N' \ --mandir='${prefix}/share/man' \ --infodir='${prefix}/share/info' \ --with-libraries=%p/lib \ --with-includes=%p/include \ \ --with-perl \ --with-python \ --with-tcl \ --with-tclconfig=%p/lib \ \ --enable-thread-safety \ --with-openssl \ --with-pam \ --with-bonjour \ --with-krb5 \ --with-gssapi \ \ --with-libxml \ --with-libxslt perl -pi -e 's,-arch x86_64,,g; s,-arch i386,,g; s,-arch ppc,,g' src/Makefile.global make make -C contrib << InstallScript: << #!/bin/sh -xe # postgresql make -j1 install DESTDIR="%d" BE_DLLLIBS=%p/opt/postgresql-9.1/bin/postgres make -j1 -C contrib install DESTDIR="%d" BE_DLLLIBS=%p/opt/postgresql-9.1/bin/postgres ranlib %i/opt/postgresql-9.1/lib/*.a install -d -m 755 %i/share/doc/%N find contrib -name README.\* -exec cp {} %i/share/doc/%N/ \; install -d -m 755 %i/bin install -c -m 755 pgsql.sh %i/bin/pgsql.sh-9.1 install -d -m 755 %i/var/postgresql-9.1 echo "be sure to back up this database before any upgrades!" >> %i/var/postgresql-9.1/README install -d -m 755 %i/var/log ln -sf %p/var/postgresql-9.1/pgsql.log %i/var/log/pgsql-9.1.log for file in `ls -1 %i/opt/postgresql-9.1/bin/`; do echo "${file}" >> %i/var/postgresql-9.1/binary.list done cat <<END > %i/var/postgresql-9.1/remove-alternatives.sh #!/bin/sh for arg in "\$@"; do case \$arg in -h|--h|--he|--hel|--help) echo "usage: \$0 [-h]" echo "" echo " -h, --help this help" echo "" exit 0; ;; *) echo "\$0: unknown argument '\$arg'" exit 1; ;; esac done update-alternatives --remove "pgsql.sh" "%p/bin/pgsql.sh-9.1" for tuple in %p/opt/postgresql-9.1/bin:binary.list; do TUPLE_PATH=\`echo \$tuple | cut -d: -f1\` TUPLE_FILE=\`echo \$tuple | cut -d: -f2\` for file in \`cat %p/var/postgresql-9.1/\${TUPLE_FILE}\`; do update-alternatives --remove "\${file}" "\${TUPLE_PATH}/\${file}" done done END cat <<END > %i/var/postgresql-9.1/update-alternatives.sh #!/bin/sh FORCE=0 for arg in "\$@"; do case \$arg in -h|--h|--he|--hel|--help) echo "usage: \$0 [-h] [-f]" echo "" echo " -h, --help this help" # echo " -f, --force force this version of PostgreSQL, even if there is a newer one" echo "" exit 0; ;; # -f|--f|--fo|--for|--forc|--force) # FORCE=1 # ;; *) echo "\$0: unknown argument '\$arg'" exit 1; ;; esac done update-alternatives --install "%p/bin/pgsql.sh" "pgsql.sh" "%p/bin/pgsql.sh-9.1" 91 for tuple in bin:binary.list; do TUPLE_PATH=\`echo \$tuple | cut -d: -f1\` TUPLE_FILE=\`echo \$tuple | cut -d: -f2\` for file in \`cat %p/var/postgresql-9.1/\${TUPLE_FILE}\`; do if [ -e "%p/opt/postgresql-9.1/\${TUPLE_PATH}/\${file}" ]; then #echo update-alternatives --install "%p/\${TUPLE_PATH}/\${file}" "\${file}" "%p/opt/postgresql-9.1/\${TUPLE_PATH}/\${file}" 91 update-alternatives --install "%p/\${TUPLE_PATH}/\${file}" "\${file}" "%p/opt/postgresql-9.1/\${TUPLE_PATH}/\${file}" 91 fi done done END chmod 755 %i/var/postgresql-9.1/*.sh perl -pi -e 's,^%d,,' %i/bin/pg_config* << DocFiles: COPYRIGHT HISTORY INSTALL README SplitOff: << Package: %N-dev Description: PostgreSQL development headers and libraries Depends: %N (>= %v-%r) BuildDependsOnly: true Files: << opt/postgresql-9.1/bin/pg_config* opt/postgresql-9.1/include opt/postgresql-9.1/lib/*.a opt/postgresql-9.1/lib/libecpg_compat.dylib opt/postgresql-9.1/lib/libecpg.dylib opt/postgresql-9.1/lib/libpgtypes.dylib opt/postgresql-9.1/lib/libpq.dylib << PreInstScript: << PG_ID=`id -u postgres 2>/dev/null || true` if [ -z "$PG_ID" ]; then echo "Whoa there! You must have a postgres user to install this package." echo "Please do a 'fink reinstall passwd' or 'fink reinstall passwd-postgres'" echo "and make sure you hit 'y' when it asks if you want to update your users." exit 1 fi << PostInstScript: [ -x %p/var/postgresql-9.1/update-alternatives.sh ] && %p/var/postgresql-9.1/update-alternatives.sh PreRmScript: if [ "$1" != "upgrade" ]; then [ -x %p/var/postgresql-9.1/remove-alternatives.sh ] && %p/var/postgresql-9.1/remove-alternatives.sh; fi << SplitOff2: << Package: %N-shlibs Description: PostgreSQL shared libraries Files: << opt/postgresql-9.1/lib/lib*.*.dylib var/postgresql-9.1/*.sh var/postgresql-9.1/*.list << Shlibs: << %p/opt/postgresql-9.1/lib/libecpg.6.dylib 6.0.0 postgresql91-shlibs (>= 9.1.0-1) %p/opt/postgresql-9.1/lib/libecpg_compat.3.dylib 3.0.0 postgresql91-shlibs (>= 9.1.0-1) %p/opt/postgresql-9.1/lib/libpgtypes.3.dylib 3.0.0 postgresql91-shlibs (>= 9.1.0-1) %p/opt/postgresql-9.1/lib/libpq.5.dylib 5.0.0 postgresql91-shlibs (>= 9.1.0-1) << PostInstScript: [ -x %p/var/postgresql-9.1/update-alternatives.sh ] && %p/var/postgresql-9.1/update-alternatives.sh PreRmScript: if [ "$1" != "upgrade" ]; then [ -x %p/var/postgresql-9.1/remove-alternatives.sh ] && %p/var/postgresql-9.1/remove-alternatives.sh; fi << PreInstScript: << PG_ID=`id -u postgres 2>/dev/null || true` if [ -z "$PG_ID" ]; then echo "Whoa there! You must have a postgres user to install this package." echo "Please do a 'fink reinstall passwd' or 'fink reinstall passwd-postgres'" echo "and make sure you hit 'y' when it asks if you want to update your users." exit 1 fi << PostInstScript: << INSTALL_PHASE="$1" [ -x %p/var/postgresql-9.1/update-alternatives.sh ] && %p/var/postgresql-9.1/update-alternatives.sh # remove the old "pgsql" entries from netinfo; the username was switched to # "postgres" but the old ones hang around because of the way niload works niutil -destroy . /users/pgsql >/dev/null 2>&1 || true niutil -destroy . /groups/pgsql >/dev/null 2>&1 || true die () { echo "failed" echo "" echo "*** bailing because an error ocurred:" echo "" echo "$*" exit 1 } # update daemonic init script if necessary daemonic install %N >/dev/null 2>&1 || : # get a nice port to run on while true; do PGPORT=$RANDOM; if [ "$PGPORT" -gt 10000 ] && [ "$PGPORT" -lt 20000 ]; then break fi done export PGPORT echo "- starting PostgreSQL on port $PGPORT" if %p/bin/pgsql.sh-9.1 start >/tmp/pgstart-9.1.log 2>&1; then sleep 5 ERROR=0 # install the plpgsql language if possible printf -- "- attempting to install the plpgsql language in the template1 database... " %p/opt/postgresql-9.1/bin/createlang -U postgres -p $PGPORT plpgsql template1 >/tmp/createlang-9.1.log 2>&1 || ERROR="$?" if [ $ERROR -eq 0 ]; then echo "done" elif [ $ERROR -gt 0 ] && [ $ERROR -ne 2 ]; then echo "WARNING: an unknown error occurred inserting the plpgsql language" else : fi sleep 5 %p/bin/pgsql.sh-9.1 stop >/dev/null 2>&1 || echo "WARNING: unable to stop postgresql: run 'PGPORT=$PGPORT sudo %p/bin/pgsql.sh-9.1 stop' to try again" else cat <<END WARNING: unable to start postgresql on an alternate port, not installing plpgsql! If you wish to install it manually, run: sudo %p/bin/pgsql.sh-9.1 start sudo -u postgres %p/opt/postgresql-9.1/bin/createlang plpgsql template1 END fi << PreRmScript: << # clean up if [ $1 != "upgrade" ]; then [ -x %p/var/postgresql-9.1/remove-alternatives.sh ] && %p/var/postgresql-9.1/remove-alternatives.sh daemonic remove %N >/dev/null 2>&1 || : fi << DaemonicFile: << <service> <description>PostgreSQL database server</description> <message> PostgreSQL database server</message> <daemon name="%N"> <executable background="no">%p/bin/pgsql.sh-9.1</executable> <parameters>start</parameters> </daemon> </service> << Homepage: http://www.postgresql.org/ DescUsage: << The package runs initdb on installation as the user 'postgres'. The best way to run it is using the supplied pgsql.sh script, i.e. 'sudo pgsql.sh start'. Or, you can run 'sudo daemonic enable %N' as root to create a StartupItem for it. Unless you set up admin users in the database, the easiest way to run psql commands with administrator access is to prefix them with the command "sudo -u postgres". This will ask you your administrator password, and then run the command as the postgres user. For example, to create a new database, you would run: sudo -u postgres %p/opt/postgresql-9.1/bin/createdb mydb << DescPackaging: << IMPORTANT: The location of the data files has changed from early revisions of this package. If you're upgrading from an earlier revision, note that this one expects the data files to be installed at <prefix>/var/postgresql-9.1/data. When run from the startup script, logs output to <prefix>/var/postgresql-9.1/pgsql.log << DescPort: << Rearranged a lot of the PostgreSQL build to be more "correct" on Darwin, including making proper dylibs (instead of bundles, which ended up creating static binaries). << << ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs