summaryrefslogtreecommitdiffstats
path: root/main/cvechecker
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2012-05-07 14:34:17 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2012-05-07 14:35:12 +0000
commit6252d05fb4208d70d36882cde2b0ee1b17c48a99 (patch)
tree538e5d7f43a6c6f267c2865aaba7f1b9978d5b5f /main/cvechecker
parentcf51994bd3479e62c75255aacce17764cfcf4be0 (diff)
downloadaports-6252d05fb4208d70d36882cde2b0ee1b17c48a99.tar.bz2
aports-6252d05fb4208d70d36882cde2b0ee1b17c48a99.tar.xz
main/cvechecker: fixed buffsize error causing parsing error
Diffstat (limited to 'main/cvechecker')
-rw-r--r--main/cvechecker/APKBUILD31
-rw-r--r--main/cvechecker/cvecheck-c.patch18
-rw-r--r--main/cvechecker/cvechecker.post-install2
-rw-r--r--main/cvechecker/cvechecker.pre-install4
-rw-r--r--main/cvechecker/path-cvecheck.patch12
5 files changed, 57 insertions, 10 deletions
diff --git a/main/cvechecker/APKBUILD b/main/cvechecker/APKBUILD
index 898b8d965..7b0f6213b 100644
--- a/main/cvechecker/APKBUILD
+++ b/main/cvechecker/APKBUILD
@@ -2,19 +2,32 @@
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=cvechecker
pkgver=3.1
-pkgrel=2
+pkgrel=3
pkgdesc="A local CVE checker tool"
url="http://cvechecker.sourceforge.net/"
arch="all"
license="GPL"
-depends="wget"
-depends_dev="libconfig-dev argp-standalone
- mysql-dev sqlite-dev openssl-dev libcrypto1.0 libxslt"
+depends="gawk wget libxslt"
+depends_dev="libconfig-dev argp-standalone sqlite-dev openssl-dev
+mysql-dev sqlite-dev openssl-dev"
makedepends="$depends_dev"
-install="$pkgname.post-install"
+install="$pkgname.pre-install"
subpackages="$pkgname-doc"
-source="http://sourceforge.net/projects/cvechecker/files/$pkgname-$pkgver.tar.gz"
+source="http://sourceforge.net/projects/cvechecker/files/$pkgname-$pkgver.tar.gz
+ cvecheck-c.patch
+ path-cvecheck.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"
export LIBS="-largp"
@@ -22,7 +35,7 @@ build() {
--sysconfdir=/etc/cvechecker \
--localstatedir=/var \
--enable-sqlite3 \
- --enable-mysql
+ --enable-mysql
make || return 1
}
package() {
@@ -31,4 +44,6 @@ package() {
chgrp -R cvechecker "$pkgdir"/var/cvechecker/* &>/dev/null
chmod -R g+w "$pkgdir"/var/cvechecker &>/dev/null
}
-md5sums="d49e7322703045d32e741ed172be5e69 cvechecker-3.1.tar.gz"
+md5sums="d49e7322703045d32e741ed172be5e69 cvechecker-3.1.tar.gz
+51fb6d2e496e93538cb5c64ca3613041 cvecheck-c.patch
+393b18b0a818daee2d117d3849fda829 path-cvecheck.patch"
diff --git a/main/cvechecker/cvecheck-c.patch b/main/cvechecker/cvecheck-c.patch
new file mode 100644
index 000000000..32ac856f1
--- /dev/null
+++ b/main/cvechecker/cvecheck-c.patch
@@ -0,0 +1,18 @@
+--- cvechecker-3.1/src/cvecheck.c
++++ cvechecker-3.1/src/cvecheck.c
+@@ -1255,6 +1255,7 @@
+ }
+
+ cvelist = fopen(arg->cvedata, "r");
++ bzero (buffer, BUFFERSIZE);
+ while (fgets(buffer, sizeof(buffer), cvelist) != 0) {
+ int cvelength = 0;
+
+@@ -1302,6 +1303,7 @@
+ mysql_dbimpl_store_cve_in_db_checkpoint(ws);
+ };
+ linenum++;
++ bzero (buffer, BUFFERSIZE);
+ };
+
+ if (ws->dbtype == sqlite)
diff --git a/main/cvechecker/cvechecker.post-install b/main/cvechecker/cvechecker.post-install
deleted file mode 100644
index c8482a13d..000000000
--- a/main/cvechecker/cvechecker.post-install
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-addgroup cvechecker &>/dev/null
diff --git a/main/cvechecker/cvechecker.pre-install b/main/cvechecker/cvechecker.pre-install
new file mode 100644
index 000000000..9b32da9b2
--- /dev/null
+++ b/main/cvechecker/cvechecker.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+addgroup cvechecker &>/dev/null
+adduser cvechecker -h /var/cvechecker -DG cvechecker &>/dev/null
+echo "umask 007" >> /var/cvechecker/.profile &>/dev/null
diff --git a/main/cvechecker/path-cvecheck.patch b/main/cvechecker/path-cvecheck.patch
new file mode 100644
index 000000000..782f947cc
--- /dev/null
+++ b/main/cvechecker/path-cvecheck.patch
@@ -0,0 +1,12 @@
+diff --git a/scripts/pullcves b/scripts/pullcves
+index 14b27f4..37b32d4 100755
+--- a/scripts/pullcves
++++ b/scripts/pullcves
+@@ -17,6 +17,9 @@ then
+ elif [ -f /etc/cvechecker.conf ];
+ then
+ CONFFILE=/etc/cvechecker.conf;
++elif [ -f /etc//cvechecker/cvechecker.conf ];
++then
++ CONFFILE=/etc/cvechecker/cvechecker.conf;
+ fi