1 |
bicatali 15/07/31 20:09:57 |
2 |
|
3 |
Added: cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch |
4 |
cvmfs-2.1.20.0_p05-cares-underlink.patch |
5 |
Removed: FindCARes.cmake cvmfs-2.1.10-no-config.patch |
6 |
Findleveldb.cmake cvmfs-2.1.10-openrc.patch |
7 |
Log: |
8 |
Version bump, add geoip dependencies |
9 |
|
10 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch |
19 |
=================================================================== |
20 |
--- /dev/null |
21 |
+++ cmake/Modules/FindLibGeoIP.cmake |
22 |
@@ -0,0 +1,68 @@ |
23 |
+# - Try to find GeoIP headers and libraries |
24 |
+# |
25 |
+# Usage of this module as follows: |
26 |
+# |
27 |
+# find_package(LibGeoIP) |
28 |
+# |
29 |
+# Variables used by this module, they can change the default behaviour and need |
30 |
+# to be set before calling find_package: |
31 |
+# |
32 |
+# LibGeoIP_ROOT_DIR Set this variable to the root installation of |
33 |
+# libGeoIP if the module has problems finding the |
34 |
+# proper installation path. |
35 |
+# |
36 |
+# Variables defined by this module: |
37 |
+# |
38 |
+# LIBGEOIP_FOUND System has GeoIP libraries and headers |
39 |
+# LibGeoIP_LIBRARY The GeoIP library |
40 |
+# LibGeoIP_INCLUDE_DIR The location of GeoIP headers |
41 |
+# HAVE_GEOIP_COUNTRY_EDITION_V6 Whether the API support IPv6 country edition |
42 |
+# HAVE_GEOIP_CITY_EDITION_REV0_V6 Whether the API supports IPv6 city edition |
43 |
+ |
44 |
+find_path(LibGeoIP_ROOT_DIR |
45 |
+ NAMES include/GeoIPCity.h |
46 |
+) |
47 |
+ |
48 |
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
49 |
+ # the static version of the library is preferred on OS X for the |
50 |
+ # purposes of making packages (libGeoIP doesn't ship w/ OS X) |
51 |
+ set(libgeoip_names libGeoIp.a GeoIP) |
52 |
+else () |
53 |
+ set(libgeoip_names GeoIP) |
54 |
+endif () |
55 |
+ |
56 |
+find_library(LibGeoIP_LIBRARY |
57 |
+ NAMES ${libgeoip_names} |
58 |
+ HINTS ${LibGeoIP_ROOT_DIR}/lib |
59 |
+) |
60 |
+ |
61 |
+find_path(LibGeoIP_INCLUDE_DIR |
62 |
+ NAMES GeoIPCity.h |
63 |
+ HINTS ${LibGeoIP_ROOT_DIR}/include |
64 |
+) |
65 |
+ |
66 |
+include(FindPackageHandleStandardArgs) |
67 |
+find_package_handle_standard_args(LibGeoIP DEFAULT_MSG |
68 |
+ LibGeoIP_LIBRARY |
69 |
+ LibGeoIP_INCLUDE_DIR |
70 |
+) |
71 |
+ |
72 |
+if (LIBGEOIP_FOUND) |
73 |
+ include(CheckCXXSourceCompiles) |
74 |
+ set(CMAKE_REQUIRED_INCLUDES ${LibGeoIP_INCLUDE_DIR}) |
75 |
+ check_cxx_source_compiles(" |
76 |
+ #include <GeoIPCity.h> |
77 |
+ int main() { GEOIP_COUNTRY_EDITION_V6; return 0; } |
78 |
+ " HAVE_GEOIP_COUNTRY_EDITION_V6) |
79 |
+ check_cxx_source_compiles(" |
80 |
+ #include <GeoIPCity.h> |
81 |
+ int main() { GEOIP_CITY_EDITION_REV0_V6; return 0; } |
82 |
+ " HAVE_GEOIP_CITY_EDITION_REV0_V6) |
83 |
+ set(CMAKE_REQUIRED_INCLUDES) |
84 |
+endif () |
85 |
+ |
86 |
+mark_as_advanced( |
87 |
+ LibGeoIP_ROOT_DIR |
88 |
+ LibGeoIP_LIBRARY |
89 |
+ LibGeoIP_INCLUDE_DIR |
90 |
+) |
91 |
\ No newline at end of file |
92 |
diff --git a/cmake/Modules/FindPythonModule.cmake b/cmake/Modules/FindPythonModule.cmake |
93 |
new file mode 100644 |
94 |
index 0000000..1a29315 |
95 |
--- /dev/null |
96 |
+++ cmake/Modules/FindPythonModule.cmake |
97 |
@@ -0,0 +1,24 @@ |
98 |
+# Find if a Python module is installed |
99 |
+# Found at http://www.cmake.org/pipermail/cmake/2011-January/041666.html |
100 |
+# To use do: find_python_module(PyQt4 REQUIRED) |
101 |
+function(find_python_module module) |
102 |
+ string(TOUPPER ${module} module_upper) |
103 |
+ if(NOT PYTHON_${module_upper}) |
104 |
+ include (FindPythonInterp) |
105 |
+ if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") |
106 |
+ set(PY_${module}_FIND_REQUIRED TRUE) |
107 |
+ endif() |
108 |
+ # A module's location is usually a directory, but for binary modules |
109 |
+ # it's a .so file. |
110 |
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" |
111 |
+ "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))" |
112 |
+ RESULT_VARIABLE _${module}_status |
113 |
+ OUTPUT_VARIABLE _${module}_location |
114 |
+ ERROR_QUIET |
115 |
+ OUTPUT_STRIP_TRAILING_WHITESPACE) |
116 |
+ if(${_${module}_status} EQUAL 0) |
117 |
+ set(PYTHON_${module_upper} ${_${module}_location} CACHE STRING "Location of Python module ${module}") |
118 |
+ endif(${_${module}_status} EQUAL 0) |
119 |
+ endif(NOT PYTHON_${module_upper}) |
120 |
+ find_package_handle_standard_args(PY_${module} DEFAULT_MSG PYTHON_${module_upper}) |
121 |
+endfunction(find_python_module) |
122 |
\ No newline at end of file |
123 |
diff --git a/cvmfs/CMakeLists.txt b/cvmfs/CMakeLists.txt |
124 |
index cb09b94..44be85e 100644 |
125 |
--- cvmfs/CMakeLists.txt |
126 |
+++ cvmfs/CMakeLists.txt |
127 |
@@ -347,9 +347,9 @@ if (BUILD_SERVER) |
128 |
# create targets with corresponding sources and static link libraries |
129 |
add_executable (cvmfs_swissknife ${CVMFS_SWISSKNIFE_SOURCES}) |
130 |
add_executable (cvmfs_suid_helper ${CVMFS_SUID_HELPER_SOURCES}) |
131 |
- add_custom_target (geoip ALL) |
132 |
|
133 |
if (GEOIP_BUILTIN) |
134 |
+ add_custom_target (geoip ALL) |
135 |
add_dependencies (python-geoip libgeoip) |
136 |
add_dependencies (geoip python-geoip) |
137 |
endif (GEOIP_BUILTIN) |
138 |
--- CMakeLists.txt.orig 2015-02-23 13:51:47.000000000 +0000 |
139 |
+++ CMakeLists.txt 2015-07-31 17:57:17.019920094 +0000 |
140 |
@@ -145,6 +145,12 @@ |
141 |
endif (EXISTS "${CMAKE_SOURCE_DIR}/bootstrap.sh") |
142 |
|
143 |
# |
144 |
+# include some common functionality |
145 |
+# |
146 |
+include (FindPythonModule) |
147 |
+ |
148 |
+ |
149 |
+# |
150 |
# set some default flags |
151 |
# |
152 |
# flags in CMAKE_C**_FLAGS are always passed to the compiler |
153 |
@@ -313,8 +319,8 @@ |
154 |
include (${LIBGEOIP_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt) |
155 |
include (${PYTHON_GEOIP_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt) |
156 |
else (GEOIP_BUILTIN) |
157 |
- find_package (GeoIP REQUIRED) |
158 |
- find_package (python-GeoIP REQUIRED) |
159 |
+ find_package (LibGeoIP REQUIRED) |
160 |
+ find_python_module (GeoIP REQUIRED) |
161 |
endif (GEOIP_BUILTIN) |
162 |
|
163 |
# required libraries for client and libcvmfs |
164 |
|
165 |
|
166 |
|
167 |
1.1 net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch |
168 |
|
169 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch?rev=1.1&view=markup |
170 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch?rev=1.1&content-type=text/plain |
171 |
|
172 |
Index: cvmfs-2.1.20.0_p05-cares-underlink.patch |
173 |
=================================================================== |
174 |
diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/cmake/Modules/FindCARES.cmake cvmfs-cvmfs-2.1.20.0-fix05/cmake/Modules/FindCARES.cmake |
175 |
--- cvmfs-cvmfs-2.1.20.0-fix05.orig/cmake/Modules/FindCARES.cmake 1970-01-01 00:00:00.000000000 +0000 |
176 |
+++ cvmfs-cvmfs-2.1.20.0-fix05/cmake/Modules/FindCARES.cmake 2015-07-31 18:35:05.859879354 +0000 |
177 |
@@ -0,0 +1,35 @@ |
178 |
+# |
179 |
+# $Id: cvmfs-2.1.20.0_p05-cares-underlink.patch,v 1.1 2015/07/31 20:09:57 bicatali Exp $ |
180 |
+# |
181 |
+# - Find cares |
182 |
+# Find the native CARES includes and library |
183 |
+# |
184 |
+# CARES_INCLUDE_DIRS - where to find cares.h, etc. |
185 |
+# CARES_LIBRARIES - List of libraries when using cares. |
186 |
+# CARES_FOUND - True if cares found. |
187 |
+ |
188 |
+ |
189 |
+IF (CARES_INCLUDE_DIRS) |
190 |
+ # Already in cache, be silent |
191 |
+ SET(CARES_FIND_QUIETLY TRUE) |
192 |
+ENDIF (CARES_INCLUDE_DIRS) |
193 |
+ |
194 |
+FIND_PATH(CARES_INCLUDE_DIR ares.h) |
195 |
+ |
196 |
+SET(CARES_NAMES cares) |
197 |
+FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} ) |
198 |
+ |
199 |
+# handle the QUIETLY and REQUIRED arguments and set CARES_FOUND to TRUE if |
200 |
+# all listed variables are TRUE |
201 |
+INCLUDE(FindPackageHandleStandardArgs) |
202 |
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CARES DEFAULT_MSG CARES_LIBRARY CARES_INCLUDE_DIR) |
203 |
+ |
204 |
+IF(CARES_FOUND) |
205 |
+ SET( CARES_LIBRARIES ${CARES_LIBRARY} ) |
206 |
+ SET( CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR} ) |
207 |
+ELSE(CARES_FOUND) |
208 |
+ SET( CARES_LIBRARIES ) |
209 |
+ SET( CARES_INCLUDE_DIRS ) |
210 |
+ENDIF(CARES_FOUND) |
211 |
+ |
212 |
+MARK_AS_ADVANCED( CARES_LIBRARIES CARES_INCLUDE_DIRS ) |
213 |
diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/CMakeLists.txt cvmfs-cvmfs-2.1.20.0-fix05/CMakeLists.txt |
214 |
--- cvmfs-cvmfs-2.1.20.0-fix05.orig/CMakeLists.txt 2015-02-23 13:51:47.000000000 +0000 |
215 |
+++ cvmfs-cvmfs-2.1.20.0-fix05/CMakeLists.txt 2015-07-31 18:32:34.259882076 +0000 |
216 |
@@ -252,9 +252,12 @@ |
217 |
include (${CARES_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt) |
218 |
include (${LIBCURL_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt) |
219 |
set (CURL_LIBRARIES "") |
220 |
+ set (CARES_LIBRARIES "") |
221 |
else (LIBCURL_BUILTIN) |
222 |
find_package (CURL REQUIRED) |
223 |
+ find_package (CARES REQUIRED) |
224 |
set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${CURL_INCLUDE_DIRS}) |
225 |
+ set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${CARES_INCLUDE_DIRS}) |
226 |
if (CURL_INCLUDE_DIRS) |
227 |
find_program(CURL_CONFIG_EXEC NAMES curl-config) |
228 |
if (CURL_CONFIG_EXEC) |
229 |
diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/cvmfs/CMakeLists.txt cvmfs-cvmfs-2.1.20.0-fix05/cvmfs/CMakeLists.txt |
230 |
--- cvmfs-cvmfs-2.1.20.0-fix05.orig/cvmfs/CMakeLists.txt 2015-02-23 13:51:47.000000000 +0000 |
231 |
+++ cvmfs-cvmfs-2.1.20.0-fix05/cvmfs/CMakeLists.txt 2015-07-31 18:34:36.789879876 +0000 |
232 |
@@ -271,7 +271,7 @@ |
233 |
set_target_properties (cvmfs_fuse_debug PROPERTIES VERSION ${CernVM-FS_VERSION_STRING}) |
234 |
|
235 |
# link the stuff (*_LIBRARIES are dynamic link libraries *_archive are static link libraries ... one of them will be empty for each dependency) |
236 |
- set (CVMFS_FUSE_LINK_LIBRARIES ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${LEVELDB_LIBRARIES} ${OPENSSL_LIBRARIES} ${FUSE_LIBRARIES} ${LIBFUSE_ARCHIVE} ${SQLITE3_ARCHIVE} ${LIBCURL_ARCHIVE} ${PACPARSER_ARCHIVE} ${LEVELDB_ARCHIVE} ${CARES_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl) |
237 |
+ set (CVMFS_FUSE_LINK_LIBRARIES ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${LEVELDB_LIBRARIES} ${OPENSSL_LIBRARIES} ${FUSE_LIBRARIES} ${LIBFUSE_ARCHIVE} ${SQLITE3_ARCHIVE} ${LIBCURL_ARCHIVE} ${PACPARSER_ARCHIVE} ${LEVELDB_ARCHIVE} ${CARES_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl) |
238 |
|
239 |
target_link_libraries (cvmfs2 ${CVMFS_LOADER_LIBS} ${OPENSSL_LIBRARIES} ${LIBFUSE} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl) |
240 |
target_link_libraries (cvmfs_fuse_debug ${CVMFS2_DEBUG_LIBS} ${CVMFS_FUSE_LINK_LIBRARIES}) |
241 |
@@ -331,7 +331,7 @@ |
242 |
add_dependencies (libcvmfs cvmfs_only) |
243 |
|
244 |
add_executable( test_libcvmfs ${TEST_LIBCVMFS_SOURCES} ) |
245 |
- target_link_libraries( test_libcvmfs ${CMAKE_CURRENT_BINARY_DIR}/libcvmfs.a ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl ) |
246 |
+ target_link_libraries( test_libcvmfs ${CMAKE_CURRENT_BINARY_DIR}/libcvmfs.a ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl ) |
247 |
add_dependencies (test_libcvmfs libcvmfs) |
248 |
|
249 |
endif (BUILD_LIBCVMFS) |
250 |
@@ -371,7 +371,7 @@ |
251 |
set_target_properties (cvmfs_swissknife PROPERTIES COMPILE_FLAGS "${CVMFS_SWISSKNIFE_CFLAGS}" LINK_FLAGS "${CVMFS_SWISSKNIFE_LD_FLAGS}") |
252 |
|
253 |
# link the stuff (*_LIBRARIES are dynamic link libraries) |
254 |
- target_link_libraries (cvmfs_swissknife ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${TBB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl) |
255 |
+ target_link_libraries (cvmfs_swissknife ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${TBB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl) |
256 |
|
257 |
if (BUILD_SERVER_DEBUG) |
258 |
add_executable (cvmfs_swissknife_debug ${CVMFS_SWISSKNIFE_DEBUG_SOURCES}) |
259 |
@@ -399,7 +399,7 @@ |
260 |
message (WARNING "Debug libraries of TBB were not found. Using the release versions instead.") |
261 |
set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARIES}) |
262 |
endif (NOT TBB_DEBUG_LIBRARIES) |
263 |
- target_link_libraries (cvmfs_swissknife_debug ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${TBB_DEBUG_LIBRARIES} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl) |
264 |
+ target_link_libraries (cvmfs_swissknife_debug ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${TBB_DEBUG_LIBRARIES} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl) |
265 |
endif (BUILD_SERVER_DEBUG) |
266 |
endif (BUILD_SERVER) |
267 |
|
268 |
diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/cvmfs/CMakeLists.txt cvmfs-cvmfs-2.1.20.0-fix05/cvmfs/CMakeLists.txt |
269 |
--- cvmfs-cvmfs-2.1.20.0-fix05.orig/test/unittests/CMakeLists.txt.orig 2015-07-31 19:03:06.829849170 +0000 |
270 |
+++ cvmfs-cvmfs-2.1.20.0-fix05/test/unittests/CMakeLists.txt 2015-07-31 19:03:36.459848638 +0000 |
271 |
@@ -212,7 +212,7 @@ |
272 |
endif (BUILD_UNITTESTS_DEBUG) |
273 |
|
274 |
# link the stuff (*_LIBRARIES are dynamic link libraries) |
275 |
-set (UNITTEST_LINK_LIBRARIES ${GTEST_LIBRARIES} ${GOOGLETEST_ARCHIVE} ${OPENSSL_LIBRARIES} |
276 |
+set (UNITTEST_LINK_LIBRARIES ${GTEST_LIBRARIES} ${GOOGLETEST_ARCHIVE} ${OPENSSL_LIBRARIES} ${CARES_LIBRARIES} |
277 |
${CURL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} |
278 |
${SQLITE3_LIBRARY} ${SQLITE3_ARCHIVE} ${TBB_LIBRARIES} |
279 |
${ZLIB_LIBRARIES} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${UUID_LIBRARIES} |