[arch-commits] Commit in fail2ban/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Fri Jul 6 17:49:21 UTC 2018


    Date: Friday, July 6, 2018 @ 17:49:20
  Author: eschwartz
Revision: 353906

upgpkg: fail2ban 0.10.3.1-2

python 3.7 rebuild

systemd 239 introduces runtime warnings for tmpfiles.d snippets trying to
create files in /var/run. See
https://github.com/systemd/systemd/commit/a2d1fb882c4308bc10362d971f333c5031d60069
Submit pull request upstream to fix this, and import the patch.

use HTTPS url

better fix for coverage trampling on file permissions

Modified:
  fail2ban/trunk/PKGBUILD

----------+
 PKGBUILD |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-07-06 16:59:38 UTC (rev 353905)
+++ PKGBUILD	2018-07-06 17:49:20 UTC (rev 353906)
@@ -7,9 +7,9 @@
 
 pkgname=fail2ban
 pkgver=0.10.3.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Bans IPs after too many failed authentication attempts'
-url='http://www.fail2ban.org/'
+url='https://www.fail2ban.org/'
 license=('GPL')
 arch=('any')
 depends=('iptables' 'python-pyinotify' 'whois' 'sqlite' 'python-systemd')
@@ -18,27 +18,37 @@
 backup=(etc/fail2ban/fail2ban.conf
         etc/fail2ban/jail.conf
         etc/logrotate.d/fail2ban)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/fail2ban/$pkgname/archive/$pkgver.tar.gz")
-sha512sums=('78388fce93e7a28f86905d7797cd188cfc19515ab43f85356da629f4f3797fba0e9e043f3d1a37740da463bd3cba629d660a3f7fc792be8a8f05e75fbf77c3ad')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/fail2ban/$pkgname/archive/$pkgver.tar.gz"
+        "https://github.com/fail2ban/fail2ban/pull/2174/commits/12df4ec92c27a25a300482f7707f27f7522f592f.patch")
+sha512sums=('78388fce93e7a28f86905d7797cd188cfc19515ab43f85356da629f4f3797fba0e9e043f3d1a37740da463bd3cba629d660a3f7fc792be8a8f05e75fbf77c3ad'
+            '081df2a7d76800a91d66b97a9a86f63b8f6e30c80eb5e192167b0e69debe5143035bf916eb6e105512ed323b797a0f20a1d80a43a68ddadd83d878ce094450d3')
 
 prepare() {
   cd $pkgname-$pkgver
+  # fix tmpfiles.d warning in systemd 239
+  # https://github.com/fail2ban/fail2ban/pull/2174
+  patch -p1 -i ../12df4ec92c27a25a300482f7707f27f7522f592f.patch
   sed -i 's|self.install_dir|"/usr/bin"|' setup.py
   sed -i 's/^before = paths-debian.conf/before = paths-arch.conf/' config/jail.conf
 }
 
-check() {
+build() {
   cd $pkgname-$pkgver
   ./fail2ban-2to3
+  python setup.py build
+}
+
+check() {
+  # make temp copy to run coverage since it messes with file permissions
+  cp -r $pkgname-$pkgver{,-coverage}
+  cd $pkgname-$pkgver-coverage
   coverage run bin/fail2ban-testcases || warning "Tests failed"
 }
 
 package() {
   cd $pkgname-$pkgver
-  python setup.py install --prefix /usr --root "$pkgdir" --optimize=1
+  python setup.py install --root "$pkgdir" --optimize=1
 
-  chmod 644 "$pkgdir"/usr/lib/python3.6/site-packages/fail2ban-*-py3.6.egg-info/*
-
   install -Dm644 build/fail2ban.service \
     "$pkgdir"/usr/lib/systemd/system/$pkgname.service
   install -Dm644 files/fail2ban-tmpfiles.conf \



More information about the arch-commits mailing list