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. * Bump PORTREVISION.
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.
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.
(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.
Created attachment 208672 [details] Updated patch file Fix trivial typo in pkg-message. So please commit attached patch instead of original one.
(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?
(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.
(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. lang/ruby26: Don't install man pages of bundler, irb and ri. sysutils/rubygem-bundler: Create symbolic link to man pages under ${PREFIX}/man/man{1,5} if ${RUBY_VER} is 2.6 or later. devel/rubygem-irb: Insall irb(1) manpage under ${PREFIX}/man/man1 if ${RUBY_VER} is 2.6 or later. (Otherwise mark this port IGNORE.) devel/rubygem-rdoc: Insall ri(1) manpage under ${PREFIX}/man/man1 if ${RUBY_VER} is 2.6 or later. What do you think about it?
(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 /usr/share/man:/usr/local/man:/usr/share/openssl/man:/usr/local/lib/node_modules/npm/man:/usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.30/perl/man
(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. ${PREFIX}/lib/ruby/gem/${RUBY_VER}/gems/${PORTNAME}-${PORTVERSION}/man 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.
(In reply to Yasuhiro KIMURA from comment #9) Hmm, indeed. Anyway, I'd like to hear opinions of other Ruby folks.
I'd like to revise my proposal as following. lang/ruby26: * Don't install ${PREFIX}bin/{irb,rdoc,ri}. * Don't install man pages of irb, rdoc and bundler. devel/ruby-gems: * Create ${PREFIX}/lib/ruby/gems/man/man[1-9] directories. * Add ${PREFIX}/lib/ruby/gems/man to man path. each rubygem ports: * Set GEM_MANPAGE_SEC[1-9] if they install man page. The value is list of path (relative to ${PREFIX}) to each man pages. Mk/User/gem.mk: * If GEM_MANPAGE_SEC[1-9] is not empty, create symbolic links from ${PREFIX}/lib/ruby/gems/man/man[1-9] to each man pages at staging phase. devel/rubygem-irb: * Install ${PREFIX}/bin/irb. * Install irb(1) man mage. * Set GEM_MANPAGE_SEC1. devel/rubygem-rdoc: * Install ${PREFIX}/bin/{rdoc,ri}. * Install ri(1) man page. * Set GEM_MANPAGE_SEC1. sysutils/rubygem-bundler: * Install man pages. * Set GEM_MANPAGE_SEC1 and GEM_MANPAGE_SEC5. The background of my proposal is: 1. As is written in comment #9, adding directories where man pages of each rubygem ports are installed to man path doesn't work as is expected. So symbolic links have to be created anyway. 2. Maybe making man directories for rubygem and creating symbolic links under them is better than creating them under ${PREFIX}/man/man[1-9]. 3. Only each rubygem port knows where man pages are installed. So tell it by setting GEM_MANPAGE_SEC[1-9]. And gem.mk do the task of creating symbolic links. Any suggestions and/or comments are welcome.
Created attachment 209586 [details] Updated patch file According to revised my proposal in comment #11, * Don't install ${PREFIX}bin/{irb,rdoc,ri}. * Don't install man pages of irb, rdoc and bundler. And * Fix bug of previous patches that build of depending port fails when USE_RUBY_RDOC is defined. So please commit attached patch instead of previous ones.
I believe this can be committed. exp-run and portmgr approval needed.
swills@, can you have a look at this, too?
(In reply to Koichiro Iwao from comment #13) I think the patch is incomplete. (nothing provides irb for instance)
(In reply to Antoine Brodin from comment #15) oh, I missed you're also one of portmgr. Thanks for the feedback.
(In reply to Antoine Brodin from comment #15) What should be done to make this exp-run ready?
(In reply to Koichiro Iwao from comment #17) I see at least 2 problems: there is nothing providing ri and nothing providing irb
(In reply to Antoine Brodin from comment #18) As I wrote in comment #0 they are provided by devel/rubygem-irb and devel/rubygem-rdoc. it is why this bug report depends on bug #241555 and bug #241556.
(In reply to Yasuhiro KIMURA from comment #19) I think you mixed blocks / depends on. Any way, for an exp-run, there needs to be 1 patch, not several.
A commit references this bug: Author: meta Date: Tue Jan 28 06:56:47 UTC 2020 New revision: 524460 URL: https://svnweb.freebsd.org/changeset/ports/524460 Log: devel/rubygem-irb: Update to 1.2.1 and IGNORE RUBY_VER < 2.6 because irb is provided as a part of Ruby in Ruby <= 2.5. PR: 241554 Submitted by: Yasuhiro KIMURA <yasu@utahime.org> Approved by: meta (maintainer) Changes: head/devel/rubygem-irb/Makefile head/devel/rubygem-irb/distinfo
Partially committed a patch in bug 241555 to unwind patch dependency.
Created attachment 211350 [details] Updated patch file Update patch so it includes everything necessary for exp-run. That is, * Change both lang/ruby26 and lang/ruby27 because change to the former also affects to the later. * Move ${PREFIX}/bin/irb and irb(1) man page to devel/rubygem-irb. * Move ${PREFIX}/bin/rdoc, ${PREFIX}/bin/ri and ri(1) man page to devel/rubygem-rdoc. * Move ${PREFIX}/bin/racc and ${PREFIX}/bin/racc2y to devel/rubygem-rac (lang/ruby27 only). * Update pkg-message of lang/ruby2[67].
(In reply to Yasuhiro KIMURA from comment #23) Hi Kimura-san, Thanks you very much for your work. I'm thinking of working on this irb/ri/rdoc hollow wrapper issue with following procedure. 1. Complete these fixes with lang/ruby27 because it is still non-default ver of Ruby 2. Make same changes with lang/ruby26 (in one patch, required for exp-run) 3. Request exp-run 4. Commit & fix lang/ruby26
(In reply to Yasuhiro KIMURA from comment #23) Thoghts, I don't like putting man pages in files dir. The corresponding version of irb.1 should be fetched from upstream as additional distfile. Ex. https://github.com/ruby/irb/blob/v1.2.0/man/irb.1
Regarding man page, this should be better rather than copy it in FILESDIR. >post-install: > ${MKDIR} ${STAGEDIR}${PREFIX}/share/man/man1 > ${INSTALL_DATA} ${WRKSRC}/man/irb.1
lang/ruby26 expired today, the port is being removed from the tree.
lang/ruby26 is removed from ports tree.