# This package depends on automagic byte compilation # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 %global _python_bytecompile_extra 1 %global bundled_boost_version 1.60.0 %global passenger_libdir %{_datadir}/passenger/ %global passenger_archdir %{_libdir}/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: 5.0.30 Release: 19%{?dist} # 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-5.0.30-load_from_lib_dir.patch # Unbundle jsoncpp, update to work with libjsoncpp.so.11 Patch1: passenger-5.0.30-json.patch # Do not use calls from bundled libev - they are using only # for debug. Patch2: passenger-5.0.30-libev.patch # Use explicit python3 shebangs Patch3: passenger-5.0.30-explicity-python3.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: gcc BuildRequires: gcc-c++ 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: libuv-devel BuildRequires: valgrind-devel BuildRequires: jsoncpp-devel Provides: bundled(boost) = %{bundled_boost_version} Obsoletes: rubygem-passenger < %{version}-%{release} Provides: rubygem-passenger = %{version}-%{release} Provides: rubygem-passenger%{?_isa} = %{version}-%{release} Obsoletes: rubygem-passenger-native < %{version}-%{release} Provides: rubygem-passenger-native = %{version}-%{release} Provides: rubygem-passenger-native%{?_isa} = %{version}-%{release} Obsoletes: rubygem-passenger-native-libs < %{version}-%{release} Provides: rubygem-passenger-native-libs = %{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} %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 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 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 .libev %patch2 -p1 -b .json # No backup files, as they would get packaged %patch3 -p1 # Don't use bundled libev and libuv rm -rf src/cxx_supportlib/vendor-copy/libuv rm -rf src/cxx_supportlib/vendor-modified/libev rm -rf src/cxx_supportlib/vendor-modified/jsoncpp # Fix the path to json.h find . -type f -print0 | xargs -0 sed -i -e 's|||' # Find files with a hash-bang that do not have executable permissions grep -Rl '^#!/' . | xargs chmod -c 0755 %build %configure || : export EXTRA_CFLAGS="${CFLAGS}" export EXTRA_CXXFLAGS="${CXXFLAGS}" export EXTRA_LDFLAGS="${LDFLAGS}" export USE_VENDORED_LIBEV=false export USE_VENDORED_LIBEIO=false export USE_VENDORED_LIBUV=false export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_ALL=C.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 USE_VENDORED_LIBUV=false export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_ALL=C.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 # 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 # nginx support if use compiles nginx himself with Passenger support. ln -s %{_sbindir}/nginx %{buildroot}%{passenger_archdir}/PassengerWebHelper %check export USE_VENDORED_LIBEV=false export USE_VENDORED_LIBEIO=false export USE_VENDORED_LIBUV=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. # Test are not included in the tarballs now :'( # 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_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 * Mon Sep 23 2019 Gerd Pokorra - 5.0.30-19 - Change patch to use explicit python3 shebangs * Fri Jul 26 2019 Fedora Release Engineering - 5.0.30-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Wed Jul 03 2019 Björn Esser - 5.0.30-17 - Rebuild (jsoncpp) * Fri Feb 01 2019 Fedora Release Engineering - 5.0.30-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Jan 21 2019 Mamoru TASAKA - 5.0.30-15 - F-30: rebuild against ruby26 * Fri Jan 04 2019 Björn Esser - 5.0.30-14 - Add BuildRequires: gcc(-c++), fixes FTBFS (#1605374) - Add patch to use explicit python2 shebangs, fixes FTBFS (#1605374) - Fix wrong Obsoletes (#1537216) * Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 5.0.30-13 - Use C.UTF-8 locale See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot * Fri Jul 13 2018 Fedora Release Engineering - 5.0.30-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Feb 08 2018 Fedora Release Engineering - 5.0.30-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Jan 20 2018 Björn Esser - 5.0.30-10 - Rebuilt for switch to libxcrypt * Fri Jan 05 2018 Mamoru TASAKA - 5.0.30-9 - F-28: rebuild for ruby25 * Tue Dec 26 2017 Björn Esser - 5.0.30-8 - Rebuilt for jsoncpp.so.20 * Fri Sep 01 2017 Björn Esser - 5.0.30-7 - Rebuilt for jsoncpp-1.8.3 * Thu Aug 03 2017 Fedora Release Engineering - 5.0.30-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 5.0.30-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon May 15 2017 Fedora Release Engineering - 5.0.30-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 5.0.30-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Jan 12 2017 Vít Ondruch - 5.0.30-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 * Mon Oct 17 2016 Björn Esser - 5.0.30-1 - update to 5.0.30 - update load_from_lib_dir.patch - update json.patch - update libev.patch - properly apply compiler-flags * Mon Oct 17 2016 Björn Esser - 5.0.26-3 - Rebuilt for libjsoncpp.so.11 * Tue Mar 29 2016 Björn Esser - 5.0.26-2 - Rebuilt for libjsoncpp.so.1 * Wed Mar 02 2016 Jan Kaluza - 5.0.26-1 - update to 5.0.26 * Fri Feb 19 2016 Fedora Release Engineering - 5.0.25-1 - update to 5.0.25 * Thu Feb 04 2016 Fedora Release Engineering - 5.0.23-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Jan 12 2016 Vít Ondruch - 5.0.23-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 * Mon Jan 04 2016 Jan Kaluza - 5.0.23-1 - update to 5.0.23 * Fri Oct 30 2015 Jan Kaluza - 5.0.21-1 - update to 5.0.21 - fix compatibility with httpd-2.4.17 * Thu Jun 18 2015 Fedora Release Engineering - 4.0.59-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Apr 22 2015 Orion Poplawski - 4.0.59-1 - Update to 4.0.59 * Wed Mar 11 2015 Orion Poplawski - 4.0.53-4 - Do not use bundled valgrind.h (bug #1141583) * Sun Jan 18 2015 Mamoru TASAKA - 4.0.53-3 - Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2 * Thu Nov 20 2014 Jan Kaluza - 4.0.53-2 - get agents_dir from locations.ini * Fri Oct 03 2014 Jan Kaluza - 4.0.53-1 - update to version 4.0.53 * 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