[arch-commits] Commit in fail2ban/trunk (PKGBUILD fail2ban.install rc.d tmpfiles.conf)

Bartłomiej Piotrowski bpiotrowski at nymeria.archlinux.org
Sun May 12 02:18:45 EDT 2013


    Date: Sunday, May 12, 2013 @ 08:18:45
  Author: bpiotrowski
Revision: 90381

upgpkg: fail2ban 0.8.8-2

- remove deprecated rc.d script
- create missing /run/fail2ban directory after install (FS#34663)

Added:
  fail2ban/trunk/fail2ban.install
Modified:
  fail2ban/trunk/PKGBUILD
  fail2ban/trunk/tmpfiles.conf
Deleted:
  fail2ban/trunk/rc.d

------------------+
 PKGBUILD         |   21 ++++++++++-----------
 fail2ban.install |    3 +++
 rc.d             |   40 ----------------------------------------
 tmpfiles.conf    |    2 +-
 4 files changed, 14 insertions(+), 52 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-05-12 06:14:15 UTC (rev 90380)
+++ PKGBUILD	2013-05-12 06:18:45 UTC (rev 90381)
@@ -6,7 +6,7 @@
 
 pkgname=fail2ban
 pkgver=0.8.8
-pkgrel=1
+pkgrel=2
 pkgdesc='Bans IPs after too many failed authentification attempts against common daemons'
 url='http://www.fail2ban.org/'
 license=('GPL')
@@ -14,21 +14,20 @@
 depends=('python2' 'iptables')
 backup=(etc/fail2ban/fail2ban.conf
         etc/fail2ban/jail.conf)
-source=($pkgname-$pkgver.tar.gz::https://nodeload.github.com/$pkgname/$pkgname/legacy.tar.gz/$pkgver
-		rc.d service tmpfiles.conf)
+install=fail2ban.install
+source=(https://nodeload.github.com/$pkgname/$pkgname/legacy.tar.gz/$pkgver
+        service tmpfiles.conf)
 md5sums=('352f41692cc731297b078923e46d3aea'
-         '70caa58e130a13a505d63a35b9aecfb6'
          'b4af226eb2d3029241a70e005ec7b3ac'
-         '78b42dea76c6c824b813dad9edc37377')
+         '88d51ecc760ad2e017a165c632f49892')
 
 package() {
-  cd $srcdir/$pkgname-$pkgname-*/
-  python2 setup.py install --root $pkgdir
+  cd $pkgname-$pkgname-*
+  python2 setup.py install --root "$pkgdir"
 
-  install -Dm755 $srcdir/rc.d $pkgdir/etc/rc.d/$pkgname
-  install -Dm644 $srcdir/service $pkgdir/usr/lib/systemd/system/$pkgname.service
-  install -Dm644 $srcdir/tmpfiles.conf $pkgdir/usr/lib/tmpfiles.d/$pkgname.conf
+  install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
+  install -Dm644 "$srcdir"/tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
 
   # avoid conflict with filesystem>=2012.06
-  rm -r $pkgdir/var/run
+  rm -r "$pkgdir"/var/run
 }

Added: fail2ban.install
===================================================================
--- fail2ban.install	                        (rev 0)
+++ fail2ban.install	2013-05-12 06:18:45 UTC (rev 90381)
@@ -0,0 +1,3 @@
+post_install() {
+  usr/bin/systemd-tmpfiles --create fail2ban.conf
+}

Deleted: rc.d
===================================================================
--- rc.d	2013-05-12 06:14:15 UTC (rev 90380)
+++ rc.d	2013-05-12 06:18:45 UTC (rev 90381)
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-FAIL2BAN="/usr/bin/fail2ban-client"
-
-case "$1" in
-  start)
-    stat_busy "Starting fail2ban"
-
-    [ -d /var/run/fail2ban ] || mkdir -p /var/run/fail2ban
-    [ -f /var/run/fail2ban/fail2ban.pid ] && rm -f /var/run/fail2ban/fail2ban.pid
-    $FAIL2BAN start >/dev/null
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
-      add_daemon fail2ban
-      stat_done
-    fi
-    ;;
-  stop)
-    stat_busy "Stopping fail2ban"
-    if [ "`$FAIL2BAN stop`" == "Shutdown successful" ]; then
-      rm -f /var/run/fail2ban/fail2ban.pid &> /dev/null
-      rm_daemon fail2ban
-      stat_done
-    else
-          stat_fail
-    fi
-    ;;
-  restart)
-    $0 stop
-    sleep 3
-    $0 start
-    ;;
-  *)
-    echo "usage: $0 {start|stop|restart}"  
-esac
-exit 0

Modified: tmpfiles.conf
===================================================================
--- tmpfiles.conf	2013-05-12 06:14:15 UTC (rev 90380)
+++ tmpfiles.conf	2013-05-12 06:18:45 UTC (rev 90381)
@@ -1 +1 @@
-d /var/run/fail2ban 0755 root root - -
+d /run/fail2ban 0755 root root - -



More information about the arch-commits mailing list