Bug 215787

Summary: www/gitlab: fix with newer gems
Product: Ports & Packages Reporter: Steve Wills <swills>
Component: Individual Port(s)Assignee: Torsten Zuehlsdorff <tz>
Status: Closed FIXED    
Severity: Affects Some People CC: swills, t
Priority: --- Flags: bugzilla: maintainer-feedback? (tz)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch to fix gitlab with newer gems
none
patch to fix gitlab with newer gems and fix web editing
tz: maintainer-approval+
Further updated to fix branch page issue none

Description Steve Wills freebsd_committer freebsd_triage 2017-01-05 03:19:51 UTC
Created attachment 178532 [details]
patch to fix gitlab with newer gems

See attached patch which fixes www/gitlab when used with newer gems.
Comment 1 Steve Wills freebsd_committer freebsd_triage 2017-01-10 04:42:29 UTC
Created attachment 178687 [details]
patch to fix gitlab with newer gems and fix web editing

Here's an updated version which also pulls in this fix:

https://gitlab.com/gitlab-org/gitlab-ce/commit/a93a610bac7d9ee7c0908592b6a5d91ef0d94333

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6130

which makes it so that editing via web works after the initial commit.
Comment 2 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-01-10 16:05:53 UTC
The patch itself seems to be fine, but i really have no idea if it really is okay. Through the various rubygem updates GitLab brokes in so many ways, i could not determine what causes what fall-out. A full test for functionally took around 5 hours in a row and currently the gems are faster updated than i find time to check it. Its a little bit frustrating. 

So, please go ahead and commit the fix! 

I will try to figure out, if its possible to execute the test-cases and if its possible to combine this with make test.
Comment 3 Steve Wills freebsd_committer freebsd_triage 2017-01-11 16:22:54 UTC
(In reply to Torsten Zuehlsdorff from comment #2)
I understand, sorry for the frustration.

If there are ports that shouldn't be updated, please feel free to add a PORTSCOUT=ignore line to them or make them maintained by yourself instead of ruby@, or even if needed create backlevel versions of them (like rubygem-foo1) where needed, and assign those to yourself. That will avoid the frustration, hopefully.

Also, I'm testing this a bit myself and still found one issue when trying to view branches of a repo, so I'm going to have to try to investigate that and fix it, then post a new patch.
Comment 4 Steve Wills freebsd_committer freebsd_triage 2017-01-11 17:35:00 UTC
Created attachment 178762 [details]
Further updated to fix branch page issue

Here's an updated patch which fixes the issue with the branch page. The fixes are taken from:

https://gitlab.com/gitlab-org/gitlab-ce/commit/fa3bbd449efb69a42a2347c3c3fa08cd822c2471

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6130

Any testing you can do would be appreciated. Let me know if you think I should commit.
Comment 5 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-01-20 15:44:20 UTC
It did not work, since a new gem was updated meanwhile

Could not find gem 'omniauth-twitter (~> 1.2.0)' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.

Can you please update the patch?

And yes, its frustrating. But blaming you or sunpoet for doing a great job in keeping everything up to date would be obscure. 
Its a problem of the port itself, since it is so complex. And its a problem of the ports-tree that such problems are not detected easily. 

Maybe i should reinforce me idea of porting the pessimistic operator of ruby into the ports-tree. But i have no idea where to begin.
Comment 6 Remko Lodder freebsd_committer freebsd_triage 2017-01-26 21:08:00 UTC
What I usually do is just running the update, fixing the fallout with >= for the gemfile most of the time. I need to remove the .lock file so that it 'finds' newer gems.

I am running on 8.11.11 and most things that I use just work[tm].

I am more then happy to run tests when things are updated and notify you (tz@) or someone who can fixup the tree.

Cheers
remko
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-01-31 16:33:27 UTC
A commit references this bug:

Author: tz
Date: Tue Jan 31 16:33:07 UTC 2017
New revision: 432936
URL: https://svnweb.freebsd.org/changeset/ports/432936

Log:
  www/gitlab: Unbreak GitLab and fix web editing

  Switch to rubygem-jquery-ui-rails5-rails4 and
  pull in patch for safer ref updates

  PR:           215787
  Submitted by: swills

Changes:
  head/www/gitlab/Makefile
  head/www/gitlab/files/patch-6130
  head/www/gitlab/files/patch-Gemfile
  head/www/gitlab/files/patch-new-gitlab-git
Comment 8 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-01-31 16:34:43 UTC
I changed the Gemfile to allow the new twitter gem. Otherwise i committed the patch as it is. Thanks for providing it Steve!