metasploit: pkgcheck fixes

This commit is contained in:
Rick Farina (Zero_Chaos) 2024-04-03 20:56:35 -04:00
parent f7c2eb3a4f
commit 63c56fe38e
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
2 changed files with 16 additions and 3 deletions

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>sidhayn@gmail.com</email>
<name>Zero_Chaos</name>
</maintainer>
<use>
<flag name="development">Enable ruby gems needed for development</flag>
<flag name="nexpose">Enable nexpose integration</flag>
<flag name="pcap">Enable processing of pcap files</flag>
</use>
</pkgmetadata>

View file

@ -54,7 +54,6 @@ RDEPEND+=" ${COMMON_DEPEND}
>=app-eselect/eselect-metasploit-0.16" >=app-eselect/eselect-metasploit-0.16"
DEPEND+=" ${COMMON_DEPEND}" DEPEND+=" ${COMMON_DEPEND}"
QA_PREBUILT=" QA_PREBUILT="
usr/lib*/${PN}${SLOT}/data/templates/template_x86_linux.bin usr/lib*/${PN}${SLOT}/data/templates/template_x86_linux.bin
usr/lib*/${PN}${SLOT}/data/templates/template_armle_linux.bin usr/lib*/${PN}${SLOT}/data/templates/template_armle_linux.bin
@ -176,7 +175,7 @@ fix_gemspec() {
pkg_setup() { pkg_setup() {
ruby-ng_pkg_setup ruby-ng_pkg_setup
if use test; then if use test; then
pushd "${S}/../temp" > /dev/null || die pushd "${T}" > /dev/null || die
su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail
su postgres -c "createuser msf_test_user -d -S -R" su postgres -c "createuser msf_test_user -d -S -R"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -271,7 +270,8 @@ each_ruby_install() {
rm -r test || die rm -r test || die
#rm Gemfile.lock || die #rm Gemfile.lock || die
#I'm 99% sure that this will only work for as long as we only support one ruby version. Creativity will be needed if we wish to support multiple. #I'm 99% sure that this will only work for as long as we only support one ruby version.
# Creativity will be needed if we wish to support multiple.
# should be as simple as copying everything into the target... # should be as simple as copying everything into the target...
dodir /usr/lib/${PN}${SLOT} dodir /usr/lib/${PN}${SLOT}
cp -R * "${ED}"/usr/lib/${PN}${SLOT} || die "Copy files failed" cp -R * "${ED}"/usr/lib/${PN}${SLOT} || die "Copy files failed"