From 44c55fd6214d7b90b0adba7740129b516a3853e3 Mon Sep 17 00:00:00 2001 From: Grupa za izradu paketa Date: Sun, 21 Oct 2007 22:31:02 +0000 Subject: [PATCH 1/1] r1: [svn-inject] Installing original source of mailman-cn --- README.CARNet | 55 ++++++++++++++++ changelog.CARNet | 1 + debian/changelog | 79 +++++++++++++++++++++++ debian/compat | 1 + debian/control | 17 +++++ debian/docs | 2 + debian/postinst | 187 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ debian/postrm | 14 ++++ debian/prerm | 10 +++ debian/rules | 86 +++++++++++++++++++++++++ 10 files changed, 452 insertions(+) create mode 100644 README.CARNet create mode 120000 changelog.CARNet create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/docs create mode 100755 debian/postinst create mode 100755 debian/postrm create mode 100755 debian/prerm create mode 100755 debian/rules diff --git a/README.CARNet b/README.CARNet new file mode 100644 index 0000000..f87d402 --- /dev/null +++ b/README.CARNet @@ -0,0 +1,55 @@ +mailman-cn ++--------+ + +Mailman - Mailing List Manager + +Mailman je software za rad sa mailing listama. Buduci da je integriran sa +webom, omogucava korisnicima jednostavno odrzavanje njihovih racuna, dok za +vlasnike lista olaksava administraciju. Mailman podrzava arhiviranje poruka, +filtriranje poruka prema sadrzaju i zaglavljima, dostavu poruka u obliku +redovnih sazetaka, spam filtere itd. + +Mailman je slobodan i besplatan software koji se distribuira pod GNU General +Public licencom. Napisan je u Pythonu i C-u. + +Nakon instalacije paketa nuzno je postaviti administratorsku lozinku +naredbom /usr/sbin/mmsitepass. Ta lozinka daje pristup svim dijelovima +Mailmanovog web sucelja koji zahtijevaju autentikaciju, sto obuhvaca sucelja +za konfiguraciju i moderaciju bilo koje mailing liste (ako vlasnik liste +zaboravi lozinku za pristup svojoj listi), sucelje za stvaranje nove liste, +privatne web arhive (kojima pristup imaju samo clanovi odredjene liste) itd. + +Paket je prilikom instalacije stvorio listu 'mailman' koja je sistemska i +ne smije biti obrisana. Listi mozete pristupiti koristeci web sucelje na +adresi http://hostname/mailman/list/admin/mailman. Na adrese clanova ove +liste stizati ce svi korisnicki zahtjevi i sistemske obavijesti o radu +Mailman sustava (na primjer, nakon otvaranja neke nove liste na tu cete +adresu dobiti popis aliasa koje trebate upisati u /etc/aliases datoteku). +Paket je na ovu listu dodao adresu root accounta na vasem racunalu. Ukoliko +ce netko drugi obavljati duznosti administatora mailing listi, mozete +koristeci funkcije Upravljanja clanstvom u konfiguracijskom sucelju +prijaviti neku drugu email adresu i odjaviti root account. + +Dodavanje nove mailing liste moze se napraviti na dva nacina, koristenjem +web sucelja ili koristeci shell. Web sucelje se nalazi na adresi +http://hostname/mailman/create. U polja na formi se upisu trazeni podaci, i +u posljednje polje se upise administratorska lozinka za Mailman sustav koju +ste prethodno kreirali komandom /usr/sbin/mmsitepass. Ukoliko koristite +shell za kreiranje nove mailing liste ukucajte /usr/sbin/newlist te upisite +potrebne podatke. Nakon toga cete na mail dobiti aliase koje trebate upisati +u /etc/aliases datoteku, nakon cega cete pokrenuti komandu newaliases. + +Za administriranje same liste koristite web sucelje na adresi +http://hostname/mailman/list/admin/naziv-liste. Lozinka za pristup sucelju +moze biti ona koju koristi sam administator te liste, ali i ona koju koristi +osoba zaduzena za kreiranje listi (kreirana komandom mmsitepass). + +Sa korisnicke strane dostupno je sucelje na adresi +http://hostname/list/listinfo/naziv-liste. Koristeci navedeno sucelje +korisnici se mogu, ukoliko je to dozvolio administrator liste, pretplatiti +ili odjaviti sa liste. Moguce je pregledati i arhivu liste ukoliko je ona +javna. + +Vise o Mailmanu mozete pronaci na http://list.org. + + -- Ivan 'ico' Rako Thu, 20 Nov 2003 19:17:02 +0100 diff --git a/changelog.CARNet b/changelog.CARNet new file mode 120000 index 0000000..194579e --- /dev/null +++ b/changelog.CARNet @@ -0,0 +1 @@ +changelog.Debian \ No newline at end of file diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..2c24996 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,79 @@ +mailman-cn (2:2.1.9-1) carnet-etch; urgency=low + + * Prva verzija za Etch + + -- Ivan Rako Mon, 22 Oct 2007 00:14:02 +0200 + +mailman-cn (2:2.1.5-12) stable; urgency=low + + * Ovisnost o novoj verzija koja ispravlja sigurnosne nedostatke + (CVE-2006-0052 i DSA 1027-1) + + -- Ivan 'ico' Rako Thu, 6 Apr 2006 11:06:13 +0200 + +mailman-cn (2:2.1.5-11) stable; urgency=low + + * Podrazumni jezik je hrvatski + * Regeneriranje hrvatskog template-a u postinstu (inace pola sucelja + ostane na engleskom) + + -- Ivan 'ico' Rako Sat, 25 Feb 2006 00:49:30 +0100 + +mailman-cn (2:2.1.5-10) stable; urgency=low + + * Ovisnost o novoj verziji koja ispravlja sigurnosne nedostatke + (DSA 955-1, CVE-2005-3573 i CVE-2005-4153) + + -- Ivan 'ico' Rako Mon, 30 Jan 2006 13:03:12 +0100 + +mailman-cn (2:2.1.5-9) stable; urgency=low + + * Ispravak kod komentiranja stare opcije DEFAULT_URL (greskom se + zakomentira sve sto pocinje sa DEFAULT_URL) + + -- Ivan 'ico' Rako Tue, 10 Jan 2006 10:34:49 +0100 + +mailman-cn (2:2.1.5-8) stable; urgency=low + + * Od sada se u maintainer skriptama koristi CARNet tools + * Provjera da li postoji /etc/mail/smrsh/ prije 'ln -sf' + * Kozmetika postinsta + + -- Ivan 'ico' Rako Sat, 17 Dec 2005 18:09:34 +0100 + +mailman-cn (2:2.1.5-6.1) testing; urgency=high + + * /var/lib/mailman/Mailman/mm_cfg.py -> /etc/mailman/mm_cfg.py + * provjera da li je /var/lib/mailman/Mailman/mm_cfg.py symlink, ako nije, + napravi ga symlinkom na /etc/mailman/mm_cfg.py + + -- Ivan 'ico' Rako Fri, 18 Feb 2005 11:47:55 +0100 + +mailman-cn (2:2.1.5-6) testing; urgency=high + + * ovisnost o novoj verziji koja ispravlja sigurnosne nedostatke + (DSA 674-1, CAN-2004-1177 i CAN-2004-1177) + * izbaceno divertanje lokalizacije + + -- Ivan 'ico' Rako Thu, 10 Feb 2005 14:07:32 +0100 + +mailman-cn (2:2.1.5-5) sarge; urgency=high + + * kozmetika postinsta + * ovisnost o novoj verziji koja ispravlja sigurnosne nedostatke + (CAN-2004-1143 i CAN-2004-1177) + + -- Ivan 'ico' Rako Fri, 21 Jan 2005 12:15:50 +0100 + +mailman-cn (2:2.1.4-5) + + * /usr/local/doc -> /usr/share/doc + * kozmetika postinsta + + -- Ivan 'ico' Rako Thu, 24 Jun 2004 10:34:45 +0200 + +mailman-cn (2:2.1.4-1) + + * inicijalna verzija paketa + + -- Ivan 'ico' Rako Thu, 20 Nov 2003 19:29:17 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..52117d5 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: mailman-cn +Section: mail +Priority: optional +Maintainer: Ivan Rako +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.1 + +Package: mailman-cn +Architecture: all +Depends: mailman (>= 2.1.9), apache2-cn, carnet-tools-cn (>= 2.4) +Pre-Depends: pwgen +Description: Powerful, web-based mailing list manager + The GNU Mailing List Manager, which manages email discussion lists + much like Majordomo and Smartmail. Unlike most similar products, + Mailman gives each mailing list a web page, and allows users to + subscribe, unsubscribe, etc. over the web. Even the list manager can + administer his or her list entirely from the web. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..d92e2d1 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.CARNet +changelog.CARNet diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..910c215 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,187 @@ +#!/bin/sh -e + +set -e + +[ "$1" = "configure" ] || exit 0 + +# Load CARNet tools +. /usr/share/carnet-tools/functions.sh +# Load Debconf +. /usr/share/debconf/confmodule + +# Fri, 18 Feb 2005 11:48:51 +0100 +MM_CFG="/etc/mailman/mm_cfg.py" + +if [ ! -L /usr/lib/mailman/Mailman/mm_cfg.py -a -f /usr/lib/mailman/Mailman/mm_cfg.py ]; then + mv /usr/lib/mailman/Mailman/mm_cfg.py /usr/lib/mailman/Mailman/mm_cfg.py.cn-bak + ln -sf /etc/mailman/mm_cfg.py /usr/lib/mailman/Mailman/mm_cfg.py +fi + +if [ ! -L /etc/apache2/conf.d/mailman-cn.conf -a ! -f /etc/apache2/conf.d/mailman-cn.conf ]; then + ln -sf /etc/mailman/apache.conf /etc/apache2/conf.d/mailman-cn.conf +fi + +HOSTNAME="`hostname --fqdn`" + +mmcfg_add () { + opt="$1" + val="$2" + if ( grep -E -q "^$opt " $MM_CFG && ! grep -E -q "^$opt = $val$" $MM_CFG ) || grep -E -q "^#$opt " $MM_CFG; then + perl -ne \ +"if (/^#?$opt /) { + if (! \$found) { + \$found = 1; + \$_ = \"$opt = $val\\n\"; + } else { + next; + } + } + print \$_; +" < $MM_CFG > ${MM_CFG}.$$ + if ! cmp -s $MM_CFG ${MM_CFG}.$$; then + cp_mv ${MM_CFG}.$$ $MM_CFG + restart=yes + else + rm -f ${MM_CFG}.$$ + exit 1 # shouldn't happen + fi + elif ! grep -E -q "^$opt = $val$" $MM_CFG; then + echo "$opt = $val" >> $MM_CFG + restart=yes + fi +} + +cp_backup_conffile -p -d mailman $MM_CFG || true + +# ocisti smece od prosle verzije +if dpkg --compare-versions "$2" lt 2:2.1.5-9; then + HN="'$HOSTNAME'" + grep -v -E 'DEFAULT_(URL_PATTERN|URL_HOST|EMAIL_HOST) =' $MM_CFG | \ + awk '/^# Default host for web interface of newly created MLs/ { print $0; print "DEFAULT_EMAIL_HOST = '$HN'"; getline } { print $0 }' | \ + awk '/^# Default domain for email addresses of newly created MLs/ { print $0; print "DEFAULT_URL_HOST = '$HN'"; getline } { print $0 }' \ + > ${MM_CFG}.$$ + cp_mv ${MM_CFG}.$$ $MM_CFG +fi + +# stavi hrvatski kao jezik +mmcfg_add "DEFAULT_SERVER_LANGUAGE" "'hr'" + +# sredi DEFAULT_URL_PATTERN +mmcfg_add "DEFAULT_URL_PATTERN" "'http://%s/mailman/'" + +# sredi VIRTUAL_HOST_OVERVIEW +mmcfg_add "VIRTUAL_HOST_OVERVIEW" "Off" + +# sredi DEFAULT_URL_HOST +mmcfg_add "DEFAULT_URL_HOST" "'$HOSTNAME'" + +# sredi DEFAULT_EMAIL_HOST +mmcfg_add "DEFAULT_EMAIL_HOST" "'$HOSTNAME'" + +# sredi PRIVATE_ARCHIVE_URL +mmcfg_add "PRIVATE_ARCHIVE_URL" "'/mailman/private'" + +# kreirati link za smrsh +if [ -d /etc/mail/smrsh/ ]; then + ln -sf /var/lib/mailman/mail/mailman /etc/mail/smrsh/mailman +fi + +# zakomentiraj prastare opcije +if [ -f $MM_CFG ]; then + cp_check_and_sed '^DEFAULT_MAIL_HOST ' \ + 's/^DEFAULT_MAIL_HOST .*/d' \ + $MM_CFG || true + cp_check_and_sed '^DEFAULT_URL ' \ + 's/^\(DEFAULT_URL .*\)/#\1/g' \ + $MM_CFG || true +fi + +# kreirati mailman listu +if [ -z "`list_lists | grep -i mailman`" ]; then + newlist -q mailman mailman@$HOSTNAME `pwgen 8 1` > /dev/null +fi + +# kreirati aliase +if ! grep -q "mailman.*/var/lib/mailman/mail/mailman" /etc/aliases; then + cat >> /etc/aliases < /dev/null +fi + +withlist mailman > /dev/null 2> /dev/null << EOF +m.advertised = False +m.Lock() +m.Save() +m.Unlock() +EOF + +# dodati roota na mailman listu: +if [ ! "`list_members mailman | wc -l`" -ge 1 ]; then + add_members -r - mailman <&2 + mkdir -p ${mm_etc}/${lang} + for file in $(ls ${mm_dist}/${lang}); do + echo -n . >&2 + langfile=${lang}/${file} + ucf --debconf-ok --three-way ${mm_dist}/${langfile} ${mm_etc}/${langfile} 2>/dev/null + # Upon install ucf leaves a duplicate in .dpkg-dist (Bug #238730), remove it + cmp -s ${mm_etc}/${langfile} ${mm_etc}/${langfile}.dpkg-dist \ + && rm ${mm_etc}/${langfile}.dpkg-dist + done + echo " done." >&2 +done + + +# restart mailman +if [ "$restart" = "yes" -a -x /etc/init.d/mailman ]; then + /etc/init.d/mailman stop + /etc/init.d/mailman start +fi + +# restartat apache2 +if [ -x /etc/init.d/apache2 ]; then + /etc/init.d/apache2 reload || true +fi + +# promjena passworda +echo +if [ ! -f /var/lib/mailman/data/adm.pw ]; then + echo "CN: IMPORTANT: Change your site administrator password using the command:" + echo "CN:" + echo "CN: # mmsitepass" + echo "CN:" +fi +echo "CN: Web interface is at http://$HOSTNAME/mailman/admin/" diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..2bcf4b2 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +[ "$1" = "purge" ] || exit 0 + +if [ /etc/apache2/conf.d/mailman-cn.conf ]; then + rm -f /etc/apache2/conf.d/mailman-cn.conf +fi + +# restartat apache +if [ -x /etc/init.d/apache2 ]; then + /etc/init.d/apache2 reload || true +fi diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..b9fd834 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +[ "$1" = "remove" ] || exit 0 + +# restartat apache +if [ -x /etc/init.d/apache2 ]; then + /etc/init.d/apache2 reload || true +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..718577b --- /dev/null +++ b/debian/rules @@ -0,0 +1,86 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + # $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + # -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/openssh-cn. + # $(MAKE) install DESTDIR=$(CURDIR)/debian/openssh-cn + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs -k + dh_installdocs +# dh_installexamples + dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman +# dh_link +# dh_strip +# dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure -- 1.7.10.4