From 7b630d90fe4b2a913a47c68d21019fe3feebd07b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 5 Jun 2014 16:11:06 +0200 Subject: [PATCH] Merge master to EPEL 6, add neccessary modifications for EPEL 6: - update version to 4.0.42 - node_libdir in locations.ini - removed patches: autofoo, native locations - dirty hack to build documentation --- locations.ini | 1 + rubygem-passenger-4.0.18_apache_fix_autofoo.patch | 12 ----- rubygem-passenger-4.0.18_native_dir.patch | 13 ----- rubygem-passenger.spec | 58 +++++++++++++++-------- 4 files changed, 40 insertions(+), 44 deletions(-) delete mode 100644 rubygem-passenger-4.0.18_apache_fix_autofoo.patch delete mode 100644 rubygem-passenger-4.0.18_native_dir.patch diff --git a/locations.ini b/locations.ini index bb51b3c..bb62784 100644 --- a/locations.ini +++ b/locations.ini @@ -11,3 +11,4 @@ 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 +node_libdir=@GEM_INSTDIR@/node_lib diff --git a/rubygem-passenger-4.0.18_apache_fix_autofoo.patch b/rubygem-passenger-4.0.18_apache_fix_autofoo.patch deleted file mode 100644 index dfe51ad..0000000 --- a/rubygem-passenger-4.0.18_apache_fix_autofoo.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 6354249..0000000 --- a/rubygem-passenger-4.0.18_native_dir.patch +++ /dev/null @@ -1,13 +0,0 @@ -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.spec b/rubygem-passenger.spec index 2d27d58..c89dd2f 100644 --- a/rubygem-passenger.spec +++ b/rubygem-passenger.spec @@ -1,5 +1,15 @@ %global gem_name passenger +# From rubygem-devel rpm macros, not present in EL6 +%if 0%{?rhel} < 7 || 0%{?fedora} < 16 +%{!?gem_dir:%global gem_dir %{_prefix}/lib/ruby/gems/1.8} +%{!?gem_instdir:%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}} +%{!?gem_cache:%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem} +%{!?gem_spec:%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec} +%{!?gem_docdir:%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}} +%{!?gem_extdir:%global gem_extdir %{_libdir}/gems/exts/%{gem_name}-%{version}} +%endif + %if 0%{?fedora} >= 19 %global gem_extdir %{gem_extdir_mri} %endif @@ -12,8 +22,8 @@ Summary: Passenger Ruby web application server Name: rubygem-%{gem_name} -Version: 4.0.18 -Release: 7%{?dist} +Version: 4.0.42 +Release: 1%{?dist} Group: System Environment/Daemons # Passenger code uses MIT license. # Bundled(Boost) uses Boost Software License @@ -37,9 +47,6 @@ 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 @@ -53,18 +60,15 @@ 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 +%if 0%{?fedora} Requires: ruby(release) %else -Requires: ruby(abi) = 1.9.1 +Requires: ruby(abi) = 1.8 %endif %if 0%{?rhel} >= 6 || 0%{?fedora} >= 15 @@ -88,9 +92,12 @@ BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygems BuildRequires: rubygems-devel +# for EPEL6 required special version using html4 backend from asciidoc +BuildRequires: rubygem(mizuho) BuildRequires: rubygem(rake) >= 0.8.1 BuildRequires: rubygem(rack) BuildRequires: rubygem(rspec) +BuildRequires: rubygem(rspec-core) BuildRequires: rubygem(mime-types) BuildRequires: source-highlight @@ -98,7 +105,7 @@ BuildRequires: source-highlight BuildRequires: zlib-devel Provides: rubygem(%{gem_name}) = %{version}-%{release} -Provides: bundled(boost) = 1.44 +Provides: bundled(boost) = 1.54 %description Phusion Passenger™ — a.k.a. mod_rails or mod_rack — makes deployment @@ -167,7 +174,6 @@ rebuilding this package. %patch2 -p1 -b .include-sys-types %patch4 -p1 -b .lindefault -%patch100 -p1 -b .autofoo %patch102 -p1 -b .threadtest # remove fastthread checking @@ -182,14 +188,10 @@ rebuilding this package. # 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' \ @@ -211,10 +213,15 @@ for script in `find . -type f ! -perm /a+x -name "*.rb"`; do [ ! -z "`head -n 1 $script | grep \"^#!/\"`" ] && chmod -v 755 $script done +# Incompatibility of nokogiri with asciidoc in EPEL 6 +# (dirty hack) +sed -i 's/\s*=\+$//' doc/*.txt + + %build export USE_VENDORED_LIBEV=false -CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; -CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; +EXTRA_CFLAGS="${CFLAGS:-%optflags}" ; export EXTRA_CFLAGS ; +EXTRA_CXXFLAGS="${CXXFLAGS:-%optflags}" ; export EXTRA_CXXFLAGS ; FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; rake package:gem SKIP_SIGNING=1 @@ -312,6 +319,11 @@ find %{buildroot}%{gem_instdir} -type f -size 0c -delete %{__rm} %{buildroot}%{_bindir}/%{gem_name}-install-nginx-module %{__rm} %{buildroot}%{gem_instdir}/Rakefile +%if 0%{?rhel} +%{__mkdir_p} %{buildroot}%{_docdir}/mod_passenger-%{version} +%{__cp} -p doc/Users?guide?Apache.txt %{buildroot}%{_docdir}/mod_passenger-%{version} +%endif + %check export USE_VENDORED_LIBEV=false # Run the tests, capture the output, but don't fail the build if the tests fail @@ -332,16 +344,17 @@ rake test --trace ||: %files %doc %{gem_instdir}/README.md +%doc %{gem_instdir}/CHANGELOG %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}/node_lib %{gem_instdir}/passenger.gemspec %{gem_instdir}/resources %{gem_instdir}/.travis.yml @@ -387,6 +400,13 @@ rake test --trace ||: %{gem_extdir}/lib %changelog +* Thu Jun 05 2014 František Dvořák - 4.0.42-1 +- Merge master to EPEL 6 +- Add neccessary modifications for EPEL 6: + - node_libdir in locations.ini + - removed patches: autofoo, native locations + - dirty hack to build documentation + * Fri May 23 2014 Petr Machata - 4.0.18-7 - Rebuild for boost 1.55.0 -- 1.8.2.3