[DRE-commits] [ruby-passenger] 07/11: add bin_load_path.patch to prevent load_path manipulation in bin/*

Cédric Boutillier boutil at moszumanska.debian.org
Thu Jan 16 16:24:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-passenger.

commit b0e6cc3dca95bf3f8e35f32be100afc759923004
Author: Cédric Boutillier <boutil at debian.org>
Date:   Thu Jan 16 14:41:45 2014 +0100

    add bin_load_path.patch to prevent load_path manipulation in bin/*
---
 debian/changelog                   |  1 +
 debian/patches/bin_load_path.patch | 94 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 3 files changed, 96 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a1e2baa..ff034b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ ruby-passenger (4.0.35-1) unstable; urgency=low
   * debian/patches:
     - drop fix_ftbfs_fortify_source.patch, applied upstream
     - refresh fix_install_path.patch and no_jsoncpp.patch
+    - add bin_load_path.patch to prevent load_path manipulation in bin/*
 
  -- Cédric Boutillier <boutil at debian.org>  Thu, 16 Jan 2014 12:53:56 +0100
 
diff --git a/debian/patches/bin_load_path.patch b/debian/patches/bin_load_path.patch
new file mode 100644
index 0000000..7b6cacf
--- /dev/null
+++ b/debian/patches/bin_load_path.patch
@@ -0,0 +1,94 @@
+Description: do not mess with LOAD_PATH in bin/* files
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-01-16
+
+--- a/bin/passenger
++++ b/bin/passenger
+@@ -23,12 +23,6 @@
+ #  THE SOFTWARE.
+ 
+ ## Magic comment: begin bootstrap ##
+-source_root = File.expand_path("..", File.dirname(__FILE__))
+-$LOAD_PATH.unshift("#{source_root}/lib")
+-begin
+-	require 'rubygems'
+-rescue LoadError
+-end
+ require 'phusion_passenger'
+ ## Magic comment: end bootstrap ##
+ 
+--- a/bin/passenger-config
++++ b/bin/passenger-config
+@@ -23,12 +23,6 @@
+ #  THE SOFTWARE.
+ 
+ ## Magic comment: begin bootstrap ##
+-source_root = File.expand_path("..", File.dirname(__FILE__))
+-$LOAD_PATH.unshift("#{source_root}/lib")
+-begin
+-	require 'rubygems'
+-rescue LoadError
+-end
+ require 'phusion_passenger'
+ ## Magic comment: end bootstrap ##
+ 
+--- a/bin/passenger-install-apache2-module
++++ b/bin/passenger-install-apache2-module
+@@ -24,12 +24,6 @@
+ #  THE SOFTWARE.
+ 
+ ## Magic comment: begin bootstrap ##
+-source_root = File.expand_path("..", File.dirname(__FILE__))
+-$LOAD_PATH.unshift("#{source_root}/lib")
+-begin
+-	require 'rubygems'
+-rescue LoadError
+-end
+ require 'phusion_passenger'
+ ## Magic comment: end bootstrap ##
+ 
+--- a/bin/passenger-install-nginx-module
++++ b/bin/passenger-install-nginx-module
+@@ -23,12 +23,6 @@
+ #  THE SOFTWARE.
+ 
+ ## Magic comment: begin bootstrap ##
+-source_root = File.expand_path("..", File.dirname(__FILE__))
+-$LOAD_PATH.unshift("#{source_root}/lib")
+-begin
+-	require 'rubygems'
+-rescue LoadError
+-end
+ require 'phusion_passenger'
+ ## Magic comment: end bootstrap ##
+ 
+--- a/bin/passenger-memory-stats
++++ b/bin/passenger-memory-stats
+@@ -23,12 +23,6 @@
+ #  THE SOFTWARE.
+ 
+ ## Magic comment: begin bootstrap ##
+-source_root = File.expand_path("..", File.dirname(__FILE__))
+-$LOAD_PATH.unshift("#{source_root}/lib")
+-begin
+-	require 'rubygems'
+-rescue LoadError
+-end
+ require 'phusion_passenger'
+ ## Magic comment: end bootstrap ##
+ 
+--- a/bin/passenger-status
++++ b/bin/passenger-status
+@@ -23,12 +23,6 @@
+ #  THE SOFTWARE.
+ 
+ ## Magic comment: begin bootstrap ##
+-source_root = File.expand_path("..", File.dirname(__FILE__))
+-$LOAD_PATH.unshift("#{source_root}/lib")
+-begin
+-	require 'rubygems'
+-rescue LoadError
+-end
+ require 'phusion_passenger'
+ ## Magic comment: end bootstrap ##
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 98027a8..d4cadda 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 fix_install_path.patch
 no_jsoncpp.patch
+bin_load_path.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-passenger.git



More information about the Pkg-ruby-extras-commits mailing list