Bug 199953 - www/rubygem-passenger fails to build for nginx option via poudriere
Summary: www/rubygem-passenger fails to build for nginx option via poudriere
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: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-05 16:42 UTC by Paul Mather
Modified: 2015-05-18 16:46 UTC (History)
3 users (show)

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


Attachments
Build log for www/rubygem-passenger 5.0.7 (4.99 KB, text/plain)
2015-05-05 16:42 UTC, Paul Mather
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Mather 2015-05-05 16:42:23 UTC
Created attachment 156379 [details]
Build log for www/rubygem-passenger 5.0.7

Since the recent change to check for nginx built with PASSENGER option set, www/rubygem-passenger no longer builds via poudriere: it is always skipped with this summary in the Poudriere build GUI: "rebuild nginx with third-party 5.0.7 module, current verion is nginx: not found"

In my Poudriere setup, that jail does build www/nginx with the PASSENGER option set to "on".  I suspect that the check in the www/rubygem-passenger Makefile is assuming that nginx is actually installed on the system, which may not be the case at that point when building via Poudriere.

I've attached a log of the most recent attempt to build www/rubygem-passenger via Poudriere.  The last time I was able successfully to build www/rubygem-passenger via Poudriere is on 2015-04-08.  I presume r384951 broke things.

Cheers,

Paul.
Comment 1 Zsolt Udvari freebsd_committer freebsd_triage 2015-05-05 17:48:22 UTC
I've same problem. My poudriere log is here: http://uzsolt.hu/freebsd/poudriere/logs/amd64/rubygem-passenger-5.0.7.log

One more "bug": on line 49 is "verion", not "ver*s*ion" :)
Comment 2 Sergey A. Osokin freebsd_committer freebsd_triage 2015-05-05 19:00:44 UTC
Reassign to poudriere guru.

Bryan, could you please take a look, thanks in advance.
Comment 3 Zsolt Udvari freebsd_committer freebsd_triage 2015-05-06 05:34:59 UTC
Sergey, I think the Makefile doesn't work as you expect.
If nginx doesn't installed:
1. NGINXVERSION and NGXPASSENGER variables are empty because no nginx{,-devel} installed (line 38 and 39).
2. On line 41 add www/nginx to BUILD_DEPENDS.
3. On line 46 change IGNORE to "rebuild nginx with latest passenger module".
4. On line 49 IGNORE will overwrite (because the empty NGXPASSENGER doesn't equal with PORTVERSION).

So you'll have a non-empty IGNORE.

I think if no nginx is installed should leave empty IGNORE and simply add nginx to BUILD_DEPENDS and the port system will install nginx.
If any nginx is installed without (correct) passenger-module should set IGNORE.
If any nginx is installed with correct passenger module, should build the package.
Comment 4 Sergey A. Osokin freebsd_committer freebsd_triage 2015-05-17 23:40:38 UTC
Fixed.
Comment 5 Paul Mather 2015-05-18 13:16:18 UTC
(In reply to Sergey A. Osokin from comment #4)

This fix causes www/rubygem-passenger to lose www/nginx as a dependency.  Now, "pkg autoremove" will offer up the www/nginx package for deletion.  I don't believe this occurred previously.  It is certainly not desirable.

Is there a way of fixing www/rubygem-passenger to build with the nginx option but also to preserve correct dependencies?  I'm not up on the intricacies of the ports build infrastructure, so I don't know whether this is easy to achieve.

Cheers,

Paul.
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2015-05-18 15:24:45 UTC
(In reply to paul from comment #5)
> (In reply to Sergey A. Osokin from comment #4)
> 
> This fix causes www/rubygem-passenger to lose www/nginx as a dependency. 
> Now, "pkg autoremove" will offer up the www/nginx package for deletion.  I
> don't believe this occurred previously.  It is certainly not desirable.
> 
> Is there a way of fixing www/rubygem-passenger to build with the nginx
> option but also to preserve correct dependencies?  I'm not up on the
> intricacies of the ports build infrastructure, so I don't know whether this
> is easy to achieve.
> 

The removed code was not a RUN dependency though. It was only a build dependency. So before this change `pkg autoremove` should have been removing it already.
Comment 7 Paul Mather 2015-05-18 16:46:47 UTC
(In reply to Bryan Drewery from comment #6)

Oddly enough, previously "pkg autoremove" did not offer up nginx for deletion, so somehow a dependency was being established.  Now that's not the case.

Whether that was by accident or design, shouldn't a runtime dependency be established if you select that option?  I'd always assumed that's what the option meant: use Passenger with Nginx.

I believe the fact that nginx is offering to be removed in response to "pkg autoremove" implies that it was auto-installed as part of installing another package at some time.  I also believe that auto-installation was due to installing www/rubygem-passenger in the past.  It seems to me the behaviour has changed at some point, and I suspect it is the recent change that yielded this PR.