[arch-commits] Commit in mailman/trunk (3 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Tue Aug 3 20:23:17 UTC 2010


    Date: Tuesday, August 3, 2010 @ 16:23:16
  Author: andyrtr
Revision: 86762

upgpkg: mailman 2.1.13-1
update to 2.1.13, fix build issues and user/group handlling, /home/mailman isn't needed anymore

Added:
  mailman/trunk/mailman-2.1-build.patch
Modified:
  mailman/trunk/PKGBUILD
  mailman/trunk/mailman.install

-------------------------+
 PKGBUILD                |   65 ++--
 mailman-2.1-build.patch |  694 ++++++++++++++++++++++++++++++++++++++++++++++
 mailman.install         |   34 +-
 3 files changed, 758 insertions(+), 35 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-03 19:12:29 UTC (rev 86761)
+++ PKGBUILD	2010-08-03 20:23:16 UTC (rev 86762)
@@ -2,7 +2,7 @@
 # Maintainer: Paul Mattal <paul at archlinux.org>
 
 pkgname=mailman
-pkgver=2.1.12
+pkgver=2.1.13
 pkgrel=1
 pkgdesc="Mailing list manager with built in web access"
 arch=('i686' 'x86_64')
@@ -12,50 +12,71 @@
 # 'Defaults.py' should not be changed by users; 'mm_cfg.py' should instead.
 backup=('usr/lib/mailman/Mailman/mm_cfg.py')
 install=$pkgname.install
-source=(http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tgz \
+source=(http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tgz
+	mailman-2.1-build.patch
 	rc.mailman)
-md5sums=('d565a6d2d0ec6d2dd6936a81e1c1ca86'
+md5sums=('3235323ccb3e0135c10b7c66a440390b'
+         'ed04d062379eb21e39ce1e70e6b1ade2'
          '3d83d06d0ec3319bf3c7d9df5d18e89f')
 
+# needs to be build as root for pam allowing to create new user/group
+# LANG=C; time rm -rf src/ pkg/ && time makepkg -L --asroot
+
 build() {
-  cd $srcdir/$pkgname-$pkgver || return 1
+  cd $srcdir/$pkgname-$pkgver
+
+  # fix directory permissions to satisfy check_perms
+  patch -Np1 -i ${srcdir}/mailman-2.1-build.patch
   
-  # the mailman user and group are required to build
+  # the mailman user and group are required to build (better to satisfy check_perms)
   if [ ! `egrep '^mailman' /etc/passwd` ]; then
     msg "Adding user/group mailman (temporarily)"
-    groupadd -g 80 mailman || return 1
-    sleep 2
-    useradd -u 80 -g mailman -d /home/mailman -s /bin/false mailman \
-    	|| return 1
-    mkdir -p /home/mailman || return 1
-    chown mailman.mailman /home/mailman || return 1
-    chmod a+rx,g+ws /home/mailman || return 1
+    groupadd -g 80 mailman
+    useradd -s /sbin/nologin -c "GNU Mailing List Manager" -d /usr/lib/mailman -u 80 -g mailman -M -r mailman
     cleanup=1
   else
     cleanup=0
   fi
 
-  # set permissions and ownership on the target directory
-  #mkdir -p $pkgdir/home/mailman || return 1
-  #chown mailman.mailman $pkgdir/home/mailman || return 1
-  #chmod a+rx,g+ws $pkgdir/home/mailman || return 1
-
-  # configure and build
   ./configure --without-permcheck \
               --prefix=/usr/lib/mailman \
               --with-var-prefix=/var/lib/mailman \
               --with-mail-gid=mailman \
+	      --with-username=mailman --with-groupname=mailman \
               --with-cgi-gid=http
 
-  make || return 1
-  make DESTDIR=$pkgdir install || return 1
+  make
+}
 
+package() {
+  cd $srcdir/$pkgname-$pkgver
+  make DESTDIR=$pkgdir install
+
+  # let's follow Fedora FHS way; Gentoo does it the other way round
+
+  # Create a link so that the config file mm_cfg.py appears in config
+  # directory /etc/mailman. We don't put mm_cfg.py in the config directory
+  # because its executable code (python file) and the security policy wants
+  # to keep executable code out of /etc and inside of a lib directory instead,
+  # and because traditionally mm_cfg.py was in the Mailman subdirectory and
+  # experienced mailman admins will expect to find it there. But having it
+  # "appear" in the config directory is good practice and heading in the
+  # right direction for FHS compliance.
+  install -d -m755 ${pkgdir}/etc/${pkgname}
+  ln -sv /usr/lib/mailman/Mailman/mm_cfg.py ${pkgdir}/etc/${pkgname}/mm_cfg.py
+
+  # fix some permissions to satisfy check_perms
+  chown -R mailman:mailman $pkgdir/{usr/lib/mailman,var/lib/mailman,etc/mailman/*}
+  chown http:mailman ${pkgdir}/var/lib/mailman/archives/private
+  chmod 2770 ${pkgdir}/var/lib/mailman/archives/private
+  chmod 2755 ${pkgdir}/usr/lib/mailman/cgi-bin/* 
+  chmod 2755 ${pkgdir}/usr/lib/mailman/mail/mailman
+  
   # install the launch script
   install -D -m755 $srcdir/rc.mailman $pkgdir/etc/rc.d/mailman || return 1
-
+  
   if [ $cleanup -eq 1 ]; then
     msg "Removing user/group mailman"
     userdel mailman
-    rmdir /home/mailman
   fi
 }

Added: mailman-2.1-build.patch
===================================================================
--- mailman-2.1-build.patch	                        (rev 0)
+++ mailman-2.1-build.patch	2010-08-03 20:23:16 UTC (rev 86762)
@@ -0,0 +1,694 @@
+diff -ruN mailman-2.1.12-a/bin/Makefile.in mailman-2.1.12-b/bin/Makefile.in
+--- mailman-2.1.12-a/bin/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/bin/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -56,7 +55,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -72,8 +71,6 @@
+ 	    $(INSTALL) -m $(EXEMODE) $(BUILDDIR)/$$f $(DESTDIR)$(SCRIPTSDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/cron/Makefile.in mailman-2.1.12-b/cron/Makefile.in
+--- mailman-2.1.12-a/cron/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/cron/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -68,8 +67,6 @@
+ 	    $(INSTALL) -m $(EXEMODE) $(BUILDDIR)/$$f $(DESTDIR)$(CRONDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Archiver/Makefile.in mailman-2.1.12-b/Mailman/Archiver/Makefile.in
+--- mailman-2.1.12-a/Mailman/Archiver/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Archiver/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -47,7 +46,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -63,8 +62,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Bouncers/Makefile.in mailman-2.1.12-b/Mailman/Bouncers/Makefile.in
+--- mailman-2.1.12-a/Mailman/Bouncers/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Bouncers/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Cgi/Makefile.in mailman-2.1.12-b/Mailman/Cgi/Makefile.in
+--- mailman-2.1.12-a/Mailman/Cgi/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Cgi/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -47,7 +46,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -63,8 +62,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(CGIDIR); \
+         done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Commands/Makefile.in mailman-2.1.12-b/Mailman/Commands/Makefile.in
+--- mailman-2.1.12-a/Mailman/Commands/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Commands/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Gui/Makefile.in mailman-2.1.12-b/Mailman/Gui/Makefile.in
+--- mailman-2.1.12-a/Mailman/Gui/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Gui/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Handlers/Makefile.in mailman-2.1.12-b/Mailman/Handlers/Makefile.in
+--- mailman-2.1.12-a/Mailman/Handlers/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Handlers/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Logging/Makefile.in mailman-2.1.12-b/Mailman/Logging/Makefile.in
+--- mailman-2.1.12-a/Mailman/Logging/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Logging/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Makefile.in mailman-2.1.12-b/Mailman/Makefile.in
+--- mailman-2.1.12-a/Mailman/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -20,8 +20,6 @@
+ 
+ # Variables set by configure
+ 
+-VERSION=	@VERSION@
+-
+ VPATH=		@srcdir@
+ srcdir= 	@srcdir@
+ bindir= 	@bindir@
+@@ -30,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -48,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -79,12 +76,6 @@
+ 	    (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \
+ 	done
+ 
+-finish:
+-	@for d in $(SUBDIRS); \
+-	do \
+-	    (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) finish); \
+-	done
+-
+ clean:
+ 	for d in $(SUBDIRS); \
+ 	do \
+diff -ruN mailman-2.1.12-a/Mailman/MTA/Makefile.in mailman-2.1.12-b/Mailman/MTA/Makefile.in
+--- mailman-2.1.12-a/Mailman/MTA/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/MTA/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Mailman/Queue/Makefile.in mailman-2.1.12-b/Mailman/Queue/Makefile.in
+--- mailman-2.1.12-a/Mailman/Queue/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Mailman/Queue/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/Makefile.in mailman-2.1.12-b/Makefile.in
+--- mailman-2.1.12-a/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -61,11 +61,10 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+-DIRSETGID=	chmod g+s
+ 
+ DATE = $(shell python -c 'import time; print time.strftime("%d-%b-%Y"),')
+ LANGPACK = README-I18N.en templates messages
+@@ -85,14 +84,24 @@
+ 
+ doinstall: $(SUBDIRS)
+ 	@echo "Creating architecture independent directories..."
++	dir=$(DESTDIR)$(prefix); \
++	if test ! -d $$dir; then \
++		echo "Creating directory hierarchy $$dir"; \
++		$(INSTALL) -d -m $(DIRMODE) $$dir; \
++	else true; \
++	fi;
++	dir=$(DESTDIR)$(var_prefix); \
++	if test ! -d $$dir; then \
++		echo "Creating directory hierarchy $$dir"; \
++		$(INSTALL) -d -m $(DIRMODE) $$dir; \
++	else true; \
++	fi;
+ 	@for d in $(VAR_DIRS); \
+ 	do \
+ 	    dir=$(DESTDIR)$(var_prefix)/$$d; \
+ 	    if test ! -d $$dir; then \
+ 		echo "Creating directory hierarchy $$dir"; \
+-		$(srcdir)/mkinstalldirs $$dir; \
+-		chmod $(DIRMODE) $$dir; \
+-		$(DIRSETGID) $$dir; \
++		$(INSTALL) -d -m $(DIRMODE) $$dir; \
+ 	    else true; \
+ 	    fi; \
+ 	done
+@@ -102,9 +111,7 @@
+ 	    dir=$(DESTDIR)$(prefix)/$$d; \
+ 	    if test ! -d $$dir; then \
+ 		echo "Creating directory hierarchy $$dir"; \
+-		$(srcdir)/mkinstalldirs $$dir; \
+-		chmod $(DIRMODE) $$dir; \
+-		$(DIRSETGID) $$dir; \
++		$(INSTALL) -d -m $(DIRMODE) $$dir; \
+ 	    else true; \
+ 	    fi; \
+ 	done
+@@ -114,9 +121,7 @@
+ 	    dir=$(DESTDIR)$(exec_prefix)/$$d; \
+ 	    if test ! -d $$dir; then \
+ 		echo "Creating directory hierarchy $$dir"; \
+-		$(srcdir)/mkinstalldirs $$dir; \
+-		chmod $(DIRMODE) $$dir; \
+-		$(DIRSETGID) $$dir; \
++		$(INSTALL) -d -m $(DIRMODE) $$dir; \
+ 	    else true; \
+ 	    fi; \
+ 	done
+diff -ruN mailman-2.1.12-a/messages/Makefile.in mailman-2.1.12-b/messages/Makefile.in
+--- mailman-2.1.12-a/messages/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/messages/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -32,7 +32,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -43,7 +42,6 @@
+ CFLAGS=		$(OPT) $(DEFS)
+ PACKAGEDIR= 	$(prefix)/messages
+ SHELL=		/bin/sh
+-DIRSETGID=	chmod g+s
+ MSGFMT= 	@PYTHON@ ../build/bin/msgfmt.py
+ MSGMERGE=	msgmerge
+ 
+@@ -60,7 +58,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -90,9 +88,8 @@
+ 	do \
+ 	    dir=$(DESTDIR)$(prefix)/$$d; \
+ 	    echo "Creating language directory $$dir"; \
+-	    $(srcdir)/../mkinstalldirs $$dir; \
+-	    chmod $(DIRMODE) $$dir; \
+-	    $(DIRSETGID) $$dir; \
++	    $(INSTALL) -d -m $(DIRMODE) `dirname $$dir`; \
++	    $(INSTALL) -d -m $(DIRMODE) $$dir; \
+ 	done
+ 	@for d in $(LANGUAGES); \
+ 	do \
+@@ -113,8 +110,6 @@
+ 
+ mofiles: $(MOFILES)
+ 
+-finish:
+-
+ clean:
+ 	-rm -f */LC_MESSAGES/mailman.mo
+ 
+diff -ruN mailman-2.1.12-a/misc/Makefile.in mailman-2.1.12-b/misc/Makefile.in
+--- mailman-2.1.12-a/misc/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/misc/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -30,7 +30,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ PYTHON=		@PYTHON@
+ 
+@@ -62,7 +61,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ DATAMODE=	664
+@@ -101,8 +100,6 @@
+ 	    (cd $(PKGDIR)/$$p ; umask 02 ; PYTHONPATH=$(PYTHONLIBDIR) $(PYTHON) $(SETUPCMD)); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/scripts/Makefile.in mailman-2.1.12-b/scripts/Makefile.in
+--- mailman-2.1.12-a/scripts/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/scripts/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -49,7 +48,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -68,8 +67,6 @@
+ 	$(INSTALL) -m $(FILEMODE) $(srcdir)/join    $(DESTDIR)$(SCRIPTSDIR)/subscribe
+ 	$(INSTALL) -m $(FILEMODE) $(srcdir)/leave   $(DESTDIR)$(SCRIPTSDIR)/unsubscribe
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/src/Makefile.in mailman-2.1.12-b/src/Makefile.in
+--- mailman-2.1.12-a/src/Makefile.in	2009-07-28 12:19:47.000000000 +0200
++++ mailman-2.1.12-b/src/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ PYTHON=  	@PYTHON@
+ 
+@@ -63,10 +62,9 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
+-EXEMODE=	755
++DIRMODE=	2775
++EXEMODE=	2755
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+-DIRSETGID=	chmod g+s
+ 
+ # Fixed definitions
+ 
+@@ -110,20 +108,10 @@
+ 	do \
+ 	    exe=$(DESTDIR)$(CGIDIR)/$$f$(CGIEXT); \
+ 	    $(INSTALL_PROGRAM) $$f $$exe; \
+-	    $(DIRSETGID) $$exe; \
+ 	done
+ 	for f in $(MAIL_PROGS); \
+ 	do \
+ 	    $(INSTALL_PROGRAM) $$f $(DESTDIR)$(MAILDIR); \
+-	    $(DIRSETGID) $(DESTDIR)$(MAILDIR)/$$f; \
+-	done
+-
+-finish:
+-	-for f in $(SUID_CGI_PROGS); \
+-	do \
+-	    exe=$(DESTDIR)$(CGIDIR)/$$f$(CGIEXT); \
+-	    chown $(MAILMAN_USER) $$exe; \
+-	    chmod u+s $$exe; \
+ 	done
+ 
+ clean:
+diff -ruN mailman-2.1.12-a/templates/Makefile.in mailman-2.1.12-b/templates/Makefile.in
+--- mailman-2.1.12-a/templates/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/templates/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ TRUE=		@TRUE@
+ 
+@@ -48,7 +47,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,15 +60,13 @@
+ install:
+ 	for d in $(LANGUAGES); \
+ 	do \
+-	    $(srcdir)/../mkinstalldirs $(DESTDIR)$(TEMPLATEDIR)/$$d; \
++	    $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(TEMPLATEDIR)/$$d; \
+ 	    for f in $(srcdir)/$$d/*.html $(srcdir)/$$d/*.txt; \
+ 	    do \
+ 	    	$(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(TEMPLATEDIR)/$$d; \
+ 	    done; \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/tests/bounces/Makefile.in mailman-2.1.12-b/tests/bounces/Makefile.in
+--- mailman-2.1.12-a/tests/bounces/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/tests/bounces/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -46,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -60,8 +59,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(BOUNCEDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/tests/Makefile.in mailman-2.1.12-b/tests/Makefile.in
+--- mailman-2.1.12-a/tests/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/tests/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -46,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -71,8 +70,6 @@
+ 	    (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:
+diff -ruN mailman-2.1.12-a/tests/msgs/Makefile.in mailman-2.1.12-b/tests/msgs/Makefile.in
+--- mailman-2.1.12-a/tests/msgs/Makefile.in	2009-02-23 22:23:35.000000000 +0100
++++ mailman-2.1.12-b/tests/msgs/Makefile.in	2009-07-28 12:19:48.000000000 +0200
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ 
+ CC=		@CC@
+-CHMOD=  	@CHMOD@
+ INSTALL=	@INSTALL@
+ 
+ DEFS=   	@DEFS@
+@@ -46,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=	775
++DIRMODE=	2775
+ EXEMODE=	755
+ FILEMODE=	644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -60,8 +59,6 @@
+ 	    $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(MSGSDIR); \
+ 	done
+ 
+-finish:
+-
+ clean:
+ 
+ distclean:

Modified: mailman.install
===================================================================
--- mailman.install	2010-08-03 19:12:29 UTC (rev 86761)
+++ mailman.install	2010-08-03 20:23:16 UTC (rev 86762)
@@ -1,23 +1,31 @@
-# arg 1:  the new package version
+## arg 1:  the new package version
 post_install() {
-  groupadd -g 80 mailman &>/dev/null
-  useradd -u 80 -g mailman -d /home/mailman -s /bin/false mailman &>/dev/null
-  cd /home/mailman && bin/check_perms -f >/dev/null 2>&1
+  # Make sure the group and user "mailman" exists on this system and has the correct values
+  if grep -q "^mailman:" /etc/group &> /dev/null ; then
+    groupmod -g 80 -n mailman mailman &> /dev/null
+  else
+    groupadd -g 80 mailman &> /dev/null
+  fi
+  
+  if grep -q "^mailman:" /etc/passwd 2> /dev/null ; then
+    usermod -s /sbin/nologin -c "GNU Mailing List Manager" -d /usr/lib/mailman -u 80 -g mailman mailman &> /dev/null
+  else
+    useradd -s /sbin/nologin -c "GNU Mailing List Manager" -d /usr/lib/mailman -u 80 -g mailman -M -r mailman &> /dev/null
+  fi 
+
+  # check file permissions
+#  cd /usr/lib/mailman && bin/check_perms -f  > /dev/null 2>&1     # -f applies fixes we should solve in the PKGBUILD
+  cd /usr/lib/mailman && bin/check_perms > /dev/null
 }
 
-# arg 1:  the new package version
-# arg 2:  the old package version
+## arg 1:  the new package version
+## arg 2:  the old package version
 post_upgrade() {
   post_install $1
 }
 
-# arg 1:  the old package version
+## arg 1:  the old package version
 pre_remove() {
   userdel mailman &>/dev/null
-  groupdel mailman &>/dev/null
+  groupdel mailman &>/dev/null || /bin/true
 }
-
-op=$1
-shift
-
-$op $*




More information about the arch-commits mailing list