From 98e3ece5e63915192637c4243bf42be3d5684727 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 5 Jun 2014 16:08:08 +0200 Subject: [PATCH] Initial import from http://pkgs.fedoraproject.org/cgit/rubygem-passenger.git/commit/?id=6be51f291f68e535e132decfad6f9dab3b80f4c8 . --- apache-passenger.conf.in | 19 + locations.ini | 13 + passenger.logrotate | 7 + passenger_dynamic_thread_group.patch | 16 + passenger_tests_default_config_example.patch | 44 ++ ...gem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch | 21 + rubygem-passenger-4.0.18-correct_docs.patch | 12 + ...-passenger-4.0.18-gcc47-include-sys_types.patch | 45 ++ rubygem-passenger-4.0.18_apache_fix_autofoo.patch | 12 + rubygem-passenger-4.0.18_native_dir.patch | 13 + ...em-passenger-4.0.18_remove_fastthread_dep.patch | 16 + rubygem-passenger.spec | 539 +++++++++++++++++++++ rubygem-passenger.tmpfiles | 1 + sources | 1 + 14 files changed, 759 insertions(+) create mode 100644 apache-passenger.conf.in create mode 100644 locations.ini create mode 100644 passenger.logrotate create mode 100644 passenger_dynamic_thread_group.patch create mode 100644 passenger_tests_default_config_example.patch create mode 100644 rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch create mode 100644 rubygem-passenger-4.0.18-correct_docs.patch create mode 100644 rubygem-passenger-4.0.18-gcc47-include-sys_types.patch create mode 100644 rubygem-passenger-4.0.18_apache_fix_autofoo.patch create mode 100644 rubygem-passenger-4.0.18_native_dir.patch create mode 100644 rubygem-passenger-4.0.18_remove_fastthread_dep.patch create mode 100644 rubygem-passenger.spec create mode 100644 rubygem-passenger.tmpfiles create mode 100644 sources diff --git a/apache-passenger.conf.in b/apache-passenger.conf.in new file mode 100644 index 0000000..9eaea1a --- /dev/null +++ b/apache-passenger.conf.in @@ -0,0 +1,19 @@ +LoadModule passenger_module modules/mod_passenger.so + + PassengerRoot @PASSENGERROOT@ + PassengerRuby /usr/bin/ruby + + +# Deploying a Ruby on Rails application: an example + +# Suppose you have a Rails application in /somewhere. Add a virtual host to +# your Apache configuration file and set its DocumentRoot to /somewhere/public: +# +# +# ServerName www.yourhost.com +# DocumentRoot /somewhere/public # <-- be sure to point to 'public'! +# +# AllowOverride all # <-- relax Apache security settings +# Options -MultiViews # <-- MultiViews must be turned off +# +# diff --git a/locations.ini b/locations.ini new file mode 100644 index 0000000..bb51b3c --- /dev/null +++ b/locations.ini @@ -0,0 +1,13 @@ +[locations] +natively_packaged=true +bin_dir=@BINDIR@ +agents_dir=@GEM_EXTDIR@/agents +helper_scripts_dir=@GEM_INSTDIR@/helper-scripts +resources_dir=@GEM_INSTDIR@/resources +doc_dir=@GEM_DOCDIR@ +ruby_libdir=@GEM_INSTDIR@/.. +lib_dir=@GEM_INSTDIR@/lib +include_dir=@GEM_INSTDIR@/include +apache2_module_path=@HTTPD_MODDIR@ +ruby_extension_source_dir=@GEM_INSTDIR@/ruby_extension_source +nginx_module_source_dir=@GEM_INSTDIR@/ngx_http_passenger_module diff --git a/passenger.logrotate b/passenger.logrotate new file mode 100644 index 0000000..a6cc52b --- /dev/null +++ b/passenger.logrotate @@ -0,0 +1,7 @@ +/var/log/passenger-analytics/*.log { + missingok + notifempty + sharedscripts + compress + delaycompress +} diff --git a/passenger_dynamic_thread_group.patch b/passenger_dynamic_thread_group.patch new file mode 100644 index 0000000..134a304 --- /dev/null +++ b/passenger_dynamic_thread_group.patch @@ -0,0 +1,16 @@ +diff --git a/test/oxt/dynamic_thread_group_test.cpp b/test/oxt/dynamic_thread_group_test.cpp +index 003b7ef..5a90463 100644 +--- a/test/oxt/dynamic_thread_group_test.cpp ++++ b/test/oxt/dynamic_thread_group_test.cpp +@@ -103,9 +103,9 @@ namespace tut { + } + + static void create_threads(dynamic_thread_group *group) { +- for (int i = 1000; i >= 0; i--) { ++ for (int i = 100; i >= 0; i--) { + boost::function f(boost::bind(do_nothing, i * 1000)); +- group->create_thread(f, "", 256 * 1024); ++ group->create_thread(f, "", 8 * 1024); + } + } + diff --git a/passenger_tests_default_config_example.patch b/passenger_tests_default_config_example.patch new file mode 100644 index 0000000..0615303 --- /dev/null +++ b/passenger_tests_default_config_example.patch @@ -0,0 +1,44 @@ +diff -up ./test/config.json.example.lindefault ./test/config.json.example +--- ./test/config.json.example.lindefault 2013-05-30 16:04:41.206533618 +0200 ++++ ./test/config.json.example 2013-05-30 16:04:34.070449358 +0200 +@@ -10,24 +10,24 @@ + // otherwise the tests will fail. + + //// Good values for OS X: +- "normal_user_1": "_www", +- "normal_user_2": "daemon", +- // Must not be "nobody". +- "default_user": "_sandbox", +- // Must not be normal_user_1's primary group. +- "normal_group_1": "daemon", +- // Must not be normal_user_2's primary group. +- "normal_group_2": "_sandbox", +- // Must not be default_user's primary group. Must not be "nobody". +- "default_group": "_www", +- +- ///// Good values for Linux and FreeBSD. Same restrictions apply. +- //"normal_user_1": "games", ++ //"normal_user_1": "_www", + //"normal_user_2": "daemon", +- //"default_user": "man", ++ //// Must not be "nobody". ++ //"default_user": "_sandbox", ++ //// Must not be normal_user_1's primary group. + //"normal_group_1": "daemon", +- //"normal_group_2": "man", +- //"default_group": "games", ++ //// Must not be normal_user_2's primary group. ++ //"normal_group_2": "_sandbox", ++ //// Must not be default_user's primary group. Must not be "nobody". ++ //"default_group": "_www", ++ ++ ///// Good values for Linux and FreeBSD. Same restrictions apply. ++ "normal_user_1": "games", ++ "normal_user_2": "daemon", ++ "default_user": "man", ++ "normal_group_1": "daemon", ++ "normal_group_2": "man", ++ "default_group": "games", + + // A nonexistant username, group name, user ID and group ID. + "nonexistant_user": "xxxxxxxxxxxxxxxxxxx", diff --git a/rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch b/rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch new file mode 100644 index 0000000..cb76bdf --- /dev/null +++ b/rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch @@ -0,0 +1,21 @@ +diff -urp passenger-release-4.0.18.orig/ext/boost/cstdint.hpp passenger-release-4.0.18/ext/boost/cstdint.hpp +--- passenger-release-4.0.18.orig/ext/boost/cstdint.hpp 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/ext/boost/cstdint.hpp 2013-09-23 16:34:02.074450639 -0500 +@@ -41,7 +41,15 @@ + // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. + // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 + // +-#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) ++// This define has been dropped altogether in GLIBC 2.17. As of then, ++// support for long long is part of baseline requirements, and ++// [u]int64_t is always defined. See here: ++// http://sourceware.org/ml/libc-alpha/2013-01/msg00440.html ++// ++#if defined(BOOST_HAS_STDINT_H) \ ++ && (!defined(__GLIBC__) \ ++ || defined(__GLIBC_HAVE_LONG_LONG) \ ++ || (defined __GLIBC_PREREQ && __GLIBC_PREREQ(2,17))) + + // The following #include is an implementation artifact; not part of interface. + # ifdef __hpux +Only in passenger-release-4.0.18/ext/boost: cstdint.hpp.glibc-long diff --git a/rubygem-passenger-4.0.18-correct_docs.patch b/rubygem-passenger-4.0.18-correct_docs.patch new file mode 100644 index 0000000..dd98a5b --- /dev/null +++ b/rubygem-passenger-4.0.18-correct_docs.patch @@ -0,0 +1,12 @@ +diff -urp passenger-release-4.0.18.orig/lib/phusion_passenger/packaging.rb passenger-release-4.0.18/lib/phusion_passenger/packaging.rb +--- passenger-release-4.0.18.orig/lib/phusion_passenger/packaging.rb 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/lib/phusion_passenger/packaging.rb 2013-09-24 14:42:54.126310781 -0500 +@@ -36,7 +36,7 @@ module Packaging + # Files that must be generated before packaging. + PREGENERATED_FILES = [ + 'ext/common/Constants.h', +- 'doc/Packaging.html' ++ 'doc/Packaging.txt.md' + ] + ASCII_DOCS + + USER_EXECUTABLES = [ diff --git a/rubygem-passenger-4.0.18-gcc47-include-sys_types.patch b/rubygem-passenger-4.0.18-gcc47-include-sys_types.patch new file mode 100644 index 0000000..2be2151 --- /dev/null +++ b/rubygem-passenger-4.0.18-gcc47-include-sys_types.patch @@ -0,0 +1,45 @@ +diff -urp passenger-release-4.0.18.orig/ext/common/EventedMessageServer.h passenger-release-4.0.18/ext/common/EventedMessageServer.h +--- passenger-release-4.0.18.orig/ext/common/EventedMessageServer.h 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/ext/common/EventedMessageServer.h 2013-09-23 13:59:23.012484647 -0500 +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + #include + #include +diff -urp passenger-release-4.0.18.orig/ext/common/FileDescriptor.h passenger-release-4.0.18/ext/common/FileDescriptor.h +--- passenger-release-4.0.18.orig/ext/common/FileDescriptor.h 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/ext/common/FileDescriptor.h 2013-09-23 13:59:23.013484647 -0500 +@@ -30,6 +30,7 @@ + #include + + #include ++#include + #include + #include + +diff -urp passenger-release-4.0.18.orig/ext/common/Utils/BufferedIO.h passenger-release-4.0.18/ext/common/Utils/BufferedIO.h +--- passenger-release-4.0.18.orig/ext/common/Utils/BufferedIO.h 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/ext/common/Utils/BufferedIO.h 2013-09-23 13:59:23.014484646 -0500 +@@ -1,6 +1,7 @@ + #ifndef _PASSENGER_BUFFERED_IO_H_ + #define _PASSENGER_BUFFERED_IO_H_ + ++#include + #include + #include + #include +diff -urp passenger-release-4.0.18.orig/ext/common/Utils/StreamBoyerMooreHorspool.h passenger-release-4.0.18/ext/common/Utils/StreamBoyerMooreHorspool.h +--- passenger-release-4.0.18.orig/ext/common/Utils/StreamBoyerMooreHorspool.h 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/ext/common/Utils/StreamBoyerMooreHorspool.h 2013-09-23 13:59:23.015484645 -0500 +@@ -189,7 +189,7 @@ + #endif + #endif + +- ++#include + #include + #include + #include diff --git a/rubygem-passenger-4.0.18_apache_fix_autofoo.patch b/rubygem-passenger-4.0.18_apache_fix_autofoo.patch new file mode 100644 index 0000000..dfe51ad --- /dev/null +++ b/rubygem-passenger-4.0.18_apache_fix_autofoo.patch @@ -0,0 +1,12 @@ +diff -urp passenger-release-4.0.18.orig/build/basics.rb passenger-release-4.0.18/build/basics.rb +--- passenger-release-4.0.18.orig/build/basics.rb 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/build/basics.rb 2013-09-23 16:11:12.926455965 -0500 +@@ -138,7 +138,7 @@ LIBEXT = PlatformInfo.library_extensio + USE_DMALLOC = boolean_option('USE_DMALLOC') + USE_EFENCE = boolean_option('USE_EFENCE') + USE_ASAN = boolean_option('USE_ASAN') +-OPTIMIZATION_FLAGS = "#{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon".strip ++OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']} #{PlatformInfo.debugging_cflags} -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon".strip + OPTIMIZATION_FLAGS << " -O" if OPTIMIZE + OPTIMIZATION_FLAGS << " -feliminate-unused-debug-symbols -feliminate-unused-debug-types" if PlatformInfo.compiler_supports_feliminate_unused_debug? + OPTIMIZATION_FLAGS << " -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED" if PlatformInfo.compiler_supports_visibility_flag? diff --git a/rubygem-passenger-4.0.18_native_dir.patch b/rubygem-passenger-4.0.18_native_dir.patch new file mode 100644 index 0000000..6354249 --- /dev/null +++ b/rubygem-passenger-4.0.18_native_dir.patch @@ -0,0 +1,13 @@ +diff --git a/lib/phusion_passenger/native_support.rb b/lib/phusion_passenger/native_support.rb +index 994c379..d2b84fc 100644 +--- a/lib/phusion_passenger/native_support.rb ++++ b/lib/phusion_passenger/native_support.rb +@@ -113,7 +113,7 @@ private + end + + def load_from_load_path +- require 'passenger_native_support' ++ require "%%NATIVE_SUPPORT_DIR%%/native/#{library_name}" + return true + rescue LoadError + return false diff --git a/rubygem-passenger-4.0.18_remove_fastthread_dep.patch b/rubygem-passenger-4.0.18_remove_fastthread_dep.patch new file mode 100644 index 0000000..3517f2e --- /dev/null +++ b/rubygem-passenger-4.0.18_remove_fastthread_dep.patch @@ -0,0 +1,16 @@ +diff -urp passenger-release-4.0.18.orig/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb passenger-release-4.0.18/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb +--- passenger-release-4.0.18.orig/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb 2013-09-17 13:47:54.000000000 -0500 ++++ passenger-release-4.0.18/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb 2013-09-23 16:27:59.963267382 -0500 +@@ -1,11 +1,3 @@ +-define 'fastthread' do +- name 'fastthread' +- define_checker do +- check_for_ruby_library('fastthread') +- end +- gem_install 'fastthread' +-end +- + define 'rack' do + name 'rack' + define_checker do +Only in passenger-release-4.0.18/lib/phusion_passenger/platform_info/depcheck_specs: gems.rb.fastthread diff --git a/rubygem-passenger.spec b/rubygem-passenger.spec new file mode 100644 index 0000000..2d27d58 --- /dev/null +++ b/rubygem-passenger.spec @@ -0,0 +1,539 @@ +%global gem_name passenger + +%if 0%{?fedora} >= 19 +%global gem_extdir %{gem_extdir_mri} +%endif + +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} + +Summary: Passenger Ruby web application server +Name: rubygem-%{gem_name} +Version: 4.0.18 +Release: 7%{?dist} +Group: System Environment/Daemons +# Passenger code uses MIT license. +# Bundled(Boost) uses Boost Software License +# BCrypt and Blowfish files use BSD license. +# Documentation is CC-BY-SA +# See: https://bugzilla.redhat.com/show_bug.cgi?id=470696#c146 +License: Boost and BSD and BSD with advertising and MIT and zlib + +URL: http://www.modrails.com +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Source: https://github.com/FooBarWidget/passenger/archive/release-%{version}.tar.gz +Source1: passenger.logrotate +Source2: rubygem-passenger.tmpfiles +Source10: apache-passenger.conf.in +Source11: locations.ini + +# Include sys/types.h for GCC 4.7 +Patch2: rubygem-passenger-4.0.18-gcc47-include-sys_types.patch + +# Make example config for tests ready for linux by default +Patch4: passenger_tests_default_config_example.patch + +# Honor CXXFLAGS in the environment. +Patch100: rubygem-passenger-4.0.18_apache_fix_autofoo.patch + +# Test tries to spawn 1000 threads with 256kb stacks. Default Linux settings +# deny allocating so much, causing test to fail. Let's use 8kb stacks instead. +Patch102: passenger_dynamic_thread_group.patch + +# Remove checking for fastthread on F17+ +Patch104: rubygem-passenger-4.0.18_remove_fastthread_dep.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=985634 +Patch107: rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch + +# Until rubygem-bluecloth is in Fedora, don't use it +Patch201: rubygem-passenger-4.0.18-correct_docs.patch + +# Load native library from proper directory +Patch202: rubygem-passenger-4.0.18_native_dir.patch + +Requires: rubygems +# XXX: Needed to run passenger standalone +Requires: rubygem(daemon_controller) >= 1.0.0 +Requires: rubygem(rack) +Requires: rubygem(rake) +%if 0%{?fedora} >= 19 +Requires: ruby(release) +%else +Requires: ruby(abi) = 1.9.1 +%endif + +%if 0%{?rhel} >= 6 || 0%{?fedora} >= 15 +BuildRequires: libcurl-devel +%else +BuildRequires: curl-devel +%endif + +%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 +Requires: rubygem(fastthread) >= 1.0.1 +BuildRequires: rubygem(fastthread) >= 1.0.1 +%endif + +BuildRequires: asciidoc +BuildRequires: boost-devel +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: httpd-devel +BuildRequires: libev-devel +BuildRequires: ruby +BuildRequires: ruby-devel +BuildRequires: rubygems +BuildRequires: rubygems-devel +BuildRequires: rubygem(rake) >= 0.8.1 +BuildRequires: rubygem(rack) +BuildRequires: rubygem(rspec) +BuildRequires: rubygem(mime-types) +BuildRequires: source-highlight + +# XXX +BuildRequires: zlib-devel + +Provides: rubygem(%{gem_name}) = %{version}-%{release} +Provides: bundled(boost) = 1.44 + +%description +Phusion Passenger™ — a.k.a. mod_rails or mod_rack — makes deployment +of Ruby web applications, such as those built on the revolutionary +Ruby on Rails web framework, a breeze. It follows the usual Ruby on +Rails conventions, such as “Don’t-Repeat-Yourself”. + +%package -n mod_passenger +Summary: Apache Module for Phusion Passenger +Group: System Environment/Daemons +BuildRequires: httpd-devel +Requires: httpd-mmn = %{_httpd_mmn} +Requires: rubygem(%{gem_name}) = %{version}-%{release} +Requires: %{name}-native%{?_isa} = %{version}-%{release} +License: Boost and BSD and BSD with advertising and MIT and zlib + +%description -n mod_passenger +This package contains the pluggable Apache server module for Phusion Passenger™. + +%package devel +Summary: Apache Module for Phusion Passenger +Group: System Environment/Daemons +Requires: rubygem(%{gem_name}) = %{version}-%{release} +Provides: bundled(boost-devel) = 1.44 +License: Boost and BSD and BSD with advertising and GPL+ and MIT and zlib + +%description devel +This package contains development files for Phusion Passenger™. + +%package doc +Summary: Apache Module for Phusion Passenger +Group: System Environment/Daemons +Requires: rubygem(%{gem_name}) = %{version}-%{release} +BuildArch: noarch +License: CC-BY-SA and MIT and (MIT or GPL+) + +%description doc +This package contains documentation files for Phusion Passenger™. + +%package native +Summary: Phusion Passenger native extensions +Group: System Environment/Daemons +Requires: rubygem(%{gem_name}) = %{version}-%{release} +Requires: %{name}-native-libs%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +License: Boost and BSD and BSD with advertising and MIT and zlib +%description native +This package contains the native code extensions for Apache & Nginx +Phusion Passenger™ bindings. + +%package native-libs +Summary: Phusion Passenger native extensions +Group: System Environment/Daemons +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: ruby +License: Boost and BSD and BSD with advertising and MIT and zlib +%description native-libs +This package contains the native shared library for Apache & Nginx +Phusion Passenger™ bindings, built against ruby sources. It has been +separated so that installing a new ruby interpreter only necessitates +rebuilding this package. + + +%prep +%setup -q -n %{gem_name}-release-%{version} + +%patch2 -p1 -b .include-sys-types +%patch4 -p1 -b .lindefault +%patch100 -p1 -b .autofoo +%patch102 -p1 -b .threadtest + +# remove fastthread checking +%if 0%{?fedora} >= 17 +%patch104 -p1 -b .fastthread +%endif + +# fix passenger boost for glibc >= 2.18 +%if 0%{?fedora} >= 20 +%patch107 -p1 -b .glibc-long +%endif + +# Until bluecloth is in Fedora, don't use it +%patch201 -p1 -b .docs +%patch202 -p1 -b .nativedir + +# Don't use bundled libev +%{__rm} -rf ext/libev + +# asciidoc 8.4.x doesn't have an html5 backend +%{__sed} -i 's/-b html5/-b html4/' build/documentation.rb + +# fix up install paths +%{__sed} -i \ + -e 's|%%%%GEM_INSTALL_DIR%%%%|%{gem_instdir}|g' \ + -e 's|%%%%APACHE_INSTALLED_MOD%%%%|%{_httpd_moddir}|g' \ + -e 's|%%%%AGENTS_DIR%%%%|%{gem_extdir}/agents|g' \ + -e 's|%%%%NATIVE_SUPPORT_DIR%%%%|%{gem_extdir}/lib|g' \ + lib/phusion_passenger.rb \ + lib/phusion_passenger/native_support.rb \ + ext/common/ResourceLocator.h + +# Fix anything executable that does not have a hash-bang +# Why are there executable header files? WTF. +for script in `find . -type f -perm /a+x -name "*.rb" -o -perm /a+x -name "*.h"`; do + [ -z "`head -n 1 $script | grep \"^#!/\"`" ] && chmod -v 644 $script +done + +# Find files with a hash-bang that do not have executable permissions +for script in `find . -type f ! -perm /a+x -name "*.rb"`; do + [ ! -z "`head -n 1 $script | grep \"^#!/\"`" ] && chmod -v 755 $script +done + +%build +export USE_VENDORED_LIBEV=false +CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; +CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; +FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; + +rake package:gem SKIP_SIGNING=1 +rake apache2 +#rake nginx + +%install +export USE_VENDORED_LIBEV=false + +# Install the gem. +gem install -V \ + --local \ + --install-dir %{buildroot}%{gem_dir} \ + --bindir %{buildroot}%{_bindir} \ + --force \ + --rdoc \ + pkg/%{gem_name}-%{version}.gem + +# Install locations.ini +install -pm 0644 %{SOURCE11} %{buildroot}%{gem_instdir}/lib/phusion_passenger/ +%{__sed} -i 's|@BINDIR@|%{_bindir}|' %{buildroot}%{gem_instdir}/lib/phusion_passenger/locations.ini +%{__sed} -i 's|@GEM_EXTDIR@|%{gem_extdir}|' %{buildroot}%{gem_instdir}/lib/phusion_passenger/locations.ini +%{__sed} -i 's|@GEM_INSTDIR@|%{gem_instdir}|' %{buildroot}%{gem_instdir}/lib/phusion_passenger/locations.ini +%{__sed} -i 's|@GEM_DOCDIR@|%{gem_docdir}|' %{buildroot}%{gem_instdir}/lib/phusion_passenger/locations.ini +%{__sed} -i 's|@HTTPD_MODDIR@|%{_httpd_moddir}|' %{buildroot}%{gem_instdir}/lib/phusion_passenger/locations.ini + + +# Install Apache module. +%{__mkdir_p} %{buildroot}/%{_httpd_moddir} +install -pm 0755 buildout/apache2/mod_passenger.so %{buildroot}/%{_httpd_moddir} + +# Install Apache config. +%{__mkdir_p} %{buildroot}%{_httpd_confdir} %{buildroot}%{_httpd_modconfdir} +%{__sed} -e 's|@PASSENGERROOT@|%{gem_instdir}/lib/phusion_passenger/locations.ini|g' %{SOURCE10} > passenger.conf + +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" +%{__sed} -n /^LoadModule/p passenger.conf > 10-passenger.conf +%{__sed} -i /^LoadModule/d passenger.conf +touch -r %{SOURCE10} 10-passenger.conf +install -pm 0644 10-passenger.conf %{buildroot}%{_httpd_modconfdir}/passenger.conf +%endif +touch -r %{SOURCE10} passenger.conf +install -pm 0644 passenger.conf %{buildroot}%{_httpd_confdir}/passenger.conf + +# Install man pages into the proper location. +%{__mkdir_p} %{buildroot}%{_mandir}/man1 +%{__mkdir_p} %{buildroot}%{_mandir}/man8 +%{__mv} %{buildroot}%{gem_instdir}/man/*.1 %{buildroot}%{_mandir}/man1 +%{__mv} %{buildroot}%{gem_instdir}/man/*.8 %{buildroot}%{_mandir}/man8 +rmdir %{buildroot}%{gem_instdir}/man + +# The agents aren't in the gem for some reason... +%{__chmod} -R 0755 buildout/agents/* +%{__mkdir_p} %{buildroot}%{gem_extdir} +%{__cp} -a buildout/agents %{buildroot}%{gem_extdir} +%{__rm} -f %{buildroot}%{gem_extdir}/agents/*.o + +# Make our ghost log and run directories... +%{__mkdir_p} %{buildroot}%{_localstatedir}/log/passenger-analytics + +# logrotate +%{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d +install -pm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/passenger + +# tmpfiles.d +%if 0%{?fedora} > 15 +%{__mkdir_p} %{buildroot}/run +%{__mkdir_p} %{buildroot}%{_prefix}/lib/tmpfiles.d +install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf +install -d -m 0755 %{buildroot}/run/%{name} +%else +%{__mkdir_p} %{buildroot}%{_localstatedir}/run/%{name} +%endif + +# Fix wrong EOF encoding on the RI files... +for file in `find %{buildroot}%{gem_docdir} -type f -name "*.ri"`; do + sed -i 's/\r//' $file +done + +# Bring over just the native binaries +%{__mkdir_p} %{buildroot}%{gem_extdir}/lib/native +install -m 0755 buildout/ruby/ruby*linux/passenger_native_support.so %{buildroot}%{gem_extdir}/lib/native + +# Remove zero-length and non-needed files +find %{buildroot}%{gem_instdir} -type f -size 0c -delete +%{__rm} -rf %{buildroot}%{gem_instdir}/.gitignore +%{__rm} -rf %{buildroot}%{gem_instdir}/.yardoc +%{__rm} -rf %{buildroot}%{gem_instdir}/rpm/ + + +# Don't install the installation scripts and Rakefile. That's why we have packaging. +%{__rm} %{buildroot}%{gem_instdir}/bin/%{gem_name}-install-apache2-module +%{__rm} %{buildroot}%{gem_instdir}/bin/%{gem_name}-install-nginx-module +%{__rm} %{buildroot}%{_bindir}/%{gem_name}-install-apache2-module +%{__rm} %{buildroot}%{_bindir}/%{gem_name}-install-nginx-module +%{__rm} %{buildroot}%{gem_instdir}/Rakefile + +%check +export USE_VENDORED_LIBEV=false +# Run the tests, capture the output, but don't fail the build if the tests fail +# +# This will make the test failure non-critical, but it should be examined +# anyway. +sed -i 's|sh "cd test && \./cxx/CxxTestMain"|& rescue true|' \ + build/cxx_tests.rb + +# Fedora has RSpec 2 while the test suite seems to require RSpec 1. +sed -i \ + "s|return locate_ruby_tool('spec')|return locate_ruby_tool('rspec')|" \ + lib/phusion_passenger/platform_info/ruby.rb + +%{__cp} test/config.json.example test/config.json + +rake test --trace ||: + +%files +%doc %{gem_instdir}/README.md +%doc %{gem_instdir}/CONTRIBUTING.md +%doc %{gem_instdir}/CONTRIBUTORS +%doc %{gem_instdir}/LICENSE +%doc %{gem_instdir}/NEWS +%{gem_cache} +%{gem_spec} +%dir %{gem_instdir} +%{gem_instdir}/bin +%{gem_instdir}/helper-scripts +%{gem_instdir}/lib +%{gem_instdir}/passenger.gemspec +%{gem_instdir}/resources +%{gem_instdir}/.travis.yml +%{_bindir}/%{gem_name}* +%{_mandir}/man1/%{gem_name}-* +%{_mandir}/man8/%{gem_name}-* +%if 0%{?fedora} > 15 +%{_prefix}/lib/tmpfiles.d/%{name}.conf +%dir /run/rubygem-passenger +%else +%dir %{_localstatedir}/run/rubygem-passenger +%endif +%exclude %{gem_instdir}/configure +%exclude %{gem_instdir}/debian.template/ +%exclude %{gem_cache} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/doc + +%files devel +%doc %{gem_instdir}/INSTALL.md +%{gem_instdir}/test +%{gem_instdir}/build +%{gem_instdir}/dev +%{gem_instdir}/ext + +%files -n mod_passenger +%config(noreplace) %{_httpd_modconfdir}/*.conf +%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" +%config(noreplace) %{_httpd_confdir}/*.conf +%endif +%doc doc/Users?guide?Apache.txt +%{_httpd_moddir}/mod_passenger.so + +%files native +%{gem_extdir}/agents +%dir %{_localstatedir}/log/passenger-analytics +%{_sysconfdir}/logrotate.d/passenger + +%files native-libs +%dir %{gem_extdir} +%{gem_extdir}/lib + +%changelog +* Fri May 23 2014 Petr Machata - 4.0.18-7 +- Rebuild for boost 1.55.0 + +* Fri May 02 2014 Jan Kaluza - 4.0.18-6 +- rebuild because of new ruby + +* Thu Jan 23 2014 Joe Orton - 4.0.18-5 +- fix _httpd_mmn expansion in absence of httpd-devel + +* Thu Nov 14 2013 Jan Kaluza - 4.0.18-4 +- load native library from proper path + +* Thu Oct 31 2013 Jan Kaluza - 4.0.18-3 +- fix #1021940 - add locations.ini with proper Fedora locations + +* Wed Sep 25 2013 Troy Dawson - 4.0.18-2 +- Cleanup spec file +- Fix for bz#987879 + +* Tue Sep 24 2013 Troy Dawson - 4.0.18-1 +- Update to 4.0.18 +- Remove patches no longer needed +- Update patches that need updating + +* Mon Sep 23 2013 Brett Lentz - 3.0.21-9 +- finish fixing bz#999384 + +* Fri Sep 20 2013 Joe Orton - 3.0.21-8 +- update packaging for httpd 2.4.x + +* Thu Sep 19 2013 Troy Dawson - 3.0.21-7 +- Fix for F20 FTBFS (#993310) + +* Thu Aug 22 2013 Brett Lentz - 3.0.21-6 +- bz#999384 + +* Sun Aug 04 2013 Fedora Release Engineering - 3.0.21-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jul 18 2013 Troy Dawson - 3.0.21-4 +- Fix for CVE-2013-4136 (#985634) + +* Fri Jun 21 2013 Troy Dawson - 3.0.21-3 +- Putting the agents back to where they originally were + +* Fri Jun 21 2013 Troy Dawson - 3.0.21-2 +- Remove Rakefile (only used for building) (#976843) + +* Thu May 30 2013 Troy Dawson - 3.0.21-1 +- Update to version 3.0.21 +- Fix for CVE-2013-2119 + +* Thu May 16 2013 Troy Dawson - 3.0.19-4 +- Fix to make agents work on F19+ + +* Wed Mar 13 2013 Troy Dawson - 3.0.19-3 +- Fix to make it build/install on F19+ +- Added patch105 + +* Thu Feb 14 2013 Fedora Release Engineering - 3.0.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jan 20 2013 Orion Poplawski - 3.0.19-1 +- Update to 3.0.19 + +* Wed Sep 19 2012 Orion Poplawski - 3.0.17-3 +- Drop dependency on rubygem(file-tail), no longer needed + +* Fri Sep 7 2012 Brett Lentz - 3.0.17-2 +- Fix License + +* Thu Sep 6 2012 Brett Lentz - 3.0.17-1 +- update to 3.0.17 + +* Wed Sep 5 2012 Brett Lentz - 3.0.14-15 +- add support for tmpfiles.d + +* Tue Sep 4 2012 Brett Lentz - 3.0.14-14 +- Fix License tag +- Fix gem_extdir ownership issue + +* Wed Aug 29 2012 Brett Lentz - 3.0.14-13 +- fix pathing issues +- fix ruby abi requires + +* Wed Aug 29 2012 Brett Lentz - 3.0.14-12 +- remove capability for running passenger standalone until daemon_controller is updated + +* Tue Aug 28 2012 Brett Lentz - 3.0.14-11 +- fix issues with fastthread + +* Mon Aug 27 2012 Brett Lentz - 3.0.14-10 +- get test suite sort of working +- move agents to gem_extdir + +* Fri Aug 24 2012 Brett Lentz - 3.0.14-9 +- stop using _bindir +- fix native libs path +- fix ownership on extdir +- improve test output + +* Wed Aug 22 2012 Brett Lentz - 3.0.14-8 +- removed policycoreutils requirement +- moved native libs to gem_extdir + +* Wed Aug 22 2012 Brett Lentz - 3.0.14-7 +- remove selinux policy module. it's in the base policy now. + +* Fri Aug 17 2012 Brett Lentz - 3.0.14-6 +- put native-libs into ruby_vendorarchdir. + +* Thu Aug 16 2012 Brett Lentz - 3.0.14-5 +- clean up packaging and file placement. +- add logrotate file for /var/log/passenger-analytics + +* Wed Aug 15 2012 Brett Lentz - 3.0.14-4 +- backported fix only needed on f18+ + +* Wed Aug 15 2012 Brett Lentz - 3.0.14-3 +- backport fix from https://svn.boost.org/trac/boost/ticket/6940 + +* Mon Aug 13 2012 Brett Lentz - 3.0.14-2 +- remove F15 conditional. F15 is EOL. + +* Fri Jul 27 2012 Troy Dawson - 3.0.14-1 +- Updated to version 3.0.14 + +* Fri Jul 27 2012 Troy Dawson - 3.0.12-6 +- Added patch20, spawn-ip +- Changed selinux files to be more dynamic + +* Tue Jun 05 2012 Troy Dawson - 3.0.12-5 +- Add all the selinux files + +* Tue Jun 05 2012 Troy Dawson - 3.0.12-4 +- Added selinux configurations + +* Tue Jun 05 2012 Troy Dawson - 3.0.12-3 +- Added native and native-libs rpms. + +* Mon Apr 16 2012 Brett Lentz - 3.0.12-2 +- Add dist to release. +- Shuffle around deprecated buildrequires and requires. + +* Mon Apr 16 2012 Brett Lentz - 3.0.12-1 +- Update to 3.0.12 +- Incorporate specfile changes from kanarip's version + +* Wed Apr 11 2012 Brett Lentz - 3.0.11-1 +- Initial spec file diff --git a/rubygem-passenger.tmpfiles b/rubygem-passenger.tmpfiles new file mode 100644 index 0000000..6ba4472 --- /dev/null +++ b/rubygem-passenger.tmpfiles @@ -0,0 +1 @@ +d /run/passenger 0755 root root - diff --git a/sources b/sources new file mode 100644 index 0000000..01b5436 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +8ddbc3fae662f04bf6996aaed16d42ff release-4.0.18.tar.gz -- 1.8.2.3