diff options
author | Peter Volkov <pva@gentoo.org> | 2009-07-08 09:09:41 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2009-07-08 09:09:41 +0000 |
commit | 013b20d0fa123a08dd669d834da05d057fedd2a3 (patch) | |
tree | ce8fd2cf5d760ce6127fad11a914d05a33a6a6fa | |
parent | Use pidfile in initscript. Per bug #276271. (diff) | |
download | gentoo-2-013b20d0fa123a08dd669d834da05d057fedd2a3.tar.gz gentoo-2-013b20d0fa123a08dd669d834da05d057fedd2a3.tar.bz2 gentoo-2-013b20d0fa123a08dd669d834da05d057fedd2a3.zip |
Version bump, bug #247787, thank H D Moore for report and useful ideas.
(Portage version: 2.2_rc33/cvs/Linux i686)
-rw-r--r-- | net-analyzer/metasploit/ChangeLog | 10 | ||||
-rw-r--r-- | net-analyzer/metasploit/files/msfweb3.2.confd | 10 | ||||
-rw-r--r-- | net-analyzer/metasploit/files/msfweb3.2.initd | 20 | ||||
-rw-r--r-- | net-analyzer/metasploit/metasploit-3.2_p6750.ebuild | 98 |
4 files changed, 136 insertions, 2 deletions
diff --git a/net-analyzer/metasploit/ChangeLog b/net-analyzer/metasploit/ChangeLog index 680b6c46fd8b..66467426be7a 100644 --- a/net-analyzer/metasploit/ChangeLog +++ b/net-analyzer/metasploit/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/metasploit -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/ChangeLog,v 1.44 2008/11/09 14:52:13 nixnut Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/ChangeLog,v 1.45 2009/07/08 09:09:41 pva Exp $ + +*metasploit-3.2_p6750 (08 Jul 2009) + + 08 Jul 2009; Peter Volkov <pva@gentoo.org> +files/msfweb3.2.confd, + +metasploit-3.2_p6750.ebuild, +files/msfweb3.2.initd: + Version bump, bug #247787, thank H D Moore for report and useful ideas. 09 Nov 2008; nixnut <nixnut@gentoo.org> metasploit-3.1_p5699-r1.ebuild: Stable on ppc wrt bug 246089 diff --git a/net-analyzer/metasploit/files/msfweb3.2.confd b/net-analyzer/metasploit/files/msfweb3.2.confd new file mode 100644 index 000000000000..b0cf87e6dfaf --- /dev/null +++ b/net-analyzer/metasploit/files/msfweb3.2.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/metasploit + +# Bind to the following IP instead of the loopback address +IPADDR=127.0.0.1 + +# Bind to the following TCP port instead of default 55555 +PORT=55555 + +# All options +MSF_OPTS="-a $IPADDR -p $PORT" diff --git a/net-analyzer/metasploit/files/msfweb3.2.initd b/net-analyzer/metasploit/files/msfweb3.2.initd new file mode 100644 index 000000000000..0618169b8a01 --- /dev/null +++ b/net-analyzer/metasploit/files/msfweb3.2.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/files/msfweb3.2.initd,v 1.1 2009/07/08 09:09:41 pva Exp $ + +PIDFILE=/var/run/msfweb3.2.pid + +start() { + ebegin "Starting msfweb3.2" + start-stop-daemon --start --quiet --background --startas msfweb3.2 --exec /usr/lib/metasploit3.2/msfweb \ + --pidfile ${PIDFILE} --make-pidfile -- ${MSF_OPTS} + eend $? + einfo "Note: msfweb3.2 is started but needs some before it serves clients." +} + +stop() { + ebegin "Stopping msfweb" + start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/metasploit/metasploit-3.2_p6750.ebuild b/net-analyzer/metasploit/metasploit-3.2_p6750.ebuild new file mode 100644 index 000000000000..9edcc8797089 --- /dev/null +++ b/net-analyzer/metasploit/metasploit-3.2_p6750.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/metasploit-3.2_p6750.ebuild,v 1.1 2009/07/08 09:09:41 pva Exp $ + +MY_P=${PN/metasploit/framework}-${PV} + +# Metasploit uses subversion as a *normal* update mechanism for stable branches +# of the package. This ebuild uses _p<number> inside $PV to install updated up +# to revision <number> version of framework. For more information, take a look +# at bug #195924. +if [[ "${PV}" =~ (_p)([0-9]+) ]] ; then + inherit subversion + SRC_URI="" + MTSLPT_REV=${BASH_REMATCH[2]} + ESVN_REPO_URI="https://metasploit.com/svn/framework3/branches/framework-${PV%_p*}/@${MTSLPT_REV}" +else + SRC_URI="http://sugar.metasploit.com/releases/${MY_P}.tar.gz" +fi + +DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code" +HOMEPAGE="http://www.metasploit.org/" + +LICENSE="BSD" +SLOT="3.2" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="gtk sqlite postgres" + + +# Note we use bundled gems (see data/msfweb/vendor/rails/) as upstream voted for +# such solution, bug #247787 +RDEPEND="dev-lang/ruby + dev-ruby/rubygems + gtk? ( dev-ruby/ruby-libglade2 ) + sqlite? ( dev-ruby/sqlite3-ruby + dev-ruby/activerecord ) + postgres? ( dev-ruby/ruby-postgres + dev-ruby/activerecord )" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_install() { + if [[ "${SRC_URI}" != "" ]] ; then + # svn sources... + find "${S}" -type d -name ".svn" -print0 | xargs -0 -n1 rm -R + fi + + # should be as simple as copying everything into the target... + dodir /usr/lib/${PN}${SLOT} + cp -R "${S}"/* "${D}"/usr/lib/${PN}${SLOT} || die "Copy files failed" + + # do not remove LICENSE, bug #238137 + dodir /usr/share/doc/${PF} + cp -R "${S}"/{documentation,README} "${D}"/usr/share/doc/${PF} + rm -Rf "${D}"/usr/lib/${PN}${SLOT}/documentation "${D}"/usr/lib/${PN}${SLOT}/README + dosym /usr/share/doc/${PF}/documentation /usr/lib/${PN}${SLOT}/documentation + + dodir /usr/bin/ + use gtk || rm msfgui3.2 + for file in msf*; do + dosym /usr/lib/${PN}${SLOT}/${file} /usr/bin/${file}${SLOT} + done + + chown -R root:0 "${D}" + + newinitd "${FILESDIR}"/msfweb${SLOT}.initd msfweb${SLOT} \ + || die "newinitd failed" + newconfd "${FILESDIR}"/msfweb${SLOT}.confd msfweb${SLOT} \ + || die "newconfd failed" +} + +pkg_postinst() { + if [[ "${SRC_URI}" == "" ]] ; then + elog "If you wish to update ${PN} manually simply run:" + elog + elog "ESVN_REVISION=<rev> emerge =${PF}" + elog + elog "where <rev> is either HEAD (in case you wish to get all updates)" + elog "or specific revision number. But NOTE, this update will vanish" + elog "next time you reemerge ${PN}. To make update permanent either" + elog "create ebuild with specific revision number inside your overlay" + elog "or report revision bump bug at http://bugs.gentoo.org ." + elog + elog "In case you use portage it's also possible to create" + elog "/etc/portage/env/${CATEGORY}/${PN} file with ESVN_REVISION=<rev>" + elog "content. Then each time you run emerge ${PN} you'll have said" + elog "<rev> installed. For example, if you run" + elog " # mkdir -p /etc/portage/env/${CATEGORY}" + elog " # echo ESVN_REVISION=HEAD >> /etc/portage/env/${CATEGORY}/${PN}" + elog "each time you reemerge ${PN} it'll be updated to get all possible" + elog "updates for framework-${PV%_p*} branch." + elog "You can do similar things in paludis using /etc/paludis/bashrc." + else + ewarn "${PN} version you installed is for testing purposes only" + ewarn "as it's impossible to update it. For day by day work use" + ewarn "different version." + fi +} |