diff --git a/dev-python/pywinrm/Manifest b/dev-python/pywinrm/Manifest
deleted file mode 100644
index 16495968f..000000000
--- a/dev-python/pywinrm/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST pywinrm-0.4.1.tar.gz 39865 BLAKE2B dde1697386a3fc245e2b1b0b05138431bb7b569ef9bdbc07ed6b6cb8bf593f2cc3d784bc65808b695cae36cc38c255c76847ed2e7cfb60b02648ef60db8b309e SHA512 e44427b69105e593eceb0a7801055c8fab60df30a619602ace73509ea2c39b3b5f3e034d8ec091835451f5daebaec515ef5782497706dedd8bf91cf167c9caa8
diff --git a/dev-python/pywinrm/pywinrm-0.4.1.ebuild b/dev-python/pywinrm/pywinrm-0.4.1.ebuild
deleted file mode 100644
index d05c636ae..000000000
--- a/dev-python/pywinrm/pywinrm-0.4.1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-
-inherit distutils-r1 optfeature
-
-DESCRIPTION="Python library for Windows Remote Management"
-HOMEPAGE="https://github.com/diyan/pywinrm"
-SRC_URI="https://github.com/diyan/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="dev-python/requests[${PYTHON_USEDEP}]
- dev-python/requests-ntlm[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
- dev-python/xmltodict[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}"
-
-distutils_enable_tests pytest
-
-python_install_all() {
- distutils-r1_python_install_all
- find "${ED}" -type d -name "tests" -exec rm -rv {} + || die "tests removing failed"
-}
-
-pkg_postinst() {
- optfeature "integration with Kerberos" dev-python/requests-kerberos
- optfeature "integration with CredSSP" dev-python/requests-credssp
-}
diff --git a/dev-ruby/metasploit-concern/Manifest b/dev-ruby/metasploit-concern/Manifest
index 02f29081c..8c0418128 100644
--- a/dev-ruby/metasploit-concern/Manifest
+++ b/dev-ruby/metasploit-concern/Manifest
@@ -1,3 +1,3 @@
DIST metasploit-concern-3.0.0.gem 18944 BLAKE2B 769f5d7f1df51021624a9c2a62db98b83e03a319a887fcb96689c9525c8b7e2a295ce7f9c0c58aca197263759698b356086327a8b9776daf16819defa697e9b6 SHA512 0de97f7131e1d92a34b4f091aadd5779cf75037445c9d4c3460810747c65b64f872757414fedd13d9aef7b978efc9d0dd0fc3d24e286e0d4ab628d6187a68483
DIST metasploit-concern-3.0.1.gem 18944 BLAKE2B cd297442f0762e8579968608c188c7c4779f2d25141bd3b9bf63c9bd710dbfd62d6ab4bf19140d32e4e0877df0093402972ed386ec1dc719221420922a15daf2 SHA512 146b64ee51139dc61ee1460ce3813514a683cafc67e7553c4474be8a1a19ffef25f02db239dadc14a6ac296b3f8d704df1c10da361a1f15629dcbd6ed034c082
-DIST metasploit-concern-4.0.2.gem 18944 BLAKE2B 20a7cc63fb68da2273441991a8712a341d5b86caaf6c3ac886e0fff2436bac0f8e2a73dc24f0d650abb68b786d1b187685c78445ea604da37cac265aa65c85df SHA512 962b93ddd0c09264f68c5efbfd78be9b3a1f19c9e188051e2d67d347f457975ede969d2a9c08106a8bad496b75f230b31876a41af012258b73ab08558f51c6f9
+DIST metasploit-concern-4.0.3.gem 18944 BLAKE2B aaae406d6a7df3c3b20ac74caa7629f8406a941979c5ab96f7ec4d7a13bf203e384efd9e7bffc5ac251c2952d23982a4257413e543518c6094a5f048dca65f2c SHA512 7170657cde24f1bf86d8872802b8c6e81d99abd18d563353fa0d47858c98e38c86d7ddc5670d9164d6cf4d47ed35da2cc4b6f83d328fb5b464d1038dbea849b3
diff --git a/dev-ruby/metasploit-concern/metasploit-concern-4.0.2.ebuild b/dev-ruby/metasploit-concern/metasploit-concern-4.0.3.ebuild
similarity index 90%
rename from dev-ruby/metasploit-concern/metasploit-concern-4.0.2.ebuild
rename to dev-ruby/metasploit-concern/metasploit-concern-4.0.3.ebuild
index 36cf2d7fe..d502ecaab 100644
--- a/dev-ruby/metasploit-concern/metasploit-concern-4.0.2.ebuild
+++ b/dev-ruby/metasploit-concern/metasploit-concern-4.0.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-USE_RUBY="ruby26"
+USE_RUBY="ruby26 ruby27"
RUBY_FAKEGEM_EXTRAINSTALL="spec"
diff --git a/dev-ruby/metasploit-credential/Manifest b/dev-ruby/metasploit-credential/Manifest
index 802cde7df..b91f6f33d 100644
--- a/dev-ruby/metasploit-credential/Manifest
+++ b/dev-ruby/metasploit-credential/Manifest
@@ -1,2 +1,3 @@
DIST metasploit-credential-4.0.3.gem 109568 BLAKE2B 8f3f5bbe6a119cb19a468cb19afdee45a3e384d942697354d29c0261724b03e70dfc7257ad03b895e4dd6229c21e5a7e98bcfe894ac26894846f539875f688c3 SHA512 7f3ef6096eb8256d151cca62581c9bed21f24e4ae7c2ae5680bfe839a5c00ad4a31883b95bca5dda919bb0ca3d9d11587013d84dae45de80a44377286137ad63
DIST metasploit-credential-5.0.2.gem 110080 BLAKE2B df1932e74dc1aa8d38ec3e14812d2c4e0b3d1fcbf91ec921533d170aed0b8d99fe32aa7f3fa25c32e59e93c4b1f3d42402f98b80ca1397f813d63a1dd894117c SHA512 5dcc9f39db9d012dfecc85e73659ea8dd9b59721bdb2fbdf3dfaa9d08b21aeaef37dd77726242f28864c9db44a0806787453caa331673776c02fea6904ea55c4
+DIST metasploit-credential-5.0.5.gem 110592 BLAKE2B 5019177832f6b10def2c976e5b38e3d4d244d21fdea5ecc7d1fbd42cf36efa75860ce620ff4abe12c4c5e116ad7b453b3e1888ef889261e3195c0ee3a96b4c45 SHA512 9b5faabce15828a7be8d8ba0410f0dbf3e5fe9191868aa64a35be1e35dfcacd917e073157ac20fbc38535e55b937055a0f3cbf3fef33b0d764f40662754ff646
diff --git a/dev-ruby/metasploit-credential/metasploit-credential-5.0.5.ebuild b/dev-ruby/metasploit-credential/metasploit-credential-5.0.5.ebuild
new file mode 100644
index 000000000..3b655353c
--- /dev/null
+++ b/dev-ruby/metasploit-credential/metasploit-credential-5.0.5.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby26 ruby27"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+
+inherit ruby-fakegem
+
+RUBY_FAKEGEM_EXTRAINSTALL="app config db spec"
+
+DESCRIPTION="Code for modeling and managing credentials in Metasploit"
+HOMEPAGE="https://github.com/rapid7/metasploit-credential"
+
+LICENSE="BSD"
+SLOT="$(ver_cut 1-2)"
+#FIXME: Gentoo's net-ssh/rubyntlm is not arm64
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT=test
+
+ruby_add_rdepend "dev-ruby/metasploit-concern:4.0
+ dev-ruby/metasploit_data_models:5.0
+ dev-ruby/metasploit-model
+ dev-ruby/net-ssh:*
+ dev-ruby/pg:*
+ dev-ruby/railties:6.0
+ dev-ruby/rex-socket
+ dev-ruby/rubyntlm
+ dev-ruby/rubyzip:*"
diff --git a/dev-ruby/metasploit-model/Manifest b/dev-ruby/metasploit-model/Manifest
index a06fa413b..49f5c6b5f 100644
--- a/dev-ruby/metasploit-model/Manifest
+++ b/dev-ruby/metasploit-model/Manifest
@@ -1,2 +1,2 @@
DIST metasploit-model-3.1.3.gem 81920 BLAKE2B 44dcb9a15506fb81eac261b072c125cddaab84775b0d807aaefc2e79b0ac4f737f0de7ff4b99dba7eef21d6bc6c8e2324c0ce163b1ddc999122f2e5e598f62b0 SHA512 603ec29b897cac2bcab886034333bdafe504bd3cd30e654ab298ae8bdb23711409aaa677a21421629e596e35e652ac4bf1381e1c8c067c4e45c6880b5c1a8db0
-DIST metasploit-model-4.0.2.gem 81920 BLAKE2B 9537f0e097b8e7737d4319d0ac32de3d8496a17c9a863a049ff7b5ffb2c88afde5ebdd709c9a1eed97300eb1cf4a00ed5533110c2a00cfe560e9164ca61bb5ae SHA512 2bba08a73e3ce4b260b01e69729697941a04bd178c42184c8f87f09f52bff7b054c98a7570aa3b0e99f4831f8cdcdb9dbd6a0e2a559860d25b9b9c203e2d8562
+DIST metasploit-model-4.0.3.gem 81920 BLAKE2B c44e4833ba2110875bd69f4bbab80f72877bb49a6aa641ae4f4d47f70a682be0e77b5c943884abfa0fbdd7855010ecc6ec1fcb25cf0f512840d42b76e855373c SHA512 db02fa2f848025df2f0ddf579200adf800eead15bcd3d3ab62e743fa4c85b1f4ff581f3286d6391c0b1d1b032a230fd2aa67ca095c93d066d50a6d27983819aa
diff --git a/dev-ruby/metasploit-model/metasploit-model-4.0.2.ebuild b/dev-ruby/metasploit-model/metasploit-model-4.0.3.ebuild
similarity index 95%
rename from dev-ruby/metasploit-model/metasploit-model-4.0.2.ebuild
rename to dev-ruby/metasploit-model/metasploit-model-4.0.3.ebuild
index c2f14a72d..52166e539 100644
--- a/dev-ruby/metasploit-model/metasploit-model-4.0.2.ebuild
+++ b/dev-ruby/metasploit-model/metasploit-model-4.0.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-USE_RUBY="ruby26"
+USE_RUBY="ruby26 ruby27"
inherit ruby-fakegem
RUBY_FAKEGEM_EXTRAINSTALL="app config script spec"
diff --git a/dev-ruby/metasploit_data_models/Manifest b/dev-ruby/metasploit_data_models/Manifest
index 1184ce1d2..fca884f12 100644
--- a/dev-ruby/metasploit_data_models/Manifest
+++ b/dev-ruby/metasploit_data_models/Manifest
@@ -1,2 +1,2 @@
DIST metasploit_data_models-4.1.1.gem 178688 BLAKE2B e05d45ee04d6da7d31d5a0233c92c75985b7680a9bc6ae6455cbf1278324070081dc8af62426c30969a289b48d79a86bf82eeef840cfe6d9007a52139b2e973a SHA512 8c78630515a1404c142961f99b9b51624fa06e8590c1bda201d6d9bb1567d6b25844763bfce0a101f7590ed12198087cb80778d32ef7add8d67fa9d3d1f13f56
-DIST metasploit_data_models-5.0.1.gem 178688 BLAKE2B a30f50b27611bd75e3725b23374abc66c8cdf2cae8a73422865672a0852a57911861923dada97fea64db9269385bdbb9fd319b597336afdbd514e108b9ae458e SHA512 690531948ea0a69c5bbf6c1161843636bd7b47f3368c556b39325ce7f804bc5a41a73610faf1870be4336ba19eb58aee4b57733df4ebe073616891f4ec89b213
+DIST metasploit_data_models-5.0.4.gem 179200 BLAKE2B 12575a8da05a619bff5896025fbec570304fd252c3a3bcf8c65391a15927e68c72e2d9f5f822108a7e419b466e76fa6c59ca1b87c22527a18f051f2e3003fdb7 SHA512 1516c9d50e7d95a9823936a41f0acd8ebb805c82758cf3b35fb849c4ac015e03448f35d96c0ea7d5dff4f3e6839130300132baf42fff47315b08b6fae279721b
diff --git a/dev-ruby/metasploit_data_models/metasploit_data_models-5.0.1.ebuild b/dev-ruby/metasploit_data_models/metasploit_data_models-5.0.4.ebuild
similarity index 93%
rename from dev-ruby/metasploit_data_models/metasploit_data_models-5.0.1.ebuild
rename to dev-ruby/metasploit_data_models/metasploit_data_models-5.0.4.ebuild
index 850ffe1bb..5036032fc 100644
--- a/dev-ruby/metasploit_data_models/metasploit_data_models-5.0.1.ebuild
+++ b/dev-ruby/metasploit_data_models/metasploit_data_models-5.0.4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-USE_RUBY="ruby26"
+USE_RUBY="ruby26 ruby27"
inherit ruby-fakegem
@@ -26,12 +26,13 @@ RDEPEND="${RDEPEND} !dev-ruby/metasploit_data_models:0"
ruby_add_rdepend "
dev-ruby/activerecord:6.0[postgres]
dev-ruby/activesupport:6.0
- dev-ruby/railties:6.0
+ dev-ruby/arel-helpers
dev-ruby/metasploit-concern
>=dev-ruby/metasploit-model-3.1.0
- dev-ruby/arel-helpers
dev-ruby/pg:*
- >=dev-ruby/recog-2.0.0:*"
+ dev-ruby/railties:6.0
+ >=dev-ruby/recog-2.0.0:*
+ dev-ruby/webrick"
ruby_add_bdepend "dev-ruby/bundler:2"
diff --git a/dev-ruby/metasploit_payloads-mettle/Manifest b/dev-ruby/metasploit_payloads-mettle/Manifest
index ef53d11e6..8462a71c5 100644
--- a/dev-ruby/metasploit_payloads-mettle/Manifest
+++ b/dev-ruby/metasploit_payloads-mettle/Manifest
@@ -1 +1,2 @@
DIST metasploit_payloads-mettle-1.0.10.gem 22333440 BLAKE2B a10b65260b8b53dabc5bc311f919bfb84173590a4d58392947539f15dac6953f3df61c05cf62408168b6ab4bcee6a85713c4128f7cffcfcc5f6956564cfc0eeb SHA512 d26e9e7dcba47a22baae257e60060ff7c0f38a0fe3f67feb1e59125ef82b80d313ad8697c2d8cc464cd82c545a012921dfaaa3d0e82ea66f1128c5404c0c8654
+DIST metasploit_payloads-mettle-1.0.17.gem 22376960 BLAKE2B 5fdf4c1746d2401e9d94aa9f62c21f5c7ba58d235533f5b02843e6d667c473ca80c70e5716fb52c9a8b37133c0ae6d24d6037481d88232fc8df2f9480173deca SHA512 fd0163d53a17f8a80daaf736894670f39d647f372678af810f8bdbb2bfef9b4191e42375514ea459bf7e31e224cba7e0cbff345ce7069078a640fa10c4daef89
diff --git a/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.17.ebuild b/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.17.ebuild
new file mode 100644
index 000000000..b8daf7f72
--- /dev/null
+++ b/dev-ruby/metasploit_payloads-mettle/metasploit_payloads-mettle-1.0.17.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby26 ruby27"
+
+RUBY_FAKEGEM_TASK_DOC=""
+
+RUBY_FAKEGEM_EXTRAINSTALL="build"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Compiled binaries for Metasploit's next-gen Meterpreter"
+HOMEPAGE="https://rubygems.org/gems/metasploit_payloads-mettle"
+
+LICENSE="BSD"
+
+SLOT="${PV}"
+KEYWORDS="amd64 ~arm64 x86"
+IUSE=""
+
+#no tests
+RESTRICT="test strip"
+
+QA_PREBUILT="
+ usr/lib*/ruby/gems/*/gems/${P}/build/aarch64-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/aarch64-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5b-linux-musleabi/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5b-linux-musleabi/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5l-linux-musleabi/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/armv5l-linux-musleabi/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/i486-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/i486-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips64-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mipsel-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/sniffer
+ usr/lib*/ruby/gems/*/gems/${P}/build/mips-linux-muslsf/bin/sniffer.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc64le-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc64le-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc-linux-muslsf/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/powerpc-linux-muslsf/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/s390x-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/s390x-linux-musl/bin/mettle.bin
+ usr/lib*/ruby/gems/*/gems/${P}/build/x86_64-linux-musl/bin/mettle
+ usr/lib*/ruby/gems/*/gems/${P}/build/x86_64-linux-musl/bin/mettle.bin
+ "
+
+src_install() {
+ ruby-ng_src_install
+ #tell revdep-rebuild to ignore binaries meant for the target
+ dodir /etc/revdep-rebuild
+ cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-${PN}-${SLOT} || die
+ #These dirs contain prebuilt binaries for running on the TARGET not the HOST
+ SEARCH_DIRS_MASK="/usr/lib*/ruby/gems/*/gems/${P}/build"
+ EOF
+}
diff --git a/dev-ruby/packetfu/Manifest b/dev-ruby/packetfu/Manifest
new file mode 100644
index 000000000..a9be91484
--- /dev/null
+++ b/dev-ruby/packetfu/Manifest
@@ -0,0 +1 @@
+DIST packetfu-1.1.13.gem 769024 BLAKE2B 6fa53680dec76c14c6cd73cac4e57acf2da5aaa2a9a6371d0b9fbea1e764d9e2eda09fcf0ad245eb62340fa0d3047e525ba290d4c45ff4739e28fd5782659cd6 SHA512 c3ee67bfd597dcd197f213361ab94c614136304d8746de45b99322c1b6878eaef7c4a2ebc19be658d891df3e7d261476def27ae14990157dc6cb466815bd6f15
diff --git a/dev-ruby/packetfu/metadata.xml b/dev-ruby/packetfu/metadata.xml
new file mode 100644
index 000000000..37f15a1d0
--- /dev/null
+++ b/dev-ruby/packetfu/metadata.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ zerochaos@gentoo.org
+ Rick Farina
+
+
+ ruby@gentoo.org
+ Gentoo Ruby Project
+
+
+ packetfu
+
+
diff --git a/dev-ruby/packetfu/packetfu-1.1.13.ebuild b/dev-ruby/packetfu/packetfu-1.1.13.ebuild
new file mode 100644
index 000000000..22bfb7445
--- /dev/null
+++ b/dev-ruby/packetfu/packetfu-1.1.13.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+USE_RUBY="ruby26 ruby27"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+RUBY_FAKEGEM_EXTRAINSTALL="examples"
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+inherit multilib ruby-fakegem
+
+DESCRIPTION="A mid-level packet manipulation library"
+HOMEPAGE="https://rubygems.org/gems/packetfu"
+
+LICENSE="BSD"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~x86"
+
+ruby_add_rdepend "
+ dev-ruby/network_interface:0
+ dev-ruby/pcaprub:*
+"
+
+ruby_add_bdepend "test? ( >=dev-ruby/rspec-its-1.2.0:1 )
+ dev-ruby/bundler"
+DEPEND="${DEPEND} !dev-ruby/packetfu:0"
+
+all_ruby_prepare() {
+ [ -f Gemfile.lock ] && rm Gemfile.lock
+ #For now, we don't support development or testing at all
+ #if ! use development; then
+ sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
+ sed -i -e "/s.add_development_dependency/d" "${PN}".gemspec || die
+ sed -i -e "/spec.add_development_dependency/d" "${PN}".gemspec || die
+ #fi
+ #if ! use test; then
+ sed -i -e "/^group :test do/,/^end$/d" Gemfile || die
+ #fi
+ #if ! use test && ! use development; then
+ sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die
+ #fi
+ sed -i -e '/[Cc]overalls/d' spec/spec_helper.rb || die
+}
diff --git a/dev-ruby/ruby-oci8/Manifest b/dev-ruby/ruby-oci8/Manifest
index a718aa461..bc0d3b49b 100644
--- a/dev-ruby/ruby-oci8/Manifest
+++ b/dev-ruby/ruby-oci8/Manifest
@@ -1 +1,2 @@
+DIST ruby-oci8-2.2.10.gem 279040 BLAKE2B 40c2f936e105a6f9465be176e373473d7d70b1ff2382242f1aa64962fe6284c64d6062d1dc5b28490d99b5ea4af59c4c8a865e163c56c5e27aa839a33436d577 SHA512 6c45514bc78ef5bc63f2a096b9c682cc6411a8c82fd81c6b4bf91ee3d8e2d597b07919c40a7c26d41fcc48cc311ed20d8db7a1644f0b87e325a2cf9d33b0f807
DIST ruby-oci8-2.2.9.gem 336896 BLAKE2B 60fb88c4c1034f7ba1730095ba10a7232d46991dbf9f55b15bd757e22fe946980aa73d99535543391cd509fedf5c8163c4333f5092d64cfbbe74e5c7ceb7b90a SHA512 f6a7244c1173a03e40e3fa696ea1cf350687515d2d605264a9fab1d1cf44d5a6f39dcbf78291ae0e37e362da9351c545afc74f9c86fa2ec662e15a126b913290
diff --git a/dev-ruby/ruby-oci8/ruby-oci8-2.2.10.ebuild b/dev-ruby/ruby-oci8/ruby-oci8-2.2.10.ebuild
new file mode 100644
index 000000000..04f91ebc8
--- /dev/null
+++ b/dev-ruby/ruby-oci8/ruby-oci8-2.2.10.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby26 ruby27 ruby30"
+
+inherit multilib ruby-fakegem
+
+RUBY_FAKEGEM_EXTRADOC="NEWS README.md ChangeLog"
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+
+DESCRIPTION="A Ruby library for Oracle OCI8"
+HOMEPAGE="https://rubygems.org/gems/ruby-oci8/"
+
+LICENSE="Ruby"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-db/oracle-instantclient"
+DEPEND="dev-db/oracle-instantclient"
+
+EXT_DIR="ext/oci8"
+
+each_ruby_configure() {
+ # configure the native libraries
+ ${RUBY} -C${EXT_DIR} extconf.rb --prefix="${D}/usr" || die "configure failed"
+}
+
+each_ruby_compile() {
+ # compile the native libraries
+ emake -C ${EXT_DIR} V=1 || die "could not compile native library"
+}
+
+each_ruby_install() {
+ # install the native libraries
+ emake -C ${EXT_DIR} install DESTDIR="${D}" || die "could not install native library"
+ # install the gem files
+ each_fakegem_install
+}
diff --git a/dev-ruby/ruby-oci8/ruby-oci8-2.2.9.ebuild b/dev-ruby/ruby-oci8/ruby-oci8-2.2.9.ebuild
index 0467e8d02..44f899c1f 100644
--- a/dev-ruby/ruby-oci8/ruby-oci8-2.2.9.ebuild
+++ b/dev-ruby/ruby-oci8/ruby-oci8-2.2.9.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-USE_RUBY="ruby26"
+USE_RUBY="ruby26 ruby27"
inherit multilib ruby-fakegem
@@ -17,8 +17,8 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
-RDEPEND="dev-db/oracle-instantclient-basic"
-DEPEND="dev-db/oracle-instantclient-basic"
+RDEPEND="dev-db/oracle-instantclient"
+DEPEND="dev-db/oracle-instantclient"
EXT_DIR="ext/oci8"
diff --git a/dev-ruby/unix-crypt/Manifest b/dev-ruby/unix-crypt/Manifest
new file mode 100644
index 000000000..c5e42fba3
--- /dev/null
+++ b/dev-ruby/unix-crypt/Manifest
@@ -0,0 +1 @@
+DIST unix-crypt-1.3.0.gem 12800 BLAKE2B 56d317649cc8ca1bd0415127099e9d6b8c6497e28d43731cf9a851f6b34a799944a512cfbdff407ebce620ae610eff6071ec24fcae56eab220e867f8eb7f763a SHA512 0b814e1c108056fdf70cb266b8aa2781fce9115161b9de372a1c62763becab3d8fc2b1722e8a31903e1ea6e831ab569d8e81655664345d5fa60ea80c9ee68e9b
diff --git a/dev-ruby/unix-crypt/unix-crypt-1.3.0.ebuild b/dev-ruby/unix-crypt/unix-crypt-1.3.0.ebuild
new file mode 100644
index 000000000..bfe3e6403
--- /dev/null
+++ b/dev-ruby/unix-crypt/unix-crypt-1.3.0.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby26 ruby27 ruby30"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Performs the UNIX crypt(3) algorithm"
+HOMEPAGE="https://rubygems.org/gems/unix-crypt"
+
+KEYWORDS="amd64 arm64 x86"
+LICENSE=""
+SLOT="0"
+
+#ruby_add_rdepend ""
diff --git a/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest
index 388d799c6..546c3d947 100644
--- a/net-analyzer/metasploit/Manifest
+++ b/net-analyzer/metasploit/Manifest
@@ -1 +1,2 @@
DIST metasploit-6.0.50.tar.gz 66572385 BLAKE2B ebede53045d56668ffc641d8bc88cdd5ac9b0fd58a5f5f04df2a770576710b3c8d9ba6b6a7da34446ce05337d405f68bbce7030bc43f108e558c7bb9811501a7 SHA512 835fc4be1ed3536e746754da445dfd832f6af381d7549a069a3251f90332337b61b8feaa4d031d023efd4b261effc0d562710a317d1326af62f4745291a40b6e
+DIST metasploit-6.1.25.tar.gz 68354626 BLAKE2B 5d2c3d59b10c58e72c9611ed7a55d7a1e30c656c5193ec533065df72a47b6611a77892a0a785f72e1af329b69626e9dddea9c837f4c747bdbeafd7f46940c023 SHA512 245f4c5a3ead8ce6357006d26e021493da7c71a4946007e455d3a3b4dc629f5df4e87e7c4f18768209c59ed87172f2d3abaef017a92b8d447fc071ffbff458e3
diff --git a/net-analyzer/metasploit/metasploit-6.0.50.ebuild b/net-analyzer/metasploit/metasploit-6.0.50.ebuild
index 3912cfe21..fed4a0623 100644
--- a/net-analyzer/metasploit/metasploit-6.0.50.ebuild
+++ b/net-analyzer/metasploit/metasploit-6.0.50.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -115,13 +115,11 @@ RUBY_COMMON_DEPEND="virtual/ruby-ssl
dev-ruby/pry
dev-ruby/redcarpet
dev-ruby/yard
- >=dev-ruby/rake-10.0.0
- >=dev-ruby/factory_girl-4.1.0 )"
+ >=dev-ruby/rake-10.0.0 )"
#lorcon doesn't support ruby21
#lorcon? ( net-wireless/lorcon[ruby] )
ruby_add_bdepend "${RUBY_COMMON_DEPEND}
- test? ( >=dev-ruby/factory_girl-4.1.0
- dev-ruby/fivemat
+ test? ( dev-ruby/fivemat
dev-ruby/database_cleaner
>=dev-ruby/rspec-2.12
dev-ruby/shoulda-matchers
diff --git a/net-analyzer/metasploit/metasploit-6.1.25.ebuild b/net-analyzer/metasploit/metasploit-6.1.25.ebuild
new file mode 100644
index 000000000..ae7ad5b29
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-6.1.25.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+#never ever ever have more than one ruby in here
+#TODO: use ruby-single instead?
+USE_RUBY="ruby27"
+inherit eutils ruby-ng
+
+##Tags https://github.com/rapid7/metasploit-framework/releases
+MY_PV=${PV/_p/-}
+SRC_URI="https://github.com/rapid7/metasploit-framework/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+#FIXME: add winrm
+#KEYWORDS="~amd64"
+RUBY_S="${PN}-framework-${MY_PV}"
+SLOT="$(ver_cut 1).$(ver_cut 2)"
+
+DESCRIPTION="Advanced framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+LICENSE="BSD"
+IUSE="development +java oracle +pcap test"
+
+#multiple known bugs with tests reported upstream and ignored
+#http://dev.metasploit.com/redmine/issues/8418 - worked around (fix user creation when possible)
+RESTRICT="test"
+
+#grep spec.add_runtime_dependency metasploit-framework.gemspec | sort
+RUBY_COMMON_DEPEND="virtual/ruby-ssl
+ dev-ruby/actionpack:6.0
+ dev-ruby/activerecord:6.0
+ dev-ruby/activesupport:6.0
+ dev-ruby/railties:6.0
+ dev-ruby/bcrypt-ruby
+ dev-ruby/bcrypt_pbkdf
+ dev-ruby/bit-struct
+ dev-ruby/bson
+ dev-ruby/bundler:2
+ dev-ruby/concurrent-ruby
+ dev-ruby/dnsruby
+ dev-ruby/ed25519
+ dev-ruby/em-http-request
+ dev-ruby/eventmachine
+ dev-ruby/faker:2
+ dev-ruby/faraday
+ dev-ruby/faye-websocket
+ dev-ruby/filesize:*
+ dev-ruby/hrr_rb_ssh
+ dev-ruby/http-cookie
+ dev-ruby/irb
+ dev-ruby/jsobfu:*
+ dev-ruby/json:*
+ dev-ruby/metasm:*
+ dev-ruby/metasploit-concern:4.0
+ dev-ruby/metasploit-credential:5.0
+ dev-ruby/metasploit_data_models:5.0
+ dev-ruby/metasploit-model:4.0
+ dev-ruby/metasploit-payloads:2.0.47
+ dev-ruby/metasploit_payloads-mettle:1.0.17
+ dev-ruby/mqtt
+ dev-ruby/msgpack
+ dev-ruby/ruby-net-ldap
+ dev-ruby/net-ssh:*
+ dev-ruby/network_interface
+ dev-ruby/nokogiri
+ dev-ruby/octokit
+ dev-ruby/openssl-ccm
+ dev-ruby/packetfu
+ dev-ruby/patch_finder
+ dev-ruby/pcaprub
+ dev-ruby/pdf-reader:*
+ dev-ruby/pg:*
+ dev-ruby/rb-readline
+ dev-ruby/recog:*
+ dev-ruby/redcarpet
+ dev-ruby/rex-arch
+ dev-ruby/rex-bin_tools
+ dev-ruby/rex-core
+ dev-ruby/rex-encoder
+ dev-ruby/rex-exploitation
+ dev-ruby/rex-java
+ dev-ruby/rex-mime
+ dev-ruby/rex-nop
+ dev-ruby/rex-ole
+ dev-ruby/rex-powershell
+ dev-ruby/rex-random_identifier
+ dev-ruby/rex-registry
+ dev-ruby/rex-rop_builder
+ dev-ruby/rex-socket
+ dev-ruby/rex-sslscan
+ dev-ruby/rex-struct2
+ dev-ruby/rex-text
+ dev-ruby/rex-zip
+ ~dev-ruby/reline-0.2.5
+ dev-ruby/ruby-macho
+ dev-ruby/rubyntlm
+ >=dev-ruby/ruby_smb-2.0.0
+ dev-ruby/rubyzip:*
+ dev-ruby/sinatra
+ dev-ruby/sqlite3
+ dev-ruby/sshkey
+ dev-ruby/swagger-blocks
+ dev-ruby/zeitwerk
+ dev-ruby/tzinfo:*
+ dev-ruby/warden
+ dev-ruby/windows_error
+ dev-ruby/xdr
+ dev-ruby/xmlrpc
+ dev-ruby/unix-crypt
+ dev-ruby/winrm
+ www-servers/puma
+ www-servers/thin
+ java? ( dev-ruby/rjb )
+ oracle? ( dev-ruby/ruby-oci8 )
+ pcap? ( dev-ruby/pcaprub:*
+ dev-ruby/network_interface )
+ development? ( dev-ruby/fivemat
+ dev-ruby/pry
+ dev-ruby/redcarpet
+ dev-ruby/yard
+ >=dev-ruby/rake-10.0.0 )"
+ #lorcon doesn't support ruby21
+ #lorcon? ( net-wireless/lorcon[ruby] )
+ruby_add_bdepend "${RUBY_COMMON_DEPEND}
+ test? ( dev-ruby/fivemat
+ dev-ruby/database_cleaner
+ >=dev-ruby/rspec-2.12
+ dev-ruby/shoulda-matchers
+ dev-ruby/timecop
+ >=dev-ruby/rake-10.0.0 )
+
+"
+ruby_add_rdepend "${RUBY_COMMON_DEPEND}"
+
+COMMON_DEPEND="dev-db/postgresql:*[server]
+ || ( app-crypt/johntheripper-jumbo >=app-crypt/johntheripper-1.7.9-r1[-minimal(-)] )
+ dev-libs/libxml2
+ dev-libs/libxslt
+ dev-libs/openssl
+ net-analyzer/nmap
+ net-libs/libpcap
+ sys-libs/zlib"
+RDEPEND+=" ${COMMON_DEPEND}
+ >=app-eselect/eselect-metasploit-0.16"
+
+RESTRICT="strip"
+
+QA_PREBUILT="
+ 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_x86_solaris.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x64_linux.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x64_linux_dll.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x86_bsd.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_x64_bsd.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_mipsle_linux.bin
+ usr/lib*/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
+ usr/lib*/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso
+ usr/lib*/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso
+ usr/lib*/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2014-3153.elf
+ usr/lib*/${PN}${SLOT}/data/exploits/mysql/lib_mysqludf_sys_32.so
+ usr/lib*/${PN}${SLOT}/data/exploits/*
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2012-6636/armeabi/libndkstager.so
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2012-6636/mips/libndkstager.so
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2012-6636/x86/libndkstager.so
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2013-6282.so
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2014-3153.so
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2016-4557/hello
+ usr/lib*/${PN}${SLOT}/data/exploits/CVE-2019-2215/exploit
+ usr/lib*/${PN}${SLOT}/data/templates/template_x86_linux_dll.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_armle_linux_dll.bin
+ usr/lib*/${PN}${SLOT}/data/templates/template_aarch64_linux.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/*/*/*
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/aarch64-linux-musl/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/aarch64-linux-musl/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/aarch64-linux-musl/bin/sniffer
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/armv5b-linux-musleabi/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/armv5b-linux-musleabi/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/armv5b-linux-musleabi/bin/sniffer
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/armv5l-linux-musleabi/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/armv5l-linux-musleabi/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/armv5l-linux-musleabi/bin/sniffer
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/i486-linux-musl/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/i486-linux-musl/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips64-linux-muslsf/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips64-linux-muslsf/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips64-linux-muslsf/bin/sniffer
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips64-linux-muslsf/bin/sniffer.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mipsel-linux-muslsf/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mipsel-linux-muslsf/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mipsel-linux-muslsf/bin/sniffer
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mipsel-linux-muslsf/bin/sniffer.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips-linux-muslsf/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips-linux-muslsf/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips-linux-muslsf/bin/sniffer
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/mips-linux-muslsf/bin/sniffer.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/powerpc64le-linux-musl/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/powerpc64le-linux-musl/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/powerpc-linux-muslsf/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/powerpc-linux-muslsf/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/s390x-linux-musl/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/s390x-linux-musl/bin/mettle.bin
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/x86_64-linux-musl/bin/mettle
+ usr/lib*/${PN}${SLOT}/vendor/ruby/*/gems/metasploit_payloads-mettle-*/build/x86_64-linux-musl/bin/mettle.bin
+ "
+QA_NO_DEPCHECK="${QA_PREBUILT}"
+
+pkg_setup() {
+ if use test; then
+ su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail
+ su postgres -c "createuser msf_test_user -d -S -R"
+ if [ $? -ne 0 ]; then
+ su postgres -c "dropuser msf_test_user" || die
+ su postgres -c "createuser msf_test_user -d -S -R" || die
+ fi
+ su postgres -c "createdb --owner=msf_test_user msf_test_database" || die
+ fi
+ ruby-ng_pkg_setup
+}
+
+all_ruby_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ default_src_unpack
+# mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all
+# rm -r msf3
+ #msf_version=$(grep --color=never "CURRENT_VERSION =" ${S}/spec/lib/msf/core/framework_spec.rb)
+ #msf_version=${msf_version#*=}
+ fi
+}
+
+all_ruby_prepare() {
+ # add psexec patch from pull request 2657 to allow custom exe templates from any files, bypassing most AVs
+ #epatch "${FILESDIR}/agix_psexec_pull-2657.patch"
+ eapply_user
+
+ #remove random "cpuinfo" binaries which a only needed to detect which bundled john to run
+# rm -r data/cpuinfo
+
+ #remove unneeded ruby bundler versioning files
+ #Gemfile.lock contains the versions tested by the msf team but not the hard requirements
+ #we regen this file in each_ruby_prepare
+ rm Gemfile.lock
+
+ #The Gemfile contains real known deps
+ sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die
+ #use released packetfu
+ sed -i "s/1.1.13.pre/1.1.13/" metasploit-framework.gemspec || die
+ #use the stable pg
+ #https://github.com/rapid7/metasploit-framework/issues/10234
+ sed -i "s/dependency 'pg', '0.20.0'/dependency 'pg', '0.21.0'/" metasploit-framework.gemspec || die
+ #git gems are only for ruby24 support and we are not there yet
+ sed -i "/git:/d" Gemfile || die
+
+ #now we edit the Gemfile based on use flags
+ if ! use pcap; then
+ sed -i -e "/^group :pcap do/,/^end$/d" Gemfile || die
+ fi
+ #if ! use nexpose; then
+ sed -i -e "/nexpose/d" metasploit-framework.gemspec || die
+ #fi
+ #no support for nessus right now
+ #if ! use nessus; then
+ sed -i -e "/nessus/d" metasploit-framework.gemspec || die
+ #fi
+
+ #no support for aws-sdk right now
+ #if ! use aws; then
+ sed -i -e "/aws-sdk/d" metasploit-framework.gemspec || die
+ #fi
+
+ #this version is old, remove it
+ sed -i -e "/openvas-omp/d" metasploit-framework.gemspec || die
+ #even if we pass --without=blah bundler still calculates the deps and messes us up
+ if ! use development; then
+ sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
+ fi
+ if ! use test; then
+ sed -i -e "/^group :test/,/^end$/d" Gemfile || die
+ fi
+ if ! use test && ! use development; then
+ sed -i -e "/^group :development/,/^end$/d" Gemfile || die
+ fi
+ #We don't need simplecov
+ sed -i -e "/^group :coverage/,/^end$/d" Gemfile || die
+ sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die
+
+ #we need to edit the gemspec too, since it tries to call git instead of anything sane
+ #probably a better way to fix this... if I care at some point
+ sed -i -e "/^ spec.files/,/^ }/d" metasploit-framework.gemspec || die
+
+ #https://bugs.gentoo.org/show_bug.cgi?id=584522 no tzinfo-data by choice in gentoo
+ sed -i '/tzinfo-data/d' metasploit-framework.gemspec || die
+
+ #fails without faraday in Gemfile.lock
+ #despite activesupport(?) needing it, it doesn't end up there :-(
+ sed -i "/'activesupport'/a \ \ spec.add_runtime_dependency 'faraday'" metasploit-framework.gemspec
+ sed -i "/spec.add_runtime_dependency 'faraday'/d" metasploit-framework.gemspec
+
+ sed -i "s|'hrr_rb_ssh', '0.3.0.pre2'|'hrr_rb_ssh'|" metasploit-framework.gemspec
+
+ #let's bogart msfupdate
+ rm msfupdate
+ echo "#!/bin/sh" > msfupdate
+ echo "echo \"[*]\"" >> msfupdate
+ echo "echo \"[*] Attempting to update the Metasploit Framework...\"" >> msfupdate
+ echo "echo \"[*]\"" >> msfupdate
+ echo "echo \"\"" >> msfupdate
+ if [[ ${PV} == "9999" ]] ; then
+ echo "if [ -x /usr/bin/smart-live-rebuild ]; then" >> msfupdate
+ echo " smart-live-rebuild -f net-analyzer/metasploit" >> msfupdate
+ echo "else" >> msfupdate
+ echo " echo \"Please install app-portage/smart-live-rebuild for a better experience.\"" >> msfupdate
+ echo "emerge --oneshot \"=${CATEGORY}/${PF}\"" >> msfupdate
+ echo "fi" >> msfupdate
+ else
+ echo "echo \"Unable to update tagged version of metasploit.\"" >> msfupdate
+ echo "echo \"If you want the latest please install and eselect the live version (metasploit9999)\"" >> msfupdate
+ echo "echo \"emerge metasploit:9999 -vat && eselect metasploit set metasploit9999\"" >> msfupdate
+ fi
+ #this is set executable in src_install
+
+ #install our database.yml file before tests are run
+ cp "${FILESDIR}"/database.yml config/
+
+}
+
+each_ruby_prepare() {
+ GEM_HOME="${T}" MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
+ GEM_HOME="${T}" MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
+
+ #force all metasploit executables to use desired ruby version
+ #https://dev.metasploit.com/redmine/issues/8357
+ for file in $(ls -1 msf*)
+ do
+ #poorly adapted from python.eclass
+ sed -e "1s:^#![[:space:]]*\([^[:space:]]*/usr/bin/env[[:space:]]\)\?[[:space:]]*\([^[:space:]]*/\)\?ruby\([[:digit:]]\+\(\.[[:digit:]]\+\)\?\)\?\(\$\|[[:space:]].*\):#!\1\2${RUBY}:" -i "${file}" || die "Conversion of shebang in '${file}' failed"
+ done
+}
+
+each_ruby_test() {
+ #review dev-python/pymongo for ways to make the test compatible with FEATURES=network-sandbox
+
+ #we bogart msfupdate so no point in trying to test it
+ rm spec/msfupdate_spec.rb || die
+ #we don't really want to be uploading to virustotal during the tests
+ rm spec/tools/virustotal_spec.rb || die
+
+ # https://dev.metasploit.com/redmine/issues/8425
+ GEM_HOME="${T}" BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:create || die
+ GEM_HOME="${T}" BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:migrate || die
+
+ GEM_HOME="${T}" MSF_DATABASE_CONFIG=config/database.yml BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake || die
+ su postgres -c "dropuser msf_test_user" || die "failed to cleanup msf_test-user"
+}
+
+each_ruby_install() {
+ #Tests have already been run, we don't need this stuff
+ rm -r spec || die
+ rm -r test || 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.
+ # should be as simple as copying everything into the target...
+ dodir /usr/lib/${PN}${SLOT}
+ cp -R * "${ED}"/usr/lib/${PN}${SLOT} || die "Copy files failed"
+ rm -Rf "${ED}"/usr/lib/${PN}${SLOT}/documentation "${ED}"/usr/lib${PN}${SLOT}/README.md
+ fowners -R root:0 /
+
+}
+
+all_ruby_install() {
+ # do not remove LICENSE, bug #238137
+ dodir /usr/share/doc/${PF}
+ cp -R {documentation,README.md} "${ED}"/usr/share/doc/${PF} || die
+ ln -s "../../share/doc/${PF}/documentation" "${ED}/usr/lib/${PN}${SLOT}/documentation"
+
+ fperms +x /usr/lib/${PN}${SLOT}/msfupdate
+
+ #tell revdep-rebuild to ignore binaries meant for the target
+ dodir /etc/revdep-rebuild
+ cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-metasploit${SLOT}
+ #These dirs contain prebuilt binaries for running on the TARGET not the HOST
+ SEARCH_DIRS_MASK="/usr/lib/${PN}${SLOT}/data/meterpreter"
+ SEARCH_DIRS_MASK="/usr/lib/${PN}${SLOT}/data/exploits"
+ EOF
+}
+
+pkg_postinst() {
+ elog "Before use you should run 'env-update' and '. /etc/profile'"
+ elog "otherwise you may be missing important environmental variables."
+
+ elog "You need to prepare the database by running:"
+ elog "emerge --config postgresql"
+ elog "/etc/init.d/postgresql- start"
+ elog "emerge --config =metasploit-${PV}"
+
+ "${EROOT}"/usr/bin/eselect metasploit set --use-old ${PN}${SLOT}
+
+ einfo
+ elog "Adjust /usr/lib/${PN}${SLOT}/config/database.yml if necessary"
+}
+
+pkg_config() {
+ einfo "If the following fails, it is likely because you forgot to start/config postgresql first"
+ su postgres -c "createuser msf_user -D -S -R"
+ su postgres -c "createdb --owner=msf_user msf_database"
+}
diff --git a/profiles/pentoo/base/package.accept_keywords/dev-ruby b/profiles/pentoo/base/package.accept_keywords/dev-ruby
index a2fe5b592..dd32d5467 100644
--- a/profiles/pentoo/base/package.accept_keywords/dev-ruby
+++ b/profiles/pentoo/base/package.accept_keywords/dev-ruby
@@ -82,6 +82,7 @@ dev-ruby/windows_error
~dev-ruby/pg-0.20.0
~dev-ruby/regexp_parser-0.4.3
dev-ruby/metasploit_payloads-mettle
+dev-ruby/metasploit-model
=dev-ruby/rexml-3.2*
dev-ruby/rex-core
dev-ruby/rex-socket
diff --git a/profiles/pentoo/base/package.keywords/dev-ruby b/profiles/pentoo/base/package.keywords/dev-ruby
index f650d416c..278d48456 100644
--- a/profiles/pentoo/base/package.keywords/dev-ruby
+++ b/profiles/pentoo/base/package.keywords/dev-ruby
@@ -14,6 +14,5 @@
~dev-ruby/ruby2_keywords-0.0.2 x86
~dev-ruby/rails-dom-testing-2.0.3 x86
~dev-ruby/erubi-1.9.0 x86
-=dev-ruby/metasploit-model-3.1* x86
dev-ruby/sqlite3 amd64 x86
=dev-ruby/bson-4* amd64 x86