aboutsummaryrefslogtreecommitdiffstats
path: root/testing/greenbone-security-assistant
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2015-11-30 15:06:20 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2015-11-30 15:06:20 +0000
commit4e607422f2655b3da9497bf6f252b02fa76283d5 (patch)
tree3027d8d1068de082994df20b4258b652ffebddee /testing/greenbone-security-assistant
parent141a8ec1385110248c99ba9222bff6e289dad9f4 (diff)
downloadaports-4e607422f2655b3da9497bf6f252b02fa76283d5.tar.bz2
aports-4e607422f2655b3da9497bf6f252b02fa76283d5.tar.xz
testing/greenbone-security-assistant: new aport
Diffstat (limited to 'testing/greenbone-security-assistant')
-rw-r--r--testing/greenbone-security-assistant/001-fortify-source.patch13
-rw-r--r--testing/greenbone-security-assistant/002-sys_siglist.patch13
-rw-r--r--testing/greenbone-security-assistant/APKBUILD66
-rw-r--r--testing/greenbone-security-assistant/gsad.initd23
-rw-r--r--testing/greenbone-security-assistant/gsad.logrotate11
5 files changed, 126 insertions, 0 deletions
diff --git a/testing/greenbone-security-assistant/001-fortify-source.patch b/testing/greenbone-security-assistant/001-fortify-source.patch
new file mode 100644
index 0000000000..afd1af231d
--- /dev/null
+++ b/testing/greenbone-security-assistant/001-fortify-source.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 549833c..a4e7882 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -487,7 +487,7 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/zones.xml
+
+ ## Program
+
+-set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
++set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
+
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall")
diff --git a/testing/greenbone-security-assistant/002-sys_siglist.patch b/testing/greenbone-security-assistant/002-sys_siglist.patch
new file mode 100644
index 0000000000..e5720e57f6
--- /dev/null
+++ b/testing/greenbone-security-assistant/002-sys_siglist.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gsad.c b/src/gsad.c
+index 7536183..4722a8d 100644
+--- a/src/gsad.c
++++ b/src/gsad.c
+@@ -5296,7 +5296,7 @@ main (int argc, char **argv)
+ if (termination_signal)
+ {
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Received %s signal.\n",
+- sys_siglist[termination_signal]);
++ strsignal(termination_signal));
+ gsad_cleanup ();
+ /* Raise signal again, to exit with the correct return value. */
+ signal (termination_signal, SIG_DFL);
diff --git a/testing/greenbone-security-assistant/APKBUILD b/testing/greenbone-security-assistant/APKBUILD
new file mode 100644
index 0000000000..a8502d6369
--- /dev/null
+++ b/testing/greenbone-security-assistant/APKBUILD
@@ -0,0 +1,66 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=greenbone-security-assistant
+_pkgname=gsad
+pkgver=6.0.6
+pkgrel=0
+pkgdesc="Greenbone Security Assistant (gsa) - OpenVAS web frontend"
+url="http://www.openvas.org/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev cmake doxygen xmltoman openvas-libraries-dev
+ libxslt-dev libmicrohttpd-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-lang"
+source="http://wald.intevation.org/frs/download.php/2200/$pkgname-$pkgver.tar.gz
+ $_pkgname.initd
+ $_pkgname.logrotate
+ 001-fortify-source.patch
+ 002-sys_siglist.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+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"
+ cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc \
+ -DSBINDIR=/usr/bin \
+ -DLOCALSTATEDIR=/var .
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 "$srcdir/$_pkgname.logrotate" "$pkgdir/etc/logrotate.d/$_pkgname"
+ install -Dm755 "$srcdir/$_pkgname.initd" "$pkgdir/etc/init.d/$_pkgname"
+
+}
+
+md5sums="42410155524762f99cf2c0a391715980 greenbone-security-assistant-6.0.6.tar.gz
+a7f3aaa7887190db96ae4c754d10cbaa gsad.initd
+acbc1dc7c674d55675ec931a34c10790 gsad.logrotate
+cc7b793ba26393891a079fe990a0c305 001-fortify-source.patch
+bd17aa7ac9a70e97776480c49a263604 002-sys_siglist.patch"
+sha256sums="3df98355dc599b2efe24f1d3d1ca4f04b1380eb8996e3814f60b9a56fcc153fb greenbone-security-assistant-6.0.6.tar.gz
+311d313ac4867eccc6df7f013474a5077a5d0e3faac2d8720acee14c4308d267 gsad.initd
+520799df540fc9d665d03095c368d3f7b61badd28fc9e4d1dbd095e374e7eff2 gsad.logrotate
+40b340828d4711bffc579a3c3709bafee5983d1501bcd387f41b7e9350dabeda 001-fortify-source.patch
+8573e2c4effc3ecf21a90380b46fd1851e364b4007bee7cf7eace19ac2ffe727 002-sys_siglist.patch"
+sha512sums="68eac5a41206d8c1bb43e84129987c7dd8ab922743c8f40f261ddcf49a1ac6245b17cac859af0d1cdc6061e3156170c88ec5b258ea8ed8a3828513ed8ef64af3 greenbone-security-assistant-6.0.6.tar.gz
+b3aa90ae85bee9cd26767d1fd8253b826d6dcc675a15c933c1280d8b156a376adbeb842d2aa93596bfd3aad6b0d997a988caa5472f7ee905ba9be300f8311586 gsad.initd
+0d459084f95e00dfb06912b9d89af011fac117a32687ffd3da3887c24e80c074b681c0d87532a4a7511e42c540f8d8b2ceaa04208fff531b94047a08decddd0f gsad.logrotate
+7f43460d0a71a29b79345c64342186dcfbdc5345703d35a1493f39df76ac5e4c1b998e1d8d8915ceca31e29d936218c20597412afb93b434cd35f16f666e1cd0 001-fortify-source.patch
+51da67628959894b8e9b6de102372f9bad6922379199141706686d4dcdb4ca545e8503510d345a96f16397a782e99574b1ca8c93f5983402c50d9fa9930c1cb5 002-sys_siglist.patch"
diff --git a/testing/greenbone-security-assistant/gsad.initd b/testing/greenbone-security-assistant/gsad.initd
new file mode 100644
index 0000000000..28c4b9651c
--- /dev/null
+++ b/testing/greenbone-security-assistant/gsad.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Greenbone Security Assistant Daemon"
+ start-stop-daemon --start --name gsad \
+ --exec /usr/sbin/gsad \
+ --pidfile /var/run/gsad.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stop Greenbone Security Assistant Daemon"
+ start-stop-daemon --stop --name gsad \
+ --pidfile /var/run/gsad.pid
+ eend $?
+}
diff --git a/testing/greenbone-security-assistant/gsad.logrotate b/testing/greenbone-security-assistant/gsad.logrotate
new file mode 100644
index 0000000000..f0948cbea1
--- /dev/null
+++ b/testing/greenbone-security-assistant/gsad.logrotate
@@ -0,0 +1,11 @@
+# logrotate for openvas
+/var/log/openvas/gsad.log {
+ rotate 4
+ weekly
+ compress
+ delaycompress
+ missingok
+ postrotate
+ /bin/kill -HUP `pidof gsad`
+ endscript
+}