summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2013-07-21 08:48:37 +0000
committerHans de Graaff <graaff@gentoo.org>2013-07-21 08:48:37 +0000
commit9064bf03f7b06cd96d288327dd3523a01c294fc9 (patch)
treeb52779416424ae996e2920571ccdccfcd0cab07f /www-apache/passenger
parentCleanup due #92799 (diff)
downloadgentoo-2-9064bf03f7b06cd96d288327dd3523a01c294fc9.tar.gz
gentoo-2-9064bf03f7b06cd96d288327dd3523a01c294fc9.tar.bz2
gentoo-2-9064bf03f7b06cd96d288327dd3523a01c294fc9.zip
Version bump to 4.x series. Now supports multiple ruby implementations and has many other changes and bug fixes.
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
Diffstat (limited to 'www-apache/passenger')
-rw-r--r--www-apache/passenger/ChangeLog10
-rw-r--r--www-apache/passenger/files/30_mod_passenger-4.0.0.conf63
-rw-r--r--www-apache/passenger/files/passenger-4.0.10-gentoo.patch48
-rw-r--r--www-apache/passenger/metadata.xml3
-rw-r--r--www-apache/passenger/passenger-4.0.10.ebuild106
5 files changed, 229 insertions, 1 deletions
diff --git a/www-apache/passenger/ChangeLog b/www-apache/passenger/ChangeLog
index a400ad66f11d..f8f916831678 100644
--- a/www-apache/passenger/ChangeLog
+++ b/www-apache/passenger/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for www-apache/passenger
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/ChangeLog,v 1.65 2013/07/16 11:12:21 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/ChangeLog,v 1.66 2013/07/21 08:48:37 graaff Exp $
+
+*passenger-4.0.10 (21 Jul 2013)
+
+ 21 Jul 2013; Hans de Graaff <graaff@gentoo.org>
+ +files/30_mod_passenger-4.0.0.conf, +passenger-4.0.10.ebuild,
+ +files/passenger-4.0.10-gentoo.patch, metadata.xml:
+ Version bump to 4.x series. Now supports multiple ruby implementations and
+ has many other changes and bug fixes.
16 Jul 2013; Hans de Graaff <graaff@gentoo.org> -passenger-3.0.19.ebuild:
Cleanup.
diff --git a/www-apache/passenger/files/30_mod_passenger-4.0.0.conf b/www-apache/passenger/files/30_mod_passenger-4.0.0.conf
new file mode 100644
index 000000000000..f218b59ca412
--- /dev/null
+++ b/www-apache/passenger/files/30_mod_passenger-4.0.0.conf
@@ -0,0 +1,63 @@
+<IfDefine PASSENGER>
+LoadModule passenger_module modules/mod_passenger.so
+
+# The location to the Phusion Passenger root directory. This configuration
+# option is essential to Phusion Passenger. The correct value is given by the
+# installer, and should usually not be changed manually.
+PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
+
+# This option allows one to specify how much information Phusion Passenger
+# should write to the Apache error log file. A higher log level value means
+# that more information will be logged.
+#
+# Possible values are:
+#
+# 0: Show only errors and warnings.
+# 1: Show the most important debugging information. This might be useful for
+# system administrators who are trying to figure out the cause of a
+# problem.
+# 2: Show more debugging information. This is typically only useful for
+# developers.
+# 3: Show even more debugging information.
+PassengerLogLevel 0
+
+# This option specifies the default global version of Ruby to use.
+PassengerDefaultRuby /usr/bin/ruby
+
+# This option allows one to specify the Ruby interpreter to use for
+# specific instances.
+# PassengerRuby /usr/bin/ruby
+
+# The maximum number of Ruby on Rails application instances that may be
+# simultaneously active. A larger number results in higher memory usage, but
+# improved ability to handle concurrent HTTP clients.
+PassengerMaxPoolSize 20
+
+# The maximum number of seconds that a Ruby on Rails application instance may
+# be idle. That is, if an application instance hasn't done anything after the
+# given number of seconds, then it will be shutdown in order to conserve
+# memory.
+PassengerPoolIdleTime 120
+
+# The maximum number of application instances that may be simultaneously active
+# for a single application. This helps to make sure that a single application
+# will not occupy all available slots in the application pool.
+#
+# This value must be less than PassengerMaxPoolSize. A value of 0 means that
+# there is no limit placed on the number of instances a single application may
+# use, i.e. only the global limit of PassengerMaxPoolSize will be enforced.
+PassengerMaxInstancesPerApp 0
+
+# When the PassengerUserSwitching option is enabled a Rails application is started
+# as the owner of the file config/environment.rb. So if
+# /home/webapps/foo/config/environment.rb is owned by joe, then Passenger will
+# launch the corresponding Rails application as joe as well.
+PassengerUserSwitching On
+
+# Under no circumstances will Rails applications be run as root. If
+# environment.rb is owned by root or by an unknown user, then the Rails
+# application will run as the user specified by PassengerDefaultUser.
+PassengerDefaultUser apache
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/passenger/files/passenger-4.0.10-gentoo.patch b/www-apache/passenger/files/passenger-4.0.10-gentoo.patch
new file mode 100644
index 000000000000..808f988c7a72
--- /dev/null
+++ b/www-apache/passenger/files/passenger-4.0.10-gentoo.patch
@@ -0,0 +1,48 @@
+--- build/packaging.rb.~1~ 2013-07-09 10:10:02.000000000 +0200
++++ build/packaging.rb 2013-07-17 10:25:33.287663252 +0200
+@@ -184,7 +184,7 @@
+ require 'rbconfig'
+ require 'fileutils'
+ include RbConfig
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+--- build/packaging.rb.~1~ 2013-07-17 13:06:40.199882060 +0200
++++ build/packaging.rb 2013-07-17 13:18:31.444209611 +0200
+@@ -189,9 +189,9 @@
+ # We don't use CONFIG['archdir'] and the like because we want
+ # the files to be installed to /usr, and the Ruby interpreter
+ # on the packaging machine might be in /usr/local.
+- fake_rubylibdir = "#{fakeroot}/usr/lib/ruby/vendor_ruby"
++ fake_rubylibdir = "#{fakeroot}#{CONFIG['vendordir']}"
+ fake_libdir = "#{fakeroot}/usr/lib/passenger"
+- fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
++ fake_native_support_dir = "#{fakeroot}#{CONFIG['archdir']}"
+ fake_agents_dir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents"
+ fake_helper_scripts_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts"
+ fake_resources_dir = "#{fakeroot}/usr/share/passenger"
+--- build/packaging.rb.~1~ 2013-07-17 13:19:21.434826846 +0200
++++ build/packaging.rb 2013-07-17 13:21:42.954912287 +0200
+@@ -276,10 +276,6 @@
+ sh "cp bin/#{exe} #{fake_sbindir}/"
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{fake_apache2_module_dir}"
+- sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
+--- build/packaging.rb.~1~ 2013-07-17 13:25:51.440038844 +0200
++++ build/packaging.rb 2013-07-17 13:33:30.151365870 +0200
+@@ -203,7 +203,6 @@
+ fake_apache2_module = "#{fake_apache2_module_dir}/mod_passenger.so"
+ fake_ruby_extension_source_dir = "#{fakeroot}/usr/share/passenger/ruby_extension_source"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
diff --git a/www-apache/passenger/metadata.xml b/www-apache/passenger/metadata.xml
index 983f0ff025b1..91d489ce1e02 100644
--- a/www-apache/passenger/metadata.xml
+++ b/www-apache/passenger/metadata.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer>
+ <email>graaff@gentoo.org></email>
+ </maintainer>
<herd>ruby</herd>
<upstream>
<remote-id type="rubyforge">passenger</remote-id>
diff --git a/www-apache/passenger/passenger-4.0.10.ebuild b/www-apache/passenger/passenger-4.0.10.ebuild
new file mode 100644
index 000000000000..4d58c587a1cb
--- /dev/null
+++ b/www-apache/passenger/passenger-4.0.10.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/passenger-4.0.10.ebuild,v 1.1 2013/07/21 08:48:37 graaff Exp $
+
+EAPI=5
+USE_RUBY="ruby18 ruby19"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="http://modrails.com/"
+SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/daemon_controller-1.1.0
+ >=dev-ruby/rack-1.0.0"
+
+CDEPEND=">=dev-libs/libev-4.11 net-misc/curl[ssl]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-4.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-${PV}-gentoo.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "s/gcc/$(tc-getCC)/" \
+ -e "s/g++/$(tc-getCXX)/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ lib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version.
+ rm -rf ext/libev || die "Unable to remove vendored libev."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ sed -i -e 's/, :doc//' build/packaging.rb || die
+
+ # Use the correct arch-specific lib directory
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' build/packaging.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
+
+pkg_postint() {
+ einfo "The apache module is compiled for the currently eselected ruby."
+ einfo" If you eselect another ruby you must recompile passenger as well."
+}