%global bundled_boost_version 1.54.0 %global passenger_libdir %{_datadir}/passenger/ %global passenger_archdir %{_libdir}/passenger/ %global passenger_agentsdir %{_libexecdir}/passenger/ %{!?_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: Phusion Passenger application server Name: passenger Version: 4.0.50 Release: 2%{?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: https://www.phusionpassenger.com Source: http://s3.amazonaws.com/phusion-passenger/releases/passenger-%{version}.tar.gz Source1: passenger.logrotate Source2: rubygem-passenger.tmpfiles Source10: apache-passenger.conf.in Source12: config.json # # Load passenger_native_support.so from lib_dir Patch0: passenger-4.0.38-load_from_lib_dir.patch # Use system libeio Patch1: passenger-4.0.38-libeio.patch # Until rubygem-bluecloth is in Fedora, don't use it Patch201: rubygem-passenger-4.0.18-correct_docs.patch Requires: rubygems # XXX: Needed to run passenger standalone Requires: rubygem(daemon_controller) >= 1.1.0 Requires: rubygem(rack) Requires: rubygem(rake) Requires: ruby(release) BuildRequires: libcurl-devel BuildRequires: httpd-devel BuildRequires: libev-devel >= 4.0.0 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: rubygem(mizuho) BuildRequires: source-highlight BuildRequires: zlib-devel BuildRequires: pcre-devel BuildRequires: openssl-devel BuildRequires: libeio-devel Provides: bundled(boost) = %{bundled_boost_version} Obsoletes: rubygem-passenger < %{version}-%{release} Provides: rubygem-passenger = %{version}-%{release} Obsoletes: rubygem-passenger%{?_isa} < %{version}-%{release} Provides: rubygem-passenger%{?_isa} = %{version}-%{release} Obsoletes: rubygem-passenger-native < %{version}-%{release} Provides: rubygem-passenger-native = %{version}-%{release} Obsoletes: rubygem-passenger-native%{?_isa} < %{version}-%{release} Provides: rubygem-passenger-native%{?_isa} = %{version}-%{release} Obsoletes: rubygem-passenger-native-libs < %{version}-%{release} Provides: rubygem-passenger-native-libs = %{version}-%{release} Obsoletes: rubygem-passenger-native-libs%{?_isa} < %{version}-%{release} Provides: rubygem-passenger-native-libs%{?_isa} = %{version}-%{release} # We are not providing -devel package anymore, so use just "Obsoletes" Obsoletes: rubygem-passenger-devel < %{version}-%{release} Obsoletes: rubygem-passenger-devel%{?_isa} < %{version}-%{release} %description Phusion Passenger® is a web server and application server, designed to be fast, robust and lightweight. It takes a lot of complexity out of deploying web apps, adds powerful enterprise-grade features that are useful in production, and makes administration much easier and less complex. It supports Ruby, Python, Node.js and Meteor. %package -n mod_passenger Summary: Apache Module for Phusion Passenger Group: System Environment/Daemons BuildRequires: httpd-devel Requires: httpd-mmn = %{_httpd_mmn} Requires: %{name}%{?_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 doc Summary: Phusion Passenger documentation Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} BuildArch: noarch Obsoletes: rubygem-passenger-doc < %{version}-%{release} Provides: rubygem-passenger-doc = %{version}-%{release} License: CC-BY-SA and MIT and (MIT or GPL+) %description doc This package contains documentation files for Phusion Passenger®. %prep %setup -q %patch0 -p1 -b .libdir %patch1 -p1 -b .libeio # Until bluecloth is in Fedora, don't use it %patch201 -p1 -b .docs # Don't use bundled libev and libeio rm -rf ext/libev rm -rf ext/libeio # 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 export USE_VENDORED_LIBEIO=false CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 rake fakeroot \ NATIVE_PACKAGING_METHOD=rpm \ FS_PREFIX=%{_prefix} \ FS_BINDIR=%{_bindir} \ FS_SBINDIR=%{_sbindir} \ FS_DATADIR=%{_datadir} \ FS_LIBDIR=%{_libdir} \ FS_DOCDIR=%{_docdir} \ RUBYLIBDIR=%{passenger_libdir} \ RUBYARCHDIR=%{passenger_archdir} \ APACHE2_MODULE_PATH=%{_httpd_moddir}/mod_passenger.so %install export USE_VENDORED_LIBEV=false export USE_VENDORED_LIBEIO=false export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 cp -a pkg/fakeroot/* %{buildroot}/ # Install bootstrapping code into the executables and the Nginx config script. ./dev/install_scripts_bootstrap_code.rb --ruby %{passenger_libdir} %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/* # 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@|%{passenger_libdir}/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 # Move agents to libexec mkdir -p %{buildroot}/%{passenger_agentsdir} mv %{buildroot}/%{passenger_archdir}/agents/* %{buildroot}/%{passenger_agentsdir} rm -d %{buildroot}/%{passenger_archdir}/agents/ sed -i 's|%{passenger_archdir}agents|%{passenger_agentsdir}|g' \ %{buildroot}%{passenger_libdir}/phusion_passenger/locations.ini # 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 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} # Install man pages into the proper location. mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_mandir}/man8 cp man/*.1 %{buildroot}%{_mandir}/man1 cp man/*.8 %{buildroot}%{_mandir}/man8 # Fix Python scripts with shebang which are not executable chmod +x %{buildroot}%{_datadir}/passenger/helper-scripts/wsgi-loader.py # Remove empty release.txt file rm -f %{buildroot}%{_datadir}/%{name}/release.txt # Remove object files and source files. They are needed to compile nginx # using "passenger-install-nginx-module", but it's not according to # guidelines. Debian does not provide these files too, so we stay consistent. # In the long term, it would be better to allow Fedora nginx to support # Passenger. rm -rf %{buildroot}%{passenger_libdir}/ngx_http_passenger_module rm -rf %{buildroot}%{passenger_libdir}/ruby_extension_source rm -rf %{buildroot}%{passenger_libdir}/include rm -rf %{buildroot}%{_libdir}/%{name}/common rm -rf %{buildroot}%{_bindir}/passenger-install-*-module %check export USE_VENDORED_LIBEV=false export USE_VENDORED_LIBEIO=false # Running the full test suite is not only slow, but also impossible # because not all requirements are packaged by Fedora. It's also not # too useful because Phusion Passenger is automatically tested by a CI # server on every commit. The C++ tests are the most likely to catch # any platform-specific bugs (e.g. bugs caused by wrong compiler options) # so we only run those. Note that the C++ tests are highly timing # sensitive, so sometimes they may fail even though nothing is really # wrong. We therefore do not make failures fatal, although the result # should still be checked. # Currently the tests fail quite often on ARM because of the slower machines. cp %{SOURCE12} test/config.json rake test:cxx || true %files %doc LICENSE CONTRIBUTORS CHANGELOG %{_bindir}/%{name}* %{_prefix}/lib/tmpfiles.d/%{name}.conf %dir /run/%{name} %{passenger_libdir} %{passenger_agentsdir} %{passenger_archdir} %{_sbindir}/* %dir %{_localstatedir}/log/passenger-analytics %config(noreplace) %{_sysconfdir}/logrotate.d/passenger %{_mandir}/man1/* %{_mandir}/man8/* %files doc %doc %{_docdir}/%{name} %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 %changelog * Wed Sep 24 2014 Jan Kaluza - 4.0.50-2 - remove old BuildRequires and tmpfiles.d conditions * Mon Sep 15 2014 Jan Kaluza - 4.0.50-1 - update to new version 4.0.50 * Tue May 13 2014 Jan Kaluza - 4.0.38-1 - renamed from rubygem-passenger to passenger - changed the packaging structure to be closer to upstream - update to 4.0.38 (#1060106) - fix for CVE-2014-1831 and CVE-2014-1832 - use real commands without macros - do not bundle libeio * 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