X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from apollo.thewebhostserver.com (apollomail.thewebhostserver.com [46.23.65.248]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 23EC4DC00B8 for ; Thu, 18 Sep 2014 03:26:06 +0000 (UTC) Received: from [81.4.121.188] (port=64307 helo=localhost.localdomain) by apollo.thewebhostserver.com with esmtpsa (UNKNOWN:AES128-SHA256:128) (Exim 4.82) (envelope-from ) id 1XUSLl-000QsM-EG; Thu, 18 Sep 2014 04:26:03 +0100 From: Stuart Cardall To: alpine-devel@lists.alpinelinux.org Cc: Stuart Cardall Subject: [alpine-devel] [PATCH] testing/naxsi-utils: new aport Date: Thu, 18 Sep 2014 03:25:18 +0000 Message-Id: <1411010718-6158-1-git-send-email-developer@it-offshore.co.uk> X-Mailer: git-send-email 2.1.0 X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - apollo.thewebhostserver.com X-AntiAbuse: Original Domain - lists.alpinelinux.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - it-offshore.co.uk X-Get-Message-Sender-Via: apollo.thewebhostserver.com: authenticated_id: developer@it-offshore.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: A tool to parse & analyze naxsi logs. --- testing/naxsi-utils/APKBUILD | 46 +++++++++++++++++++++++++++++++++++++++ testing/naxsi-utils/nx_util.patch | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 testing/naxsi-utils/APKBUILD create mode 100644 testing/naxsi-utils/nx_util.patch diff --git a/testing/naxsi-utils/APKBUILD b/testing/naxsi-utils/APKBUILD new file mode 100644 index 0000000..2377dde --- /dev/null +++ b/testing/naxsi-utils/APKBUILD @@ -0,0 +1,46 @@ +# Contributor: Stuart Cardall +# Maintainer: Stuart Cardall +pkgname=naxsi-utils +_pkgname=naxsi +pkgver=0.53_rc2 +_ver=${pkgver/_rc/-} +pkgrel=0 +pkgdesc="nginx/naxsi log parser, whitelist and report generator." +url="http://www.nginx.org | https://github.com/nbs-system/naxsi" +arch="noarch" +license="GPL v2" +depends="python" +depends_dev="" +makedepends="python-dev" +subpackages="$pkgname-doc" +source="$_pkgname-$_ver.tar.gz::https://github.com/nbs-system/naxsi/archive/${_ver}.tar.gz + nx_util.patch + " + +_builddir="$srcdir"/$_pkgname-$_ver/nx_util +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + python setup.py build || return 1 +} + +package() { + cd "$_builddir" + python setup.py install --prefix=/usr --root="$pkgdir" || return 1 +} + +md5sums="348b50914a1eedaed09a2509621adf43 naxsi-0.53-2.tar.gz +472655eb76480c1b0bdd284ec75a45c7 nx_util.patch" +sha256sums="3eadff1d91995beae41b92733ade28091c2075a24ae37058f4d6aa90b0f4b660 naxsi-0.53-2.tar.gz +48a2e379deb76222410d801fbfceb30301e2ab7bd1b8a1052d1e7d65568b6335 nx_util.patch" +sha512sums="ada592f5e7f80a6d549cc435ee8720df01a788dc88cf27a7d55521bb7e4c66fa11b9ec28216aff7e13c70a5faf12cb745bd398b8a782ed4dea1eecd04b07e24c naxsi-0.53-2.tar.gz +005057ae94da5cdcb0e9e23e6f328ec7c75789e1b841ad2167f0c9e4f61d229d3a92b7a74704ec0af4fc150ec1165c6cfc6371f9758ecec225d39bd48f01c825 nx_util.patch" diff --git a/testing/naxsi-utils/nx_util.patch b/testing/naxsi-utils/nx_util.patch new file mode 100644 index 0000000..7d5c3c0 --- /dev/null +++ b/testing/naxsi-utils/nx_util.patch @@ -0,0 +1,43 @@ +--- nx_util/nx_util.conf ++++ nx_util/nx_util.conf +@@ -1,4 +1,4 @@ + [nx_util] +-data_dir=/usr/local/nx_datas +-database_dir= ++data_dir=/usr/share/nginx-naxsi/nx_datas ++database_dir=/usr/share/nginx-naxsi + naxsi_core_rules=/etc/nginx/naxsi_core.rules +--- nx_util/nx_util.py ++++ nx_util/nx_util.py +@@ -62,8 +62,8 @@ + + # Configuration + parser.add_option("-c", "--config", dest="conf_path", +- help="Path to configuration (defaults to /usr/local/etc/nx_util.conf)", +- type="string", default="/usr/local/etc/nx_util.conf") ++ help="Path to configuration (defaults to /etc/nginx/nx_util.conf)", ++ type="string", default="/etc/nginx/nx_util.conf") + + # Filtering options should go here :) + parser.add_option("-f", "--filters", dest="usr_filter", +--- nx_util/setup.py ++++ nx_util/setup.py +@@ -7,15 +7,15 @@ + description='Naxsi log parser, whitelist & report generator', + author='Naxsi Dev Team', + author_email='thibault.koechlin@nbs-system.com', +- url='naxsi.googlecode.com', ++ url='https://github.com/nbs-system/naxsi', + scripts=['nx_util.py'], + packages=['nx_lib'], +- data_files=[('nx_datas', ['nx_datas/bootstrap.min.css', ++ data_files=[('/usr/share/nginx-naxsi/nx_datas', ['nx_datas/bootstrap.min.css', + 'nx_datas/bootstrap-responsive.min.css', + 'nx_datas/highcharts.js', + 'nx_datas/map.tpl', + 'nx_datas/bootstrap.min.js', + 'nx_datas/country2coords.txt']), + ('/usr/share/man/man1', ['nx_util.1.gz']), +- ('/usr/local/etc/', ['nx_util.conf'])] ++ ('/etc/nginx/', ['nx_util.conf'])] + ) -- 2.1.0 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---