Bug 263688 - www/gitlab-ce build and run failed because of dep rubygem-rails61>=<6.1.5, but rubygem-rails61- is already installed
Summary: www/gitlab-ce build and run failed because of dep rubygem-rails61>=<6....
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Matthias Fechner
Depends on:
Reported: 2022-04-30 17:39 UTC by VVD
Modified: 2022-05-28 09:22 UTC (History)
1 user (show)

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

add option KERBEROS - possibility to not install security/krb5 (1.55 KB, patch)
2022-05-28 09:22 UTC, VVD
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2022-04-30 17:39:03 UTC
This commit breaks run and build: https://cgit.freebsd.org/ports/commit/?id=816b6f1f77dfa9405a5f6050e1254a1805d09346

# service gitlab start 
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this
application for all non-root users on this machine.
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this
application for all non-root users on this machine.
Could not find gem 'activesupport (~>' in cached gems or installed locally.

The source contains the following gems matching 'activesupport':
  * activesupport-
  * activesupport-
Could not create Gemfile.lock for gitaly, please report this using FreeBSD Bugtracker, https://bugs.freebsd.org/

Trying rebuild gitlab:
===>   gitlab-ce-14.10.0_1 depends on package: rubygem-rails61>=<6.1.5 - not found
===>  Installing for rubygem-rails61-
===>  Checking if rubygem-rails61 is already installed
===>   rubygem-rails61- is already installed
Comment 1 VVD 2022-04-30 18:16:11 UTC
Workaround - manually editing files:
Comment 2 Po-Chuan Hsieh freebsd_committer 2022-04-30 18:51:36 UTC
It's known problem. I sent a patch file [1] to mfechner for testing when Rails 6.1.5 is out. The update was postponed because gitlab is not ready for Rails 6.1.5.

I updated Rails to because of the security issue [2].

[1] https://people.freebsd.org/~sunpoet/patch/rails61.txt
[2] https://www.vuxml.org/freebsd/9db93f3d-c725-11ec-9618-000d3ac47524.html
Comment 3 VVD 2022-05-13 16:58:17 UTC
14.10.1 and 14.10.2 already released.
Comment 4 commit-hook freebsd_committer 2022-05-27 17:19:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3719f5e06662079e80fd9698370ef32a2b75469c

commit 3719f5e06662079e80fd9698370ef32a2b75469c
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2022-05-27 17:13:01 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2022-05-27 17:18:33 +0000

    www/gitlab-ce: major update to 15.0.0


    This commit also includes a not so strict restriction on rails61.
    This is not tested by gitlab itself, but my tests showed that it should work.
    This fixes a regression introduced by:

    PR:             263688

 www/gitlab-ce/Makefile                             | 40 ++++++++---------
 www/gitlab-ce/distinfo                             |  6 +--
 .../files/extra-patch-Gemfile-kerberos-off (gone)  | 11 -----
 www/gitlab-ce/files/patch-Gemfile                  | 50 ++++++++++------------
 .../files/patch-config_gitlab.yml.example          | 26 ++++++-----
 www/gitlab-ce/pkg-message                          |  4 +-
 6 files changed, 57 insertions(+), 80 deletions(-)
Comment 5 Matthias Fechner freebsd_committer 2022-05-27 17:27:51 UTC
Should be fixed now.
Comment 6 VVD 2022-05-27 19:59:46 UTC
(In reply to Matthias Fechner from comment #5)
[/usr/ports/www/gitlab-ce]# make patch
===>  License MIT accepted by the user
===>   gitlab-ce-15.0.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by gitlab-ce-15.0.0 for building
===>  Extracting for gitlab-ce-15.0.0
=> SHA256 Checksum OK for gitlab-org-gitlab-foss-8a186dedfc1da12270ea77f2673b59fa08f770c1_GL0.tar.gz.
===>   gitlab-ce-15.0.0 depends on file: /usr/local/bin/ruby30 - found
===>  Patching for gitlab-ce-15.0.0
===>   gitlab-ce-15.0.0 depends on file: /usr/local/bin/ruby30 - found
===>  Applying FreeBSD patches for gitlab-ce-15.0.0 from /usr/ports/www/gitlab-ce/files
patch: **** malformed patch at line 119: @@ -423,30 +351,6 @@ group :development, :test, :omnibus do
===>  FAILED Applying FreeBSD patch-Gemfile
===> FAILED to apply cleanly FreeBSD patch(es)  patch-Gemfile
*** Error code 1

make: stopped in /usr/ports/www/gitlab-ce

And it depends on krb again, but krb work on EE only (Gemfile):
> # Kerberos authentication. EE-only
> gem 'gssapi', group: :kerberos
> gem 'timfel-krb5-auth', '~> 0.8', group: :kerberos
Comment 7 Matthias Fechner freebsd_committer 2022-05-28 05:54:50 UTC
(In reply to VVD from comment #6)
Make sure you use the latest version:

It fixes the broken patch.
Comment 8 VVD 2022-05-28 09:22:10 UTC
Created attachment 234287 [details]
add option KERBEROS - possibility to not install security/krb5

Fechner from comment #7)
Thanks. I tried to build in time between commit with update to 15.0.0 and this fix.

I create patch with option KERBEROS for 15.0.0.