openvas*: nessus 2.2 was forked and openvas was created.

the 3.x release of openvas should replace nessus in pentoo
I've not completely covered the deps of these ebuilds but here is a start
This commit is contained in:
Zero_Chaos 2010-06-29 15:54:33 +00:00
parent 26383e69bb
commit fe35f08bd3
13 changed files with 412 additions and 0 deletions

View file

@ -0,0 +1,2 @@
DIST openvas-client-3.0.0.tar.gz 758925 RMD160 47853e832b07a568e53ef3e47f5ea35c8b67a56a SHA1 1890c9813e1219efe4e72a0697f4c0271bc2670c SHA256 8e4242d5736c83f6322efc700f70f1c312b6f41274a0d735de9f8034f7a5cb1b
EBUILD openvas-client-3.0.0.ebuild 757 RMD160 08f066f4a11b99218a5094a8bab72963e76e12e4 SHA1 d9808387a2fab0343abd57e4f434c96da53b0e3b SHA256 9f40988a5e2a47f170d48cda5eacb5d6e4a077ae210903e2b5a3e55507406b4c

View file

@ -0,0 +1,30 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header
inherit eutils
DESCRIPTION="A client for the openvas vulnerability scanner"
HOMEPAGE="http://www.openvas.org/"
SRC_URI="http://wald.intevation.org/frs/download.php/685/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="gtk"
DEPEND="net-libs/gnutls
gtk? ( >=x11-libs/gtk+-2.8.8 )
>=net-analyzer/openvas-libraries-3.0.5"
RDEPEND="${DEPEND}"
src_compile() {
econf $(use_enable gtk) || die "econf failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "install failed"
dodoc AUTHORS CHANGES README TODO || die "dodoc failed"
make_desktop_entry OpenVAS-Client "OpenVAS Client"
}

View file

@ -0,0 +1,7 @@
AUX backport-r7792.patch 2520 RMD160 a49b8cbc9cc7caa8ba12c519cb74e1a704457b70 SHA1 18349940fd8138fcb5c8b4b174792ba521f62b53 SHA256 a6e3e7ccde7f5715556896ef2e6dd6137eb45ea4cfec9600518a988ba30f6279
AUX gpgme-include.patch 2483 RMD160 52e4946f2c98129fdfb6efbf3a486b92327921cf SHA1 217f7fd48b8747f62e2a42d28736adc5c7002781 SHA256 f5de1083f18ccd33ee74da3a7f45bad302b259ac8c875d091ecf9686bcf7f24a
DIST openvas-libraries-3.0.5.tar.gz 782282 RMD160 eaf350ebfba8b49a1c93a8b77cf4baa48b68e2e6 SHA1 265970a5bc695afdf001d4528bd69d326b6eaa70 SHA256 834b224bec6e16a103ce1166d6d2d1f2e50e5b898d4669fd77a7a602218ff44d
DIST openvas-libraries-3.1.0.rc2.tar.gz 835186 RMD160 9c85b922bd8b8b4e244ea314947c788b681d68af SHA1 421536e60845480646018c318e2156c61fb9d51d SHA256 b1cd5bbaefa6b87dbf57cafe6c60c025b9a6920c39a4bc17387d83068bfb041d
EBUILD openvas-libraries-3.0.5.ebuild 737 RMD160 0b2012cc724c8663a52bae70c4ded229c478a23a SHA1 62e9702a1a77d7386b531ca38a0e4553d2d6f385 SHA256 5b56fc4e43d5e2db1d7cab0bfaa9186e8dd422ca772fb1807ba1e3ebfe35b89f
EBUILD openvas-libraries-3.1.0_rc2.ebuild 795 RMD160 486faf46816aeef95c81d1659556ea095dd99fb4 SHA1 44aa48443a18a8769e7c8d737f12198389897ec3 SHA256 be5656c40aa78441a80e4054acce3185fbffc3c47098650064ce316f5270a8ee
EBUILD openvas-libraries-9999.ebuild 879 RMD160 4ac062fee2c80cf0c46865a4b6c2c6ac0792648f SHA1 e61920cfe44dab60aaf3195d8d96f762852a0053 SHA256 664278bf5738e6a0cfa7df427a6f3f795d1fe6da5aafbc29c191a72d4785703d

View file

@ -0,0 +1,76 @@
Author: felix
Date: 2010-05-20 11:29:39 +0200 (Thu, 20 May 2010)
New Revision: 7792
Modified:
trunk/openvas-libraries/ChangeLog
trunk/openvas-libraries/base/openvas_certificate_file.c
Log:
* base/openvas_certificate_file.c (openvas_certificate_file_write):
Adressed compiler warning that prevented build on some systems.
Open the file, close it directly, set contents with GLib File Utility
Functions.
Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog 2010-05-20 08:29:02 UTC (rev 7791)
+++ trunk/openvas-libraries/ChangeLog 2010-05-20 09:29:39 UTC (rev 7792)
@@ -1,3 +1,10 @@
+2010-05-20 Felix Wolfsteller <felix.wolfsteller at greenbone.net>
+
+ * base/openvas_certificate_file.c (openvas_certificate_file_write):
+ Adressed compiler warning that prevented build on some systems.
+ Open the file, close it directly, set contents with GLib File Utility
+ Functions.
+
2010-05-19 Michael Wiegand <michael.wiegand at greenbone.net>
Post-release version bump.
Modified: trunk/openvas-libraries/base/openvas_certificate_file.c
===================================================================
--- trunk/openvas-libraries/base/openvas_certificate_file.c 2010-05-20 08:29:02 UTC (rev 7791)
+++ trunk/openvas-libraries/base/openvas_certificate_file.c 2010-05-20 09:29:39 UTC (rev 7792)
@@ -116,7 +116,7 @@
g_hash_table_foreach (certs, (GHFunc) add_cert_to_file, key_file);
} // (else file content is comment only)
- // Write GKeyFile to filesystem.
+ // Open/Close/Create file in the desired mode.
fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600);
if (!fd)
{
@@ -124,19 +124,29 @@
g_key_file_free (key_file);
return FALSE;
}
+ if (close (fd) != 0)
+ {
+ g_key_file_free (key_file);
+ return FALSE;
+ }
+ // Create data to write to file.
keyfile_data = g_key_file_to_data (key_file, &data_length, &err);
if (err != NULL)
{
//show_error(_("Error exporting key file: %s"), err->message);
g_error_free (err);
g_key_file_free (key_file);
- close (fd);
return FALSE;
}
- write (fd, keyfile_data, data_length);
- close (fd);
+ // Write data to file.
+ if (g_file_set_contents (filename, keyfile_data, data_length, &err) == FALSE)
+ {
+ g_error_free (err);
+ g_key_file_free (key_file);
+ return FALSE;
+ }
g_key_file_free (key_file);

View file

@ -0,0 +1,56 @@
--- old_openvas-libraries-3.0.4/nasl/CMakeLists.txt 2010-02-15 14:19:12.000000000 +0100
+++ old_openvas-libraries-3.0.4/nasl/CMakeLists.txt 2010-03-21 12:19:50.000000000 +0100
@@ -125,6 +125,9 @@
exec_program (pkg-config
ARGS --cflags glib-2.0
OUTPUT_VARIABLE GLIB_CFLAGS)
+exec_program (gpgme-config
+ ARGS --cflags
+ OUTPUT_VARIABLE GPGME_CFLAGS)
## Library
@@ -171,7 +174,7 @@
add_library (openvas_nasl_static STATIC ${FILES})
-set_target_properties (openvas_nasl_static PROPERTIES COMPILE_FLAGS "${GLIB_CFLAGS} ${WMI_LIBS}")
+set_target_properties (openvas_nasl_static PROPERTIES COMPILE_FLAGS "${GLIB_CFLAGS} ${WMI_LIBS} ${GPGME_CFLAGS}")
set_target_properties (openvas_nasl_static PROPERTIES OUTPUT_NAME "openvas_nasl")
set_target_properties (openvas_nasl_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
target_link_libraries (openvas_nasl_static libopenvas_base libopenvas_misc
@@ -179,7 +182,7 @@
gpg-error gnutls pcap resolv)
add_library (openvas_nasl_shared SHARED ${FILES})
-set_target_properties (openvas_nasl_shared PROPERTIES COMPILE_FLAGS "${GLIB_CFLAGS} ${WMI_LIBS}")
+set_target_properties (openvas_nasl_shared PROPERTIES COMPILE_FLAGS "${GLIB_CFLAGS} ${WMI_LIBS} ${GPGME_CFLAGS}")
set_target_properties (openvas_nasl_shared PROPERTIES OUTPUT_NAME "openvas_nasl")
set_target_properties (openvas_nasl_shared PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties (openvas_nasl_shared PROPERTIES SOVERSION "${CPACK_PACKAGE_VERSION_MAJOR}")
@@ -194,6 +197,12 @@
exec_program (pkg-config
ARGS --libs glib-2.0
OUTPUT_VARIABLE GLIB_LDFLAGS)
+exec_program (gpgme-config
+ ARGS --cflags
+ OUTPUT_VARIABLE GPGME_CFLAGS)
+exec_program (gpgme-config
+ ARGS --libs
+ OUTPUT_VARIABLE GPGME_LDFLAGS)
# Add ("import") static libs from Make based subprojects of openvas-libraries
add_library (libopenvas_base SHARED IMPORTED)
@@ -212,9 +221,9 @@
libopenvas_hg ${GLIB_LDFLAGS} -lgcrypt -lgpgme
-lgpg-error -lgnutls -lpcap -lresolv)
set_target_properties (openvas-nasl PROPERTIES COMPILE_FLAGS
- ${GLIB_CFLAGS})
+ "${GLIB_CFLAGS} ${GPGME_CFLAGS}")
set_target_properties (openvas-nasl PROPERTIES LINK_FLAGS
- ${GLIB_LDFLAGS})
+ "${GLIB_LDFLAGS} ${GPGME_LDFLAGS}")
## Install

View file

@ -0,0 +1,31 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
HOMEPAGE="http://www.openvas.org/"
EAPI="2"
SRC_URI="http://wald.intevation.org/frs/download.php/729/${P}.tar.gz"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="amd64 ~ppc x86"
IUSE=""
DEPEND=">=net-libs/gnutls-2.0
net-libs/libpcap
>=app-crypt/gpgme-1.1.2
>=dev-libs/glib-2.12
!net-analyzer/openvas-libnasl"
RDEPEND="${DEPEND}"
src_prepare() {
epatch "${FILESDIR}"/gpgme-include.patch
}
src_install() {
einstall || die "failed to install"
find "${D}" -name '*.la' -delete
dodoc ChangeLog CHANGES TODO || die
}

View file

@ -0,0 +1,35 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit versionator eutils
MY_P=${P/_rc/.rc}
DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
HOMEPAGE="http://www.openvas.org/"
SRC_URI="http://wald.intevation.org/frs/download.php/749/${MY_P}.tar.gz"
EAPI="2"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""
DEPEND=">=net-libs/gnutls-2.0
net-libs/libpcap
>=app-crypt/gpgme-1.1.2
>=dev-libs/glib-2.12
!net-analyzer/openvas-libnasl"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}
src_prepare() {
epatch "${FILESDIR}"/gpgme-include.patch
}
src_install() {
einstall || die "failed to install"
find "${D}" -name '*.la' -delete
dodoc ChangeLog CHANGES TODO || die
}

View file

@ -0,0 +1,33 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit subversion eutils
DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
HOMEPAGE="http://www.openvas.org/"
EAPI="2"
#SRC_URI="http://wald.intevation.org/frs/download.php/737/${MY_P}.tar.gz"
ESVN_REPO_URI="https://svn.wald.intevation.org/svn/openvas/trunk/openvas-libraries/"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="-*"
IUSE=""
DEPEND=">=net-libs/gnutls-2.0
net-libs/libpcap
>=app-crypt/gpgme-1.1.2
>=dev-libs/glib-2.12
!net-analyzer/openvas-libnasl"
RDEPEND="${DEPEND}"
src_prepare() {
#remove this patch after they learn how to include things properly
epatch "${FILESDIR}"/gpgme-include.patch
}
src_install() {
einstall || die "failed to install"
find "${D}" -name '*.la' -delete
dodoc ChangeLog CHANGES TODO || die
}

View file

@ -0,0 +1,28 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net
}
start() {
ebegin "Starting openvassd"
start-stop-daemon --start --quiet -n openvassd --exec /usr/sbin/openvas$
eend $?
}
stop() {
ebegin "Stop openvassd"
start-stop-daemon --stop --quiet -n openvassd
einfo "Waiting for the environment to be sane"
RUNNING=$(ps aux | grep -m 1 openvassd: | grep -v grep)
while [ -n "$RUNNING" ] ; do
sleep 1
RUNNING=$(ps aux | grep -m 1 openvassd: | grep -v grep)
done
eend $?
}

View file

@ -0,0 +1,46 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="A remote security scanner for Linux (openvas-scanner)"
HOMEPAGE="http://www.openvas.org/"
SRC_URI="http://wald.intevation.org/frs/download.php/724/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="tcpd gtk debug prelude"
DEPEND="tcpd? ( sys-apps/tcp-wrappers )
gtk? ( =x11-libs/gtk+-2* )
prelude? ( dev-libs/libprelude )
>=net-analyzer/openvas-libraries-3.0.5
!net-analyzer/openvas-plugins
!net-analyzer/openvas-server"
RDEPEND="${DEPEND}"
src_compile() {
econf \
$(use_enable tcpd tcpwrappers) \
$(use_enable debug) \
$(use_enable gtk) \
|| die "configure failed"
emake || die "emake failed"
}
src_install() {
einstall || die "einstall failed"
dodoc CHANGES || die
dodoc doc/*.txt || die
doinitd "${FILESDIR}"/openvasd || die "doinitd failed"
keepdir /var/lib/openvas/logs
keepdir /var/lib/openvas/users
}
pkg_postinst() {
ewarn "1. Call 'openvas-nvt-sync' to download plugins"
ewarn "2. Call 'openvas-mkcert' to generate server certificate"
ewarn "3. Call 'openvas-adduser' to create a user"
}

View file

@ -0,0 +1,51 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit versionator
DESCRIPTION="A remote security scanner for Linux (openvas-scanner)"
HOMEPAGE="http://www.openvas.org/"
SRC_URI="http://wald.intevation.org/frs/download.php/750/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="tcpd gtk debug prelude"
MY_P=${P/_rc/.rc}
DEPEND="tcpd? ( sys-apps/tcp-wrappers )
gtk? ( =x11-libs/gtk+-2* )
prelude? ( dev-libs/libprelude )
>=net-analyzer/openvas-libraries-3.0.5
!net-analyzer/openvas-plugins
!net-analyzer/openvas-server"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}
src_compile() {
econf \
$(use_enable tcpd tcpwrappers) \
$(use_enable debug) \
$(use_enable gtk) \
|| die "configure failed"
emake || die "emake failed"
}
src_install() {
einstall || die "einstall failed"
dodoc CHANGES || die
dodoc doc/*.txt || die
doinitd "${FILESDIR}"/openvasd || die "doinitd failed"
keepdir /var/lib/openvas/logs
keepdir /var/lib/openvas/users
}
pkg_postinst() {
ewarn "1. Call 'openvas-nvt-sync' to download plugins"
ewarn "2. Call 'openvas-mkcert' to generate server certificate"
ewarn "3. Call 'openvas-adduser' to create a user"
}

View file

@ -0,0 +1 @@
EBUILD openvas-3.0.2.ebuild 368 RMD160 cbaf7fd83b8caf0f1e6e4198f7d5e42a135e3afa SHA1 8e7174ebd9bb96898fc759c2cbc2ec762fbda253 SHA256 3eee0f5aadf7cbf854c62ab8ad3b26b70efd9a5665f29a260d39534feb3c513d

View file

@ -0,0 +1,16 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="A remote security scanner"
HOMEPAGE="http://www.openvas.org/"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="amd64 ~ppc x86"
IUSE=""
DEPEND=">=net-analyzer/openvas-scanner-3.0.2
>=net-analyzer/openvas-client-3.0.0
"
RDEPEND="${DEPEND}"