Bug 198052 - devel/ruby-gems: fails to build with DOCS option disabled
Summary: devel/ruby-gems: fails to build with DOCS option disabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-26 12:09 UTC by Yasuhiro Kimura
Modified: 2015-06-08 17:32 UTC (History)
7 users (show)

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


Attachments
Log of poudriere. (11.73 KB, text/plain)
2015-02-26 12:09 UTC, Yasuhiro Kimura
no flags Details
Log of poudriere with latest patch (ruby-gem-2.4.5-take4.diff). (5.15 KB, text/plain)
2015-02-26 20:25 UTC, Yasuhiro Kimura
no flags Details
ruby22-gems-2.4.5.log.txt (18.48 KB, text/plain)
2015-02-26 23:57 UTC, Steve Wills
no flags Details
proposed patch to fix issue (1.26 KB, patch)
2015-04-01 04:50 UTC, Steve Wills
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 2015-02-26 12:09:46 UTC
Created attachment 153544 [details]
Log of poudriere.

With ruby 2.2 devel/ruby-gems fails to build in stage-qa.
Log file of poudriere with 10.1-R jail is attached.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-26 12:09:46 UTC
Auto-assigned to maintainer ruby@FreeBSD.org
Comment 2 Steve Wills freebsd_committer freebsd_triage 2015-02-26 16:14:35 UTC
There's an update to devel/ruby-gems to 2.4.5 in PR 197083. Please try that, I believe it should resolve this issue.
Comment 3 Yasuhiro Kimura freebsd_committer freebsd_triage 2015-02-26 20:25:18 UTC
Created attachment 153558 [details]
Log of poudriere with latest patch (ruby-gem-2.4.5-take4.diff).

(In reply to Steve Wills from comment #2)
I tried latest patch from PR 197083 (ruby-gem-2.4.5-take4.diff) and now build with poudriere fails at check-sanity phase.
Log file is attached.
Comment 4 Steve Wills freebsd_committer freebsd_triage 2015-02-26 23:57:34 UTC
Created attachment 153566 [details]
ruby22-gems-2.4.5.log.txt

Sorry, but I'm not able to reproduce this. See my log.
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-02-27 10:13:04 UTC
(In reply to Steve Wills from comment #4)

Can you build ruby22-gems-2.4.5 with poudriere "-t" flag?
I've patched Mk/bsd.ruby.mk and devel/ruby-gems but it failed during check-plist:.
Did I miss anything?

% cd /usr/ports/devel/ruby-gems/
% make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: @dir lib/ruby/gems/%%RUBY_VER%%/build_info
Error: Missing: @dir %%CACHE_DIR%%
Error: Missing: @dir %%EXT_DIR%%
Error: Missing: @dir %%GEMS_DIR%%
Error: Missing: @dir %%SPEC_DIR%%
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/ruby-gems
Comment 6 Steve Wills freebsd_committer freebsd_triage 2015-02-28 00:31:32 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #5)

No, this is a known issue, but I believe the current version of devel/ruby-gems has the same issue. Correct me if I'm wrong.
Comment 7 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-02-28 05:49:08 UTC
(In reply to Steve Wills from comment #6)

I guess not. I did not got this error when building ruby21-gems-1.8.30. According latest exp-run (with QA enabled) [1] by antoine, ruby20-gems-2.4.5 passed check-plist. I've checked that ruby21-gems-2.4.5 has same issue.

% make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: @dir lib/ruby/gems/%%RUBY_VER%%/build_info
Error: Missing: @dir %%CACHE_DIR%%
Error: Missing: @dir %%EXT_DIR%%
Error: Missing: @dir %%GEMS_DIR%%
Error: Missing: @dir %%SPEC_DIR%%
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/ruby-gems

% make package
===>  Building package for ruby21-gems-2.4.5
/usr/local/bin/ruby21
pkg-static: lstat(/usr/ports/works/usr/ports/devel/ruby-gems/work/stage/usr/local/lib/ruby/gems/2.1/build_info/): No such file or directory
pkg-static: lstat(/usr/ports/works/usr/ports/devel/ruby-gems/work/stage/usr/local/lib/ruby/gems/2.1/extensions/): No such file or directory
pkg-static: lstat(/usr/ports/works/usr/ports/devel/ruby-gems/work/stage/usr/local/lib/ruby/gems/2.1/cache/): No such file or directory
pkg-static: lstat(/usr/ports/works/usr/ports/devel/ruby-gems/work/stage/usr/local/lib/ruby/gems/2.1/gems/): No such file or directory
pkg-static: lstat(/usr/ports/works/usr/ports/devel/ruby-gems/work/stage/usr/local/lib/ruby/gems/2.1/specifications/): No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/ruby-gems

[1] http://pb2.nyi.freebsd.org/build.html?mastername=101amd64-default-PR197083&build=2015-02-16_10h33m49s
    http://pb2.nyi.freebsd.org/data/101amd64-default-PR197083/2015-02-16_10h33m49s/logs/ruby20-gems-2.4.5.log
Comment 8 Steve Wills freebsd_committer freebsd_triage 2015-02-28 17:31:47 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #7)

Actually, I was wrong earlier. I can't reproduce that either:

root@11amd64-default:/usr/ports/devel/ruby-gems # make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
root@11amd64-default:/usr/ports/devel/ruby-gems # make package
===>  Building package for ruby21-gems-2.4.5
/usr/local/bin/ruby21
root@11amd64-default:/usr/ports/devel/ruby-gems #
Comment 9 dewayne 2015-03-31 05:19:11 UTC
Unfortunately I'm receiving the same error as Sunpoet.  From an amd64 jail on an
# uname -srmi -K -U
FreeBSD 10.1-STABLE amd64 hqdev-amd64-padlock-smp-vga 1001512 1001512
built last Thursday.

===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: @dir lib/ruby/gems/%%RUBY_VER%%/build_info
Error: Missing: @dir %%CACHE_DIR%%
Error: Missing: @dir %%EXT_DIR%%
Error: Missing: @dir %%GEMS_DIR%%
Error: Missing: @dir %%SPEC_DIR%%
===> Error: Plist issues found.
*** Error code 1

which was checked after
===>   Registering installation for ruby21-gems-2.4.5 as automatic
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/build_info/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/extensions/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/cache/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/gems/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/specifications/): No such file or directory
*** Error code 74

I can reproduce the above by clearing all the stage and temporary files, and 
cd /usr/ports/devel/ruby-gems
make -DBATCH package

Unfortunately I'm not able to dig further as I'm just a user of ruby that needs metasploit. :)
Comment 10 dewayne 2015-03-31 05:22:29 UTC
Unfortunately I'm receiving the same error as Sunpoet.  From an amd64 jail on an
# uname -srmi -K -U
FreeBSD 10.1-STABLE amd64 hqdev-amd64-padlock-smp-vga 1001512 1001512
built last Thursday.

===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: @dir lib/ruby/gems/%%RUBY_VER%%/build_info
Error: Missing: @dir %%CACHE_DIR%%
Error: Missing: @dir %%EXT_DIR%%
Error: Missing: @dir %%GEMS_DIR%%
Error: Missing: @dir %%SPEC_DIR%%
===> Error: Plist issues found.
*** Error code 1

which was checked after
===>   Registering installation for ruby21-gems-2.4.5 as automatic
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/build_info/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/extensions/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/cache/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/gems/): No such file or directory
pkg-static: lstat(/usr/staging/usr/local/lib/ruby/gems/2.1/specifications/): No such file or directory
*** Error code 74

I can reproduce the above by clearing all the stage and temporary files, and 
cd /usr/ports/devel/ruby-gems
make -DBATCH package

Unfortunately I'm not able to dig further as I'm just a user of ruby that needs metasploit. :)
Comment 11 Steve Wills freebsd_committer freebsd_triage 2015-03-31 12:11:41 UTC
(In reply to dewayne from comment #10)
Sorry you're having trouble, I've been unable to reproduce this. Could you send me the complete log and all your poudriere and make.conf files?
Comment 12 Lukasz Wasikowski 2015-03-31 22:41:03 UTC
Steve, just change options for devel/ruby-gems - UNSET DOCS and you'll get that error.
Comment 13 dewayne 2015-03-31 23:49:32 UTC
(In reply to Lukasz Wasikowski from comment #12)
Thank-you Lukasz, you've provided a valuable clue. When I have 
DOCS=on 
the ruby-gem package is successfully built.
With
DOCS=off
the package fails to build, as mentioned above. Because I only need the package for a higher level package, I had turned off DOCS.
Comment 14 Steve Wills freebsd_committer freebsd_triage 2015-04-01 04:50:47 UTC
Created attachment 155075 [details]
proposed patch to fix issue

(In reply to Lukasz Wasikowski from comment #12)

Thanks, that helped a lot. Try this patch. I think it should fix it. I'm going to test it a bit more, but it should go in soon if it looks good.
Comment 15 Lukasz Wasikowski 2015-04-01 07:57:15 UTC
(In reply to Steve Wills from comment #14)
That patch works for me, thank you.
Comment 16 Romain Tartière freebsd_committer freebsd_triage 2015-04-01 12:49:45 UTC
The same problem exists with Ruby 2.1.  The proposed fix also saves the situation with this version of Ruby.

Thanks!
Comment 17 commit-hook freebsd_committer freebsd_triage 2015-04-01 15:55:02 UTC
A commit references this bug:

Author: swills
Date: Wed Apr  1 15:54:55 UTC 2015
New revision: 382918
URL: https://svnweb.freebsd.org/changeset/ports/382918

Log:
  devel/ruby-gems: fix with DOCS option disabled

  PR:		198052

Changes:
  head/devel/ruby-gems/Makefile
  head/devel/ruby-gems/pkg-plist
Comment 18 Steve Wills freebsd_committer freebsd_triage 2015-04-01 15:55:19 UTC
Fix committed, closing.
Comment 19 florian.heigl 2015-06-08 03:02:23 UTC
Hi,

I think this hit again in the 2015Q2 stable branch with the 2.4.7 version bump in commit 386699.

I changed everything below .include <bsd.port.options.mk> to be like in commit 198052 and that allowed me to build with docs disabled.
Comment 20 Michael Moll freebsd_committer freebsd_triage 2015-06-08 17:32:59 UTC
AFAICT, r382918 was not in 2015Q2 by about three hours and not MFHed, so that's not surprising. :)