Bug 241554 - lang/ruby26: Don't install bin/{irb,rdoc,ri}, install man pages for bundler and gem
Summary: lang/ruby26: Don't install bin/{irb,rdoc,ri}, install man pages for bundler a...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
Depends on:
Blocks: 241555 241556
  Show dependency treegraph
Reported: 2019-10-28 23:31 UTC by Yasuhiro KIMURA
Modified: 2019-11-05 06:19 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ruby)
yasu: exp-run?

Patch file (5.42 KB, patch)
2019-10-28 23:31 UTC, Yasuhiro KIMURA
no flags Details | Diff
Updated patch file (5.42 KB, patch)
2019-10-29 06:03 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 2019-10-28 23:31:46 UTC
Created attachment 208661 [details]
Patch file

* Don't install bin/{irb,rdoc,ri}. The intention is to install these scripts from devel/rubygem-irb and devel/rubygem-rdoc.
* Install man pages for bundler and gem. It is because they aren't installed by devel/ruby-gems and sysutils/rubygem-bundler.
Comment 1 Yasuhiro KIMURA 2019-10-28 23:48:34 UTC
My Understanding is that bin/{rdoc,ri} of lang/ruby26 don't work without devel/rubygem-rdoc. So moving them from lang/ruby26 to devel/rubygem-rdoc shouldn't affect to build of depending ports. But lang/ruby26 is current default version of Ruby. So just to make sure I would like to request exp-run with combination of bug #241556 and this bug report.
Comment 2 Koichiro Iwao freebsd_committer 2019-10-29 03:45:34 UTC
Overall, I agree with your change.

I remember we had discussion to separate bundler from ruby port (actually I didn't join the discussion). Does this change mean the man page of bundler is installed by lang/ruby26 but bundler is installed as sysutils/rubygem-bundler. That sounds odd a little bit.
Comment 3 Yasuhiro KIMURA 2019-10-29 04:02:35 UTC
(In reply to Koichiro Iwao from comment #2)

To be honest I also would like to remove man pages for bundler, irb, ri and gemfile from lang/ruby26. But unfortunately they are not included in coressponding gems. So there is no way other than including them in lang/ruby26.
Comment 4 Yasuhiro KIMURA 2019-10-29 06:03:32 UTC
Created attachment 208672 [details]
Updated patch file

Fix trivial typo in pkg-message. So please commit attached patch instead of original one.
Comment 5 Koichiro Iwao freebsd_committer 2019-10-29 07:00:21 UTC
(In reply to Yasuhiro KIMURA from comment #3)
IMHO, if lang/ruby26 port installs man page of bundler, also bundle should be a part of lang/ruby26 port. Now Ruby 2.6 is default, separating bundler from ruby port?
Comment 6 Yasuhiro KIMURA 2019-10-29 08:44:25 UTC
(In reply to Koichiro Iwao from comment #5)

Then which you prefer?

1. Simply remove these man pages from lang/ruby26 and don't include anywhere.
2. Include these man pages to corresponding rubygem ports.
Comment 7 Yasuhiro KIMURA 2019-10-30 05:07:40 UTC
(In reply to Koichiro Iwao from comment #5)

After that I found man pages of bundler are included in the gem and sysutils/rubygem-bundler installs them outside of ${PREFIX}/man. So I would like to change plan as following.

  Don't install man pages of bundler, irb and ri.
  Create symbolic link to man pages under ${PREFIX}/man/man{1,5} if ${RUBY_VER} is 2.6 or later.
  Insall irb(1) manpage under ${PREFIX}/man/man1 if ${RUBY_VER} is 2.6 or later. (Otherwise mark this port IGNORE.)
  Insall ri(1) manpage under ${PREFIX}/man/man1 if ${RUBY_VER} is 2.6 or later.

What do you think about it?
Comment 8 Koichiro Iwao freebsd_committer 2019-10-30 08:19:58 UTC
(In reply to Yasuhiro KIMURA from comment #7)
Sounds better. However, now that is not the issue of each rubygem ports such as bundler, irb, ri.

As far as I understand, the real issue is man command cannot show man pages of rubygem ports such as bundler because rubygem ports installs man page under ${PREFIX}${GEMS_BASE_DIR}.

I would say that should be addressed rubygems framework (Uses/gem.mk) or man, not each rubygem ports. For example, mail/spamassassin is written in Perl and installs man pages under ${SITE_PERL} however man command can find it properly. That's because ${SITE_PERL}/man is added in manpath. What about adjusting manpath?

This is the result of manpath command for me:
% manpath
Comment 9 Yasuhiro KIMURA 2019-10-30 15:40:49 UTC
(In reply to Koichiro Iwao from comment #8)

I agree that your proposal is better than mine. But at the same time I have 3 concerns about it. The first is about directory where man pages are placed in each gem. I read guide documents in rubygems.org but couldn't find where man pages should placed. In bundler 2.0.2 gem man pages are placed under 'man' subdirectory. If there is rule that man pages should be places under 'man' subdirectory in gem, then we can determine where man pages are installed and therefore we can handle the issue with gem.mk. But if there isn't such rule then we can't determine it and forced to handle the issue with each rubygem port.

And even if there is rule as above, there is second concern. According to gem.mk man pages are install in following directory.


As you can see this is different from standard /somewhere/man/man[1-9] style of man pages directories. So I'm not sure if adding this directory works as is expected.

And last concern is that above directory means that different rubygem ports installs man pages in different directory. I don't know how many rubygem ports install man pages. But if you install 10 such ports then 10 directories must be added to man path. And if there limit about total length of man path, installing a lot of such rubygem ports may hits the limit.
Comment 10 Koichiro Iwao freebsd_committer 2019-11-05 06:19:29 UTC
(In reply to Yasuhiro KIMURA from comment #9)
Hmm, indeed.  Anyway, I'd like to hear opinions of other Ruby folks.