Bug 251741 - lang/ruby30: Update to 3.0.1
Summary: lang/ruby30: Update to 3.0.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL: https://www.ruby-lang.org/en/news/202...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-10 19:17 UTC by Yasuhiro Kimura
Modified: 2021-05-09 16:22 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ruby)


Attachments
Patch file (279.39 KB, patch)
2020-12-10 19:17 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (331.63 KB, patch)
2020-12-20 19:52 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (345.18 KB, patch)
2020-12-25 07:56 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (323.37 KB, patch)
2021-02-03 16:31 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (343.22 KB, patch)
2021-04-05 20:09 UTC, Yasuhiro Kimura
no flags Details | Diff
Updated patch file (282.33 KB, patch)
2021-04-19 00:57 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2020-12-10 19:17:47 UTC
Created attachment 220438 [details]
Patch file

* Update to 3.0.0-preview2.
* Don't install erb command and its man page.
  files/patch-tool_rbinstall.rb makes bundled gems not installed. And
  it makes erb broken. We should create rubygem-erb port. But
  unfortunately devel/ruby-gems is currently broken with Ruby 3.0.
* Don't create symbolic link for erb and its manpage.
* Install bundler files other than bin/bundle and bin/bundler

Release Note: https://www.ruby-lang.org/en/news/2020/12/08/ruby-3-0-0-preview2-released/
Comment 1 Yasuhiro Kimura freebsd_committer freebsd_triage 2020-12-20 19:52:00 UTC
Created attachment 220762 [details]
Updated patch file

New version 3.0.0-rc1 is released.

Release Note: https://www.ruby-lang.org/en/news/2020/12/20/ruby-3-0-0-rc1-released/
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2020-12-25 07:56:09 UTC
Created attachment 220907 [details]
Updated patch file

New version 3.0.0 is released.

Release Note: https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-01-07 16:01:00 UTC
(In reply to Yasuhiro Kimura from comment #0)

> * Install bundler files other than bin/bundle and bin/bundler

I've prepared 2 ruby30 patchs (with/without bundler). I'd like to know what you think about the change from removing bundler files to keeping them.

(In reply to Yasuhiro Kimura from comment #2)

> Created attachment 220907 [details]

There are some %%RUBY_SUFFIX%% in PLIST entries of capidoc which should be changed to 30.

The PLIST is not well-sorted. The bundler entries are out of order.


BTW, are you working on ruby-gems 3.2.4 update? I still cannot make it work with Ruby 3.0.
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-02-03 16:31:40 UTC
Created attachment 222122 [details]
Updated patch file

Update patch to make it fit to the latest ports tree.
Comment 5 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-02-03 18:16:06 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #3)

At first, sorry for very late response.

 > I've prepared 2 ruby30 patchs (with/without bundler). I'd like to know what you think about the change from removing bundler files to keeping them.

Main reason of this change is that it doesn't seem there is any problem even if these files aren't removed. These files stared to be removed when I submitted patch to add lang/ruby26 to ports tree and it was submitted. I decided to remove them simply because I thought bundler files need to be removed to avoid conflict with sysutils/rubygem-bundler port. But when I created original patch I thought that only removing bin/bundle and bin/bundler is enough. I wanted confirm this with lang/ruby30, but unfortunately develop/ruby-gems does not work properly with it. So I locally applied same change to lang/ruby27 and test it. And as a result it seems to work fine without any problem.

 > There are some %%RUBY_SUFFIX%% in PLIST entries of capidoc which should be changed to 30.
 > The PLIST is not well-sorted. The bundler entries are out of order.

These problem should be fixed with updated patch.

 > BTW, are you working on ruby-gems 3.2.4 update? I still cannot make it work with Ruby 3.0.

Yes, and I don't succeed it either. You may already know but there are two problems about it.

The first is that since 3.1 it isn't checked if DONT_USE_BUNDLER_FOR_GEMDEPS environment variable is set. it means that we can't install rubygem without installing bundler. So we need to include bundler to devel/ruby-gems port. But fortunately it seems that rubygems and bundler are released in sync since rubygem 3.2.0 and bundler 2.2.0. So we can soleve this problem by unifying sysutils/rubygem-bundler to devel/ruby-gems.

The second is that --destdir option of setup.rb is broken. As for it there are 2 issues on upstream GitHub repostory.

setup.rb: don't apply destdir twice #2768
https://github.com/rubygems/rubygems/pull/2768
setup.rb does not respec --destdir for Bundler #3604
https://github.com/rubygems/rubygems/issues/3604

The formar is pull request and I confirmed the described problem is fixed with proposed patch. But the latter is issue report and currently there is no patch to fix it.
Comment 6 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-04-05 20:09:09 UTC
Created attachment 223840 [details]
Updated patch file

New version 3.0.1 is released, which includes fix of CVE-2021-28965.

Release Note: https://www.ruby-lang.org/en/news/2021/04/05/ruby-3-0-1-released/

Bug #254793 describes vulnerability fixed with this release. So please commit it together.
Comment 7 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-04-19 00:57:02 UTC
Created attachment 224237 [details]
Updated patch file

Chase update of ports tree.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-04-25 20:44:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=95fa9913f79cd0c31f0cc4df2294d934f5368bc5

commit 95fa9913f79cd0c31f0cc4df2294d934f5368bc5
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-04-25 20:32:52 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-04-25 20:36:32 +0000

    lang/ruby30: Update to 3.0.1

    Changes:        https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
                    https://www.ruby-lang.org/en/news/2021/04/05/ruby-3-0-1-released/
    PR:             251741
    Reported by:    Yasuhiro Kimura <yasu@utahime.org>

 lang/ruby30/Makefile                             |   27 +-
 lang/ruby30/distinfo                             |    6 +-
 lang/ruby30/files/patch-tool_rbinstall.rb        |   33 +-
 lang/ruby30/files/patch-upstream-bug17191 (gone) |   43 -
 lang/ruby30/pkg-message                          |    2 +
 lang/ruby30/pkg-plist                            | 1435 +++++++++++++---------
 6 files changed, 914 insertions(+), 632 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-04-25 20:54:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e9a5dbb3d4e2d45e5bc40c288ce9d2869c68aebd

commit e9a5dbb3d4e2d45e5bc40c288ce9d2869c68aebd
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-04-25 20:53:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-04-25 20:53:29 +0000

    lang/ruby30: Update to 3.0.1

    Changes:        https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
                    https://www.ruby-lang.org/en/news/2021/04/05/ruby-3-0-1-released/
    PR:             251741
    Reported by:    Yasuhiro Kimura <yasu@utahime.org>

 Mk/bsd.ruby.mk | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
Comment 10 Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-04-25 21:13:15 UTC
Sorry for the long delay. Each time I finalize the patch, newer doxygen comes out, therefore I have to manipulate PLIST again (check order, remove unnecessary %%RUBY_DEFAULT_SUFFIX%% and %%RUBY_SUFFIX%% ...).

I really hope that CAPIDOCS could be split into a different port.

(In reply to Yasuhiro Kimura from comment #7)

I don't know why but attachment 224237 [details] is not sorted correctly.