From f9b82de3fc5ba0a42456c827c0ae90068aa71c59 Mon Sep 17 00:00:00 2001 From: blshkv Date: Thu, 28 May 2020 07:47:42 +0800 Subject: [PATCH] nessus-bin: fork and 8.10.1 bump --- net-analyzer/nessus-bin/Manifest | 1 + net-analyzer/nessus-bin/files/nessusd-initd | 25 ++++++++ net-analyzer/nessus-bin/metadata.xml | 12 ++++ .../nessus-bin/nessus-bin-8.10.1.ebuild | 60 +++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 net-analyzer/nessus-bin/Manifest create mode 100644 net-analyzer/nessus-bin/files/nessusd-initd create mode 100644 net-analyzer/nessus-bin/metadata.xml create mode 100644 net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild diff --git a/net-analyzer/nessus-bin/Manifest b/net-analyzer/nessus-bin/Manifest new file mode 100644 index 000000000..8f99613e3 --- /dev/null +++ b/net-analyzer/nessus-bin/Manifest @@ -0,0 +1 @@ +DIST Nessus-8.10.1-es8.x86_64.rpm 88141784 BLAKE2B 602128aa3cf7fb1a4bbbce60c07cb7820afe51790a65d3ea0a2e0366540ba8a67cb5b364eed6da631b5018055ef5be1a053c32c815ff708ce95567d87fc7c106 SHA512 14d7b5d8e1ba358ce5428629f72f5f01b4dc79e57ae17e490dd618266f38f8a81abd480552ba7551f3f57d1a7f3b544e3f96ec98416e5849a2cc78d8d12b0d30 diff --git a/net-analyzer/nessus-bin/files/nessusd-initd b/net-analyzer/nessus-bin/files/nessusd-initd new file mode 100644 index 000000000..fb95cb2b2 --- /dev/null +++ b/net-analyzer/nessus-bin/files/nessusd-initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting nessus-service" + start-stop-daemon --start --quiet --exec /opt/nessus/sbin/nessus-service -- -D --quiet + eend $? +} + +stop() { + ebegin "Stopping nessus-service" + start-stop-daemon --stop --quiet --exec /opt/nessus/sbin/nessus-service + einfo "Waiting for the environment to be sane" + while [ -n "$RUNNING" ] ; do + sleep 1 + RUNNING=$(ps aux | grep -m 1 nessusd: | grep -v grep) + done + sleep 3 + eend $? +} diff --git a/net-analyzer/nessus-bin/metadata.xml b/net-analyzer/nessus-bin/metadata.xml new file mode 100644 index 000000000..240647db5 --- /dev/null +++ b/net-analyzer/nessus-bin/metadata.xml @@ -0,0 +1,12 @@ + + + + + marecki@gentoo.org + Marek Szuba + + + zerochaos@gentoo.org + Rick Farina + + diff --git a/net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild b/net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild new file mode 100644 index 000000000..6b5ca1530 --- /dev/null +++ b/net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit rpm pax-utils systemd + +MY_P="Nessus-${PV}-es8" + +DESCRIPTION="A remote security scanner for Linux" +HOMEPAGE="https://www.tenable.com/" +SRC_URI="${MY_P}.x86_64.rpm" + +LICENSE="GPL-2 Nessus-EULA" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="mirror fetch strip" + +QA_PREBUILT="opt/nessus/bin/nasl + opt/nessus/bin/ndbg + opt/nessus/bin/nessus-mkrand + opt/nessus/lib/nessus/*.so* + opt/nessus/lib/nessus/*/*.so + opt/nessus/sbin/nessus-service + opt/nessus/sbin/nessuscli + opt/nessus/sbin/nessusd" +S="${WORKDIR}" + +pkg_nofetch() { + einfo "Please download ${A} from ${HOMEPAGE}downloads/nessus" + einfo "The archive should then be placed into your DISTDIR directory." +} + +src_install() { + # Using doins -r would strip executable bits from all binaries + cp -pPR "${S}"/opt "${D}"/ || die "Failed to copy files" + + pax-mark m "${D}"/opt/nessus/sbin/nessusd + + # Make sure these originally empty directories do not vanish, + # Nessus will not run properly without them + keepdir /opt/nessus/com/nessus/CA + keepdir /opt/nessus/etc/nessus + keepdir /opt/nessus/var/nessus/logs + keepdir /opt/nessus/var/nessus/tmp + + newinitd "${FILESDIR}"/nessusd-initd nessusd-bin + systemd_newunit usr/lib/systemd/system/nessusd.service nessusd-bin.service +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "To get started launch the nessusd-bin service, then point your Web browser to" + elog " https://:8834/" + else + elog "You may want to restart the nessusd-bin service to use" + elog "the new version of Nessus." + fi +}