Skip to content

package almalinux-8 test: use Ruby 3.1 instead of 2.5 for grntest - #1760

Merged
kou merged 1 commit into
groonga:mainfrom
otegami:update-ruby-version-on-alma-linux-8
Apr 15, 2024
Merged

kou merged 1 commit into
groonga:mainfrom
otegami:update-ruby-version-on-alma-linux-8

Conversation

@otegami

@otegami otegami commented Apr 15, 2024 •

Copy link
Copy Markdown
Contributor

Problem

CI failed with the following error log.

ERROR:  Error installing grntest:
	timeout requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.

Expected

Successfully install gem grntest.

Explanation

The gem timeout requires Ruby version >= 2.6.0.
On AlmaLinux8, the default Ruby version is 2.5.0 as shown below.

$ dnf module list ruby
Name                          Stream                           Profiles                            Summary                                                                     
ruby                          2.5 [d]                          common [d]                          An interpreter of object-oriented scripting language                        
ruby                          2.6                              common [d]                          An interpreter of object-oriented scripting language                        
ruby                          2.7                              common [d]                          An interpreter of object-oriented scripting language                        
ruby                          3.0                              common [d]                          An interpreter of object-oriented scripting language                        
ruby                          3.1                              common [d]                          An interpreter of object-oriented scripting language                        

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled 

Solution

Use Ruby 3.1 not 2.5 for grntest.

grntest is used only for test. So newer Ruby doesn't affect anything to users.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このファイルはパッケージのビルド時だけに使っていて、テスト時には使っていない気がします。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こんな感じじゃない?

diff --git a/packages/yum/test.sh b/packages/yum/test.sh
index 5129f5311..74a579ba3 100755
--- a/packages/yum/test.sh
+++ b/packages/yum/test.sh
@@ -72,6 +72,11 @@ if [ "${run_test}" = "yes" ]; then
       . /opt/rh/rh-ruby30/enable
       set -u
       ;;
+    8)
+      ${DNF} module disable ruby
+      ${DNF} module enable:31
+      ${DNF} install -y ruby-devel
+      ;;
     *)
       ${DNF} install -y ruby-devel
       ;;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そうでした。。。
なおします。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix: efa9750

@otegami
otegami force-pushed the update-ruby-version-on-alma-linux-8 branch from 4c2b87a to f48e010 Compare April 15, 2024 02:33
@otegami
otegami force-pushed the update-ruby-version-on-alma-linux-8 branch from f48e010 to efa9750 Compare April 15, 2024 02:34
@otegami
otegami marked this pull request as ready for review April 15, 2024 03:16
@kou kou changed the title Update Ruby version from 2.5(default) to 3.1 package almalinux-8 test: use Ruby 3.1 instead of 2.5 for grntest Apr 15, 2024
@kou
kou merged commit a359eee into groonga:main Apr 15, 2024
@otegami
otegami deleted the update-ruby-version-on-alma-linux-8 branch April 15, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants