0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

FreeBSDのRuby ports更新が待てない人へのチートシート

0
Posted at

Ruby のRCE脆弱性対策版(4.0.10,3.4.13,3.3.14) への公式Ports(3.3, 3.4, 4.0)の対応を急ぎたい人のためのチートシートです。

Ports treeのrootに移動

# cd /usr/ports

Rubyのバージョンを変更

diff -u Mk/Uses/ruby.mk.orig Mk/Uses/ruby.mk
--- Mk/Uses/ruby.mk.orig        2026-11-20 10:11:42.845179000 +0900
+++ Mk/Uses/ruby.mk     2026-11-20 16:05:43.077861000 +0900
@@ -144,19 +144,19 @@
 #
 # Ruby 3.3
 #
-RUBY_DISTVERSION=      3.3.13
+RUBY_DISTVERSION=      3.3.14

 .      elif ${RUBY_VER} == 3.4
 #
 # Ruby 3.4
 #
-RUBY_DISTVERSION=      3.4.12
+RUBY_DISTVERSION=      3.4.13

 .      elif ${RUBY_VER} == 4.0
 #
 # Ruby 4.0
 #
-RUBY_DISTVERSION=      4.0.9
+RUBY_DISTVERSION=      4.0.10

 # When adding a version, please keep the comment in
 # Mk/bsd.default-versions.mk in sync.

ビルドしたいRubyのディレクトリに移動

# cd /usr/ports/lang/ruby33

distinfoの作成

# make clean makesum

(/etc/make.confにDEFAULT_VERSIONS+= ... ssl=openssl ...がある人のみ)
/etc/make.confに以下を追記

DISABLE_VULNERABILITIES=yes

pkg-plist の調整(今回は不要でした)

# make makeplist
# make makeplist > pkg-plist.new

ビルド、インストール

# make
# make install

(deinstall, reinstallは適当に)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?