[pkg-horde] [COMMIT lionel nag--sid--1--patch-1] Import nag 1.1-3.2

Lionel Elie Mamane lmamane at costa.debian.org
Sat Dec 24 19:10:03 UTC 2005


A/ debian
A/ debian/.arch-ids
A  debian/.arch-ids/nag.sql.in.id
A  debian/changelog
A  debian/.arch-ids/=id
A  debian/postinst
A  debian/.arch-ids/docs.id
A  debian/.arch-ids/control.id
A  .arch-ids/nag.conf.in.id
A  debian/.arch-ids/copyright.id
A  debian/nag.sql.in
A  debian/.arch-ids/dirs.id
A  nag.conf.in
A  debian/rules
A  {arch}/nag/nag--sid/nag--sid--1/pkg-horde-hackers at lists.alioth.debian.org--2006/patch-log/patch-1
A  debian/.arch-ids/postinst.id
A  debian/.arch-ids/changelog.id
A  debian/.arch-ids/prerm.id
A  debian/control
A  debian/dirs
A  debian/nag.php
A  debian/prerm
A  debian/copyright
A  debian/.arch-ids/nag.php.id
A  debian/docs
A  debian/.arch-ids/rules.id
M  config/prefs.php.dist
M  lib/Driver.php
M  config/conf.php.dist
M  templates/common-footer.inc

--- /dev/null
+++ debian/.arch-ids/nag.sql.in.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4384.0


--- /dev/null
+++ debian/changelog
@@ -0,0 +1,48 @@
+nag (1.1-3.2) unstable; urgency=low
+
+  * NMU
+  * PHP4.4 compatibility: Fix "Only variable references should be returned
+    by reference" error messages (closes: #323267)
+  * Drop dependency on apache-common (closes: #305349)
+  * Drop "new" from the reference to Horde2 - it is old by now.
+
+ -- Lionel Elie Mamane <lmamane at debian.org>  Sun, 20 Nov 2005 10:39:48 +0100
+
+nag (1.1-3.1) unstable; urgency=HIGH
+
+  * NMU
+  * Applied patch from Frank Lichtenheld to fix XSS hole. (CAN-2005-1322)
+    Closes: #307180
+
+ -- Joey Hess <joeyh at debian.org>  Mon, 16 May 2005 13:37:46 -0400
+
+nag (1.1-3) unstable; urgency=low
+
+  * Inserted status flag in nag registry file (closes: #214453)
+  * Fixed path reference in prefs.php (Thanks to David Härdeman for the patch)
+    (closes: #214451)
+  * Fixed reference to database connection information file
+    (Thanks to David Härdeman for the patch)(closes: #214452)
+  * Changed Standards-Version to 3.6.1 (No changes needed)
+
+ -- Fabio Rafael da Rosa <f2r at users.sourceforge.net>  Tue, 17 Feb 2004 16:10:51 -0300
+
+nag (1.1-2) unstable; urgency=low
+
+  * New Maintainer (Closes #193587)
+  * Changed Standards-Version do 3.5.10 (No changes needed)
+
+ -- Fabio Rafael da Rosa <f2r at users.sourceforge.net>  Mon, 23 Jun 2003 16:45:30 -0300
+
+nag (1.1-1) unstable; urgency=low
+
+  * New upstream release (closes: #183637).
+  * Bumped Standards-Version to 3.5.9.0. No changes necessary.
+
+ -- Luis Bustamante <luferbu at fluidsignal.com>  Wed, 16 Apr 2003 13:36:05 -0500
+
+nag (1.0-1) unstable; urgency=low
+
+  * Initial release (closes: #174076).
+
+ -- Luis Bustamante <luferbu at fluidsignal.com>  Fri, 20 Dec 2002 08:39:03 -0500


--- /dev/null
+++ debian/.arch-ids/=id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4377.0


--- /dev/null
+++ debian/.arch-ids/docs.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4382.0


--- /dev/null
+++ debian/postinst
@@ -0,0 +1,147 @@
+#! /bin/sh
+# postinst script for nag
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+create_file_from_template() {
+	infile=$1
+	outfile=$2
+	sed -e "				\
+		s#@dbtype@#$dbtype#;		\
+		s#@dbname@#$dbname#;		\
+		s#@dbserver@#$dbserver#;	\
+		s#@dbport@#$dbport#;		\
+		s#@dbuser@#$dbuser#;		\
+		s#@dbpass@#$dbpass#;		\
+		" <$infile >$outfile
+}
+
+get_database_vars() {
+	db_get "horde2/databasemgr_type"
+	dbtype="$RET"
+	case "$dbtype" in
+	MySQL)
+		dbtype=mysql
+		;;
+	PostgreSQL)
+		dbtype=pgsql
+		;;
+	*)
+		dbtype=none
+		;;
+	esac
+	db_get "horde2/databasemgr_server"
+	dbserver="$RET"
+	db_get "horde2/databasemgr_port"
+	dbport="$RET"
+	db_get "horde2/database_name"
+	dbname="$RET"
+	db_get "horde2/database_user"
+	dbuser="$RET"
+	db_get "horde2/database_pass"
+	dbpass="$RET"
+}
+
+do_config_sql() {
+	get_database_vars
+	sqlfile="/usr/share/horde2/nag/scripts/nag.sql"
+	create_file_from_template $sqlfile.in $sqlfile
+	case "$dbtype" in
+	pgsql)
+		if [ -x $(which psql) ]; then
+			db_get "horde2/dbpgadmin"
+			dbadmin="$RET"
+			. /usr/share/wwwconfig-common/pgsql-exec.sh
+		else
+			echo "Not configuring PostgreSQL database becase we cannot locate"
+			echo "the psql client executable (postgresql-client package missing"
+		fi
+		;;
+	mysql)
+		if [ -e /usr/share/wwwconfig-common/mysql-localadmpass.get ] ; then
+			. /usr/share/wwwconfig-common/mysql-localadmpass.get
+		fi
+		if [ -z "$dbadmin" ] ; then
+			db_input "high" "horde2/dbmyadmin" || true
+			db_go
+			db_get "horde2/dbmyadmin"
+			dbadmin="$RET"
+		fi
+		if [ -z "$dbadmpass" ] ; then
+			db_input "critical" "horde2/dbadmpass" || true
+			db_go
+			db_get "horde2/dbadmpass"
+			dbadmpass="$RET"
+			db_reset "horde2/dbadmpass"
+		fi
+		if [ -x $(which mysql) ]; then
+			. /usr/share/wwwconfig-common/mysql-exec.sh
+		else
+			echo "Not configuring MySQL database because we cannot locate"
+			echo "the mysql client executable (mysql-client package missing)."
+		fi
+		;;
+	*)
+		echo "Can't configure Nag for database type $dbtype"
+		;;
+	esac
+	rm -f "$sqlfile"
+}
+
+case "$1" in
+    configure)
+	# Use debconf
+	. /usr/share/debconf/confmodule
+	db_version 2.0
+	do_config_sql
+	webgroup=www-data
+	(umask 0027
+	for i in /usr/share/horde2/nag/*.conf.in; do
+		TEMP=/etc/nag/${i##*/}
+		TARGET=${TEMP%.in}
+		create_file_from_template $i ${TARGET}
+		chgrp $webgroup ${TARGET}
+		if ! grep -q "@[a-zA-Z]*pass@" $i; then
+			chmod o+r ${TARGET}
+		fi
+	done)
+	
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+


--- /dev/null
+++ debian/.arch-ids/control.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4379.0


--- /dev/null
+++ .arch-ids/nag.conf.in.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4388.0


--- /dev/null
+++ debian/.arch-ids/copyright.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4380.0


--- /dev/null
+++ debian/nag.sql.in
@@ -0,0 +1,17 @@
+-- $Horde: nag/scripts/drivers/nag_tasks.sql,v 1.4.2.1 2002/04/23 06:25:22 chuck Exp $
+
+create table nag_tasks (
+    task_owner      varchar(255) not null,
+    task_id         int not null,
+    task_name       varchar(64) not null,
+    task_desc       text null,
+    task_modified   int not null,
+    task_due        int null,
+    task_priority   int not null default 0,
+    task_category   int not null default 0,
+    task_completed  smallint not null default 0,
+    task_private    smallint not null default 1,
+    primary key (task_owner, task_id)
+);
+
+grant select, insert, update, delete on nag_tasks to @dbuser@;


--- /dev/null
+++ debian/.arch-ids/dirs.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4381.0


--- /dev/null
+++ debian/rules
@@ -0,0 +1,81 @@
+#!/usr/bin/make -f
+# 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
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=3
+
+COPY_EXCLUDE=^(COPYING|README|config|debian|docs|po|scripts)$
+DESTROOT=debian/nag/usr/share/horde2/nag
+DOCROOT=debian/nag/usr/share/doc/nag
+CFGROOT=debian/nag/etc/nag
+build:
+	#nothing needs to be done
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f install-stamp
+	dh_clean
+
+install: install-stamp
+install-stamp:
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	#### copy stuff that belongs to $DESTROOT ###
+	for i in `ls -1 | egrep -v "$(COPY_EXCLUDE)"`; do	\
+		cp -a $$i $(DESTROOT);				\
+	done
+	#### copy stuff that belongs to documentation/examples ###
+	cp -a scripts $(DOCROOT)/examples
+	cp -a config/* $(DOCROOT)/examples
+	#### copy configuration files ###
+	for i in config/*.dist; do				\
+		dest=$${i%.dist};				\
+		dest=$${dest#config/};				\
+		cp -a $$i $(CFGROOT)/$${dest};			\
+	done
+	cp -a debian/nag.php debian/nag/etc/horde2/registry.d
+	cp -a debian/nag.sql.in $(DESTROOT)/scripts
+	#### nag expects configuration in config subdir, create a symlink
+	#### to comply with FHS
+	(cd $(DESTROOT); ln -s /etc/nag config)
+	touch install-stamp
+
+# Build architecture-dependent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installdebconf	
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installman
+#	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs 
+	dh_link
+#	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+#	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep
+.PHONY: build clean binary-indep binary install


--- /dev/null
+++ nag.conf.in
@@ -0,0 +1,14 @@
+<?php
+
+$conf['storage']['driver'] = 'sql';
+$conf['storage']['params'] = array();
+
+$conf['storage']['params']['phptype'] = '@dbtype@';
+$conf['storage']['params']['hostspec'] = '@dbserver@';
+$conf['storage']['params']['username'] = '@dbuser@';
+$conf['storage']['params']['password'] = '@dbpass@';
+$conf['storage']['params']['database'] = '@dbname@';
+$conf['storage']['params']['port'] = '@dbport@';
+$conf['storage']['params']['table'] = 'nag_tasks';
+
+?>


--- /dev/null
+++ {arch}/nag/nag--sid/nag--sid--1/pkg-horde-hackers at lists.alioth.debian.org--2006/patch-log/patch-1
@@ -0,0 +1,27 @@
+Revision: nag--sid--1--patch-1
+Archive: pkg-horde-hackers at lists.alioth.debian.org--2006
+Creator: Lionel Elie Mamane <lionel at mamane.lu>
+Date: Sat Dec 24 20:08:26 CET 2005
+Standard-date: 2005-12-24 19:08:26 GMT
+New-files: .arch-ids/nag.conf.in.id debian/.arch-ids/=id
+    debian/.arch-ids/changelog.id
+    debian/.arch-ids/control.id
+    debian/.arch-ids/copyright.id debian/.arch-ids/dirs.id
+    debian/.arch-ids/docs.id debian/.arch-ids/nag.php.id
+    debian/.arch-ids/nag.sql.in.id
+    debian/.arch-ids/postinst.id debian/.arch-ids/prerm.id
+    debian/.arch-ids/rules.id debian/changelog
+    debian/control debian/copyright debian/dirs debian/docs
+    debian/nag.php debian/nag.sql.in debian/postinst
+    debian/prerm debian/rules nag.conf.in
+New-directories: debian debian/.arch-ids
+Modified-files: config/conf.php.dist config/prefs.php.dist
+    lib/Driver.php templates/common-footer.inc
+New-patches: pkg-horde-hackers at lists.alioth.debian.org--2006/nag--sid--1--patch-1
+Summary: Import nag 1.1-3.2
+Keywords: 
+
+Imported nag-1.1
+into pkg-horde-hackers at lists.alioth.debian.org--2006/nag--sid--1
+
+


--- /dev/null
+++ debian/.arch-ids/postinst.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4385.0


--- /dev/null
+++ debian/.arch-ids/changelog.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4378.0


--- /dev/null
+++ debian/.arch-ids/prerm.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4386.0


--- /dev/null
+++ debian/control
@@ -0,0 +1,16 @@
+Source: nag
+Section: web
+Priority: optional
+Maintainer: Fabio Rafael da Rosa <f2r at users.sourceforge.net>
+Build-Depends-Indep: debhelper (>> 3.0.0)
+Standards-Version: 3.6.1
+
+Package: nag
+Architecture: all
+Depends: horde2 (>=2.1), php4-pgsql | php4-mysql, wwwconfig-common
+Description: Multiuser Task List Manager
+ Nag is a set of PHP scripts that implement a simple, multiuser task 
+ list manager. It supports items, things to do later this week, etc.
+ It is very similar in functionality to Palm ToDo application 
+ .
+ It makes extensive use of the Horde 2.0 web application framework. 


--- /dev/null
+++ debian/dirs
@@ -0,0 +1,4 @@
+/etc/horde2/registry.d
+/etc/nag
+/usr/share/horde2/nag/scripts
+/usr/share/doc/nag/examples


--- /dev/null
+++ debian/nag.php
@@ -0,0 +1,13 @@
+<?php
+
+$this->applications['nag'] = array(
+    'fileroot' => '/usr/share/horde2/nag',
+    'webroot' => $this->applications['horde']['webroot'] . '/nag',
+    'icon' => '/horde2/nag/graphics/nag.gif',
+    'name' => _("Tasks"),
+    'allow_guests' => false,
+    'status' => 'active',
+    'show' => true
+);
+
+?>


--- /dev/null
+++ debian/prerm
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for nag
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	rm -f /etc/nag/nag.conf
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+


--- /dev/null
+++ debian/copyright
@@ -0,0 +1,18 @@
+This package was debianized by Luis Bustamante <luferbu at fluidsignal.com> on 
+Fri, 20 Dec 2002 08:39:03 -0500
+Now, this package is maintained by Fabio Rafael da Rosa
+<f2r at users.sourceforge.net> since Mon, 23 Jun 2003 16:45:30 -0300
+
+It was downloaded from
+ftp://ftp.horde.org/pub/nag/tarballs/nag-1.1.tar.gz
+
+Upstream Authors: Jon Parise <jon at csh.rit.edu>
+                  Chuck Hagenbuch <chuck at horde.org>
+
+Copyright:
+
+  You are free to distribute this software under the terms of
+  the GNU General Public License, Version 2.
+
+  On Debian systems, the complete text of the GNU General Public
+  License can be found in /usr/share/common-licenses/GPL file.


--- /dev/null
+++ debian/.arch-ids/nag.php.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4383.0


--- /dev/null
+++ debian/docs
@@ -0,0 +1,1 @@
+README


--- /dev/null
+++ debian/.arch-ids/rules.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Sat Dec 24 20:08:25 2005 4387.0


--- orig/config/prefs.php.dist
+++ mod/config/prefs.php.dist
@@ -2,7 +2,7 @@
 // $Horde: nag/config/prefs.php.dist,v 1.12.2.3 2002/10/15 15:13:43 jan Exp $
 
 // Make sure that constants are defined.
-require_once dirname(__FILE__) . '/../lib/constants.php';
+require_once '/usr/share/horde2/nag/lib/constants.php';
 
 $prefGroups['language'] = array(
     'column' => _("Your Information"),


--- orig/lib/Driver.php
+++ mod/lib/Driver.php
@@ -61,7 +61,8 @@
         include_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
         $class = 'Nag_Driver_' . $driver;
         if (class_exists($class)) {
-            return new $class($user, $params);
+            $result = new $class($user, $params);
+            return $result;
         } else {
             return false;
         }


--- orig/config/conf.php.dist
+++ mod/config/conf.php.dist
@@ -63,3 +63,8 @@
 // example providing a link to Turba (an addressbook program) would
 // be: $conf['menu']['apps'] = array('turba');
 $conf['menu']['apps'] = array();
+
+/**
+ ** DB settings
+ **/
+include "nag.conf";


--- orig/templates/common-footer.inc
+++ mod/templates/common-footer.inc
@@ -1,7 +1,7 @@
 <?php if (!empty($title)): ?>
 <script language="JavaScript" type="text/javascript">
 <!--
-if (parent.frames.horde_main) parent.document.title = '<?php echo addslashes($registry->getParam('name') . ' :: ' . $title) ?>';
+if (parent.frames.horde_main) parent.document.title = '<?php echo str_replace(array('<', '>'), array('\<', '\>'), addslashes($registry->getParam('name') . ' :: ' . $title)) ?>';
 //-->
 </script>
 <?php endif; ?>




More information about the pkg-horde-hackers mailing list