Bug 263688 - www/gitlab-ce build and run failed because of dep rubygem-rails61>=6.1.4.7<6.1.5, but rubygem-rails61-6.1.5.1 is already installed
Summary: www/gitlab-ce build and run failed because of dep rubygem-rails61>=6.1.4.7<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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-30 17:39 UTC by Vladimir Druzenko
Modified: 2022-06-04 11:19 UTC (History)
1 user (show)

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


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

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 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 (~> 6.1.4.7)' in cached gems or installed locally.

The source contains the following gems matching 'activesupport':
  * activesupport-6.0.4.8
  * activesupport-6.1.5.1
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.4.7<6.1.5 - not found
…
===>  Installing for rubygem-rails61-6.1.5.1
===>  Checking if rubygem-rails61 is already installed
===>   rubygem-rails61-6.1.5.1 is already installed
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2022-04-30 18:16:11 UTC
Workaround - manually editing files:
/usr/local/share/gitaly/ruby/Gemfile
/usr/local/www/gitlab-ce/Gemfile
/usr/local/www/gitlab-ce/qa/Gemfile
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 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 6.1.5.1 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 Vladimir Druzenko freebsd_committer freebsd_triage 2022-05-13 16:58:17 UTC
14.10.1 and 14.10.2 already released.
Comment 4 commit-hook freebsd_committer freebsd_triage 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

    Changelog:
    https://about.gitlab.com/releases/2022/05/22/gitlab-15-0-released/

    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:
    2dd5a4751e19c9a02911d797d67fff6ec9f09da4

    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 freebsd_triage 2022-05-27 17:27:51 UTC
Should be fixed now.
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 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

Stop.
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 freebsd_triage 2022-05-28 05:54:50 UTC
(In reply to VVD from comment #6)
Make sure you use the latest version:
https://cgit.freebsd.org/ports/commit/?id=35d750f806d4539ed73ccc03bc3d2e4cc14e9afa

It fixes the broken patch.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 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.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2022-05-31 15:01:20 UTC
Is my patch good?
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-05-31 15:50:42 UTC
A commit in branch main references this bug:

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

commit e6e83842d9749824da4e2da42f13b89883e73858
Author:     VVD <vvd@unislabs.com>
AuthorDate: 2022-05-31 15:43:06 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2022-05-31 15:49:39 +0000

    www/gitlab-ce: added possibility to disabled kerberos

    As this does not change the behaviour of port, no revision bump.

    PR:             263688

 www/gitlab-ce/Makefile                                     |  8 +++++++-
 www/gitlab-ce/files/extra-patch-Gemfile-kerberos-off (new) | 11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
Comment 11 Matthias Fechner freebsd_committer freebsd_triage 2022-05-31 15:51:57 UTC
(In reply to VVD from comment #9)
sry was missing the missing as it does not really belong to the topic:
www/gitlab-ce build and run failed because of dep rubygem-rails61>=6.1.4.7<6.1.5, but rubygem-rails61-6.1.5.1 is already installed

But it is now committed.

Thanks.
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2022-05-31 16:25:19 UTC
Thanks you too!
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-04 11:19:58 UTC
GitLab Critical Security Release: 15.0.1, 14.10.4, and 14.9.5
https://about.gitlab.com/releases/2022/06/01/critical-security-release-gitlab-15-0-1-released/