From 298c577bdc7a33b314ba50e096201861c1e69728 Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Thu, 18 Apr 2024 12:06:57 +0100 Subject: [PATCH] Run under cmd prompt --- .github/workflows/verify.yml | 9 ++++++++- Makefile | 11 +++++++---- config/software/ruby-windows-devkit.rb | 4 ++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index b7e697a..7fd4b04 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -302,6 +302,13 @@ jobs: ls local/cache - name: Run omnibus + shell: cmd run: | cd metasploit-omnibus - make + + # Don't run via `make`, as the process will be spawned under msys2 - and the ridk.cmd + # ruby installer will forcibly kill the msys2 process before attempting to install ruby + make dependencies + + # build the metasploit-framework package + ruby bin/omnibus build metasploit-framework diff --git a/Makefile b/Makefile index 92cdd1e..d168220 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,14 @@ .DEFAULT_GOAL := all .PHONY: all -all: certs/ca-certificates.crt +all: certs/ca-certificates.crt dependencies # export SSL_CERT_FILE=${PWD}/certs/ca-certificates.crt + + # build the metasploit-framework package + ruby bin/omnibus build metasploit-framework + +.PHONY: dependencies +dependencies: # Ensure consistent bundler versions gem install bundler -v 2.2.3 @@ -12,9 +18,6 @@ all: certs/ca-certificates.crt gem install win32-process -v 0.9.0 - # build the metasploit-framework package - ruby bin/omnibus build metasploit-framework - certs/ca-certificates.crt: mkdir -p certs curl -L -o certs/ca-certificates.crt https://curl.haxx.se/ca/cacert.pem diff --git a/config/software/ruby-windows-devkit.rb b/config/software/ruby-windows-devkit.rb index 61cce00..33e9b89 100644 --- a/config/software/ruby-windows-devkit.rb +++ b/config/software/ruby-windows-devkit.rb @@ -28,6 +28,10 @@ embedded_dir = "#{install_dir}/embedded" command "echo before!", env: env, cwd: embedded_dir + # Ruby Installer for windows: + # 1 - MSYS2 base installation + # 2 - MSYS2 system update (optional) + # 3 - MSYS2 and MINGW development toolchain command "#{embedded_dir}/bin/ridk.cmd install 2 3", env: env, cwd: embedded_dir command "echo after!", env: env, cwd: embedded_dir end