From 426e783363e20f878a4df0131ac76e294cf0948c Mon Sep 17 00:00:00 2001 From: mwolson_admin Date: Fri, 25 Jan 2008 17:30:25 -0500 Subject: [PATCH] Imported Debian patch 0.59.3-1 --- debian/authenumerate.pod | 24 +++ debian/changelog | 145 +++++++++++++++ debian/control | 69 ++++++++ debian/copyright | 25 +++ debian/courier-authdaemon.dirs | 1 + debian/courier-authdaemon.files | 3 + debian/courier-authdaemon.init | 40 +++++ debian/courier-authdaemon.postrm | 25 +++ debian/courier-authlib-dev.files | 6 + debian/courier-authlib-ldap.docs | 2 + debian/courier-authlib-ldap.files | 2 + debian/courier-authlib-mysql.docs | 1 + debian/courier-authlib-mysql.files | 2 + debian/courier-authlib-mysql.postinst | 30 ++++ debian/courier-authlib-mysql.prerm | 25 +++ debian/courier-authlib-pipe.files | 2 + debian/courier-authlib-postgresql.docs | 2 + debian/courier-authlib-postgresql.files | 2 + debian/courier-authlib-postgresql.postinst | 30 ++++ debian/courier-authlib-postgresql.prerm | 25 +++ debian/courier-authlib-userdb.files | 18 ++ debian/courier-authlib.docs | 1 + debian/courier-authlib.files | 14 ++ debian/courier-authlib.postrm | 25 +++ debian/courier_perms | 105 +++++++++++ debian/permissions | 9 + debian/rules | 195 +++++++++++++++++++++ 27 files changed, 828 insertions(+) create mode 100644 debian/authenumerate.pod create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/courier-authdaemon.dirs create mode 100644 debian/courier-authdaemon.files create mode 100644 debian/courier-authdaemon.init create mode 100644 debian/courier-authdaemon.postrm create mode 100644 debian/courier-authlib-dev.files create mode 100644 debian/courier-authlib-ldap.docs create mode 100644 debian/courier-authlib-ldap.files create mode 100644 debian/courier-authlib-mysql.docs create mode 100644 debian/courier-authlib-mysql.files create mode 100644 debian/courier-authlib-mysql.postinst create mode 100644 debian/courier-authlib-mysql.prerm create mode 100644 debian/courier-authlib-pipe.files create mode 100644 debian/courier-authlib-postgresql.docs create mode 100644 debian/courier-authlib-postgresql.files create mode 100644 debian/courier-authlib-postgresql.postinst create mode 100644 debian/courier-authlib-postgresql.prerm create mode 100644 debian/courier-authlib-userdb.files create mode 100644 debian/courier-authlib.docs create mode 100644 debian/courier-authlib.files create mode 100644 debian/courier-authlib.postrm create mode 100755 debian/courier_perms create mode 100644 debian/permissions create mode 100755 debian/rules diff --git a/debian/authenumerate.pod b/debian/authenumerate.pod new file mode 100644 index 0000000..1fdb539 --- /dev/null +++ b/debian/authenumerate.pod @@ -0,0 +1,24 @@ +=head1 NAME + +authenumerate - Fetches all known users from the authentication modules + +=head1 SYNOPSIS + +authenumerate [ -m MODULE ] + +=head1 DESCRIPTION + +B lists all known users from the authentication modules, +including uid, gid and home directory. Its use is documented in +F. +It may also be useful to test the authentication modules. + +=head1 SEE ALSO + +L(8) + +=head1 AUTHOR + +This manual page was written by Willi Mann +for the Debian GNU/Linux system. + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..69db09e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,145 @@ +courier-authlib (0.59.3-1) unstable; urgency=low + + * new upstream release + + -- Stefan Hornburg (Racke) Mon, 23 Apr 2007 10:18:17 +0200 + +courier-authlib (0.59.1-0.1) experimental; urgency=low + + * new upstream release + + -- Stefan Hornburg (Racke) Wed, 17 Jan 2007 11:58:29 +0100 + +courier-authlib (0.58-5) unstable; urgency=low + + * added dependency and build dependency on expect (Closes: #400812, + thanks to Peter Troeger for the report) + + -- Stefan Hornburg (Racke) Wed, 29 Nov 2006 11:42:45 +0100 + +courier-authlib (0.58-4) unstable; urgency=medium + + * call dh_makeshlibs during binary-arch target in order to get proper shlib + information for libcourierauth.so (Closes: #378249, thanks to Charles + Fry for the report and Steinar H. Gunderson + for the patch) + * ensure that courier-authdaemon is upgraded when switching to courier-authlib + * switch to lsb logging functions (Closes: #384823, thanks to David Härdeman + for the patch) + + -- Stefan Hornburg (Racke) Sat, 9 Sep 2006 17:37:11 +0200 + +courier-authlib (0.58-3.1) unstable; urgency=medium + + * Non-Maintainer Upload to fix security bug, caused by + /var/run/courier/authdaemon being world executable. Thanks to Martin + Ferrari for the fix. (Closes: #378571) + + -- Margarita Manterola Tue, 1 Aug 2006 16:45:07 -0300 + +courier-authlib (0.58-3) unstable; urgency=low + + * remove all Courier runtime files on purge of courier-authdaemon + + -- Stefan Hornburg (Racke) Tue, 6 Jun 2006 04:48:20 +0200 + +courier-authlib (0.58-2) unstable; urgency=low + + * set ownership of /var/run/courier and /var/run/courier/authdaemon to + daemon.daemon (Closes: #368358, #368360) + + -- Stefan Hornburg (Racke) Tue, 23 May 2006 09:43:15 +0200 + +courier-authlib (0.58-1.0) unstable; urgency=low + + * first upload to unstable + + -- Stefan Hornburg (Racke) Fri, 12 May 2006 16:53:38 +0200 + +courier-authlib (0.58-0.4) experimental; urgency=low + + * changed alternative dependency for libmysqlclient-dev to + libmysqlclient15-dev (Closes: #356728, thanks to Stefan Huehner + for the report) + + -- Stefan Hornburg (Racke) Tue, 14 Mar 2006 11:14:11 +0100 + +courier-authlib (0.58-0.3) experimental; urgency=low + + * courier-authlib-userdb conflicts with pre-authlib courier-base package + + -- Stefan Hornburg (Racke) Wed, 11 Jan 2006 09:33:10 +0100 + +courier-authlib (0.58-0.2) experimental; urgency=low + + * updated config.{guess,sub} to avoid FTBFS on some architectures + (Closes: #346105, thanks to Petr Salinger + ) + + -- Stefan Hornburg (Racke) Fri, 6 Jan 2006 11:13:19 +0100 + +courier-authlib (0.58-0.1) experimental; urgency=low + + * new upstream release + * transition to new PostgreSQL architecture (Closes: #339297, thanks to + Martin Pitt for the report and the patch) + * added courier-authlib-mysql/postgresql prerm/postinst scripts to + restart courier-authdaemon + + -- Stefan Hornburg (Racke) Thu, 5 Jan 2006 14:58:19 +0100 + +courier-authlib (0.57.20051004-2) experimental; urgency=low + + * ship configuration files with sane ownership/permissions + * restoring call to pam_acct_mgmt + + -- Stefan Hornburg (Racke) Fri, 11 Nov 2005 00:49:19 +0100 + +courier-authlib (0.57.20051004-1) experimental; urgency=low + + * new upstream release: + - contains authtest manual page and authpasswd script + * keep authtest name instead of renaming to courierauthtest, there are + currently no conflicts with other binaries + * separate package courier-authlib-pipe for authpipe module + * revive courier-authdaemon package to allow seamless upgrades from sarge + * changed FSF address in copyright file + * changed BuildDepends from libmysqlclient10-dev to libmysqlclient14-dev + * use DH_COMPAT=4 + + -- Stefan Hornburg (Racke) Tue, 25 Oct 2005 11:04:45 +0200 + +courier-authlib (0.56-0.5) experimental; urgency=low + + * added build dependency on procps (Closes: #311976, thanks to Kurt + Roeckx for the report) + + -- Stefan Hornburg (Racke) Sat, 4 Jun 2005 22:03:43 +0200 + +courier-authlib (0.56-0.4) experimental; urgency=low + + * provide proper LDAP configuration file instead of an empty one (thanks + to Peter Mann for the report) + + -- Stefan Hornburg (Racke) Tue, 31 May 2005 14:48:04 +0200 + +courier-authlib (0.56-0.3) experimental; urgency=low + + * added dependency to courier-authlib-dev on courier-authlib + * versioned dependencies for courier-authlib-* packages + + -- Stefan Hornburg (Racke) Tue, 31 May 2005 11:13:01 +0200 + +courier-authlib (0.56-0.2) experimental; urgency=low + + * removed check for openssl binary (Closes: #311175, thanks to Kenshi + Muto for the report) + + -- Stefan Hornburg (Racke) Mon, 30 May 2005 13:23:02 +0200 + +courier-authlib (0.56-0.1) experimental; urgency=low + + * initial release + + -- Stefan Hornburg (Racke) Fri, 27 May 2005 23:20:21 +0200 + diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0a2fb2f --- /dev/null +++ b/debian/control @@ -0,0 +1,69 @@ +Source: courier-authlib +Section: mail +Priority: optional +Maintainer: Stefan Hornburg (Racke) +Standards-Version: 3.6.1.1 +Build-Depends: libmysqlclient-dev | libmysqlclient15-dev, libpam0g-dev, libgdbm-dev | libgdbmg1-dev, debhelper (>= 4.1.16), libldap-dev, libsasl2-dev | libsasl-dev, libpq-dev | postgresql-dev, libtool, libltdl3-dev, procps, expect + +Package: courier-authlib +Architecture: any +Depends: ${shlibs:Depends}, expect +Conflicts: courier-base (<< 0.48), courier-authdaemon (<< 0.58), courier-authmysql, courier-authpostgresql +Description: Courier authentication library + The Courier authentication library provides authentication services for + other Courier applications. + +Package: courier-authdaemon +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}), lsb-base (>= 3.0-10) +Description: Courier authentication daemon + This package contains the authentication daemon for the Courier applications. + +Package: courier-authlib-dev +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-base (<< 0.48) +Description: Development libraries for the Courier authentication library + This package contains the development libraries and files needed to compile + Courier packages that use the Courier authentication library. + +Package: courier-authlib-userdb +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-base (<< 0.48) +Description: userdb support for the Courier authentication library + This package contains the userdb support for the Courier authentication + library. Userdb is a simple way to manage virtual mail accounts using + a GDBM-based database file. + +Package: courier-authlib-mysql +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-authmysql +Replaces: courier-authmysql +Description: MySQL support for the Courier authentication library + This package contains the MySQL support for the Courier authentication library. + +Package: courier-authlib-postgresql +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Conflicts: courier-authpostgresql +Replaces: courier-authpostgresql +Description: PostgreSQL support for the Courier authentication library + This package contains the PostgreSQL support for the Courier authentication + library. + +Package: courier-authlib-ldap +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Description: LDAP support for the Courier authentication library + This package contains the LDAP support for the Courier authentication library. + +Package: courier-authlib-pipe +Architecture: any +Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP}) +Description: External authentication support for the Courier authentication library + This package contains external authentication support via pipes for the + Courier authentication library. The authpipe module is a generic plugin + that enables authentication requests to be serviced by an external + program, then communicates through messages on stdin and stdout. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..a47e195 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Stefan Hornburg (Racke) on +Fri Oct 29 10:59:13 2004 CEST. + +It was downloaded from: +ftp://courier.sourceforge.net/pub/courier/courier/ + +Upstream Author: + +Sam Varshavchik +Double Precision, Inc. +PO Box 668 +Greenwood Lake, NY 10925 + +Copyright: + +This software is released under the GPL, version 2. +Additionally, compiling, linking, and/or using the OpenSSL toolkit in +conjunction with this software is allowed. + +A copy of the GNU General Public License is available as +/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution or on the +World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also +obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, +Fifth Floor, Boston, MA 02110-1301, USA. + diff --git a/debian/courier-authdaemon.dirs b/debian/courier-authdaemon.dirs new file mode 100644 index 0000000..5273027 --- /dev/null +++ b/debian/courier-authdaemon.dirs @@ -0,0 +1 @@ +/var/run/courier/authdaemon diff --git a/debian/courier-authdaemon.files b/debian/courier-authdaemon.files new file mode 100644 index 0000000..d7ec46c --- /dev/null +++ b/debian/courier-authdaemon.files @@ -0,0 +1,3 @@ +/etc/courier/authdaemonrc +/usr/sbin/authdaemond +/var/run/courier/authdaemon diff --git a/debian/courier-authdaemon.init b/debian/courier-authdaemon.init new file mode 100644 index 0000000..4c38e40 --- /dev/null +++ b/debian/courier-authdaemon.init @@ -0,0 +1,40 @@ +#! /bin/sh -e + +prefix="/usr" +exec_prefix=${prefix} +sysconfdir="/etc/courier" +sbindir="${exec_prefix}/sbin" +daemonscript="${sbindir}/authdaemond" + +. /lib/lsb/init-functions + +# Check for a leftover init script +if [ ! -x $daemonscript ]; then + exit 0 +fi + +case "$1" in +start) + # Start daemon. + cd / + log_daemon_msg "Starting Courier authentication services" "authdaemond" + $daemonscript start + log_end_msg 0 + ;; +stop) + # Stop daemon. + cd / + log_daemon_msg "Stopping Courier authentication services" "authdaemond" + $daemonscript stop + log_end_msg 0 + ;; +restart|reload|force-reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 2 + ;; +esac +exit 0 diff --git a/debian/courier-authdaemon.postrm b/debian/courier-authdaemon.postrm new file mode 100644 index 0000000..3507f4e --- /dev/null +++ b/debian/courier-authdaemon.postrm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2000,2001,2006 by Stefan Hornburg (Racke) +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +if [ "$1" = "purge" ]; then + # remove runtime files + rm -rf /var/run/courier +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-dev.files b/debian/courier-authlib-dev.files new file mode 100644 index 0000000..93fecca --- /dev/null +++ b/debian/courier-authlib-dev.files @@ -0,0 +1,6 @@ +/usr/bin/courierauthconfig +/usr/include +/usr/lib/courier-authlib/*.a +/usr/lib/courier-authlib/*.la +/usr/share/man/man3 + diff --git a/debian/courier-authlib-ldap.docs b/debian/courier-authlib-ldap.docs new file mode 100644 index 0000000..55d4e59 --- /dev/null +++ b/debian/courier-authlib-ldap.docs @@ -0,0 +1,2 @@ +README.ldap +authldap.schema \ No newline at end of file diff --git a/debian/courier-authlib-ldap.files b/debian/courier-authlib-ldap.files new file mode 100644 index 0000000..16b7437 --- /dev/null +++ b/debian/courier-authlib-ldap.files @@ -0,0 +1,2 @@ +/etc/courier/authldaprc +/usr/lib/courier-authlib/libauthldap.so* \ No newline at end of file diff --git a/debian/courier-authlib-mysql.docs b/debian/courier-authlib-mysql.docs new file mode 100644 index 0000000..82eb811 --- /dev/null +++ b/debian/courier-authlib-mysql.docs @@ -0,0 +1 @@ +README.authmysql.html diff --git a/debian/courier-authlib-mysql.files b/debian/courier-authlib-mysql.files new file mode 100644 index 0000000..fd92f24 --- /dev/null +++ b/debian/courier-authlib-mysql.files @@ -0,0 +1,2 @@ +/etc/courier/authmysqlrc +/usr/lib/courier-authlib/libauthmysql.so* \ No newline at end of file diff --git a/debian/courier-authlib-mysql.postinst b/debian/courier-authlib-mysql.postinst new file mode 100644 index 0000000..207d93b --- /dev/null +++ b/debian/courier-authlib-mysql.postinst @@ -0,0 +1,30 @@ +#! /bin/sh -e +# +# Copyright 2000,2001,2005 by Stefan Hornburg (Racke) +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + + +if [ "$1" = "configure" ]; then + if [ -z "$2" ]; then + # initial install of authmysql, we need to restart authdaemon + if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart + fi + fi +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-mysql.prerm b/debian/courier-authlib-mysql.prerm new file mode 100644 index 0000000..10a9ef2 --- /dev/null +++ b/debian/courier-authlib-mysql.prerm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2000,2005 by Stefan Hornburg +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +# we need to restart authdaemon +if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-pipe.files b/debian/courier-authlib-pipe.files new file mode 100644 index 0000000..4073d95 --- /dev/null +++ b/debian/courier-authlib-pipe.files @@ -0,0 +1,2 @@ +/usr/lib/courier-authlib/libauthpipe*.so* + diff --git a/debian/courier-authlib-postgresql.docs b/debian/courier-authlib-postgresql.docs new file mode 100644 index 0000000..0c4a644 --- /dev/null +++ b/debian/courier-authlib-postgresql.docs @@ -0,0 +1,2 @@ +README.authmysql.html +README.authpostgres.html \ No newline at end of file diff --git a/debian/courier-authlib-postgresql.files b/debian/courier-authlib-postgresql.files new file mode 100644 index 0000000..5387e8d --- /dev/null +++ b/debian/courier-authlib-postgresql.files @@ -0,0 +1,2 @@ +/etc/courier/authpgsqlrc +/usr/lib/courier-authlib/libauthpgsql.so* diff --git a/debian/courier-authlib-postgresql.postinst b/debian/courier-authlib-postgresql.postinst new file mode 100644 index 0000000..5de5e6c --- /dev/null +++ b/debian/courier-authlib-postgresql.postinst @@ -0,0 +1,30 @@ +#! /bin/sh -e +# +# Copyright 2001,2005 by Stefan Hornburg (Racke) +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + + +if [ "$1" = "configure" ]; then + if [ -z "$2" ]; then + # initial install of authpostgresql, we need to restart authdaemon + if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart + fi + fi +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-postgresql.prerm b/debian/courier-authlib-postgresql.prerm new file mode 100644 index 0000000..31c83ba --- /dev/null +++ b/debian/courier-authlib-postgresql.prerm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2001,2005 by Stefan Hornburg +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +# we need to restart authdaemon +if [ -x /usr/sbin/authdaemond ]; then + /usr/sbin/authdaemond restart +fi + +#DEBHELPER# diff --git a/debian/courier-authlib-userdb.files b/debian/courier-authlib-userdb.files new file mode 100644 index 0000000..b5437e7 --- /dev/null +++ b/debian/courier-authlib-userdb.files @@ -0,0 +1,18 @@ +/usr/lib/courier-authlib/libauthuserdb.so +/usr/lib/courier-authlib/libauthuserdb.so.0 +/usr/lib/courier-authlib/libauthuserdb.so.0.0.0 +/usr/sbin/makeuserdb +/usr/sbin/pw2userdb +/usr/sbin/vchkpw2userdb +/usr/sbin/userdb +/usr/sbin/userdbpw +/usr/sbin/userdb-test-cram-md5 +/usr/share/man/man8/makeuserdb.8 +/usr/share/man/man8/pw2userdb.8.gz +/usr/share/man/man8/vchkpw2userdb.8.gz +/usr/share/man/man8/userdb.8 +/usr/share/man/man8/userdbpw.8 + + + + diff --git a/debian/courier-authlib.docs b/debian/courier-authlib.docs new file mode 100644 index 0000000..49169f7 --- /dev/null +++ b/debian/courier-authlib.docs @@ -0,0 +1 @@ +README.authdebug.html diff --git a/debian/courier-authlib.files b/debian/courier-authlib.files new file mode 100644 index 0000000..6c94de4 --- /dev/null +++ b/debian/courier-authlib.files @@ -0,0 +1,14 @@ +/usr/lib/courier/courier-authlib/ +/usr/lib/courier-authlib/libcourierauth*.so* +/usr/lib/courier-authlib/libauthcustom*.so* +/usr/lib/courier-authlib/libauthpam*.so* +/usr/sbin/authenumerate +/usr/sbin/authpasswd +/usr/sbin/authtest +/usr/sbin/courierlogger +/usr/share/man/man1/authpasswd.1 +/usr/share/man/man1/authtest.1 +/usr/share/man/man1/courierlogger.1 +/usr/share/man/man8/authenumerate.8 + + diff --git a/debian/courier-authlib.postrm b/debian/courier-authlib.postrm new file mode 100644 index 0000000..73adefe --- /dev/null +++ b/debian/courier-authlib.postrm @@ -0,0 +1,25 @@ +#! /bin/sh -e +# +# Copyright 2000,2001 by Stefan Hornburg (Racke) +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +if [ "$1" = "purge" ]; then + # remove runtime files + rm -rf /var/run/courier/authdaemon +fi + +#DEBHELPER# diff --git a/debian/courier_perms b/debian/courier_perms new file mode 100755 index 0000000..9a054a1 --- /dev/null +++ b/debian/courier_perms @@ -0,0 +1,105 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_perms - set some special permissions after dh_fixperms + +=cut + +use strict; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B [S>] + +=head1 DESCRIPTION + +dh_perms is a debhelper program that is responsible for setting the +permissions of files and directories according to the information in +debian/permissions. It is intended to be run after dh_fixperms. + +The file debian/permissions is a tab seperated file where the first column +contains a filename, the second one the permissions in octal format, the +third one the owner and the fourth one the group. A dash in columns 2 to 4 +means that this information will not be modified. + +=head1 OPTIONS + +=over 4 + +None except the standard debhelper options. + +=back + +=cut + +init(); + +my %perms; +my %owners; +my %groups; + +# TODO: There should be a way to change this by command-line +my $permfile = "debian/permissions"; + +open PERMFILE, $permfile or exit 0; #print "could not open permfile\n"; +while (my $curline = ) +{ + #NOTE: Broken lines are not always detected. (e.g. not defining anything valid) + + # remove lineend + chomp($curline); + # skip comments/empty lines + next if $curline =~ /^#/ || $curline !~ /\S/; + (my $filename, my $octmode, my $owner, my $group) = split (/\s+/, $curline); + + die qq{$0: could not accept "$curline": wrong octmode $octmode\n} unless $octmode =~ /^[0-7]{3,4}$/; + $perms{$filename} = $octmode unless $octmode eq "-" or not defined $octmode; + + $owner = getpwnam($owner) if defined getpwnam($owner); + $owners{$filename} = $owner unless $owner eq "-" or not defined $owner; + + $group = getgrnam($group) if defined getpwnam($group); + $groups{$filename} = $group unless $group eq "-" or not defined $group; + +} +close PERMFILE; + + +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmp=tmpdir($package); + foreach my $file (keys %owners) + { + next unless -e $tmp.$file; + chown $owners{$file}, -1, $tmp.$file or die "failed to chown $file"; + verbose_print "chowned file $file to $owners{$file}"; + } + foreach my $file (keys %groups) + { + next unless -e $tmp.$file; + chown -1, $groups{$file}, $tmp.$file or die "failed to chgrp $file"; + verbose_print "chgrped file $file to $groups{$file}"; + } + foreach my $file (keys %perms) + { + next unless -e $tmp.$file; + my $nummod = oct("0".$perms{$file}); + chmod $nummod, $tmp.$file or die "failed to chmod $file"; + verbose_print "chmoded file $file to ".sprintf("0%o", $nummod); + } + +} + +=head1 SEE ALSO + +L + +This program is not yet part of debhelper. + +=head1 AUTHOR + +Willi Mann + +=cut + diff --git a/debian/permissions b/debian/permissions new file mode 100644 index 0000000..6e70307 --- /dev/null +++ b/debian/permissions @@ -0,0 +1,9 @@ +/etc/courier/authldaprc 660 daemon daemon +/etc/courier/authpgsqlrc 660 daemon daemon +/etc/courier/authmysqlrc 660 daemon daemon +/etc/courier/authdaemonrc 660 daemon daemon +/var/run/courier 755 daemon daemon +/var/run/courier/authdaemon 750 daemon daemon + + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3a29bc2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,195 @@ +#!/usr/bin/make -f +# +# Copyright 2004,2005 by Stefan Hornburg (Racke) +# +# This program 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, +# 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 Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA. + +BUILD=$(shell pwd)/debian/tmp +RELUP=$(shell dpkg-parsechangelog | perl -ne 'print $$1 if /^Version: (.*?)-(.*)$$/') + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=4 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# Common configuration options +NONSSL_CONFOPTS=--without-certdb --without-authpgsql + +COMMON_CONFOPTS=--prefix=/usr --mandir=\$${prefix}/share/man \ + --with-authdaemonvar=/var/run/courier/authdaemon \ + --sysconfdir=/etc/courier \ + --with-pkgconfdir=/etc/courier \ + --libexecdir=\$${prefix}/lib/courier \ + --datadir=\$${prefix}/lib/courier \ + --localstatedir=/var/lib/courier \ + --sbindir=\$${exec_prefix}/sbin \ + --with-mailuser=daemon \ + --with-mailgroup=daemon \ + --without-socks \ + --with-authpam \ + --with-authpipe \ + --without-authpwd \ + --with-authmysql \ + --with-mysql-includes=/usr/include/mysql \ + --with-mysql-libs=/usr/lib \ + --with-authmysqlrc=/etc/courier/authmysqlrc \ + --with-authpgsql \ + --with-pgsql-includes=`pg_config --includedir` \ + --with-pgsql-libs=/usr/lib \ + --with-authpgsqlrc=/etc/courier/authpgsqlrc \ + --without-authshadow \ + --without-authvchkpw \ + --with-authdaemonvar=/var/run/courier/authdaemon \ + --with-authldap \ + --with-authldaprc=/etc/courier/authldaprc \ + --with-authcram \ + --with-db=gdbm \ + --without-fcgi \ + --with-htmllibdir=/usr/share/sqwebmail \ + --with-ispell=/usr/bin/ispell \ + --enable-userdb \ + --enable-syslog=1 \ + --disable-root-check + +check: + dh_testdir + +# check umask + if [ `umask` != "0022" ]; then echo "You need to set umask to 022 in order to compile/build courier"; exit 1; fi + chmod +x debian/courier_perms + +build: check +# create a list of files that currently exists + if [ ! -f stamp-build ]; then \ + if [ -d /usr/include/postgresql/8.0/libpq_fe.h ]; then \ + LDFLAGS=-lcrypt ./configure $(COMMON_CONFOPTS) \ + --with-postgresql-includes=/usr/include/postgresql/8.0 \ + && $(MAKE) && touch stamp-build; \ + else \ + LDFLAGS=-lcrypt ./configure $(COMMON_CONFOPTS) \ + --with-postgresql-includes=/usr/include/postgresql \ + && $(MAKE) && touch stamp-build; \ + fi \ + fi + +stamp-build: build + +clean: check + dh_testroot + rm -f stamp-build stamp-install + +# Add here commands to clean up after the build process. + -$(MAKE) clean + dh_clean + +install: check stamp-build + dh_testroot + dh_clean -k + dh_installdirs + +# Add here commands to install the package into debian/tmp. + $(MAKE) DESTDIR=$(BUILD) install + +# (cd $(BUILD)/usr/lib/courier/courier-authlib/changepwd; ln -fs ../../authsystem.passwd ./authsystem.passwd) + +# Install authentification test program +# mv $(BUILD)/usr/sbin/authtest $(BUILD)/usr/sbin/courierauthtest + +# Additional manpages + pod2man --center='Debian GNU/Linux Documentation' --release='Debian GNU/Linux '`cat /etc/debian_version` --section=8 debian/authenumerate.pod > $(BUILD)/usr/share/man/man8/authenumerate.8 +# pod2man --center='Debian GNU/Linux Documentation' --release='Debian GNU/Linux '`cat /etc/debian_version` --section=8 debian/courierauthtest.pod > $(BUILD)/usr/share/man/man8/courierauthtest.8 + +# Symlinks for userdb manpages + (cd $(BUILD)/usr/share/man/man8 && ln -s makeuserdb.8.gz pw2userdb.8.gz && ln -s makeuserdb.8.gz vchkpw2userdb.8.gz) + + dh_installdocs +# - change authentification default settings + perl -pe 's/^authmodulelist=".*?"/authmodulelist="authpam"/' $(BUILD)/etc/courier/authdaemonrc.dist > $(BUILD)/etc/courier/authdaemonrc +# - change default LDAP server + perl -pe 's/^(LDAP_SERVER\s+)ldap.example.com/$$1localhost/' $(BUILD)/etc/courier/authldaprc.dist > $(BUILD)/etc/courier/authldaprc +# - change default MySQL server + perl -pe 's/^(MYSQL_SERVER\s+)mysql.example.com/$$1localhost/;s%^(#?\s*MYSQL_SOCKET\s+)/.*%$$1/var/run/mysqld/mysqld.sock%' $(BUILD)/etc/courier/authmysqlrc.dist > $(BUILD)/etc/courier/authmysqlrc + mv $(BUILD)/etc/courier/authpgsqlrc.dist $(BUILD)/etc/courier/authpgsqlrc + rm $(BUILD)/etc/courier/*.dist + +# This seems to be necessary for building in fakeroot +# environment (otherwise dh_strip fails) +# set all binaries to 755, by checking if user has x-bit +# debian/courier_perms will set the right permissions + find $(BUILD) -perm -u+x -type f | xargs chmod u+rwx,go+rx + + dh_movefiles + +# Check if all files have moved out + if [ `find $(BUILD) -not -type d | wc -l` -ne 0 ]; then find $(BUILD) -not -type d; echo "File(s) found not belonging to any package, please contact maintainer"; exit 1; fi + + touch stamp-install + +stamp-install: install + +# Build architecture-independent files here. +binary-indep: stamp-build stamp-install + dh_testdir + dh_testroot +# dh_installdebconf -i + dh_installexamples -i + dh_installmenu -i + dh_installinit -i + dh_installinfo -i + dh_installchangelogs -i + dh_strip -i + dh_link -i + dh_compress -i + dh_fixperms -i + debian/courier_perms -i + dh_installdeb -i + dh_perl -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: stamp-build stamp-install + dh_testdir + dh_testroot +# dh_installdebconf -a + dh_installexamples -a + dh_installmenu -a + dh_installinit -a + dh_installcron -a + dh_installinfo -a + dh_installchangelogs -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a + debian/courier_perms -a + dh_installdeb -a + dh_perl -a + dh_makeshlibs -a + dh_shlibdeps -a + dh_gencontrol -- -VRELUP="$(RELUP)" + dh_md5sums -a + dh_builddeb -a + +binary: binary-arch + +.PHONY: check build clean binary-arch binary install -- 2.20.1