From caccba03850bd208842e146ccd16ae27d98daa8c Mon Sep 17 00:00:00 2001 From: Norman Messtorff Date: Sat, 9 May 2009 22:11:32 +0000 Subject: [PATCH] Migrated my .deb changes into SVN. Feedback welcome... git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@653 a1433add-5e2c-0410-b055-b7f2511e0802 --- debian/TODO | 4 + debian/{apache-conf => apache.conf} | 0 debian/changelog | 121 +----------------- debian/control | 29 ++--- debian/copyright | 17 ++- debian/lighttpd.conf | 4 + .../patches/01-20090509_database-credentials | 21 +++ debian/patches/series | 1 + debian/po/POTFILES.in | 1 + debian/po/templates.pot | 31 +++++ debian/postfixadmin.config | 15 +++ debian/{docs => postfixadmin.docs} | 7 +- debian/postfixadmin.examples | 2 + debian/postfixadmin.install | 12 ++ debian/postfixadmin.links | 1 + debian/postfixadmin.postinst | 25 ++++ debian/postfixadmin.postrm | 26 ++++ debian/postfixadmin.prerm | 20 +++ debian/rules | 32 ++--- debian/templates | 6 + debian/watch | 2 + 21 files changed, 213 insertions(+), 164 deletions(-) create mode 100644 debian/TODO rename debian/{apache-conf => apache.conf} (100%) create mode 100644 debian/lighttpd.conf create mode 100644 debian/patches/01-20090509_database-credentials create mode 100644 debian/patches/series create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/templates.pot create mode 100644 debian/postfixadmin.config rename debian/{docs => postfixadmin.docs} (65%) create mode 100644 debian/postfixadmin.examples create mode 100644 debian/postfixadmin.install create mode 100644 debian/postfixadmin.links create mode 100644 debian/postfixadmin.postinst create mode 100644 debian/postfixadmin.postrm create mode 100644 debian/postfixadmin.prerm create mode 100644 debian/templates create mode 100644 debian/watch diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 00000000..69e7bd26 --- /dev/null +++ b/debian/TODO @@ -0,0 +1,4 @@ + * Do all necessary things automatically (maybe with dbconfig?) (database, setp password...) + * DebTags + * dbconfig: DOCUMENTS/SECURITY.txt + * include postfix configuration templates diff --git a/debian/apache-conf b/debian/apache.conf similarity index 100% rename from debian/apache-conf rename to debian/apache.conf diff --git a/debian/changelog b/debian/changelog index 818667fd..b95ce58d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,121 +1,6 @@ -postfixadmin (2.3rc4) unstable; urgency=low +postfixadmin (2.3rc5) unstable; urgency=low - * Security fix for setup.php (issue occurs for those upgrading only; where - it's possible for a new admin user to get created by nasty.person) - * SVN revision 632 + * Initial release (Closes: #247225) - -- David Goodwin Sat, 18 Apr 2009 21:00:00 +0000 - -postfixadmin (2.3rc3) unstable; urgency=low - - * Attempt at fixing Debian build issues (thanks to mez@sourceguru.net) - * SVN revision 611 - - -- David Goodwin Mon, 6 Apr 2009 20:56:00 +0000 - -postfixadmin (2.3rc2) unstable; urgency=low - - * Subversion revision 593 - * Add model directory to .deb etc. - * Updated ChangeLog - - -- David Goodwin Thu, 19 Mar 2009 19:50:00 +0000 - -postfixadmin (2.3rc1) unstable; urgency=low - - * Subversion revision 587 - * New XmlRpc API for integration with 3rd party web mail clients. - * Various bug fixes - * Translation patches - * Addition of dovecotpw support - - -- David Goodwin Wed, 18 Mar 2009 19:52:00 +0000 - -postfixadmin (2.3beta) unstable; urgency=low - - * Subversion revision 533 - * Fixes for MySQL upgrade issues - * Improved vacation.pl (renotification options, use SMTP headers, better - logging, optional external config file) - * Improved fetchmail.pl - * Domain aliases - new implementation should reduce backscatter etc. - * translation updates - * Added domain-postcreation script support - * Enhanced mailbox table to make it easier for people to customise where mailboxes live - * and much more - - -- David Goodwin Sat, 17 Jan 2009 20:06:00 +0000 - -postfixadmin (2.2.1.1) unstable; urgency=low - - * Subversion revision 412 (from branches/postfixadmin-2.2.1) - * THIS IS EFFECTIVELY THE SAME AS 2.2.1 (which should probably be ignored) - - -- David Goodwin Wed, 23 Jul 2008 12:37:00 +0000 - -postfixadmin (2.2.1) unstable; urgency=low - - * Various bug fixes (MySQL charset issue(s)) - * Updated translations (pl, bg, ru, nb, tw etc) - * added quota parameter to mailbox_postcreation hook - * new hook to update the quota after editing a mailbox - ($CONF['mailbox_postedit_script']) - * fixed subfolder creation order and timing - * allow smtp server to be specified in vacation.pl - * fixed MySQL charset issues - * several small bugfixes - * Norwegian (bokmal) translation added - * Updated translations (pl, bg, ru, nb, tw etc) - * Subversion revision 408 - - -- David Goodwin Mon, 21 Jul 2008 22:44:00 +0000 -postfixadmin (2.2.0) unstable; urgency=low - - * 2.2.0 Released. - * Fix fetchmail script to work with PostgreSQL - * Fix fetchmail table creation in MySQL and PostgreSQL - * Documentation fixups - * Subversion revision 356 - - -- David Goodwin Thu, 29 Apr 2008 15:47:00 +0000 - -postfixadmin (2.2.0-rc5) unstable; urgency=low - - * Fix MySQL installation issues (schema not being created!) - * Fix MySQL vacation_notification timestamp issue - * SVN revision: 340 - - -- David Goodwin Wed, 23 Apr 2008 16:27:00 +0000 - -postfixadmin (2.2.0-1rc4) unstable; urgency=low - - * Removal of standalone database schema files (see upgrade.php) - * Various bug fixes - * Better/Move documentation on installation - * setup.php/upgrade.php works for PostgreSQL and MySQL - * MySQL Unicode problems fixed - * I think this is effectively v2.2.0 - * SVN revision: 336 - - -- David Goodwin Sun, 20 Apr 2008 20:19:00 +0000 - -postfixadmin (2.2.0-1rc3) unstable; urgency=low - - * Various bug fixes - - -- David Goodwin Thu, 28 Feb 2008 12:00:00 +0000 - -postfixadmin (2.2.0-1rc2) unstable; urgency=low - - * Improved CSS - * Improved upgrade procedure (should work for PGSQL) (see upgrade.php) - * Various bug fixes - - -- David Goodwin Sat, 29 Dec 2007 21:14:00 +0000 - -postfixadmin (2.2.0-1rc1) unstable; urgency=low - - * Initial Release (via dpkg) - - -- David Goodwin Sun, 04 Nov 2007 15:36:00 +0000 + -- Norman Messtorff Sat, 09 May 2009 22:36:26 +0200 diff --git a/debian/control b/debian/control index 6c68b99a..3a7ee261 100644 --- a/debian/control +++ b/debian/control @@ -1,8 +1,8 @@ Source: postfixadmin Section: admin Priority: optional -Maintainer: David Goodwin -Build-Depends: debhelper (>= 7) +Maintainer: Norman Messtorff +Build-Depends: debhelper (>= 7), po-debconf, quilt (>= 0.46) Standards-Version: 3.8.1 Homepage: http://postfixadmin.sourceforge.net XS-Vcs-Svn: https://postfixadmin.svn.sourceforge.net/svnroot/postfixadmin/trunk @@ -10,19 +10,16 @@ XS-Vcs-Browse: http://postfixadmin.svn.sourceforge.net/viewvc/postfixadmin/trunk Package: postfixadmin Architecture: all -Depends: apache2 | httpd, libapache2-mod-php5 | libapache-mod-php5 | php5-cgi | php5, ${misc:Depends} -Recommends: -Suggests: postfix, postgresql-server, mysql-server, squirrelmail, squirrelmail-postfixadmin, courier-imap, dovecot-imapd +Depends: debconf (>= 0.5), dbconfig-common, wwwconfig-common (>= 0.2.0), apache2 | lighttpd, libapache2-mod-php5 | php5-cgi | php5, php5-imap, php5-mysql | php5-pgsql, mysql-client | postgresql-client, ${misc:Depends} +Recommends: postfix-mysql | postfix-pgsql, mysql-server | postgresql-server +Suggests: squirrelmail-postfixadmin, dovecot-common | courier-authlib-mysql | courier-authlib-postgresql Description: Virtual mail hosting interface for Postfix Postfixadmin is a web interface to managing virtual users and domains - for a Postfix mailserver. The web interface is written in PHP. - Postfixadmin allows administrators to delegate handling a domain to domain - administrators. - Postfixadmin allows users to login and change their own settings (e.g. forward, - vacation, password etc). - Postfixadmin also includes support for virtual vacation support - - this requires Perl and various CPAN modules to be installed. - See included vacation.pl for further details. - . - Homepage: http://postfixadmin.sf.net/ - + for a Postfix mail transport agent. The web interface is written in PHP. + It supports Virtual mailboxes, aliases, forwarders and vacation. + . + Allows administrators to delegate the handling of domains to the + domain administrators. Allows users to login and change their own + settings (e.g. forwarders, vacation, passwords etc). + . + Provides easy integration into dovecot, courier or cyrus. diff --git a/debian/copyright b/debian/copyright index a506976e..3bdda48d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,28 +3,33 @@ Sun, 04 Nov 2007 15:21:00 +0000. It was downloaded from subversion, via http://postfixadmin.sf.net -Upstream Authors: The PostfixAdmin Development Team +Upstream Authors: + + The PostfixAdmin Development Team Copyright: Copyright (C) 2007 The Postfixadmin Project Team - This program is free software; you can redistribute it and/or modify +License: + + This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in the `/usr/share/common-licenses' directory. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2' The Debian packaging of Postfixadmin is licensed under the same terms as Postfixadmin itself. diff --git a/debian/lighttpd.conf b/debian/lighttpd.conf new file mode 100644 index 00000000..75f75901 --- /dev/null +++ b/debian/lighttpd.conf @@ -0,0 +1,4 @@ +# Alias for Postfixadmin +alias.url += ( + "/postfixadmin" => "/usr/share/postfixadmin", +) diff --git a/debian/patches/01-20090509_database-credentials b/debian/patches/01-20090509_database-credentials new file mode 100644 index 00000000..41c6969d --- /dev/null +++ b/debian/patches/01-20090509_database-credentials @@ -0,0 +1,21 @@ +Index: config.inc.php +=================================================================== +--- config.inc.php.orig 2009-05-09 21:24:04.000000000 +0200 ++++ config.inc.php 2009-05-09 21:26:40.000000000 +0200 +@@ -52,11 +52,11 @@ $CONF['default_language'] = 'en'; + // mysql = MySQL 3.23 and 4.0, 4.1 or 5 + // mysqli = MySQL 4.1+ + // pgsql = PostgreSQL +-$CONF['database_type'] = 'mysql'; +-$CONF['database_host'] = 'localhost'; +-$CONF['database_user'] = 'postfix'; +-$CONF['database_password'] = 'postfixadmin'; +-$CONF['database_name'] = 'postfix'; ++$CONF['database_type'] = '_DBC_DBTYPE_'; ++$CONF['database_host'] = '_DBC_DBSERVER_'; ++$CONF['database_user'] = '_DBC_DBUSER_'; ++$CONF['database_password'] = '_DBC_DBPASS_'; ++$CONF['database_name'] = '_DBC_DBNAME_'; + $CONF['database_prefix'] = ''; + + // Here, if you need, you can customize table names. diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..ff4877ec --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +01-20090509_database-credentials -p0 diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 00000000..cef83a34 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 00000000..761557aa --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,31 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: postfixadmin@packages.debian.org\n" +"POT-Creation-Date: 2008-10-27 22:14+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: multiselect +#. Description +#: ../templates:1001 +msgid "Web server to reconfigure automatically:" +msgstr "" + +#. Type: multiselect +#. Description +#: ../templates:1001 +msgid "" +"Please choose the web server that should be automatically configured to run " +"postfixadmin." +msgstr "" diff --git a/debian/postfixadmin.config b/debian/postfixadmin.config new file mode 100644 index 00000000..9de7af4f --- /dev/null +++ b/debian/postfixadmin.config @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 +db_input high postfixadmin/reconfigure-webserver || true +db_go || true + +if [ -f /usr/share/dbconfig-common/dpkg/config ]; then + # we support mysql and pgsql + dbc_dbtypes="mysql, pgsql" + + . /usr/share/dbconfig-common/dpkg/config + dbc_go postfixadmin $@ +fi diff --git a/debian/docs b/debian/postfixadmin.docs similarity index 65% rename from debian/docs rename to debian/postfixadmin.docs index 22f0ae37..b9ec0126 100755 --- a/debian/docs +++ b/debian/postfixadmin.docs @@ -1,6 +1,5 @@ -VIRTUAL_VACATION DOCUMENTS -ADDITIONS -LICENSE.TXT -INSTALL.TXT +CHANGELOG.TXT GPL-LICENSE.TXT +INSTALL.TXT +LICENSE.TXT diff --git a/debian/postfixadmin.examples b/debian/postfixadmin.examples new file mode 100644 index 00000000..013f56bc --- /dev/null +++ b/debian/postfixadmin.examples @@ -0,0 +1,2 @@ +ADDITIONS +VIRTUAL_VACATION diff --git a/debian/postfixadmin.install b/debian/postfixadmin.install new file mode 100644 index 00000000..0c38ba6e --- /dev/null +++ b/debian/postfixadmin.install @@ -0,0 +1,12 @@ +*.php usr/share/postfixadmin +admin usr/share/postfixadmin +css usr/share/postfixadmin +images usr/share/postfixadmin +languages usr/share/postfixadmin +model usr/share/postfixadmin +motd.txt usr/share/postfixadmin +motd-users.txt usr/share/postfixadmin +templates usr/share/postfixadmin +users usr/share/postfixadmin +debian/apache.conf etc/postfixadmin +debian/lighttpd.conf etc/postfixadmin diff --git a/debian/postfixadmin.links b/debian/postfixadmin.links new file mode 100644 index 00000000..3a18ba42 --- /dev/null +++ b/debian/postfixadmin.links @@ -0,0 +1 @@ +etc/postfixadmin/config.inc.php usr/share/postfixadmin/config.inc.php diff --git a/debian/postfixadmin.postinst b/debian/postfixadmin.postinst new file mode 100644 index 00000000..f3b822ea --- /dev/null +++ b/debian/postfixadmin.postinst @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +if [ "$1" = "configure" ]; then + . /usr/share/debconf/confmodule + db_version 2.0 + dbc_generate_include='template:/etc/postfixadmin/config.inc.php' + dbc_generate_include_owner='root:www-data' + dbc_generate_include_perms='640' + dbc_generate_include_args="-U -o template_infile=/usr/share/postfixadmin/config.inc.php" + . /usr/share/dbconfig-common/dpkg/postinst + dbc_go postfixadmin $@ + db_get postfixadmin/reconfigure-webserver + servers="$RET" + restart="$servers" + linkdestination_apache="../../postfixadmin/apache.conf" + linkdestination_lighttpd="../../postfixadmin/lighttpd.conf" + linkname="postfixadmin" + . /usr/share/wwwconfig-common/confd-link.sh + . /usr/share/wwwconfig-common/restart.sh +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/postfixadmin.postrm b/debian/postfixadmin.postrm new file mode 100644 index 00000000..69059264 --- /dev/null +++ b/debian/postfixadmin.postrm @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_version 2.0 + + # restart the webserver only if we know which one was configured. + if db_get postfixadmin/reconfigure-webserver; then + servers="$RET" + restart=$servers + linkname="postfixadmin" + . /usr/share/wwwconfig-common/restart.sh + fi + + if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then + . /usr/share/dbconfig-common/dpkg/postrm + dbc_go postfixadmin $@ + fi + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/postfixadmin.prerm b/debian/postfixadmin.prerm new file mode 100644 index 00000000..08cc6bdf --- /dev/null +++ b/debian/postfixadmin.prerm @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +if [ -f /usr/share/dbconfig-common/dpkg/prerm ]; then + . /usr/share/dbconfig-common/dpkg/prerm + dbc_go postfixadmin $@ +fi + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_version 2.0 + db_get postfixadmin/reconfigure-webserver + servers="$RET" + linkname="postfixadmin" + . /usr/share/wwwconfig-common/confd-link.sh +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index 636b97df..6ca7286f 100755 --- a/debian/rules +++ b/debian/rules @@ -4,16 +4,21 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +include /usr/share/quilt/quilt.make + build: build-stamp -build-stamp: + +build-stamp: $(QUILT_STAMPFN) dh_testdir + #dh_testroot touch build-stamp -clean: + +clean: unpatch dh_testdir dh_testroot - rm -f build-stamp dh_clean + debconf-updatepo install: build dh_testdir @@ -21,33 +26,20 @@ install: build dh_prep dh_installdirs dh_install - cp motd* debian/postfixadmin/usr/share/postfixadmin - cp *.php debian/postfixadmin/usr/share/postfixadmin mv debian/postfixadmin/usr/share/postfixadmin/config.inc.php debian/postfixadmin/etc/postfixadmin/config.inc.php - ln -s /etc/postfixadmin/config.inc.php debian/postfixadmin/usr/share/postfixadmin/config.inc.php - perl -p -i -e "s#$$CONF\['postfix_admin_path'\] = dirname\(__FILE__\)#$$CONF\['postfix_admin_path'\] = '/usr/share/postfixadmin'#" debian/postfixadmin/etc/postfixadmin/config.inc.php - cp -a model debian/postfixadmin/usr/share/postfixadmin - cp -a admin debian/postfixadmin/usr/share/postfixadmin - cp -a images debian/postfixadmin/usr/share/postfixadmin - cp -a languages debian/postfixadmin/usr/share/postfixadmin - cp -a templates debian/postfixadmin/usr/share/postfixadmin - cp -a users debian/postfixadmin/usr/share/postfixadmin - cp css/default.css debian/postfixadmin/usr/share/postfixadmin/css - cp debian/apache-conf debian/postfixadmin/etc/apache2/conf.d/postfixadmin find debian/postfixadmin -name .svn | xargs -r rm -r # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot - dh_installdebconf + dh_installchangelogs + dh_installdebconf dh_installdocs -X.svn - dh_installexamples - dh_installman - dh_installcron + dh_installexamples -X.svn dh_link dh_compress - dh_fixperms -X/var + dh_fixperms dh_installdeb dh_gencontrol dh_md5sums diff --git a/debian/templates b/debian/templates new file mode 100644 index 00000000..9405de95 --- /dev/null +++ b/debian/templates @@ -0,0 +1,6 @@ +Template: postfixadmin/reconfigure-webserver +Type: multiselect +Choices: apache2, apache, apache-ssl, apache-perl, lighttpd +_Description: Web server to reconfigure automatically: + Please choose the web server that should be automatically configured + to run postfixadmin. diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..cd951ef1 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/postfixadmin/postfixadmin-(.*)\.tar\.gz