Bug 269132 - devel/rubygem-oj still no headers when building as non-root
Summary: devel/rubygem-oj still no headers when building as non-root
Status: New
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
Depends on:
Reported: 2023-01-24 18:16 UTC by Marko Cupać
Modified: 2023-01-24 20:12 UTC (History)
0 users

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

rubygem-oj-3.13.23_2.log (18.06 KB, text/plain)
2023-01-24 18:16 UTC, Marko Cupać
no flags Details
Makefile patch (740 bytes, patch)
2023-01-24 20:12 UTC, Marko Cupać
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Cupać 2023-01-24 18:16:38 UTC
Created attachment 239679 [details]


I have been instructed in #269020 to open a new ticket, so here it goes.

When building devel/rubygem-oj in poudriere as non-root, with the following set in poudriere.conf:


...port gets successfully built, even though log shows header files are not copied to approriate destination due to lack of permissions (see attached log).

This results in inability to build devel/rubygem-oj-introspect due to lack of header files, and ultimately inability to build www/gitlab-ce, when building in poudriere as non-root / nobody.

As no other port out of ~1300 I am currently building in poudriere has problem with building as non-root, would it be possible to fix devel/rubygem-oj in a way it can include header files when building as non-root, rather than asking users of this port to start building ports as root?

Thank you in advance,
Comment 1 Marko Cupać 2023-01-24 20:12:19 UTC
Created attachment 239682 [details]
Makefile patch


I am not much of a porter, but I poked around a bit, and discovered that line:


...creates directory with 644 perms instead of 755:

root@pkg:/wrkdirs/usr/ports/devel/rubygem-oj/work/stage/usr/local/lib/ruby/gems/3.0/gems/oj-3.13.23/ext # ls -alh
total 1
drwxr-xr-x  3 nobody  wheel    64B Jan 24 19:33 .
drwxr-xr-x  6 nobody  wheel   512B Jan 24 19:33 ..
drw-r--r--  2 nobody  wheel     0B Jan 24 19:33 oj

Porter's Handbook says that empty directories can be created with ${MKDIR}:


In attached Makefile patch I have bumped PORTREVISION and replaced command to create empty dir from `${INSTALL_DATA} -d ...' to `${MKDIR} ...'.

Ports build fine when building as nobody / non-root:

[00:05:23] Built ports: devel/rubygem-oj devel/rubygem-oj-introspect www/gitlab-ce

I had no time to test gitlab upgrade so far.