Bug 231224 - www/gitlab-ce fails to upgrade due to missing build dependency net/rubygem-hangouts-chat & devel/rubygem-rbtrace
Summary: www/gitlab-ce fails to upgrade due to missing build dependency net/rubygem-ha...
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: 231418
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-07 14:20 UTC by hakan
Modified: 2018-09-18 12:19 UTC (History)
2 users (show)

See Also:


Attachments
Output of `portmaster -d www/gitlab-ce` (5.75 KB, text/plain)
2018-09-07 14:20 UTC, hakan
no flags Details
Doing the bundle check in the install target so that all run depends are installed (740 bytes, patch)
2018-09-08 06:49 UTC, Matthias Fechner
no flags Details | Diff
Add deps as RUN and BUILD deps. (2.05 KB, patch)
2018-09-10 04:45 UTC, Matthias Fechner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hakan 2018-09-07 14:20:36 UTC
Created attachment 196943 [details]
Output of `portmaster -d www/gitlab-ce`

Hello,

I just tried to update my GitLab 11.1 to 11.2 according to the documentation at https://gitlab.fechner.net/mfechner/Gitlab-docu/blob/master/update/11.1-11.2-freebsd.md but instead of pkg I am using portmaster.
As seen in the log, it fails to build because the new runtime dependency net/rubygem-hangouts-chat is actually a build dependency.

Installing this port first revealed that devel/rubygem-rbtrace is also a build dependency (sorry, not in the attached log!) and after installing this too, building www/gitlab-ce worked.

Greetings,
Hakan Siktas
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2018-09-08 06:31:48 UTC
Thanks for this report.
I think the problem could be related to this commit:
https://svnweb.freebsd.org/ports/head/www/gitlab-ce/Makefile?r1=476329&r2=477216

I do not see the problem with poudriere so please give me some time to think about it.
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2018-09-08 06:49:16 UTC
Created attachment 196956 [details]
Doing the bundle check in the install target so that all run depends are installed

Could you please try the attached patch?
Comment 3 hakan 2018-09-08 15:31:49 UTC
(In reply to Matthias Fechner from comment #2)
Thanks for your fast reply!

I just applied your patch to my /usr/ports/www/gitlab-ce/Makefile and ran `pkg delete rubygem-hangouts-chat-0.0.5 rubygem-rbtrace-0.4.11` which also uninstalled the current gitlab-ce package.
Afterwards I ran `portmaster -d www/gitlab-ce` and it it attempted to install GitLab with its two missing dependencies. As before it tried to build www/gitlab-ce at first and failed with:

```
Could not find gem 'hangouts-chat (~> 0.0.5)' in any of the gem sources listed in your Gemfile.
```

Again, installing these two ports before results in a successful build of www/gitlab-ce with portmaster.

I wonder if https://svnweb.freebsd.org/ports/head/www/gitlab-ce/Makefile?r1=476329&r2=477216 actually turns all runtime-dependent rubygems for GitLab into build dependencies??

BTW, gitlab.fechner.net is down and I forgot to clone it for offline documentation. :)
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2018-09-10 04:45:00 UTC
Created attachment 196999 [details]
Add deps as RUN and BUILD deps.

Yes, it seems that portmaster require it as a BUILD DEP which is not false.
Could you please try this new patch?
Comment 5 hakan 2018-09-10 10:58:40 UTC
(In reply to Matthias Fechner from comment #4)

I reverted the previous local change of my ports tree, applied the new patch, deleted the two rubygem packages together with the GitLab package and this time `portmaster www/gitlab-ce` built the missing rubygems before building GitLab.
The issue appears to be fixed and I would assume that this is also the case for clean installs.
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-09-18 12:19:06 UTC
A commit references this bug:

Author: mfechner
Date: Tue Sep 18 12:18:25 UTC 2018
New revision: 480016
URL: https://svnweb.freebsd.org/changeset/ports/480016

Log:
  Due to problems with portmaster, portmaster does not install RUN_DEPENDS before the do-install target is executed.
  To not break the installation of www/gitlab-ce for portmaster users, RUN_DEPENS are now also defined BUILD_DEPENDS.

  PR:		231224
  Reported by:	hakan@siktas.com
  Approved by:	mentors (implicit)

Changes:
  head/www/gitlab-ce/Makefile