diff options
| -rw-r--r-- | AGENTS.md | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -144,19 +144,33 @@ Pointing the gem vars at the extracted tree fixes it. Note `3.4.0` in that path is the embedded **ruby version** and moves when upstream bumps ruby; check `$FW/embedded/lib/ruby/gems/` if the path is wrong. +**The extracted tree also needs its symlinks and library path.** makepkg +`-l y` moves every symlink into `install/doinst.sh`, so a bare `tar xf` +leaves out `libruby.so.3.4` and the run dies with `error while loading +shared libraries: libruby.so.3.4`. Run `doinst.sh` inside the extract dir +(it holds only relative `rm -rf`/`ln -sf` lines; check that before running +it) and set `LD_LIBRARY_PATH`, since the binary's RPATH points at +`/opt/metasploit-framework`. Write the output to the scratch dir first: a +failed run redirected straight onto the tracked file empties it. (Found +2026-11-11 during the 6.5.10 bump.) + ```bash +REPO=$PWD # sbo-slackbuilds root KEPT=/data/sbo-test-build/kept/metasploit-framework-bin-$VERSION-x86_64-*.tgz +mkdir -p $SCRATCH/msf-extract tar xf $KEPT -C $SCRATCH/msf-extract +(cd $SCRATCH/msf-extract && sh install/doinst.sh) FW=$SCRATCH/msf-extract/opt/metasploit-framework curl -o $SCRATCH/gen.rb \ https://gitlab.com/kalilinux/packages/metasploit-framework/-/raw/kali/master/debian/generate-msfvenom-bash-completion.rb cd $FW/embedded/framework +LD_LIBRARY_PATH=$FW/embedded/lib \ GEM_HOME=$FW/embedded/lib/ruby/gems/3.4.0 \ GEM_PATH=$FW/embedded/lib/ruby/gems/3.4.0 \ BUNDLE_GEMFILE=$FW/embedded/framework/Gemfile \ $FW/embedded/bin/ruby \ - -I$FW/embedded/framework/lib $SCRATCH/gen.rb \ - > network/metasploit-framework-bin/msfvenom.bash-completion + -I$FW/embedded/framework/lib $SCRATCH/gen.rb > $SCRATCH/new.bc +cp $SCRATCH/new.bc $REPO/network/metasploit-framework-bin/msfvenom.bash-completion ``` **Do not fall back to running the generator against a live |
