From 32c98010e5958c1b4fc8b3584bd539a6b68c1d27 Mon Sep 17 00:00:00 2001 From: lars Date: Sat, 7 Jan 2006 01:10:00 +0000 Subject: [PATCH] infrastructure for building debian packages --- CHANGES | 106 ----------------------- INSTALL | 3 +- LICENSE | 26 ++++++ changelog | 106 +++++++++++++++++++++++ copyright | 30 +++++++ debian-related/DEBIAN/conffiles | 1 + debian-related/DEBIAN/control | 20 +++++ debian-related/DEBIAN/postinst | 3 + debian-related/DEBIAN/postrm | 3 + debian-related/DEBIAN/prerm | 3 + debian-related/README.Debian | 38 ++++++++ debian-related/changelog.Debian | 3 + debian-related/ezmlm-web-make-suid | 33 +++++++ debian-related/index.c | 10 +++ debian-related/man/ezmlm-web-make-suid.1 | 25 ++++++ ezmlm-web.cgi | 37 +------- {spec => scripts}/check_languages.sh | 0 scripts/debian.sh | 76 ++++++++++++++++ 18 files changed, 383 insertions(+), 140 deletions(-) delete mode 100644 CHANGES create mode 100644 LICENSE create mode 100644 changelog create mode 100644 copyright create mode 100644 debian-related/DEBIAN/conffiles create mode 100644 debian-related/DEBIAN/control create mode 100755 debian-related/DEBIAN/postinst create mode 100755 debian-related/DEBIAN/postrm create mode 100755 debian-related/DEBIAN/prerm create mode 100644 debian-related/README.Debian create mode 100644 debian-related/changelog.Debian create mode 100755 debian-related/ezmlm-web-make-suid create mode 100644 debian-related/index.c create mode 100644 debian-related/man/ezmlm-web-make-suid.1 rename {spec => scripts}/check_languages.sh (100%) create mode 100755 scripts/debian.sh diff --git a/CHANGES b/CHANGES deleted file mode 100644 index ff6733f..0000000 --- a/CHANGES +++ /dev/null @@ -1,106 +0,0 @@ -REVISION HISTORY - ezmlm-web.cgi -================================ - -Version 0.1 - 10/04/98 (Not Released) -* University Vac - I was bored and started to play. The first version just - let people play with the subscribers list. No moderators, no nothing. - -Version 0.2 - 13/04/98 (Not Released) -* Allow list creation -* Allowed users to edit moderators - -Version 0.3 - 15/04/98 -* Allow list deletion (for balin@moria.org) -* Made changes to allow it to run on RedHat 4.2 as well as FreeBSD 3.0 -* Fixed some minor bugs (cosmetic irritaions really) that people noticed -* Sorted subscribers list into alphabetical order. -* Added command line switch to change list directory (for nxsy@moria.org) -* Wrote some documentation ... - -Version 0.4 - 28/04/98 -* Fixed up virtual domain (inlocal) stuff as spotted by bryan@rucus -* Allowed the list directory to be automatically created if necessary. - -Version 0.5 - 12/05/98 (Not Released) -* More bug fixes. Mainly for mathew@graham. - -Version 1.0 - 01/08/98 -* Complete re-write to convert to perl5 and CGI.pm -* Removed a lot of dependancy on the OS. Use builtin functions instead :) -* Added support for ezmlm-idx -* Added a lot more command line option support (-adfgiklmnpqsrstux5) -* Added support for digests and digest subscribers -* Added support for blacklists -* Allowed users to edit the config of existing lists -* Allowed the user to edit headeradd and headerremove as well as mimeremove -* Allowed user to edit any of the files in DIR/text -* Revised interface to make it more user-friendly and ergonomic. -* Changed the background colour for Kether (clb@rucus) *gryn* -* Removed a big bug in the delete_list function that had gone unnoticed. - -Version 1.0.1 - 10/08/98 -* Fixed a bug in the way 1.0 re-configured virtual hosts (bryan@rucus) -* Made the script read the /var/qmail/control files instead of explicitly - setting variables (for david@summersoft) - -Version 1.0.2 - 28/08/98 -* Fixed the bug introduced in v1.0.1 :( (keith@rucus) -* Fixed the way we recreate config files (noticed by Glen Stewart) -* Made the script check return values of system calls properly -* Fixed some of the taint checking stuff ... reports less in the logs now. - -Version 1.0.3 - 03/10/98 -* Fixed the alias-alias-alias-list bug in inlocal (bryan@rucus) -* Added a bit of online help -* Fixed the & in list owner (bryan@rucus) -* Added multi-level access to lists (based on idea by Glen Stewart) - -Version 2.0 - 01/01/00 -* Rewrote most of the code to take advantage of Mail::Ezmlm -* Made the webuser file more functional (users can alter it) -* Now handles all current, and future command line options -* Changed the colours :) -* Added support for ezmlm-cgi web archives -* Made it -w and use strict clean -* Moved all user config to a separate file -* Fixed the way we worked out list config - now complete -* Allowed a user specific config over-ride ``ezmlmwebrc'' -* Allowed the printing of `nice' usernames (for Rhodes CS Dept) -* Took account of non-standard paths for moderators -* Removed all system() and `` calls from ezmlm-web.cgi -* Made `look and feel' virtually all user configurable -* Added a lot more context sensitive help -* Made ezmlm-web 99% language configurable - but no other templates yet :( -* Added support for creating databases - -Version 2.1 - 25/09/00 -* Fixed the multiple delete thing - finally! -* Fixed the '-' in username problem - The '-' in hostnames problem is fixed - in the new version of Mail::Ezmlm -* Fixed the '_' in list names problem -* Added support for file uploads of email addresses (multiple subscribe) -* Made error handling more friendly - -Version 2.2 - 26/01/02005 (not officially released) -* German translation of the web interface - more translations can be added easily -* changed "ALT"-tags to "TITLE" - most browsers will display the tooltip texts now -* fixed security problems (permissions were not thoroughly checked) -* user-based permission for creating lists (can be set in webusersrc) -* the location of the webusers file is now an option in ezmlmwebrc - -Version 2.3 - 10/06/02005 -* css styles are used instead of tables -* permission check for upload of files fixed -* removed some taint errors -* file upload typo fixed -* update of webusers file fixed -* moderator unsubscribe fixed - -Version 3.0 - 12/25/02005 -* complete interface rewritten for enhanced usability -* suppurt for msgsize, mimereject, trailer -* fixed insecure writing of webusers data -* define a default MAIL_DOMAIN -* changed directory for safely removed mailinglists -* requires the clearsilver template engine - diff --git a/INSTALL b/INSTALL index 9551f87..ca5b576 100644 --- a/INSTALL +++ b/INSTALL @@ -65,7 +65,8 @@ OVERVIEW: the following places: 1) the home directory of the user that runs ezmlm-web.cgi (~/.ezmlmwebrc) 2) the directory, that contains your cgi binary (index.cgi) - 3) /etc/ezmlm/ezmlmwebrc + 3) /etc/ezmlm-web/ezmlmwebrc + 4) /etc/ezmlm/ezmlmwebrc [deprecated] (ezmlm-web will look for it in these places in the given order) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c7a0aa4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/changelog b/changelog new file mode 100644 index 0000000..57f0f6b --- /dev/null +++ b/changelog @@ -0,0 +1,106 @@ +Version 3.0.1 - 01/06/02006 + * allow several special characters in local part of mail address (RFC2822) + +Version 3.0 - 12/25/02005 + * complete interface rewritten for enhanced usability + * suppurt for msgsize, mimereject, trailer + * fixed insecure writing of webusers data + * define a default MAIL_DOMAIN + * changed directory for safely removed mailinglists + * requires the clearsilver template engine + +Version 2.3 - 10/06/02005 + * css styles are used instead of tables + * permission check for upload of files fixed + * removed some taint errors + * file upload typo fixed + * update of webusers file fixed + * moderator unsubscribe fixed + +Version 2.2 - 26/01/02005 (not officially released) + * German translation of the web interface - more translations can be added easily + * changed "ALT"-tags to "TITLE" - most browsers will display the tooltip texts now + * fixed security problems (permissions were not thoroughly checked) + * user-based permission for creating lists (can be set in webusersrc) + * the location of the webusers file is now an option in ezmlmwebrc + +Version 2.1 - 25/09/00 + * Fixed the multiple delete thing - finally! + * Fixed the '-' in username problem - The '-' in hostnames problem is fixed + in the new version of Mail::Ezmlm + * Fixed the '_' in list names problem + * Added support for file uploads of email addresses (multiple subscribe) + * Made error handling more friendly + +Version 2.0 - 01/01/00 + * Rewrote most of the code to take advantage of Mail::Ezmlm + * Made the webuser file more functional (users can alter it) + * Now handles all current, and future command line options + * Changed the colours :) + * Added support for ezmlm-cgi web archives + * Made it -w and use strict clean + * Moved all user config to a separate file + * Fixed the way we worked out list config - now complete + * Allowed a user specific config over-ride ``ezmlmwebrc'' + * Allowed the printing of `nice' usernames (for Rhodes CS Dept) + * Took account of non-standard paths for moderators + * Removed all system() and `` calls from ezmlm-web.cgi + * Made `look and feel' virtually all user configurable + * Added a lot more context sensitive help + * Made ezmlm-web 99% language configurable - but no other templates yet :( + * Added support for creating databases + +Version 1.0.3 - 03/10/98 + * Fixed the alias-alias-alias-list bug in inlocal (bryan@rucus) + * Added a bit of online help + * Fixed the & in list owner (bryan@rucus) + * Added multi-level access to lists (based on idea by Glen Stewart) + +Version 1.0.2 - 28/08/98 + * Fixed the bug introduced in v1.0.1 :( (keith@rucus) + * Fixed the way we recreate config files (noticed by Glen Stewart) + * Made the script check return values of system calls properly + * Fixed some of the taint checking stuff ... reports less in the logs now. + +Version 1.0.1 - 10/08/98 + * Fixed a bug in the way 1.0 re-configured virtual hosts (bryan@rucus) + * Made the script read the /var/qmail/control files instead of explicitly + setting variables (for david@summersoft) + +Version 1.0 - 01/08/98 + * Complete re-write to convert to perl5 and CGI.pm + * Removed a lot of dependancy on the OS. Use builtin functions instead :) + * Added support for ezmlm-idx + * Added a lot more command line option support (-adfgiklmnpqsrstux5) + * Added support for digests and digest subscribers + * Added support for blacklists + * Allowed users to edit the config of existing lists + * Allowed the user to edit headeradd and headerremove as well as mimeremove + * Allowed user to edit any of the files in DIR/text + * Revised interface to make it more user-friendly and ergonomic. + * Changed the background colour for Kether (clb@rucus) *gryn* + * Removed a big bug in the delete_list function that had gone unnoticed. + +Version 0.5 - 12/05/98 (Not Released) + * More bug fixes. Mainly for mathew@graham. + +Version 0.4 - 28/04/98 + * Fixed up virtual domain (inlocal) stuff as spotted by bryan@rucus + * Allowed the list directory to be automatically created if necessary. + +Version 0.3 - 15/04/98 + * Allow list deletion (for balin@moria.org) + * Made changes to allow it to run on RedHat 4.2 as well as FreeBSD 3.0 + * Fixed some minor bugs (cosmetic irritaions really) that people noticed + * Sorted subscribers list into alphabetical order. + * Added command line switch to change list directory (for nxsy@moria.org) + * Wrote some documentation ... + +Version 0.2 - 13/04/98 (Not Released) + * Allow list creation + * Allowed users to edit moderators + +Version 0.1 - 10/04/98 (Not Released) + * University Vac - I was bored and started to play. The first version just + let people play with the subscribers list. No moderators, no nothing. + diff --git a/copyright b/copyright new file mode 100644 index 0000000..b0af734 --- /dev/null +++ b/copyright @@ -0,0 +1,30 @@ +Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved. +Please send bug reports and comments to guy-ezmlm@rucus.ru.ac.za + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +Neither name Guy Antony Halse nor the names of any contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS +IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + diff --git a/debian-related/DEBIAN/conffiles b/debian-related/DEBIAN/conffiles new file mode 100644 index 0000000..effb258 --- /dev/null +++ b/debian-related/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/ezmlm-web/ezmlmwebrc diff --git a/debian-related/DEBIAN/control b/debian-related/DEBIAN/control new file mode 100644 index 0000000..bb9c1f6 --- /dev/null +++ b/debian-related/DEBIAN/control @@ -0,0 +1,20 @@ +Package: ezmlm-web +Version: 3.1-1 +Section: admin +Priority: extra +Architecture: all +Depends: perl, httpd-cgi +Suggests: qmail-src, bash (>=2.0), gcc +Maintainer: Lars Kruse +Description: Web interface for ezmlm-idx mailing list administration + This web interface allows you to configure every part of an ezmlm-idx + mailing list. + Access control makes it possible, to share the administrative work in a + controlled way. + This package depends on the following programs, that are not part of the main + debian distribution: + * qmail - http://cr.yp.to/qmail.html + * ezmlm-idx - http://ezmlm.org/ + * clearsilver for perl (>= 0.10.2) - http://www.clearsilver.net/downloads/ + * some perl modules (see README) + diff --git a/debian-related/DEBIAN/postinst b/debian-related/DEBIAN/postinst new file mode 100755 index 0000000..296ef78 --- /dev/null +++ b/debian-related/DEBIAN/postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +true diff --git a/debian-related/DEBIAN/postrm b/debian-related/DEBIAN/postrm new file mode 100755 index 0000000..296ef78 --- /dev/null +++ b/debian-related/DEBIAN/postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +true diff --git a/debian-related/DEBIAN/prerm b/debian-related/DEBIAN/prerm new file mode 100755 index 0000000..296ef78 --- /dev/null +++ b/debian-related/DEBIAN/prerm @@ -0,0 +1,3 @@ +#!/bin/sh + +true diff --git a/debian-related/README.Debian b/debian-related/README.Debian new file mode 100644 index 0000000..c79705e --- /dev/null +++ b/debian-related/README.Debian @@ -0,0 +1,38 @@ +How to use ezmlm-web with debian: + +1) install the package +you surely did this already :) + + +2) create user-specific suid binaries +As perl-suid is considered deprecated, you have to compile a C-wrapper +for every user of your debian system, who wants to manage his mailing +lists with ezmlm-we. +Usually you do this only for your virtual mailing list user. + +to create a wrapper, type the following: + ezmlm-web-make-suid USERNAME DESTINATION_FILE + +e.g: ezmlm-web-make-suid john ~john/public_html/cgi-bin/ezmlm-web + + +3) create a user-specific configuration file (optional) +Copy /usr/share/doc/ezmlm-web/examples/ezmlmwebrc to ~john/.ezmlmwebrc +and change its content according to your setup. + + +4) access control (optional) +configure access control for the fresh cgi binary. Maybe you can +use the htaccess.sample file in /usr/share/doc/ezmlm-web/examples as +a template. + +Now you should create a webusers file to define the permissions of all +possible web users. An example webusers file can be found at +/usr/share/doc/ezmlm-web/examples/webusers.sample. + +See /usr/share/doc/ezmlm-web/README for details about access control. + + +5) testing +Now you can access the ezmlm-web interface by using your web browser. +e.g. point it to http://localhost/~john/cgi-bin/ezmlm-web diff --git a/debian-related/changelog.Debian b/debian-related/changelog.Debian new file mode 100644 index 0000000..9178a39 --- /dev/null +++ b/debian-related/changelog.Debian @@ -0,0 +1,3 @@ +ezmlm-web (0.3.1-1) unstable; urgency=low + * Initial release + -- Lars Kruse Sat, 07 Jan 2006 00:45:47 +0100 diff --git a/debian-related/ezmlm-web-make-suid b/debian-related/ezmlm-web-make-suid new file mode 100755 index 0000000..8cf5f9c --- /dev/null +++ b/debian-related/ezmlm-web-make-suid @@ -0,0 +1,33 @@ +#!/bin/sh +# +# create user-specific suid binaries to call ezmlm-web.cgi +# +# parameters: [USERNAME] DESTINATION_FILE +# e.g.: john ~john/public_html/cgi-bin/ezmlm-web +# only root may choose a USERNAME +# + +set -eu + +C_SOURCE=/usr/share/ezmlm-web/index.c + +which cc >/dev/null || { echo "no compiler (cc) installed - sorry" >&2; exit 1; } + +[ $(id -u) -ne 0 ] && [ $# -ne 1 ] && echo "Syntax (for non-root): $(basename $0) DESTINATION_FILE" >&2 && exit 1 +[ $(id -u) -eq 0 ] && [ $# -gt 2 -o $# -lt 1 ] && echo "Syntax (for root): $(basename $0) [USERNAME] DESTINATION_FILE" >&2 && exit 1 + +if [ $# -eq 1 ] + then EZ_USER=$(id -un) + EZ_FILE=$1 + else EZ_USER=$1 + EZ_FILE=$2 + fi + +cc -o "$EZ_FILE" "$C_SOURCE" +if [ $(id -u) -eq 0 ] + then chown "$EZ_USER". "$EZ_FILE" || { echo "the user '$EZ_USER' does not exist" >&2; rm "$EZ_FILE"; exit 1; } + fi +chmod u+s "$EZ_FILE" + +echo "Successfully created '$EZ_FILE' for user '$EZ_USER'." + diff --git a/debian-related/index.c b/debian-related/index.c new file mode 100644 index 0000000..bae86c5 --- /dev/null +++ b/debian-related/index.c @@ -0,0 +1,10 @@ +#include + +/* C wrapper to allow ezmlm-web.cgi to run suid */ +/* Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved */ +/* See the README file in this distribution for copyright information */ + +int main(void) { + /* Change this path to wherever you decided to put ezmlm-web.cgi */ + execv("/usr/lib/ezmlm-web.cgi"); +} diff --git a/debian-related/man/ezmlm-web-make-suid.1 b/debian-related/man/ezmlm-web-make-suid.1 new file mode 100644 index 0000000..f79cb4e --- /dev/null +++ b/debian-related/man/ezmlm-web-make-suid.1 @@ -0,0 +1,25 @@ +.TH ezmlm-web-make-suid 1 "January 02006" "ezmlm-web" "helper script" +.SH NAME +ezmlm-web-make-suid \- create user-specific suid wrappers for ezmlm-web +.SH SYNOPSIS +.B ezmlm-web-make-suid +[\fIUSERNAME\fR] \fIDESTINATION_FILE\fR +.SH DESCRIPTION +.PP +Create a user-specific suid wrapper for ezmlm-web. This is necessary, as +the mailing lists are usually not owned by the webserver, that executes +the cgi. +.PP +The destination file determines where to put the resulting binary. +.PP +Only root is allowed to choose a username. +.SH EXAMPLES +.PP +ezmlm-web-make-suid john ~john/public_html/ezmlm-web +.SH AUTHOR +Written by Lars Kruse +.SH "REPORTING BUGS" +Report bugs to +.SH COPYRIGHT +Copyright \(co 02006 Lars Kruse + diff --git a/ezmlm-web.cgi b/ezmlm-web.cgi index b5f6fab..db05c06 100755 --- a/ezmlm-web.cgi +++ b/ezmlm-web.cgi @@ -1,37 +1,6 @@ #!/usr/bin/perl #=========================================================================== -# ezmlm-web.cgi - version 2.3 - 10/06/02005 -# -# Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved. -# Please send bug reports and comments to guy-ezmlm@rucus.ru.ac.za -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# Neither name Guy Antony Halse nor the names of any contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS -# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# +# ezmlm-web.cgi - version 3.1 # ========================================================================== # All user configuration happens in the config file ``ezmlmwebrc'' # POD documentation is at the end of this file @@ -93,8 +62,10 @@ if(defined($opt_C)) { require "$HOME_DIR/.ezmlmwebrc"; # User } elsif(-e "./ezmlmwebrc") { require "./ezmlmwebrc"; # Install +} elsif(-e "/etc/ezmlm-web/ezmlmwebrc") { + require "/etc/ezmlm-web/ezmlmwebrc"; # System (new style) } elsif(-e "/etc/ezmlm/ezmlmwebrc") { - require "/etc/ezmlm/ezmlmwebrc"; # System + require "/etc/ezmlm/ezmlmwebrc"; # System (old style) } else { &fatal_error("Unable to read config file"); } diff --git a/spec/check_languages.sh b/scripts/check_languages.sh similarity index 100% rename from spec/check_languages.sh rename to scripts/check_languages.sh diff --git a/scripts/debian.sh b/scripts/debian.sh new file mode 100755 index 0000000..2fcffad --- /dev/null +++ b/scripts/debian.sh @@ -0,0 +1,76 @@ +#!/bin/sh +# +# Copyright (c) 02005 Lars Kruse +# +# License: This script is distributed under the terms of +# the BSD license +# +# build a debian package +# + +set -ue + +######### some settings ########### +ROOT_DIR=$(dirname "$0")/.. +ROOT_DIR=$(cd "$ROOT_DIR"; pwd) + +BUILD_DIR=/tmp/ezmlm-web-build-$$ + +PACKAGE_DIR=$ROOT_DIR/../tags/packages +[ ! -e "$PACKAGE_DIR" ] && PACKAGE_DIR=$ROOT_DIR/../packages +[ ! -e "$PACKAGE_DIR" ] && echo "package dir not found" >&2 && exit 1 + +############# do it ############### + +[ -e "$BUILD_DIR" ] && rm -rf "$BUILD_DIR" + +ACTION=build +[ $# -gt 0 ] && ACTION=$1 && shift + +case "$ACTION" in + build ) + mkdir -p "$BUILD_DIR/usr/share/ezmlm-web" + mkdir -p "$BUILD_DIR/usr/lib" + mkdir -p "$BUILD_DIR/usr/bin" + mkdir -p "$BUILD_DIR/usr/share/man/man1" + mkdir -p "$BUILD_DIR/usr/share/doc/ezmlm-web/examples" + mkdir -p "$BUILD_DIR/etc/ezmlm-web" + mkdir -p "$BUILD_DIR/var/www" + svn export "$ROOT_DIR/template" "$BUILD_DIR/usr/share/ezmlm-web/template" >/dev/null + svn export "$ROOT_DIR/css" "$BUILD_DIR/usr/share/ezmlm-web/css" >/dev/null + ln -s /usr/share/ezmlm-web/css/default.css "$BUILD_DIR/var/www/ezmlm-web.css" + svn export "$ROOT_DIR/lang" "$BUILD_DIR/usr/share/ezmlm-web/lang" >/dev/null + cp "$ROOT_DIR/ezmlm-web.cgi" "$BUILD_DIR/usr/lib" + cp "$ROOT_DIR/debian-related/index.c" "$BUILD_DIR/usr/share/ezmlm-web" + cp "$ROOT_DIR/htaccess.sample" "$BUILD_DIR/usr/share/doc/ezmlm-web/examples" + cp "$ROOT_DIR/webusers.sample" "$BUILD_DIR/usr/share/doc/ezmlm-web/examples" + sed 's#/usr/local/#/usr/#g' "$ROOT_DIR/ezmlmwebrc" | tee "$BUILD_DIR/usr/share/doc/ezmlm-web/examples/ezmlmwebrc" >"$BUILD_DIR/etc/ezmlm-web/ezmlmwebrc" + cp "$ROOT_DIR/README" "$BUILD_DIR/usr/share/doc/ezmlm-web" + cp "$ROOT_DIR/TODO" "$BUILD_DIR/usr/share/doc/ezmlm-web" + cp "$ROOT_DIR/UPGRADING" "$BUILD_DIR/usr/share/doc/ezmlm-web" + cp "$ROOT_DIR/copyright" "$BUILD_DIR/usr/share/doc/ezmlm-web" + cp "$ROOT_DIR/debian-related/README.Debian" "$BUILD_DIR/usr/share/doc/ezmlm-web" + cp "$ROOT_DIR/debian-related/ezmlm-web-make-suid" "$BUILD_DIR/usr/bin" + gzip --best -c "$ROOT_DIR/changelog" \ + >"$BUILD_DIR/usr/share/doc/ezmlm-web/changelog.gz" + gzip --best -c "$ROOT_DIR/debian-related/changelog.Debian" \ + >"$BUILD_DIR/usr/share/doc/ezmlm-web/changelog.Debian.gz" + gzip --best -c "$ROOT_DIR/debian-related/man/ezmlm-web-make-suid.1" \ + >"$BUILD_DIR/usr/share/man/man1/ezmlm-web-make-suid.1.gz" + svn export "$ROOT_DIR/debian-related/DEBIAN" "$BUILD_DIR/DEBIAN" >/dev/null + fakeroot dpkg-deb --build "$BUILD_DIR" "$PACKAGE_DIR" + rm -rf "$BUILD_DIR" + ;; + check ) + PACKAGE_FILE=$(find "$PACKAGE_DIR" -type f -name "ezmlm-web*" | grep "\.deb$" | sort -n | tail -1) + if [ -z "$PACKAGE_FILE" ] + then echo "no debian package found in $PACKAGE_DIR" + else lintian "$PACKAGE_FILE" + fi + ;; + * ) + echo "Syntax: $(basename $0) [ build | check | help ]" + echo + ;; + esac +