-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ruby 3.1 #195
Add support for ruby 3.1 #195
Conversation
@@ -1,9 +1,24 @@ | |||
# docker build -t rapid7/msf-debian-aarch64-omnibus . | |||
FROM forumi0721/debian-aarch64-base:latest | |||
FROM rapid7/msf-debian-aarch64-omnibus:2020_03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original docker image has been yanked, extending the previous one for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this container actually used anymore? I think the build is actually executed in an AWS gravition system natively for arm64 now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirmed that now 💯
I think it makes sense to keep this setup around for testing on Github actions - and when Github ARM builders become GA this can likely be removed
|
||
ENV JENKINS_HOME /home/jenkins | ||
RUN useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins | ||
RUN id jenkins || useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idempotent user add since we're still extending the previous rapid7/msf-debian-aarch64-omnibus:2020_03 - but might not in the future
@@ -3,7 +3,8 @@ | |||
FROM rapid7/build:kali109_64 | |||
MAINTAINER Rapid7 Release Engineering <[email protected]> | |||
|
|||
RUN echo "deb http://old.kali.org/kali moto main non-free contrib" > /etc/apt/sources.list | |||
# package/ruby: needs gcc and host gcc >= 4.9, available only in Sana - https://www.kali.org/blog/kali-moto-eol/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing the compile error:
thread_pthread.h:108:43: error: expected '=', ',', ';', 'asm' or 'attribute' before 'struct'
RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
https://lists.buildroot.org/pipermail/buildroot/2021-October/626816.html
crt_path = possible_crt_paths.find { |path| File.exist?(path) } | ||
raise "Could not find valid CRT path - tried #{possible_crt_paths.join(", ")}." if crt_path.nil? | ||
%> | ||
<Merge Id="CRT" Language="0" SourceFile="<%= crt_path %>" DiskId="1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original issue on github actions
The following shell command exited with status 103:
$ light.exe -nologo -sval -ext WixUIExtension -cultures:en-us -loc "D:\a\_temp\metasploit-framework20240418-1808-v6mss1\localization-en-us.wxl" project-files.wixobj source.wixobj -out "C:\omnibus-ruby\pkg\metasploit-framework-0.0.0-20240418232212-1rapid7-1-x64.msi"
Output:
D:\a\_temp\metasploit-framework20240418-1808-v6mss1\source.wxs(79) : error LGHT0103 : The system cannot find the file 'C:\Program Files (x86)\Common Files\Merge Modules\microsoft_vc120_crt_x64.msm'.
Error:
(nothing)
Installing Microsoft.VisualStudio.Component.VC.Redist.MSM
and using the new path works, but we'll still most likely use vs2013 behind the scenes on Jenkins
I don't think this is a great pattern, we could probably resolve %VCToolsRedistDir%
etc and be smarter with this logic, but for MVP it should work for us - as right now we're running either in Github actions or on one of the predefined build envs; there's also enough of a paper trail for the next developer to resolve this issue in a short period of time
facd3b4
to
550dec5
Compare
550dec5
to
1a4b5e9
Compare
1a4b5e9
to
6811610
Compare
RUN yum upgrade -y && yum clean all | ||
RUN yum install -y centos-release-SCL && yum clean all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this was needed for signing; Maybe I'll need to circle back to this
6811610
to
38cc1a6
Compare
38cc1a6
to
c3e1ef8
Compare
b16ac7b
to
01a4720
Compare
d6f626e
to
e1a5927
Compare
e1a5927
to
b78f3c5
Compare
41203c8
to
7559107
Compare
d82c433
to
ae01d55
Compare
ae01d55
to
b15a187
Compare
Awesome, thanks for getting this across the line! |
Supercedes #191
Adds support for Metasploit omnibus to run under Github actions as well as adding support for building Ruby 3.1
Omnibus fork changes: rapid7/omnibus#3