Bug 232791 - www/gitlab-ce: "Could not create Gemfile.lock for gitlab" after update
Summary: www/gitlab-ce: "Could not create Gemfile.lock for gitlab" after update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-29 19:03 UTC by Felix Flor
Modified: 2018-11-14 19:02 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Flor 2018-10-29 19:03:35 UTC
After Update from 11.3.0 to 11.3.4 i got this error:

$ service gitlab start
ArgumentError: comparison of Pathname with String failed
An error occurred while installing rake (12.3.1), and Bundler cannot continue.
Make sure that `gem install rake -v '12.3.1' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  devise-two-factor was resolved to 3.0.3, which depends on
    devise was resolved to 4.5.0, which depends on
      responders was resolved to 2.4.0, which depends on
        railties was resolved to 4.2.10, which depends on
          rake
Could not create Gemfile.lock for gitlab, please report this using FreeBSD Bugtracker, https://bugs.freebsd.org/

$ rake -V
rake, version 12.3.1

Re-Installing change nothing. Deleting the old node_modules directory to rebuild a fresh one also doesn't help. Any ideas? I've done all the steps in the How-To.
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2018-10-29 19:21:49 UTC
It seems that an update of one dependency causes now bundle to fail if executed as user git and not as user root.

A work-around is to edit `/usr/local/etc/rc.d/gitlab` line 94:
  if ! su -l ${app_user} -c "cd ${app_root} && /usr/local/bin/bundle install --local --quiet"; then

and replace it by:
  if ! su -l root -c "cd ${app_root} && /usr/local/bin/bundle install --local --quiet"; then

I currently have no idea what caused this problem.

Make sure you change the ownership after to of `/usr/local/www/gitlab-ce/Gemfile.lock` to user git.
Comment 2 Felix Flor 2018-10-29 21:16:17 UTC
Thanks Matthias for this very fast support! Your Workaround worked for me, if i can support you to solve the problem, let me know :)
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-10-30 07:50:25 UTC
A commit references this bug:

Author: mfechner
Date: Tue Oct 30 07:50:18 UTC 2018
New revision: 483457
URL: https://svnweb.freebsd.org/changeset/ports/483457

Log:
  One of the last dependency updates gitlab-ce requires, has broken the Gemfile.lock generation for user git.
  I use now a work-around to generate the file as user root and change the ownership back to git.
  This commit can maybe be undone if the source of the problem is fixed.

  PR:		232791
  Reported by:	freebsd@felix.flornet.de
  Approved by:	mentors (implicit)
  MFC after:	1 day
  MFH:		2018Q4

Changes:
  head/www/gitlab-ce/files/gitlab.in
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2018-10-30 07:51:27 UTC
(In reply to Felix Flor from comment #2)
If you get an idea what package upgrade has broken this, we have something we can start with.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-10-30 16:37:56 UTC
A commit references this bug:

Author: mfechner
Date: Tue Oct 30 16:37:49 UTC 2018
New revision: 483503
URL: https://svnweb.freebsd.org/changeset/ports/483503

Log:
  MFH: r483457 r483459

  One of the last dependency updates gitlab-ce requires, has broken the Gemfile.lock generation for user git.
  I use now a work-around to generate the file as user root and change the ownership back to git.
  This commit can maybe be undone if the source of the problem is fixed.

  PR:		232791
  Reported by:	freebsd@felix.flornet.de
  Approved by:	mentors (implicit)
  MFC after:	1 day

  www/gitlab-ce security update to version 11.3.8.

  Approved by:	mentors (implicit)
  MFC after:	1 day
  Security:	b9591212-dba7-11e8-9416-001b217b3468

  Approved by:	ports-secteam (miwi)

Changes:
_U  branches/2018Q4/
  branches/2018Q4/www/gitlab-ce/Makefile
  branches/2018Q4/www/gitlab-ce/distinfo
  branches/2018Q4/www/gitlab-ce/files/gitlab.in
  branches/2018Q4/www/gitlab-ce/pkg-plist
Comment 6 Jochen Neumeister freebsd_committer freebsd_triage 2018-11-02 17:26:05 UTC
can we close here?
Comment 7 Matthias Fechner freebsd_committer freebsd_triage 2018-11-14 19:02:03 UTC
The problem is maybe related to new version of bundler (rubygem).
I'm not happy with like it is now, but I do not have time to look deeper into it.
I think we can keep this issued till it happens again.

Maybe this is also a bug in the new bundler version or a new limitation.