Skip to content
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

Update to Ruby 3.2 #19573

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- '3.1'
- '3.2'
- '3.3'
- '3.4.0-preview1'
- '3.4.0-preview2'
os:
- ubuntu-20.04
- ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.5
3.2.5
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.6-alpine3.20 AS builder
FROM ruby:3.2.5-alpine3.20 AS builder
LABEL maintainer="Rapid7"

ARG BUNDLER_CONFIG_ARGS="set no-cache 'true' set system 'true' set without 'development test coverage'"
Expand Down Expand Up @@ -53,7 +53,7 @@ RUN mkdir -p $TOOLS_HOME/bin && \
cd go/src && \
./make.bash

FROM ruby:3.1.5-alpine3.18
FROM ruby:3.2.5-alpine3.20
LABEL maintainer="Rapid7"
ARG TARGETARCH

Expand All @@ -65,16 +65,15 @@ ENV METASPLOIT_GROUP=metasploit
# used for the copy command
RUN addgroup -S $METASPLOIT_GROUP

RUN apk add --no-cache bash sqlite-libs nmap nmap-scripts nmap-nselibs \
postgresql-libs python3 py3-pip ncurses libcap su-exec alpine-sdk \
RUN apk add --no-cache curl bash sqlite-libs nmap nmap-scripts nmap-nselibs \
postgresql-libs python3 py3-pip py3-impacket py3-requests ncurses libcap su-exec alpine-sdk \
openssl-dev nasm
RUN\
if [ "${TARGETARCH}" = "arm64" ];\
then apk add --no-cache gcc musl-dev python3-dev libffi-dev gcompat;\
else apk add --no-cache mingw-w64-gcc;\
fi


RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which nmap)

Expand All @@ -86,9 +85,6 @@ RUN chown -R root:metasploit $APP_HOME/
RUN chmod 664 $APP_HOME/Gemfile.lock
RUN gem update --system
RUN cp -f $APP_HOME/docker/database.yml $APP_HOME/config/database.yml
RUN curl -L -O https://raw.githubusercontent.com/pypa/get-pip/f84b65709d4b20221b7dbee900dbf9985a81b5d4/public/get-pip.py && python3 get-pip.py && rm get-pip.py
RUN pip install impacket
RUN pip install requests

ENV GOPATH=$TOOLS_HOME/go
ENV GOROOT=$TOOLS_HOME/bin/go
Expand Down
2 changes: 1 addition & 1 deletion docs/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.5
3.2.5
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ Regardless of your choice, you'll want to make sure that, when inside the `~/git
```
$ cd ~/git/metasploit-framework
$ cat .ruby-version
3.0.2
3.2.5
$ ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-darwin23]
```

Note: the Ruby version is likely to change over time, so don't rely on the output in the above example. Instead, confirm your `ruby -v` output with the version number listed in the `.ruby-version` file.
Expand Down
Loading