Page MenuHomeFreeBSD

Add www/rubygem-passenger-apache & www/rubygem-passenger-nginxRequired so we can have both Apache and Nginx options in the same repo.Flavors would be great for this, but they aren't ready yet.While here, make www/rubygem-passenger compile...
ClosedPublic

Authored by dvl on Jan 12 2018, 7:31 PM.

Details

Summary

...without:

> Running Q/A tests (stage-qa)

Error: '/bin/bash' is an invalid shebang you need USES=shebangfix for 'lib/ruby/gems/2.4/gems/passenger-5.1.12/dev/ci/tests/debian/run'
Error: '/bin/bash' is an invalid shebang you need USES=shebangfix for 'lib/ruby/gems/2.4/gems/passenger-5.1.12/dev/ci/tests/rpm/run'
Error: '/usr/local/bin/python2' is an invalid shebang you need USES=shebangfix for 'lib/ruby/gems/2.4/gems/passenger-5.1.12/src/cxx_supportlib/vendor-copy/libuv/gyp_uv.py'

  • Error code 1

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dvl retitled this revision from Add www/rubygem-passenger-apache & www/rubygem-passenger-nginx Required so we can have both Apache and Nginx options in the same repo. Flavors would be great for this, but they aren't ready yet. While here, make www/rubygem-passenger compile... to Add www/rubygem-passenger-apache & www/rubygem-passenger-nginxRequired so we can have both Apache and Nginx options in the same repo.Flavors would be great for this, but they aren't ready yet.While here, make www/rubygem-passenger compile....Jan 12 2018, 7:33 PM
dvl edited subscribers, added: feld, swills; removed: mat.
www/rubygem-passenger/Makefile
27 ↗(On Diff #37879)

The only change related to slave ports

32 ↗(On Diff #37879)

This fixes SHEBANG issue with src/cxx_supportlib/vendor-copy/libuv/gyp_uv.py

38 ↗(On Diff #37879)
ultima added inline comments.
www/Makefile
2107–2109 ↗(On Diff #37879)

Why create one for both when the master port already has one enabled?

www/Makefile
2107–2109 ↗(On Diff #37879)

Clarity and ease of use.

www/rubygem-passenger/Makefile
38 ↗(On Diff #37879)

Great, this has annoyed me for a while, I fixed this upstream but this has not been released yet. Patching will therefore become useless in the future, but for now, thanks for fixing this!

Hi,

no new ports/meta-ports required to support both technologies (apache and nginx), I believe it's enough to patch existing www/rubygem-passenger.

I tried FLAVORS

I am not convinced it is correct.

The resulting package is 1.3G for Apache, and 11,000 files.

I did locate the passenger module for Apache, but I didn't find it for
Nginx.

pkg info -l rubygem-passenger-apache | grep mod_passenger.so

/usr/local/lib/ruby/gems/2.4/gems/passenger-5.1.12/buildout/apache2/mod_passenger.so
In D13889#292212, @dvl wrote:

I did locate the passenger module for Apache, but I didn't find it for
Nginx.

pkg info -l rubygem-passenger-apache | grep mod_passenger.so

/usr/local/lib/ruby/gems/2.4/gems/passenger-5.1.12/buildout/apache2/mod_passenger.so

Looking at the Makefile, I now think rubygem-passenger-nginx-5.1.12 has the right modules:

/usr/local/lib/ruby/gems/2.4/gems/passenger-5.1.12/buildout/ruby/ruby-2.4.3-x86_64-freebsd/Makefile 
/usr/local/lib/ruby/gems/2.4/gems/passenger-5.1.12/buildout/ruby/ruby-2.4.3-x86_64-freebsd/mkmf.log 
/usr/local/lib/ruby/gems/2.4/gems/passenger-5.1.12/buildout/ruby/ruby-2.4.3-x86_64-freebsd/passenger_native_support.o                                                                                            
/usr/local/lib/ruby/gems/2.4/gems/passenger-5.1.12/buildout/ruby/ruby-2.4.3-x86_64-freebsd/passenger_native_support.so

Oh, I should remove the OPTIONS and just use FLAVOR

I do not yet know how to make a default FLAVOR

In D13889#292319, @dvl wrote:

Oh, I should remove the OPTIONS and just use FLAVOR

I do not yet know how to make a default FLAVOR

The first flavor mentioned in 1 is always the default and doesn't need to be named as such. Example:

FLAVORS= nginx apache

In this case nginx would be the default flavor. Hope this helps.

[1] https://www.freebsd.org/doc/en/books/porters-handbook/flavors-using.html

[1] https://www.freebsd.org/doc/en/books/porters-handbook/flavors-using.html

Thank you. I'd been there and overlooked it. Cheers.

Next goal: get this to compile.

@nginx compiles, but has 8000 more files and than the original port.

apache does not compile yet.

Update to current WIP in coordination with dvl@

www/rubygem-passenger/Makefile
22 ↗(On Diff #38101)

I don't think this is required. The handbook is showing this to describe how the first flavor is determined.

30 ↗(On Diff #38101)

I'm not seeing DOCS being a option, why is it being excluded?

92–97 ↗(On Diff #38101)

This maybe an opportunity to create a flavor for nginx that enabled this module. Thoughts?

121 ↗(On Diff #38101)

This is changing from ${RAKE_BIN} nginx, can you please explain this change?

www/rubygem-passenger/Makefile
22 ↗(On Diff #38101)

This should be after the FLAVORS line. The first FLAVOR in the FLAVORS line determines the default FLAVOR.

Yes, thank you.

30 ↗(On Diff #38101)

There was a bug in the build system which caused DOCS to be built. This is a workaround.

See https://reviews.freebsd.org/D13953

92–97 ↗(On Diff #38101)

I think that's outside scope for what we are doing today.

www/rubygem-passenger/Makefile
121 ↗(On Diff #38101)

The upstream docs say you're only supposed to build the nginx module this way. It has extra safetybelts before it runs:

env NOEXEC_DISABLE=1 #{PlatformInfo.rake_command} nginx:clean nginx RELEASE=yes

This version builds correctly with no issues for both apache and nginx flavors

I also included a symlink to mod_passenger.so so users do not have to update their
apache configs whenever an updated version of passenger is installed.

This builds for me with without a flavor, with @apache, and with @nginx. All pass testport.

I have some further tests to run tomorrow morning.

Tests so far this morning are going well. If this continues, I plan to commit later today.

Added @osa as reviewer so their acceptance of the patch can allow us to proceed.

All tests so far are good. Going to be building to install locally here now.

Hi Dan,

I've just done with my builds of both flavors on my local machine, all looks good, good job!

This revision is now accepted and ready to land.Jan 18 2018, 11:48 PM
In D13889#293212, @osa wrote:

Hi Dan,

I've just done with my builds of both flavors on my local machine, all looks good, good job!

I understand portmgr@ approval is required for commiting new FLAVORS. I have emailed them for such approval before proceeding.

www/rubygem-passenger/Makefile
22 ↗(On Diff #38114)

Move this variable below the FLAVORS variable.

37–39 ↗(On Diff #38114)

Remove this.

dvl marked 2 inline comments as done.

Changes as requested by mat_

This revision now requires review to proceed.Jan 19 2018, 5:30 PM

Changes requested by mat are done.

mat added inline comments.
www/rubygem-passenger/Makefile
22 ↗(On Diff #38101)

The handbook was written after I added the Python flavors and before flavors were added to other ports. Setting FLAVOR makes it possible to avoid using ${FLAVOR:U${FLAVORS:[1]} everywhere we need to test the flavor.
It may need slight editing to get it to catch up with what is really done.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 22 2018, 7:12 PM
This revision was automatically updated to reflect the committed changes.