summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/openvas-administrator/openvas-administrator-0.7.0-format.patch27
-rwxr-xr-xnetwork/openvas-administrator/openvas-administrator.SlackBuild19
2 files changed, 40 insertions, 6 deletions
diff --git a/network/openvas-administrator/openvas-administrator-0.7.0-format.patch b/network/openvas-administrator/openvas-administrator-0.7.0-format.patch
new file mode 100644
index 0000000000..2a0e0add11
--- /dev/null
+++ b/network/openvas-administrator/openvas-administrator-0.7.0-format.patch
@@ -0,0 +1,27 @@
+Index: src/oap.c
+===================================================================
+--- src/oap.c
++++ src/oap.c
+@@ -633,7 +633,7 @@
+ if (((buffer_size_t) TO_CLIENT_BUFFER_SIZE) - to_client_end
+ < strlen (msg))
+ {
+- tracef (" send_to_client out of space (%i < %i)\n",
++ tracef (" send_to_client out of space (%i < %zu)\n",
+ ((buffer_size_t) TO_CLIENT_BUFFER_SIZE) - to_client_end,
+ strlen (msg));
+ return TRUE;
+Index: src/oxpd.c
+===================================================================
+--- src/oxpd.c
++++ src/oxpd.c
+@@ -247,7 +247,8 @@
+ tracef ("<= client Input may contain password, suppressed.\n");
+ else
+ tracef ("<= client \"%.*s\"\n",
+- count,
++ /* Cast is safe because count is bounded by from_client size. */
++ (int) count,
+ from_client + from_client_end);
+ #else
+ tracef ("<= client %i bytes\n", count);
diff --git a/network/openvas-administrator/openvas-administrator.SlackBuild b/network/openvas-administrator/openvas-administrator.SlackBuild
index 6f28783478..6b55ae6d55 100755
--- a/network/openvas-administrator/openvas-administrator.SlackBuild
+++ b/network/openvas-administrator/openvas-administrator.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=openvas-administrator
VERSION=${VERSION:-0.7.0}
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -50,6 +59,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# http://wald.intevation.org/tracker/?func=detail&atid=220&aid=1273&group_id=29
+patch -p0 < $CWD/openvas-administrator-0.7.0-format.patch
+
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIBDIR=/usr/lib \
@@ -63,11 +75,6 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
-
# install rc script
install -D -m0755 -oroot -groot $CWD/rc.openvasad $PKG/etc/rc.d/rc.openvasad.new