ports/opt (3.2): mailman: updated to 2.1.21, improved daemon script and README file
commit f876572d1dbfa55409c55821f2308dec221a40eb Author: Jose V Beneyto <sepen@crux.nu> Date: Mon Apr 4 11:08:21 2016 +0200 mailman: updated to 2.1.21, improved daemon script and README file diff --git a/mailman/.footprint b/mailman/.footprint index adb6d16..d0b4ee5 100644 --- a/mailman/.footprint +++ b/mailman/.footprint @@ -531,6 +531,7 @@ drwxrwxr-x root/mailman usr/lib/mailman/messages/sr/ drwxrwsr-x root/mailman usr/lib/mailman/messages/sr/LC_MESSAGES/ -rw-r--r-- root/mailman usr/lib/mailman/messages/sr/LC_MESSAGES/mailman.mo -rw-r--r-- root/mailman usr/lib/mailman/messages/sr/LC_MESSAGES/mailman.po +-rw-r--r-- root/mailman usr/lib/mailman/messages/sr/README.sr drwxrwxr-x root/mailman usr/lib/mailman/messages/sv/ drwxrwsr-x root/mailman usr/lib/mailman/messages/sv/LC_MESSAGES/ -rw-r--r-- root/mailman usr/lib/mailman/messages/sv/LC_MESSAGES/mailman.mo @@ -796,6 +797,7 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/da/ -rw-r--r-- root/mailman usr/lib/mailman/templates/da/userpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/da/verify.txt drwxrwxr-x root/mailman usr/lib/mailman/templates/de/ +-rw-r--r-- root/mailman usr/lib/mailman/templates/de/adminaddrchgack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/de/admindbdetails.html -rw-r--r-- root/mailman usr/lib/mailman/templates/de/admindbpreamble.html -rw-r--r-- root/mailman usr/lib/mailman/templates/de/admindbsummary.html @@ -886,6 +888,7 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/el/ -rw-r--r-- root/mailman usr/lib/mailman/templates/el/userpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/el/verify.txt drwxrwxr-x root/mailman usr/lib/mailman/templates/en/ +-rw-r--r-- root/mailman usr/lib/mailman/templates/en/adminaddrchgack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/en/admindbdetails.html -rw-r--r-- root/mailman usr/lib/mailman/templates/en/admindbpreamble.html -rw-r--r-- root/mailman usr/lib/mailman/templates/en/admindbsummary.html @@ -1348,6 +1351,7 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/hu/ -rw-r--r-- root/mailman usr/lib/mailman/templates/hu/userpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/hu/verify.txt drwxrwxr-x root/mailman usr/lib/mailman/templates/ia/ +-rw-r--r-- root/mailman usr/lib/mailman/templates/ia/adminaddrchgack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/ia/admindbdetails.html -rw-r--r-- root/mailman usr/lib/mailman/templates/ia/admindbpreamble.html -rw-r--r-- root/mailman usr/lib/mailman/templates/ia/admindbsummary.html @@ -1438,6 +1442,7 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/it/ -rw-r--r-- root/mailman usr/lib/mailman/templates/it/userpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/it/verify.txt drwxrwxr-x root/mailman usr/lib/mailman/templates/ja/ +-rw-r--r-- root/mailman usr/lib/mailman/templates/ja/adminaddrchgack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/ja/admindbdetails.html -rw-r--r-- root/mailman usr/lib/mailman/templates/ja/admindbpreamble.html -rw-r--r-- root/mailman usr/lib/mailman/templates/ja/admindbsummary.html @@ -1648,9 +1653,6 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/no/ -rw-r--r-- root/mailman usr/lib/mailman/templates/no/userpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/no/verify.txt drwxrwxr-x root/mailman usr/lib/mailman/templates/pl/ --rw-r--r-- root/mailman usr/lib/mailman/templates/pl/admindbdetails.html --rw-r--r-- root/mailman usr/lib/mailman/templates/pl/admindbpreamble.html --rw-r--r-- root/mailman usr/lib/mailman/templates/pl/admindbsummary.html -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/adminsubscribeack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/adminunsubscribeack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/admlogin.html @@ -1666,11 +1668,9 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/pl/ -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/article.html -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/bounce.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/checkdbs.txt --rw-r--r-- root/mailman usr/lib/mailman/templates/pl/convert.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/cronpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/disabled.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/emptyarchive.html --rw-r--r-- root/mailman usr/lib/mailman/templates/pl/headfoot.html -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/help.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/invite.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/pl/listinfo.html @@ -1821,6 +1821,7 @@ drwxrwxr-x root/mailman usr/lib/mailman/templates/ro/ -rw-r--r-- root/mailman usr/lib/mailman/templates/ro/userpass.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/ro/verify.txt drwxrwxr-x root/mailman usr/lib/mailman/templates/ru/ +-rw-r--r-- root/mailman usr/lib/mailman/templates/ru/adminaddrchgack.txt -rw-r--r-- root/mailman usr/lib/mailman/templates/ru/admindbdetails.html -rw-r--r-- root/mailman usr/lib/mailman/templates/ru/admindbpreamble.html -rw-r--r-- root/mailman usr/lib/mailman/templates/ru/admindbsummary.html diff --git a/mailman/.md5sum b/mailman/.md5sum index 8610957..2c79f81 100644 --- a/mailman/.md5sum +++ b/mailman/.md5sum @@ -1,2 +1,2 @@ -dc861ed9698a98499a951eaef7d4db9f mailman-2.1.18-1.tgz -edc8b6a6164125a0435e413af4f1c34b mailman.rc +848fcb250ca1461445d07b8a30c07376 mailman-2.1.21.tgz +7e2838b90969634d87ee180ebc54af6d mailman.rc diff --git a/mailman/Pkgfile b/mailman/Pkgfile index 81a2232..7d077c2 100644 --- a/mailman/Pkgfile +++ b/mailman/Pkgfile @@ -5,13 +5,16 @@ # Depends on: dnspython name=mailman -version=2.1.18 -release=3 -source=(http://ftp.gnu.org/gnu/$name/$name-${version}-1.tgz \ +version=2.1.21 +release=1 +source=(http://ftp.gnu.org/gnu/$name/$name-$version.tgz \ $name.rc) build() { - cd $name-${version}-1 + cd $name-$version + + # update patch from 2.1.5 to 2.1.21 + sed 's|# pidfile: .*|# pidfile: @VAR_PREFIX@/data/master-qrunner.pid|' -i contrib/redhat_fhs.patch patch -p1 -i contrib/redhat_fhs.patch rm -f configure @@ -49,8 +52,8 @@ build() { __EOF__ # fix permissions - chown -R root:$name $PKG/etc/$name $PKG/usr/lib/$name \ - $PKG/var/{lib,lock,log,run,spool}/$name + chown -R root:$name $PKG/etc/$name $PKG/usr/lib/$name $PKG/var/{lib,lock,log,run,spool}/$name + chmod 0775 $PKG/var/log/$name chmod 1777 $PKG/var/lock find $PKG/usr/lib/$name -type d -exec chmod 0775 {} \; chmod o+x $PKG/var/lib/$name/archives/private diff --git a/mailman/README b/mailman/README index ddf71bf..510df37 100644 --- a/mailman/README +++ b/mailman/README @@ -7,6 +7,14 @@ PRE-INSTALL Execute the pre-install script to add a new mailman user/group +POST-INSTALL + + Mailman required the creation of a list on the server called 'mailman'. + You should create it manually to avoid this message: + 'Site list is missing: mailman' + Follow NOTES section in this README file for more information. + + NOTES Configure options: @@ -27,7 +35,7 @@ NOTES To create a new list: - $ sudo /usr/lib/mailman/bin/newlist + $ sudo /usr/lib/mailman/bin/newlist <list_name> To check perimissions: @@ -62,8 +70,6 @@ NOTES [...] - - IMPORTANT: If archives/private is not o+x, then the owner of archives/private must be the web server user whatever that is - i.e. the web server user must be able to search in archives/private. diff --git a/mailman/mailman.rc b/mailman/mailman.rc index 962a94a..3dc82b9 100755 --- a/mailman/mailman.rc +++ b/mailman/mailman.rc @@ -3,23 +3,47 @@ # /etc/rc.d/mailman: start/stop mailman daemon # -PYTHON=/usr/bin/python -MAILMANHOME=/usr/lib/mailman -MAILMANCTL=$MAILMANHOME/bin/mailmanctl +SSD=/sbin/start-stop-daemon +PROG=/usr/lib/mailman/bin/mailmanctl +PID=/var/run/mailman/master-qrunner.pid + +fix_log_perms() { + local errorlog="/var/log/mailman/error" + if [ ! -f $errorlog ]; then + touch $errorlog + chown root:mailman $errorlog + chmod 775 $errorlog + fi +} case $1 in - start) - $PYTHON $MAILMANCTL -s -q start - ;; - stop) - $PYTHON $MAILMANCTL -q stop - ;; - restart) - $PYTHON $MAILMANCTL -q restart - ;; - *) - echo "usage: $0 [start|stop|restart]" - ;; +start) + fix_log_perms + $SSD --start --pidfile $PID --exec $PROG -- -q start + ;; +stop) + $SSD --start --pidfile $PID --exec $PROG -- -q stop + $SSD --stop --retry 10 --pidfile $PID + ;; +restart) + $0 stop + $0 start + ;; +reload) + $SSD --start --pidfile $PID --exec $PROG -- -q restart + ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; +*) + echo "usage: $0 [start|stop|restart|reload|status]" + ;; esac # End of file
participants (1)
-
crux@crux.nu