Page MenuHomeFreeBSD

Move Mk/bsd.ruby.mk to Mk/Uses/ruby.mk.
AbandonedPublic

Authored by bofh on Jan 1 2023, 3:04 PM.
Referenced Files
Unknown Object (File)
Fri, Nov 8, 6:28 PM
Unknown Object (File)
Fri, Nov 8, 6:15 PM
Unknown Object (File)
Fri, Nov 8, 11:33 AM
Unknown Object (File)
Fri, Nov 8, 11:30 AM
Unknown Object (File)
Fri, Nov 8, 12:08 AM
Unknown Object (File)
Thu, Nov 7, 7:39 PM
Unknown Object (File)
Sat, Oct 19, 10:34 PM
Unknown Object (File)
Oct 9 2024, 4:17 PM

Details

Summary

First of all this is not my work. This is the work of @yasu mentioned here https://reviews.freebsd.org/D27863. I am just running an exp-run to check that everything works fine with this. For the sake of sanity and conversation this patch only includes the changes in Mk infrastructure rather than the entire diff.

Switch from 'USE_RUBY=yes' to 'USES=ruby'.

Notable changes are.

Mk/bsd.ruby.mk is move to Mk/Uses/ruby.mk.

  • List Item
  • 'USE_RUBY=yes' is replaced with 'USES=ruby'.
  • 'USE_RUBY_EXTCONF' is replaced with 'USES=ruby:extconf'.
  • 'USE_RUBY_RDOC' is replaced with 'USES=ruby:rdoc'.
  • 'USE_RUBY_SETUP' is replaces with 'USES=ruby:setup'.
  • 'RUBY_NO_BUILD_DEPENDS' and 'RUBY_NO_RUN_DEPENDS' are replaced with 'USES=ruby:{build,none,run}'.
  • 'RUBY_REQUIRE' isn't used anywhere, so removed.
  • 'USES=gem' now implies 'USES=ruby'.
Test Plan

I am running an exp-run and will revert back with the failures.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bofh requested review of this revision.Jan 1 2023, 3:04 PM
bofh created this revision.
Mk/Uses/ruby.mk
100

^ lools like Tools/scripts/indent_make_if.pl was not yet run on this.

Run Tools/scripts/indent_make_if.pl on ruby.mk file.

I just applied the patch and tried to compile one port:

poudriere testport -p gitlab -j 131amd64 devel/rubygem-gitlab-labkit

But it fails with:

[00:00:01] Ports supports: FLAVORS SELECTED_OPTIONS
make: "/usr/ports/Mk/Uses/gem.mk" line 23: Cannot open /usr/ports/Mk/Uses/ruby.mk
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/devel/rubygem-gitlab-labkit

It seems that some path are broken, the file ruby.mk does not exist, is it maybe bsd.ruby.mk and not locate in Uses directory?

I just applied the patch and tried to compile one port:

I don't know how you have applied the patch but just for the sake of your message I have retried applying the patch on a freshly brewed ports tree like the following:

cd ports
git apply ~/Downloads/ruby.diff
poudriere testport -p gitlab -j 131amd64 devel/rubygem-gitlab-labkit

But it fails with:

[00:00:01] Ports supports: FLAVORS SELECTED_OPTIONS
make: "/usr/ports/Mk/Uses/gem.mk" line 23: Cannot open /usr/ports/Mk/Uses/ruby.mk
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/devel/rubygem-gitlab-labkit

It seems that some path are broken, the file ruby.mk does not exist, is it maybe bsd.ruby.mk and not locate in Uses directory?

Have you deleted the line USE_RUBY=yes from the Makefile of the port?

In D37925#863641, @bofh wrote:

I don't know how you have applied the patch but just for the sake of your message I have retried applying the patch on a freshly brewed ports tree like the following:

cd ports
git apply ~/Downloads/ruby.diff

thanks, that helped (I used patch before).

Have you deleted the line USE_RUBY=yes from the Makefile of the port?

not yet, I would like to see the sanity check to fail.
Without removing USE_RUBY I see the following error message, is this intended:

 poudriere testport -p gitlab -j 131amd64 devel/rubygem-gitlab-labkit
[00:00:00] Creating the reference jail... done
[00:00:00] Mounting system devices for 131amd64-gitlab
[00:00:00] Warning: Using packages from previously failed, or uncommitted, build: /usr/local/poudriere/data/packages/131amd64-gitlab/.building
[00:00:00] Mounting ccache from: /var/cache/ccache
[00:00:00] Mounting ports from: /usr/local/poudriere/ports/gitlab
[00:00:00] Mounting packages from: /usr/local/poudriere/data/packages/131amd64-gitlab
[00:00:00] Mounting distfiles from: /usr/local/poudriere/ports/gitlab/distfiles
[00:00:00] Copying /var/db/ports from: /usr/local/etc/poudriere.d/options
[00:00:00] Appending to make.conf: /usr/local/etc/poudriere.d/make.conf
/etc/resolv.conf -> /usr/local/poudriere/data/.m/131amd64-gitlab/ref/etc/resolv.conf
[00:00:00] Starting jail 131amd64-gitlab
[00:00:00] Will build as nobody:nobody (65534:65534)
[00:00:01] Ports supports: FLAVORS SELECTED_OPTIONS
[00:00:01] Logs: /usr/local/poudriere/data/logs/bulk/131amd64-gitlab/2023-01-11_16h49m01s
[00:00:01] WWW: https://pkg.fechner.net//build.html?mastername=131amd64-gitlab&build=2023-01-11_16h49m01s
[00:00:01] Loading MOVED for /usr/local/poudriere/data/.m/131amd64-gitlab/ref/usr/ports
[00:00:01] Gathering ports metadata
[00:00:01] Warning: (lang/ruby30): make: "/usr/ports/lang/ruby30/Makefile" line 107: Malformed conditional (${RUBY_VER} == ${RUBY_DEFAULT_VER})
[00:00:01] Warning: (lang/ruby30): make: "/usr/ports/lang/ruby30/Makefile" line 162: Malformed conditional (${RUBY_VER} == ${RUBY_DEFAULT_VER})
[00:00:01] Warning: (lang/ruby30): make: Fatal errors encountered -- cannot continue
[00:00:01] Warning: (lang/ruby30): Error: Error looking up dependencies for lang/ruby30
[00:00:01] Error: Fatal errors encountered gathering ports metadata
[131amd64-gitlab] [2023-01-11_16h49m01s] [crashed:] Queued: 0  Built: 0  Failed: 0  Skipped: 0  Ignored: 0  Fetched: 0  Tobuild: 0   Time: 00:00:01

Have you deleted the line USE_RUBY=yes from the Makefile of the port?

not yet, I would like to see the sanity check to fail.
Without removing USE_RUBY I see the following error message, is this intended:

 poudriere testport -p gitlab -j 131amd64 devel/rubygem-gitlab-labkit
[00:00:00] Creating the reference jail... done
[00:00:00] Mounting system devices for 131amd64-gitlab
[00:00:00] Warning: Using packages from previously failed, or uncommitted, build: /usr/local/poudriere/data/packages/131amd64-gitlab/.building
[00:00:00] Mounting ccache from: /var/cache/ccache
[00:00:00] Mounting ports from: /usr/local/poudriere/ports/gitlab
[00:00:00] Mounting packages from: /usr/local/poudriere/data/packages/131amd64-gitlab
[00:00:00] Mounting distfiles from: /usr/local/poudriere/ports/gitlab/distfiles
[00:00:00] Copying /var/db/ports from: /usr/local/etc/poudriere.d/options
[00:00:00] Appending to make.conf: /usr/local/etc/poudriere.d/make.conf
/etc/resolv.conf -> /usr/local/poudriere/data/.m/131amd64-gitlab/ref/etc/resolv.conf
[00:00:00] Starting jail 131amd64-gitlab
[00:00:00] Will build as nobody:nobody (65534:65534)
[00:00:01] Ports supports: FLAVORS SELECTED_OPTIONS
[00:00:01] Logs: /usr/local/poudriere/data/logs/bulk/131amd64-gitlab/2023-01-11_16h49m01s
[00:00:01] WWW: https://pkg.fechner.net//build.html?mastername=131amd64-gitlab&build=2023-01-11_16h49m01s
[00:00:01] Loading MOVED for /usr/local/poudriere/data/.m/131amd64-gitlab/ref/usr/ports
[00:00:01] Gathering ports metadata
[00:00:01] Warning: (lang/ruby30): make: "/usr/ports/lang/ruby30/Makefile" line 107: Malformed conditional (${RUBY_VER} == ${RUBY_DEFAULT_VER})
[00:00:01] Warning: (lang/ruby30): make: "/usr/ports/lang/ruby30/Makefile" line 162: Malformed conditional (${RUBY_VER} == ${RUBY_DEFAULT_VER})
[00:00:01] Warning: (lang/ruby30): make: Fatal errors encountered -- cannot continue
[00:00:01] Warning: (lang/ruby30): Error: Error looking up dependencies for lang/ruby30
[00:00:01] Error: Fatal errors encountered gathering ports metadata
[131amd64-gitlab] [2023-01-11_16h49m01s] [crashed:] Queued: 0  Built: 0  Failed: 0  Skipped: 0  Ignored: 0  Fetched: 0  Tobuild: 0   Time: 00:00:01

I have shared the full patch(still WIP) here https://people.freebsd.org/~bofh/dropzone/ruby.diff

You will also need to patch ruby[27|30|31|32] before moving on. Unless you use USES=ruby in lang/ruby* I don't think you can hit sanity part. However I have checked this issue and it actually hits the sanity part and fails gracefully.

Already landed in the tree.

Why www/redmine42 was converted to USES= ruby but redmine50 not?
Many ports don't have USE_RUBY or USES=ruby anymore, I fail to understand the logic.