[packages/passenger] Started update to 6.0.20 (builds)
arekm
arekm at pld-linux.org
Wed Apr 3 17:11:24 CEST 2024
commit cf6359850d90534ab87994ff249be2a76c45ab8c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Apr 3 16:37:10 2024 +0200
Started update to 6.0.20 (builds)
dirs.patch | 21 ---------------
no-bundler.patch | 79 ++++++++++++++++++++++++++++----------------------------
passenger.spec | 67 +++++++++++++++++++++++++----------------------
3 files changed, 76 insertions(+), 91 deletions(-)
---
diff --git a/passenger.spec b/passenger.spec
index d9225a0..7fd5068 100644
--- a/passenger.spec
+++ b/passenger.spec
@@ -5,8 +5,8 @@
Summary: A module to bridge Ruby on Rails to Apache
Summary(pl.UTF-8): Moduł służący za bramkę Ruby on Rails do Apache'a
Name: passenger
-Version: 4.0.50
-Release: 8
+Version: 6.0.20
+Release: 0.1
# Passenger code uses MIT license.
# Bundled(Boost) uses Boost Software License
# BCrypt and Blowfish files use BSD license.
@@ -15,11 +15,10 @@ Release: 8
License: Boost and BSD and BSD with advertising and MIT and zlib
Group: Networking/Daemons/HTTP
Source0: https://github.com/phusion/passenger/archive/release-%{version}.tar.gz
-# Source0-md5: 69c6ade41d870782ae12c3f49d79ce20
+# Source0-md5: 1f94d1264e6fdbe5a202472454e00d88
Source1: apache-mod_%{name}.conf
Patch0: alias+public.patch
-Patch1: dirs.patch
-Patch2: no-bundler.patch
+Patch1: no-bundler.patch
URL: https://www.phusionpassenger.com/
BuildRequires: apache-devel >= 2.0.55-1
BuildRequires: apache-tools
@@ -27,8 +26,9 @@ BuildRequires: apr-devel >= 1:1.0.0
BuildRequires: apr-util-devel >= 1:1.0.0
#BuildRequires: asciidoc
BuildRequires: curl-devel
-BuildRequires: libev-devel
+BuildRequires: libev-devel >= 4.11
BuildRequires: libstdc++-devel
+BuildRequires: libuv-devel >= 1.4.2
BuildRequires: openssl-devel
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.559
@@ -96,21 +96,17 @@ Dokumentacji w formacie ri dla Phusion Passengera.
%setup -q -n %{name}-release-%{version}
#%patch0 -p1
%patch1 -p1
-%patch2 -p1
-__rubydir=$(echo %{ruby_vendorlibdir} | %{__sed} -e 's|/usr||')
+%{__sed} -i -e 's|#!/usr/bin/env python|#!%{_bindir}/python3|' src/helper-scripts/*.py
+%{__sed} -i -e 's|#!/usr/bin/env ruby|#!%{_bindir}/ruby|' src/helper-scripts/{prespawn,download_binaries/extconf.rb,*.rb} bin/*
-%{__sed} -i -e "s|@@LIB@@|%{_lib}|g" \
- -e "s|@@RUBYLIBDIR@@|$__rubydir|g" ext/common/ResourceLocator.h
-
-%{__sed} -i -e 's|#!/usr/bin/env python|#!%{_bindir}/python|' helper-scripts/*.py
-%{__sed} -i -e 's|#!/usr/bin/env ruby|#!%{_bindir}/ruby|' helper-scripts/{prespawn,download_binaries/extconf.rb,*.rb} bin/*
-
-# Don't use bundled libev
-%{__rm} -r ext/libev
+# Don't use bundled libs
+%{__rm} -r src/cxx_supportlib/vendor-modified/libev
+%{__rm} -r src/cxx_supportlib/vendor-copy/libuv
%build
-export USE_VENDORED_LIBEV=false
+export USE_VENDORED_LIBEV=no
+export USE_VENDORED_LIBUV=no
export CC="%{__cc}"
export CXX="%{__cxx}"
export CFLAGS="%{rpmcflags} -fno-strict-aliasing"
@@ -125,6 +121,15 @@ export HTTPD=%{_sbindir}/httpd
export APXS2=%{apxs}
rake apache2 V=1 \
+ NATIVE_PACKAGING_METHOD=rpm \
+ FS_PREFIX=%{_prefix} \
+ FS_BINDIR=%{_bindir} \
+ FS_SBINDIR=%{_sbindir} \
+ FS_DATADIR=%{_datadir} \
+ FS_LIBDIR=%{_libdir} \
+ RUBYLIBDIR=%{ruby_vendorlibdir} \
+ RUBYARCHDIR=%{_libdir}/%{name} \
+ APACHE2_MODULE_PATH=%{_libdir}/apache/mod_passenger.so
RELEASE=yes \
OPTIMIZE=yes
@@ -152,25 +157,27 @@ rdoc --ri --op ri lib ext/ruby
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{_mandir}/man{1,8}} \
- $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir},%{ruby_ridir}} \
+ $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir},%{ruby_ridir}/PhusionPassenger} \
$RPM_BUILD_ROOT%{_bindir} \
$RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents/apache2 \
- $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts
+ $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/{node_lib,helper-scripts}
install -p buildout/apache2/mod_passenger.so $RPM_BUILD_ROOT%{_pkglibdir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/75_mod_passenger.conf
install -p buildout/ruby/ruby-*/passenger_native_support.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}
-cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+cp -a src/ruby_supportlib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
install -p bin/passenger-{config,memory-stats,status} bin/passenger $RPM_BUILD_ROOT%{_bindir}
-install -p buildout/agents/{PassengerLoggingAgent,PassengerWatchdog,PassengerHelperAgent,SpawnPreparer,TempDirToucher} $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents
-cp -a helper-scripts/* $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts
-cp -a resources node_lib $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/
+#install -p buildout/agents/{PassengerLoggingAgent,PassengerWatchdog,PassengerHelperAgent,SpawnPreparer,TempDirToucher} $RPM_BUILD_ROOT%{_libdir}/phusion-passenger/agents
+cp -a src/helper-scripts/* $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/helper-scripts
+cp -a resources $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/
+# does that make any sense?
+cp -a src/nodejs_supportlib/phusion_passenger/*.js $RPM_BUILD_ROOT%{_datadir}/phusion-passenger/node_lib
cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
cp -p man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
-cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
+cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}/PhusionPassenger
%clean
rm -rf $RPM_BUILD_ROOT
@@ -193,18 +200,17 @@ fi
%{_mandir}/man1/passenger-config.1*
%{_mandir}/man8/passenger-memory-stats.8*
%{_mandir}/man8/passenger-status.8*
-
%attr(755,root,root) %{ruby_vendorarchdir}/passenger_native_support.so
%{ruby_vendorlibdir}/phusion_passenger.rb
%{ruby_vendorlibdir}/phusion_passenger
%dir %{_libdir}/phusion-passenger
%dir %{_libdir}/phusion-passenger/agents
-%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerHelperAgent
-%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerLoggingAgent
-%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerWatchdog
-%attr(755,root,root) %{_libdir}/phusion-passenger/agents/SpawnPreparer
-%attr(755,root,root) %{_libdir}/phusion-passenger/agents/TempDirToucher
+#%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerHelperAgent
+#%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerLoggingAgent
+#%attr(755,root,root) %{_libdir}/phusion-passenger/agents/PassengerWatchdog
+#%attr(755,root,root) %{_libdir}/phusion-passenger/agents/SpawnPreparer
+#%attr(755,root,root) %{_libdir}/phusion-passenger/agents/TempDirToucher
%dir %{_datadir}/phusion-passenger
%dir %{_datadir}/phusion-passenger/helper-scripts
%attr(755,root,root) %{_datadir}/phusion-passenger/helper-scripts/*
@@ -213,7 +219,6 @@ fi
%files -n apache-mod_passenger
%defattr(644,root,root,755)
-%doc doc/Users?guide?Apache.txt
%defattr(644,root,root,755)
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_passenger.conf
%attr(755,root,root) %{_pkglibdir}/mod_passenger.so
diff --git a/dirs.patch b/dirs.patch
deleted file mode 100644
index fef7d15..0000000
--- a/dirs.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- passenger-release-4.0.50/ext/common/ResourceLocator.h~ 2014-08-26 16:15:57.000000000 +0200
-+++ passenger-release-4.0.50/ext/common/ResourceLocator.h 2014-09-04 21:47:26.617938160 +0200
-@@ -78,12 +78,12 @@
- } else {
- string root = rootOrFile;
- binDir = root + "/bin";
-- agentsDir = root + "/buildout/agents";
-- helperScriptsDir = root + "/helper-scripts";
-- resourcesDir = root + "/resources";
-- docDir = root + "/doc";
-- rubyLibDir = root + "/lib";
-- nodeLibDir = root + "/node_lib";
-+ agentsDir = root + "/@@LIB@@/phusion-passenger/agents";
-+ helperScriptsDir = root + "/share/phusion-passenger/helper-scripts";
-+ resourcesDir = root + "/share/phusion-passenger/resources";
-+ docDir = root + "/share/doc";
-+ rubyLibDir = root + "@@RUBYLIBDIR@@";
-+ nodeLibDir = root + "/share/phusion-passenger/node_lib";
- }
- }
-
diff --git a/no-bundler.patch b/no-bundler.patch
index 93f50a0..d66fd1d 100644
--- a/no-bundler.patch
+++ b/no-bundler.patch
@@ -1,41 +1,42 @@
---- passenger-release-4.0.50/lib/phusion_passenger/loader_shared_helpers.rb~ 2014-08-26 16:15:57.000000000 +0200
-+++ passenger-release-4.0.50/lib/phusion_passenger/loader_shared_helpers.rb 2014-09-05 08:19:31.449268337 +0200
-@@ -230,38 +230,6 @@
- # The app developer may also override our strategy with this magic file.
- elsif File.exist?('config/setup_load_paths.rb')
- require File.expand_path('config/setup_load_paths')
+--- passenger-release-6.0.20/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb~ 2024-01-19 18:09:36.000000000 +0100
++++ passenger-release-6.0.20/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb 2024-04-03 16:05:58.216613881 +0200
+@@ -190,39 +190,6 @@ module PhusionPassenger
+ elsif File.exist?('config/setup_load_paths.rb')
+ require File.expand_path('config/setup_load_paths')
+
+- # Older versions of Bundler use .bundle/environment.rb as the Bundler
+- # environment lock file. This has been replaced by Gemfile.lock/gems.locked
+- # in later versions, but we still support the older mechanism.
+- # If the Bundler environment lock file exists then load that. If it
+- # exists then there's a 99.9% chance that loading it is the correct
+- # thing to do.
+- elsif File.exist?('.bundle/environment.rb')
+- running_bundler(options) do
+- require File.expand_path('.bundle/environment')
+- end
-
-- # Older versions of Bundler use .bundle/environment.rb as the Bundler
-- # environment lock file. This has been replaced by Gemfile.lock in later
-- # versions, but we still support the older mechanism.
-- # If the Bundler environment lock file exists then load that. If it
-- # exists then there's a 99.9% chance that loading it is the correct
-- # thing to do.
-- elsif File.exist?('.bundle/environment.rb')
-- running_bundler(options) do
-- require File.expand_path('.bundle/environment')
-- end
+- # If the legacy Bundler environment file doesn't exist then there are two
+- # possibilities:
+- # 1. Bundler is not used, in which case we don't have to do anything.
+- # 2. Bundler *is* used, but either the user is using a newer Bundler versions,
+- # or the gems are not locked. In either case, we're supposed to call
+- # Bundler.setup.
+- #
+- # The existence of Gemfile/gems.rb indicates whether (2) is true:
+- elsif File.exist?('Gemfile') || File.exist?('gems.rb')
+- # In case of Rails 3+, config/boot.rb already calls Bundler.setup.
+- # However older versions of Rails may not so loading boot.rb might
+- # not be the correct thing to do. To be on the safe side we
+- # call Bundler.setup ourselves; calling Bundler.setup twice is
+- # harmless. If this isn't the correct thing to do after all then
+- # there's always the load_path_setup_file option and
+- # setup_load_paths.rb.
+- running_bundler(options) do
+- activate_gem 'bundler', 'bundler/setup'
+- end
+- end
-
-- # If the legacy Bundler environment file doesn't exist then there are two
-- # possibilities:
-- # 1. Bundler is not used, in which case we don't have to do anything.
-- # 2. Bundler *is* used, but either the user is using a newer Bundler versions,
-- # or the gems are not locked. In either case, we're supposed to call
-- # Bundler.setup.
-- #
-- # The existence of Gemfile indicates whether (2) is true:
-- elsif File.exist?('Gemfile')
-- # In case of Rails 3, config/boot.rb already calls Bundler.setup.
-- # However older versions of Rails may not so loading boot.rb might
-- # not be the correct thing to do. To be on the safe side we
-- # call Bundler.setup ourselves; calling Bundler.setup twice is
-- # harmless. If this isn't the correct thing to do after all then
-- # there's always the load_path_setup_file option and
-- # setup_load_paths.rb.
-- running_bundler(options) do
-- require 'rubygems'
-- require 'bundler/setup'
-- end
- end
-
-
+-
+ # !!! NOTE !!!
+ # If the app is using Bundler then any dependencies required past this
+ # point must be specified in the Gemfile. Like ruby-debug if debugging is on...
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/passenger.git/commitdiff/cf6359850d90534ab87994ff249be2a76c45ab8c
More information about the pld-cvs-commit
mailing list