~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[alpine-devel] [PATCH] testing/naxsi-utils: new aport

Details
Message ID
<1411010718-6158-1-git-send-email-developer@it-offshore.co.uk>
Sender timestamp
1411010718
DKIM signature
missing
Download raw message
Patch: +89 -0
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 <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 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
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20140918115346.15315b10@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1411010718-6158-1-git-send-email-developer@it-offshore.co.uk> (view parent)
Sender timestamp
1411034026
DKIM signature
missing
Download raw message
On Thu, 18 Sep 2014 03:25:18 +0000
Stuart Cardall <developer@it-offshore.co.uk> wrote:

> 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

applied. thanks!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)