[DRE-commits] [ruby-passenger] 04/07: Make ruby-passenger use the system jsoncpp library.

Felix Geyer fgeyer at moszumanska.debian.org
Sun Aug 24 20:57:21 UTC 2014


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

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

commit c4b737db187dc4cd09d53496e06ddde624b38976
Author: Felix Geyer <fgeyer at debian.org>
Date:   Sun Aug 24 13:20:19 2014 +0200

    Make ruby-passenger use the system jsoncpp library.
---
 debian/changelog                    |   3 +
 debian/control                      |   3 +-
 debian/patches/no_jsoncpp.patch     |  20 ------
 debian/patches/series               |   2 +-
 debian/patches/system_jsoncpp.patch | 129 ++++++++++++++++++++++++++++++++++++
 5 files changed, 135 insertions(+), 22 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f21e630..3f6f9f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ ruby-passenger (4.0.49-1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Drop CVE-2014-1832.patch, fixed upstream.
+  * Make ruby-passenger use the system jsoncpp library.
+    - Rename no_jsoncpp.patch to system_jsoncpp.patch.
+    - Add libjsoncpp-dev to build-depends.
 
  -- Felix Geyer <fgeyer at debian.org>  Sun, 24 Aug 2014 12:17:21 +0200
 
diff --git a/debian/control b/debian/control
index 0e6a508..9efc8a9 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Uploaders: Filipe Lautert <filipe at debian.org>, Micah Anderson <micah at debian.org>
  Felix Geyer <fgeyer at debian.org>
 Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.12~), apache2 (>= 2.4),
  apache2-dev (>= 2.4), libapr1-dev, doxygen, asciidoc (>= 8.2), graphviz, rake,
- source-highlight, libcurl4-openssl-dev, libev-dev, dh-autoreconf, ruby-mizuho
+ source-highlight, libcurl4-openssl-dev, libev-dev, dh-autoreconf, ruby-mizuho,
+ libjsoncpp-dev
 Standards-Version: 3.9.5
 Homepage: https://www.phusionpassenger.com/
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-passenger.git
diff --git a/debian/patches/no_jsoncpp.patch b/debian/patches/no_jsoncpp.patch
deleted file mode 100644
index 71254f5..0000000
--- a/debian/patches/no_jsoncpp.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: Remove embedded jsoncpp, only used in tests that aren't built.
-Author: Felix Geyer <fgeyer at debian.org>
-Last-Update: 2014-01-16
-
---- a/lib/phusion_passenger/common_library.rb
-+++ b/lib/phusion_passenger/common_library.rb
-@@ -437,13 +437,6 @@
- 			Utils/fib.h
- 			Utils/fibpriv.h
- 		)
--	define_component 'Utils/jsoncpp.o',
--		:source   => 'Utils/jsoncpp.cpp',
--		:category => :other,
--		:deps     => %w(
--			Utils/json.h
--			Utils/json-forwards.h
--		)
- 
- 	#'BCrypt.o' => %w(
- 	#	BCrypt.cpp
diff --git a/debian/patches/series b/debian/patches/series
index d4cadda..13a19fd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
 fix_install_path.patch
-no_jsoncpp.patch
+system_jsoncpp.patch
 bin_load_path.patch
diff --git a/debian/patches/system_jsoncpp.patch b/debian/patches/system_jsoncpp.patch
new file mode 100644
index 0000000..c08fbe2
--- /dev/null
+++ b/debian/patches/system_jsoncpp.patch
@@ -0,0 +1,129 @@
+Description: Use the system jsoncpp library.
+Author: Felix Geyer <fgeyer at debian.org>
+Last-Update: 2014-08-24
+
+--- a/build/agents.rb
++++ b/build/agents.rb
+@@ -111,7 +111,7 @@ file AGENT_OUTPUT_DIR + 'PassengerHelperAgent' => dependencies do
+ end
+ 
+ logging_agent_libs = COMMON_LIBRARY.only(:base, :logging_agent, 'AgentsBase.o',
+-	'Utils/Base64.o', 'Utils/MD5.o', 'Utils/jsoncpp.o')
++	'Utils/Base64.o', 'Utils/MD5.o')
+ dependencies = [
+ 	'ext/common/agents/LoggingAgent/Main.cpp',
+ 	'ext/common/agents/LoggingAgent/AdminController.h',
+@@ -139,6 +139,7 @@ file AGENT_OUTPUT_DIR + 'PassengerLoggingAgent' => dependencies do
+ 		"#{AGENT_CFLAGS} #{LIBEV_CFLAGS} " <<
+ 		"#{PlatformInfo.curl_flags} " <<
+ 		"#{PlatformInfo.zlib_flags} " <<
++		"-I/usr/include/jsoncpp " <<
+ 		"#{EXTRA_CXXFLAGS}")
+ 	create_executable("#{AGENT_OUTPUT_DIR}PassengerLoggingAgent",
+ 		"#{AGENT_OUTPUT_DIR}PassengerLoggingAgent.o",
+@@ -148,6 +149,7 @@ file AGENT_OUTPUT_DIR + 'PassengerLoggingAgent' => dependencies do
+ 		"#{LIBEV_LIBS} " <<
+ 		"#{PlatformInfo.curl_libs} " <<
+ 		"#{PlatformInfo.zlib_libs} " <<
++		"-ljsoncpp " <<
+ 		"#{PlatformInfo.portability_cxx_ldflags} " <<
+ 		"#{AGENT_LDFLAGS} " <<
+ 		"#{EXTRA_CXX_LDFLAGS}")
+--- a/ext/common/Utils/JsonUtils.h
++++ b/ext/common/Utils/JsonUtils.h
+@@ -27,7 +27,7 @@
+ 
+ #include <string>
+ #include <StaticString.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ #include <Utils/StrIntUtils.h>
+ 
+ namespace Passenger {
+--- a/ext/common/agents/LoggingAgent/RemoteSender.h
++++ b/ext/common/agents/LoggingAgent/RemoteSender.h
+@@ -45,7 +45,7 @@
+ #include <Utils/SystemTime.h>
+ #include <Utils/ScopeGuard.h>
+ #include <Utils/Base64.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ #include <Utils/Curl.h>
+ 
+ namespace Passenger {
+--- a/lib/phusion_passenger/common_library.rb
++++ b/lib/phusion_passenger/common_library.rb
+@@ -101,7 +101,7 @@ class CommonLibraryBuilder
+ 	end
+ 
+ 	def define_tasks(extra_compiler_flags = nil)
+-		flags =  "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
++		flags =  "-Iext -Iext/common #{LIBEV_CFLAGS} -I/usr/include/jsoncpp #{extra_compiler_flags} "
+ 		cflags = (flags + EXTRA_CFLAGS).strip
+ 		cxxflags = (flags + EXTRA_CXXFLAGS).strip
+ 
+--- a/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp
++++ b/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp
+@@ -1,6 +1,6 @@
+ #include <TestSupport.h>
+ #include <ApplicationPool2/DirectSpawner.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ #include <fcntl.h>
+ 
+ using namespace Passenger;
+--- a/test/cxx/ApplicationPool2/PoolTest.cpp
++++ b/test/cxx/ApplicationPool2/PoolTest.cpp
+@@ -2,7 +2,7 @@
+ #include <ApplicationPool2/Pool.h>
+ #include <Utils/IOUtils.h>
+ #include <Utils/StrIntUtils.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ #include <MessageReadersWriters.h>
+ #include <map>
+ #include <vector>
+--- a/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp
++++ b/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp
+@@ -1,7 +1,7 @@
+ #include <TestSupport.h>
+ #include <ApplicationPool2/SmartSpawner.h>
+ #include <Logging.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ #include <unistd.h>
+ #include <climits>
+ #include <signal.h>
+--- a/test/cxx/CxxTestMain.cpp
++++ b/test/cxx/CxxTestMain.cpp
+@@ -16,7 +16,7 @@
+ #include <Utils.h>
+ #include <Utils/IOUtils.h>
+ #include <Utils/StrIntUtils.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ 
+ using namespace std;
+ 
+--- a/test/cxx/RequestHandlerTest.cpp
++++ b/test/cxx/RequestHandlerTest.cpp
+@@ -3,7 +3,7 @@
+ #include <agents/HelperAgent/RequestHandler.cpp>
+ #include <agents/HelperAgent/AgentOptions.h>
+ #include <ApplicationPool2/Pool.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ #include <Utils/IOUtils.h>
+ #include <Utils/StrIntUtils.h>
+ #include <Utils/Timer.h>
+--- a/test/cxx/TestSupport.cpp
++++ b/test/cxx/TestSupport.cpp
+@@ -8,7 +8,7 @@
+ #include <BackgroundEventLoop.cpp>
+ #include <Utils/IOUtils.h>
+ #include <Utils/ScopeGuard.h>
+-#include <Utils/json.h>
++#include <json/json.h>
+ 
+ namespace TestSupport {
+ 

-- 
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