メンテナンス・トラブルシュート - ruby - ruby-3.3.11,1 → 3.3.11_1,1


クラウディア 


1. 概要
2. 状況
3. 対策
4. 参考サイト

1. 概要

 発生は、2026年5月20日、「FreeBSD 15.0-RELEASE-p2」上での出来事です。

2. 状況


portversion -v | grep '<'

[Reading data from pkg(8) ... - 606 packages found - done]
fakeroot-1.37.2             <  needs updating (port has 1.38)
libXi-1.8.2,1               <  needs updating (port has 1.8.3,1)
ruby-3.3.11,1               <  needs updating (port has 3.3.11_1,1)
 ということで。

env BATCH=yes portupgrade -rR ruby
 すると。

[Reading data from pkg(8) ... - 606 packages found - done]
[Gathering depends for lang/ruby33 ................................................................................... done]
[Gathering depends for textproc/rubygem-asciidoctor ... done]
[Gathering depends for editors/vim ............. done]
[Gathering depends for devel/rubygem-erb .. done]
[Gathering depends for devel/rubygem-stringio .. done]
[Gathering depends for textproc/rubygem-psych ....... done]
[Gathering depends for databases/rubygem-dbm .. done]
[Gathering depends for devel/rubygem-rdoc ....... done]
[Gathering depends for ports-mgmt/portupgrade ...... done]
[Exclude up-to-date packages ........................................... done]
--->  Upgrading 'ruby-3.3.11,1' to 'ruby-3.3.11_1,1' (lang/ruby33)
--->  Building '/usr/ports/lang/ruby33'
===>  Cleaning for ruby-3.3.11_1,1
===>  License BSD2CLAUSE RUBY accepted by the user
===>   ruby-3.3.11_1,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by ruby-3.3.11_1,1 for building
===>  Extracting for ruby-3.3.11_1,1
=> SHA256 Checksum OK for ruby/ruby-3.3.11.tar.xz.
===>  Patching for ruby-3.3.11_1,1
===>  Applying FreeBSD patches for ruby-3.3.11_1,1 from /usr/ports/lang/ruby33/files
1 out of 1 hunks failed--saving rejects to coroutine/ppc64le/Context.S.rej
===>  FAILED Applying FreeBSD patch-coroutine_ppc64le_Context.S
===> Cleanly applied FreeBSD patch(es)  patch-configure.ac
===> FAILED to apply cleanly FreeBSD patch(es)  patch-coroutine_ppc64le_Context.S
*** Error code 1

Stop.
make: stopped making "all" in /usr/ports/lang/ruby33
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20260520-48468-8dlojt env UPGRADE_TOOL=portupgrade UPGRADE_PORT=ruby-3.3.11,1 UPGRADE_PORT_VER=3.3.11,1 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
        ! lang/ruby33 (ruby-3.3.11,1)   (patch error)
 てなことになります。

3. 対策

 力技になります。  現在エラーになっている。

patch-coroutine_ppc64le_Context.S
 というファイルは、「PowerPC 64bit (Little Endian) 」環境用のコルーチン処理のパッチです。  「amd64」の環境には、不要のパッチなので、いったんよけておきます。

cd /usr/ports/lang/ruby33
mv files/patch-coroutine_ppc64le_Context.S ./disabled-patch-Context.S
 その上で。

env BATCH=yes portupgrade -rR ruby
 これで、無事、アップグレードできます。  無事にビルドが通り、アップデートが完了したら、次回以降の「git pull」で衝突(コンフリクト)を起こさないよう、退避させたファイルを削除して「Git」の状態を元に戻しておきます。

rm ./disabled-patch-Context.S
git checkout files/patch-coroutine_ppc64le_Context.S

4. 参考サイト

 本ページは、「Gemini」伍長を参考にさせていただきました。

audiobook.jp