debian/0000775000000000000000000000000012320455363007173 5ustar debian/changelog0000664000000000000000000000617212320454417011052 0ustar aolserver4-nspostgres (4.5+20110709-1ubuntu1) trusty; urgency=low * Fixed FTBFS from using deprecated structure access of Tcl_interp (LP: #1303405) - nspostgres.c: replaces direct access of result field in Tlc_interp structure with API functions Tcl_GetStringResult and Tcl_SetString. -- Sebastian Carneiro Sat, 05 Apr 2014 00:13:22 -0300 aolserver4-nspostgres (4.5+20110709-1) unstable; urgency=low * New upstream release, with fix for postgresql 9.1. (closes: #725521) * Added Vcs* fields to debian/cotrol. * Policy bumped to 3.9.5 * Now using dhelper 9. * Fixating linking. (closes: #709271) -- Francesco Paolo Lovergine Wed, 08 Jan 2014 14:28:03 +0100 aolserver4-nspostgres (4.5-3build1) precise; urgency=low * No-change rebuild for aolserver4-core ABI transition. -- Ilya Barygin Sun, 13 Nov 2011 11:57:18 +0400 aolserver4-nspostgres (4.5-3) unstable; urgency=low [ Francesco Paolo Lovergine ] * Now using substvars. [ Stefan Sobernig ] * Checking lintian sanity (v2.2.12) * Bumping policy to 3.8.2 * Referring to GPLv2 in debian/copyright explicitly -- Francesco Paolo Lovergine Tue, 30 Jun 2009 00:46:35 +0200 aolserver4-nspostgres (4.5-2) unstable; urgency=low * Changed dependency to AOLserver >=4.5.1 to avoid possible ABI breakages. * Policy bumped to 3.8.0. * Added ${misc:Depends} to make lintian happy. * Debhelper level moved to 7. -- Francesco Paolo Lovergine Sat, 07 Mar 2009 11:37:54 +0100 aolserver4-nspostgres (4.5-1) unstable; urgency=low * New upstream release. * Now installing libns*so and ns*so as required by aolserver 4.5 * Policy bumped to 3.7.3 * Added Homepage field to debian/control * Removed obsolete postgresql-dev build-dependency (closes: #429965) * Added private paths to dh_shlibdeps call -- Francesco Paolo Lovergine Sun, 06 Jan 2008 14:34:12 +0100 aolserver4-nspostgres (4.0-4) unstable; urgency=low * Changed for aolserver4 4.5.0 compatibility. * Policy bumped to 3.7.2 without changes. * Debhelper compatibility bumped to 5. -- Francesco Paolo Lovergine Sun, 22 Apr 2007 11:17:51 +0200 aolserver4-nspostgres (4.0-3) unstable; urgency=low * Revised Debian Makefile to refer the correct postgres path. * Added libpg-dev build-dep for postgresql 8.0 (closes: #317071) * Policy bumped to 3.6.2, no changes -- Francesco Paolo Lovergine Mon, 11 Jul 2005 15:00:03 +0200 aolserver4-nspostgres (4.0-2) unstable; urgency=high * Added linking to libnsdb. That's needed to solve a runtime linking problem which renders package unusable. See http://openacs.org/forums/message-view?message_id=118559 Thanks Luke Pond. -- Francesco Paolo Lovergine Fri, 15 Oct 2004 09:58:06 +0200 aolserver4-nspostgres (4.0-1) unstable; urgency=low * Initial Release. -- Francesco Paolo Lovergine Tue, 25 May 2004 10:18:33 +0200 debian/install0000664000000000000000000000011512320454373010561 0ustar nspostgres.so usr/lib/aolserver4/bin libnspostgres.so usr/lib/aolserver4/lib debian/dirs0000664000000000000000000000012212320454373010052 0ustar usr/lib/aolserver4/bin usr/lib/aolserver4/lib usr/share/doc/aolserver4-nspostgres debian/control0000664000000000000000000000237412320454417010603 0ustar Source: aolserver4-nspostgres Section: web Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Francesco Paolo Lovergine Build-Depends: debhelper (>= 9), aolserver4-dev (>= 4.5.1), libpq-dev Standards-Version: 3.9.5 Homepage: http://www.aolserver.com/ Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/ext-maint/aolserver/modules/aolserver4-nspostgres/trunk Vcs-Svn: svn://anonscm.debian.org/collab-maint/ext-maint/aolserver/modules/aolserver4-nspostgres/ Package: aolserver4-nspostgres Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${aolserver:Depends} Suggests: aolserver4-doc (>= 4.0.1) Description: AOLserver 4 module: Postgres connector This module implements a simple AOLserver database services driver for AOLserver version 4. . A database driver is a module which interfaces between the AOLserver database-independent nsdb module and the API of a particular DBMS. A database driver's job is to open connections, send SQL statements, and translate the results into the form used by nsdb. In this case, the driver is for the PostgreSQL ORDBMS from The PostgreSQL Global Development Group. . This is the official driver for the OpenACS project. debian/docs0000664000000000000000000000000712320454373010043 0ustar README debian/Makefile.debian0000664000000000000000000001427512320454373012065 0ustar # # The contents of this file are subject to the AOLserver Public License # Version 1.1 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://aolserver.com. # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See # the License for the specific language governing rights and limitations # under the License. # # The Original Code is AOLserver Code and related documentation # distributed by AOL. # # The Initial Developer of the Original Code is America Online, # Inc. Portions created by AOL are Copyright (C) 1999 America Online, # Inc. All Rights Reserved. # # Alternatively, the contents of this file may be used under the terms # of the GNU General Public License (the "GPL"), in which case the # provisions of GPL are applicable instead of those above. If you wish # to allow use of your version of this file only under the terms of the # GPL and not to allow others to use your version of this file under the # License, indicate your decision by deleting the provisions above and # replace them with the notice and other provisions required by the GPL. # If you do not delete the provisions above, a recipient may use your # version of this file under either the License or the GPL. # # Copyright (C) 2001,2002 Scott S. Goodwin # # $Header: /cvsroot/aolserver/nspostgres/Makefile,v 1.20 2007/03/10 04:14:46 jwl Exp $ # # nspostgres -- # # PostgreSQL Database Driver for AOLserver # # if POSTGRES does not receive a value, print message showing choices. # # the best choice for POSTGRES should be PG_CONFIG, but there has to be # a way to show the choices: so do NOT set POSTGRES here. ifdef INST NSHOME ?= $(INST) else ifeq ($(shell [ -f ../include/Makefile.module ] && echo ok),ok) NSHOME = .. NSBUILD = 1 else NSHOME=/usr/local/aolserver ifneq ($(shell [ -f $(NSHOME)/include/Makefile.module ] && echo ok),ok) NSHOME = ../aolserver endif endif endif # # Version number used in release tags. Valid VERs are "1.1c", "2.1", # "2.2beta7". VER "1.1c" will be translated into "v1_1c" by this Makefile. # VER_ = $(subst .,_,$(VER)) # # Manage to find PostgreSQL components in the system, or where you specify # ifndef PG_CONFIG PG_CONFIG = pg_config endif ifeq ($(POSTGRES),LSB) PGLIB = /usr/lib PGINC = /usr/include/pgsql else ifeq ($(POSTGRES),PG_CONFIG) PGLIB = $(shell $(PG_CONFIG) --libdir) PGINC = $(shell $(PG_CONFIG) --includedir) else ifneq ($(POSTGRES),SEPARATELY) PGLIB = $(POSTGRES)/lib PGINC = $(POSTGRES)/include endif # otherwise, it is assumed PGINC and PGLIB set on commandline endif endif # # Module name # MOD = nspostgres.so # # Objects to build # OBJS = nspostgres.o # # Header files for this module # HDRS = nspostgres.h # # Libraries required by this module # MODLIBS = -L$(PGLIB) -lpq ifndef AS3 MODLIBS += -lnsdb endif # # If PostgreSQL was compiled with OpenSSL support, you'll need to point the # OpenSSL installation. # ifdef OPENSSL MODLIBS += -L$(OPENSSL)/lib -lssl -lcrypto endif CFLAGS += -DBIND_EMULATION -I$(PGINC) # # ACS users should set ACS=1 # ifdef ACS ifeq ($(ACS),1) CFLAGS += -DFOR_ACS_USE endif endif include /usr/share/aolserver4/Makefile.module # # Help the poor developer # help: @echo "**" @echo "** DEVELOPER HELP FOR THIS MODULE" @echo "**" @echo "** make tag VER=X.Y" @echo "** Tags the module CVS code with the given tag." @echo "** You can tag the CVS copy at any time, but follow the rules." @echo "** VER must be of the form:" @echo "** X.Y" @echo "** X.YbetaN" @echo "** You should browse CVS at SF to find the latest tag." @echo "**" @echo "** make file-release VER=X.Y" @echo "** Checks out the code for the given tag from CVS." @echo "** The result will be a releaseable tar.gz file of" @echo "** the form: module-X.Y.tar.gz." @echo "**" # # Tag the code in CVS right now # tag: @if [ "$$VER" = "" ]; then echo 1>&2 "VER must be set to version number!"; exit 1; fi cvs rtag v$(VER_) nspostgres # # Create a distribution file release # file-release: @if [ "$$VER" = "" ]; then echo 1>&2 "VER must be set to version number!"; exit 1; fi rm -rf work mkdir work cd work && cvs -d :pserver:anonymous@cvs.aolserver.sourceforge.net:/cvsroot/aolserver co -r v$(VER_) nspostgres mv work/nspostgres work/nspostgres-$(VER) (cd work && tar cvf - nspostgres-$(VER)) | gzip -9 > nspostgres-$(VER).tar.gz rm -rf work nspostgres.c: check-env .PHONY: check-env check-env: @if [ "$(POSTGRES)" = "" ]; then \ echo "** "; \ echo "** POSTGRES variable not set."; \ echo "** nspostgres.so will not be built."; \ echo "** "; \ echo "** Usage: make POSTGRES=PG_CONFIG"; \ echo "** make POSTGRES=PG_CONFIG PG_CONFIG=/path/to/pg_config"; \ echo "** make POSTGRES=LSB"; \ echo "** make POSTGRES=/path/to/postgresql"; \ echo "** make POSTGRES=SEPARATELY \\"; \ echo " PGLIB=/path/to/libs \\"; \ echo " PGINC=/wheres/the/includes"; \ echo "** "; \ echo "** Usage: make install POSTGRES=PG_CONFIG"; \ echo "** make install POSTGRES=PG_CONFIG PG_CONFIG=/path/to/pg_config"; \ echo "** make install POSTGRES=LSB"; \ echo "** make install POSTGRES=/path/to/postgresql"; \ echo "** make install POSTGRES=SEPARATELY \\"; \ echo " PGLIB=/path/to/libs \\"; \ echo " PGINC=/wheres/the/includes"; \ echo "** "; \ echo "** if this dir is not at root of aolserver source tree,"; \ echo "** then you need to add INST=/path/to/aolserver--prefix"; \ echo "** and that dir must have aolserver installed in it"; \ echo "** "; \ echo "** OpenACS users should also set ACS=1"; \ echo "** "; \ echo "** AOLserver 3.x users should set AS3=1"; \ echo "** "; \ echo "** If PostgreSQL was compiled with SSL support, you also need:"; \ echo "** OPENSSL=/path/to/openssl"; \ echo "** "; \ exit 1; \ fi debian/rules0000775000000000000000000000301712320454417010253 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g -Wl,--no-as-needed MYPACKAGE=$(shell grep Package: debian/control | cut -d' ' -f2) ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir CFLAGS="$(CFLAGS)" $(MAKE) -f debian/Makefile.debian POSTGRES=PG_CONFIG PG_CONFIG=/usr/bin/pg_config ACS=1 touch build-stamp clean: dh_testdir dh_testroot $(MAKE) -f debian/Makefile.debian clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs build-indep: build build-arch: build # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_install dh_installdocs dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps -l/usr/lib/aolserver4/lib:$(CURDIR) cat /usr/share/aolserver4/debian.substvars >> debian/$(MYPACKAGE).substvars dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure build-indep build-arch debian/README.Debian0000664000000000000000000000071612320454373011240 0ustar aolserver4-nspostgres for Debian -------------------------------- In order to use this module you need to add a line to your nsd configuration files (eg the default one is /etc/aolserver4/aolserver4.tcl). In the section which starts with 'ns_section "ns/server/${server}"', add: ns_param nspostgres nspostgres.so After you have enabled the module, your Tcl scripts have access to the ns_nspostgres command. -- Francesco P. Lovergine debian/compat0000664000000000000000000000000212320454417010370 0ustar 9 debian/patches/0000775000000000000000000000000012320455363010622 5ustar debian/patches/series0000664000000000000000000000004312320454417012033 0ustar deprecated-tclinterp-result-access debian/patches/deprecated-tclinterp-result-access0000664000000000000000000000442112320454417017422 0ustar Description: Uses API functions to access result in Tcl_interp. Replaces deprecated direct access of field result in Tcl_interp structure with Tcl_GetStringResult / Tcl_SetResult fixing FTBFS. Author: Sebastian Carneiro Bug: Bug-Debian: https://bugs.debian.org/743074 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1303405 Forwarded: yes Last-Update: 2014-04-06 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: fix-for-ftbfs/nspostgres.c =================================================================== --- fix-for-ftbfs.orig/nspostgres.c 2014-04-06 00:32:53.467854019 -0300 +++ fix-for-ftbfs/nspostgres.c 2014-04-06 00:35:35.420657098 -0300 @@ -31,6 +31,7 @@ #include "nspostgres.h" #include +#include DllExport int Ns_ModuleVersion = 1; @@ -1760,6 +1761,8 @@ return TCL_ERROR; } + char * interp_result = Tcl_GetStringResult(interp); + if (!strcmp(argv[1], "db")) { Tcl_SetResult(interp, (char *) PQdb(nspgConn->conn), TCL_STATIC); } else if (!strcmp(argv[1], "host")) { @@ -1769,15 +1772,15 @@ } else if (!strcmp(argv[1], "port")) { Tcl_SetResult(interp, (char *) PQport(nspgConn->conn), TCL_STATIC); } else if (!strcmp(argv[1], "number")) { - sprintf(interp->result, "%u", nspgConn->cNum); + sprintf(interp_result, "%u", nspgConn->cNum); } else if (!strcmp(argv[1], "error")) { Tcl_SetResult(interp, (char *) PQerrorMessage(nspgConn->conn), TCL_STATIC); } else if (!strcmp(argv[1], "status")) { if (PQstatus(nspgConn->conn) == CONNECTION_OK) { - interp->result = "ok"; + Tcl_SetResult(interp, "ok", TCL_VOLATILE); } else { - interp->result = "bad"; + Tcl_SetResult(interp, "bad", TCL_VOLATILE); } } else if (!strcmp(argv[1], "ntuples")) { char string[16]; @@ -1982,7 +1985,8 @@ argv[0], " ", argv[1], " dbId table\"", NULL); goto bailout; } - sprintf (interp->result, "%d", tinfo->ncolumns); + char * interp_result = Tcl_GetStringResult(interp); + sprintf (interp_result, "%d", tinfo->ncolumns); } else if (!strcmp(argv[1], "exists")) debian/copyright0000664000000000000000000000326712320454373011136 0ustar This package was debianized by Francesco P. Lovergine on Mon, 26 Jan 2003 09:50:23 +0100. It was downloaded from http://aolserver.sf.net Copyright: /* * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is AOLserver Code and related documentation * distributed by AOL. * * The Initial Developer of the Original Code is America Online, * Inc. Portions created by AOL are Copyright (C) 1999 America Online, * Inc. All Rights Reserved. * * Alternatively, the contents of this file may be used under the terms * of the GNU General Public License (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish * to allow use of your version of this file only under the terms of the * GPL and not to allow others to use your version of this file under the * License, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the GPL. * If you do not delete the provisions above, a recipient may use your * version of this file under either the License or the GPL. * * $Header: /cvsroot/aolserver/nspostgres/nspostgres.h,v 1.4 2003/01/09 21:07:05 lowen Exp $ */ ( See /usr/share/common-licenses/GPL-2 for a copy of the GPL ) debian/source/0000775000000000000000000000000012320455363010473 5ustar debian/source/format0000664000000000000000000000001412320454417011700 0ustar 3.0 (quilt)