[pkg-horde] [COMMIT lionel mnemo--sid--1--patch-1] Import mnemo
1.1-2.2
Lionel Elie Mamane
lmamane at costa.debian.org
Wed Dec 21 20:50:03 UTC 2005
A/ debian/.arch-ids
A/ debian
A debian/.arch-ids/mnemo.sql.in.id
A debian/control
A debian/dirs
A .arch-ids/mnemo.conf.in.id
A debian/postinst
A debian/mnemo.php
A mnemo.conf.in
A {arch}/mnemo/mnemo--sid/mnemo--sid--1/pkg-horde-hackers at lists.alioth.debian.org--2006/patch-log/patch-1
A debian/docs
A debian/.arch-ids/copyright.id
A debian/prerm
A debian/copyright
A debian/.arch-ids/docs.id
A debian/changelog
A debian/rules
A debian/.arch-ids/control.id
A debian/.arch-ids/dirs.id
A debian/.arch-ids/=id
A debian/.arch-ids/rules.id
A debian/.arch-ids/prerm.id
A debian/.arch-ids/postinst.id
A debian/.arch-ids/changelog.id
A debian/mnemo.sql.in
A debian/.arch-ids/mnemo.php.id
M config/prefs.php.dist
M config/conf.php.dist
M lib/Driver.php
M templates/common-footer.inc
--- /dev/null
+++ debian/.arch-ids/mnemo.sql.in.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27169.0
--- /dev/null
+++ debian/control
@@ -0,0 +1,15 @@
+Source: mnemo
+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: mnemo
+Architecture: all
+Depends: horde2 (>=2.1), php4-pgsql | php4-mysql, wwwconfig-common
+Description: Notes and Memo Application
+ Mnemo is the Horde notes and memos application. It lets users keep
+ free-text notes and other bits of information which doesn't fit as a
+ contact, a todo item, an event, etc. It is very similar in
+ functionality to the Palm Memo application.
--- /dev/null
+++ debian/dirs
@@ -0,0 +1,4 @@
+/etc/horde2/registry.d
+/etc/mnemo
+/usr/share/horde2/mnemo/scripts
+/usr/share/doc/mnemo/examples
--- /dev/null
+++ .arch-ids/mnemo.conf.in.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:25 2005 27173.0
--- /dev/null
+++ debian/mnemo.php
@@ -0,0 +1,13 @@
+<?php
+
+$this->applications['mnemo'] = array(
+ 'fileroot' => '/usr/share/horde2/mnemo',
+ 'webroot' => $this->applications['horde']['webroot'] . '/mnemo',
+ 'icon' => '/horde2/mnemo/graphics/mnemo.gif',
+ 'name' => _("Memos"),
+ 'allow_guests' => false,
+ 'status' => 'active',
+ 'show' => true
+);
+
+?>
--- /dev/null
+++ debian/postinst
@@ -0,0 +1,147 @@
+#! /bin/sh
+# postinst script for mnemo
+#
+# 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/mnemo/scripts/mnemo.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 Mnemo 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/mnemo/*.conf.in; do
+ TEMP=/etc/mnemo/${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
+++ mnemo.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'] = 'mnemo_memos';
+
+?>
--- /dev/null
+++ {arch}/mnemo/mnemo--sid/mnemo--sid--1/pkg-horde-hackers at lists.alioth.debian.org--2006/patch-log/patch-1
@@ -0,0 +1,27 @@
+Revision: mnemo--sid--1--patch-1
+Archive: pkg-horde-hackers at lists.alioth.debian.org--2006
+Creator: Lionel Elie Mamane <lionel at mamane.lu>
+Date: Wed Dec 21 21:49:25 CET 2005
+Standard-date: 2005-12-21 20:49:25 GMT
+New-files: .arch-ids/mnemo.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/mnemo.php.id
+ debian/.arch-ids/mnemo.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/mnemo.php debian/mnemo.sql.in debian/postinst
+ debian/prerm debian/rules mnemo.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/mnemo--sid--1--patch-1
+Summary: Import mnemo 1.1-2.2
+Keywords:
+
+Imported mnemo-1.1.debian
+into pkg-horde-hackers at lists.alioth.debian.org--2006/mnemo--sid--1
+
+
--- /dev/null
+++ debian/docs
@@ -0,0 +1,1 @@
+README
--- /dev/null
+++ debian/.arch-ids/copyright.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27165.0
--- /dev/null
+++ debian/prerm
@@ -0,0 +1,39 @@
+#!/bin/sh
+# prerm script for mnemo
+#
+# 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/mnemo/mnemo.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/.arch-ids/docs.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27167.0
--- /dev/null
+++ debian/copyright
@@ -0,0 +1,15 @@
+This package was debianized by Luis Bustamante <luferbu at fluidsignal.com> on
+Fri, 20 Dec 2002 08:39:03 -0500
+
+It was downloaded from
+ftp://ftp.horde.org/pub/mnemo/tarballs/mnemo-1.1.tar.gz
+
+Upstream Author: 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/changelog
@@ -0,0 +1,41 @@
+mnemo (1.1-2.2) unstable; urgency=low
+
+ * NMU
+ * PHP4.4 compatibility: Fix "Only variable references should be returned
+ by reference" error messages (closes: #323268)
+ * Drop dependency on apache-common (closes: #281116, #338982)
+
+ -- Lionel Elie Mamane <lmamane at debian.org> Sun, 20 Nov 2005 11:50:29 +0100
+
+mnemo (1.1-2.1) unstable; urgency=HIGH
+
+ * NMU
+ * Applied patch from Frank Lichtenheld to fix XSS hole. (CAN-2005-1320)
+ Closes: #307180
+
+ -- Joey Hess <joeyh at debian.org> Mon, 16 May 2005 13:17:40 -0400
+
+mnemo (1.1-2) unstable; urgency=low
+
+ * Fixed status flag in mnemo registry file (closes: #214455)
+ * Fixed wrong path information in prefs.php (closes: #191219)
+ * Fixed missed database connection information in conf.php
+ (thanks David Härdeman for the patch)(closes: #214458)
+ * New Maintainer (closes: #193586)
+ * Changed Standards-Version to 3.6.1 (no changes needed)
+
+ -- Fabio Rafael da Rosa <f2r at users.sourceforge.net> Tue, 17 Feb 2004 17:28:01 -0300
+
+mnemo (1.1-1) unstable; urgency=low
+
+ * New upstream version.
+ * Bumped Standards-Version to 3.5.9.0.
+ * Fixed hardcoded user database in SQL template (closes: #184940).
+
+ -- Luis Bustamante <luferbu at fluidsignal.com> Wed, 16 Apr 2003 13:43:38 -0500
+
+mnemo (1.0-1) unstable; urgency=low
+
+ * Initial release (closes: #174077)
+
+ -- Luis Bustamante <luferbu at fluidsignal.com> Fri, 20 Dec 2002 08:39:03 -0500
--- /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|LICENSE|config|debian|docs|po|scripts)$
+DESTROOT=debian/mnemo/usr/share/horde2/mnemo
+DOCROOT=debian/mnemo/usr/share/doc/mnemo
+CFGROOT=debian/mnemo/etc/mnemo
+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/mnemo.php debian/mnemo/etc/horde2/registry.d
+ cp -a debian/*.sql.in $(DESTROOT)/scripts
+ #### mnemo expects configuration in config subdir, create a symlink
+ #### to comply with FHS
+ (cd $(DESTROOT); ln -s /etc/mnemo 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
+++ debian/.arch-ids/control.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27164.0
--- /dev/null
+++ debian/.arch-ids/dirs.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27166.0
--- /dev/null
+++ debian/.arch-ids/=id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27162.0
--- /dev/null
+++ debian/.arch-ids/rules.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:25 2005 27172.0
--- /dev/null
+++ debian/.arch-ids/prerm.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27171.0
--- /dev/null
+++ debian/.arch-ids/postinst.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27170.0
--- /dev/null
+++ debian/.arch-ids/changelog.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27163.0
--- /dev/null
+++ debian/mnemo.sql.in
@@ -0,0 +1,14 @@
+-- $Horde: mnemo/scripts/drivers/mnemo_memos.sql,v 1.1 2002/04/22 18:39:30 chuck Exp $
+
+create table mnemo_memos (
+ memo_owner varchar(255) NOT NULL,
+ memo_id int NOT NULL,
+ memo_desc varchar(64) NOT NULL,
+ memo_body text,
+ memo_category int not null default 0,
+ memo_private smallint NOT NULL DEFAULT 1,
+ memo_modified int NOT NULL,
+ primary key (memo_owner, memo_id)
+);
+
+GRANT SELECT, INSERT, UPDATE, DELETE ON mnemo_memos TO @dbuser@;
--- /dev/null
+++ debian/.arch-ids/mnemo.php.id
@@ -0,0 +1,1 @@
+Lionel Elie Mamane <lionel at mamane.lu> Wed Dec 21 21:49:24 2005 27168.0
--- orig/config/prefs.php.dist
+++ mod/config/prefs.php.dist
@@ -2,7 +2,7 @@
// $Horde: mnemo/config/prefs.php.dist,v 1.1.2.1 2002/12/28 22:54:07 jan Exp $
// Make sure that constants are defined.
-require_once dirname(__FILE__) . '/../lib/constants.php';
+require_once '/usr/share/horde2/mnemo/lib/constants.php';
$prefGroups['language'] = array(
'column' => _("Your Information"),
--- 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 "mnemo.conf";
--- orig/lib/Driver.php
+++ mod/lib/Driver.php
@@ -61,7 +61,8 @@
include_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
$class = 'Mnemo_Driver_' . $driver;
if (class_exists($class)) {
- return new $class($user, $params);
+ $result = new $class($user, $params);
+ return $result;
} else {
return false;
}
--- 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