diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2014-09-18 03:25:18 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-18 09:52:22 +0000 |
commit | cb653ac14773544007ce7925bf09444d2dfd88ee (patch) | |
tree | 560db012f6b5f28c17ce2bc95164550f44539d94 /testing/naxsi-utils | |
parent | 7596de12a5a72588a318d4768303b18635ab44b7 (diff) | |
download | aports-cb653ac14773544007ce7925bf09444d2dfd88ee.tar.bz2 aports-cb653ac14773544007ce7925bf09444d2dfd88ee.tar.xz |
testing/naxsi-utils: new aport
A tool to parse & analyze naxsi logs.
Diffstat (limited to 'testing/naxsi-utils')
-rw-r--r-- | testing/naxsi-utils/APKBUILD | 46 | ||||
-rw-r--r-- | testing/naxsi-utils/nx_util.patch | 43 |
2 files changed, 89 insertions, 0 deletions
diff --git a/testing/naxsi-utils/APKBUILD b/testing/naxsi-utils/APKBUILD new file mode 100644 index 0000000000..2377ddeac8 --- /dev/null +++ b/testing/naxsi-utils/APKBUILD @@ -0,0 +1,46 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> +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 0000000000..7d5c3c0c8b --- /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'])] + ) |