[arch-commits] Commit in fetchmail/trunk (PKGBUILD fetchmail.install fetchmail.rc)

Eric Bélanger eric at archlinux.org
Mon Dec 13 01:30:42 UTC 2010


    Date: Sunday, December 12, 2010 @ 20:30:42
  Author: eric
Revision: 102917

upgpkg: fetchmail 6.3.19-1
Upstream update, Changed shell from /bin/bash to /bin/false (close FS#19796)

Modified:
  fetchmail/trunk/PKGBUILD
  fetchmail/trunk/fetchmail.install
  fetchmail/trunk/fetchmail.rc

-------------------+
 PKGBUILD          |   27 +++++++++++++--------------
 fetchmail.install |   19 +++++++------------
 fetchmail.rc      |    2 +-
 3 files changed, 21 insertions(+), 27 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-12-13 00:07:39 UTC (rev 102916)
+++ PKGBUILD	2010-12-13 01:30:42 UTC (rev 102917)
@@ -1,10 +1,9 @@
 # $Id$
 # Maintainer: Aaron Griffin <aaron at archlinux.org>
-# Contributor: dorphell <dorphell at archlinux.org>
 
 pkgname=fetchmail
-pkgver=6.3.17
-pkgrel=2
+pkgver=6.3.19
+pkgrel=1
 pkgdesc="A remote-mail retrieval utility"
 url="http://fetchmail.berlios.de/"
 arch=('i686' 'x86_64')
@@ -13,26 +12,26 @@
 options=('!makeflags')
 license=('GPL')
 install=fetchmail.install
-source=(http://download2.berlios.de/fetchmail/$pkgname-$pkgver.tar.bz2
+source=(http://download2.berlios.de/fetchmail/${pkgname}-${pkgver}.tar.bz2
         fetchmail.rc fetchmail.conf)
-md5sums=('7b1d449ecddb6164e22c32854adc4a75'
-         'b5f4d1da0c61d3d8a93fdf4e238f4949'
+md5sums=('64519711c8533f5a34d20c9ff620d880' '6742e99d65a827bc2b9d6bc8efe269e6'\
          '8fcd6a22dfbc247755fdd050c5c5c4d3')
+sha1sums=('fcc9b9299fe147d8f522cff93f8f619e5e1372b7' '13c7e3c538211c79c5b403f2bfa6712a2ad0ac30'\
+         '30401729386d6f774c6c36ab8530842166de54a8')
 
 build() {
-  cd $srcdir/$pkgname-$pkgver
-
+  cd "${srcdir}/${pkgname}-${pkgver}"
   ./configure --prefix=/usr --with-ssl=/usr
-  make || return 1
+  make
 }
 
 package() {
-  cd $srcdir/$pkgname-$pkgver
-  make DESTDIR=$pkgdir install
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
 
-  install -Dm755 $srcdir/fetchmail.rc $pkgdir/etc/rc.d/fetchmail
-  install -Dm644 $srcdir/fetchmail.conf $pkgdir/etc/conf.d/fetchmail
+  install -Dm755 "${srcdir}/fetchmail.rc" "${pkgdir}/etc/rc.d/fetchmail"
+  install -Dm644 "${srcdir}/fetchmail.conf" "${pkgdir}/etc/conf.d/fetchmail"
 
   # "home" directory for pid file.
-  install -d -o 90 -g nobody -m700 $pkgdir/var/run/fetchmail
+  install -d -o 90 -g nobody -m700 "${pkgdir}/var/run/fetchmail"
 }

Modified: fetchmail.install
===================================================================
--- fetchmail.install	2010-12-13 00:07:39 UTC (rev 102916)
+++ fetchmail.install	2010-12-13 01:30:42 UTC (rev 102917)
@@ -1,25 +1,20 @@
-# arg 1:  the new package version
 post_install() {
   # /etc/fetchmail must be owned by fetchmail for daemon to work.
   echo "If you run fetchmail as a daemon and not a cron job"
   echo "then 'chown fetchmail /etc/fetchmailrc'"
-  # the su in /etc/rc.d/fetchmail wont work without a shell.
   getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \
-      -d '/var/run/fetchmail' -c 'Fetchmail daemon' -s /bin/bash fetchmail
+      -d '/var/run/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
 }
 
-# arg 1:  the new package version
-# arg 2:  the old package version
 post_upgrade() {
-  post_install $1
+  getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \
+      -d '/var/run/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
+
+  if [ "$(vercmp $2 6.3.19)" -lt 0 ] ; then
+    chsh -s /bin/false fetchmail
+  fi
 }
 
-# arg 1:  the old package version
 pre_remove() {
   usr/sbin/userdel fetchmail &>/dev/null
 }
-
-op=$1
-shift
-
-$op $*

Modified: fetchmail.rc
===================================================================
--- fetchmail.rc	2010-12-13 00:07:39 UTC (rev 102916)
+++ fetchmail.rc	2010-12-13 01:30:42 UTC (rev 102917)
@@ -9,7 +9,7 @@
   start)
     stat_busy "Starting fetchmail"
     [ -z "$PID" ] &&
-		su -c "/usr/bin/fetchmail -d $INTERVAL -f $CONFIG" fetchmail
+		su -c "/usr/bin/fetchmail -d $INTERVAL -f $CONFIG" -s /bin/sh fetchmail
     if [ $? -gt 0 ]; then
       stat_fail
     else




More information about the arch-commits mailing list