[mapguide-commits] r9451 - in trunk/MgDev: . Server/src/Core Web/src/ApacheAgent Web/src/HttpHandler Web/src/JavaApi Web/src/JavaApiEx Web/src/PhpApi Web/src/WebApp Web/src/WebSupport cmake/configs

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Jan 11 08:14:03 PST 2019


Author: jng
Date: 2019-01-11 08:14:03 -0800 (Fri, 11 Jan 2019)
New Revision: 9451

Modified:
   trunk/MgDev/Server/src/Core/CMakeLists.txt
   trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt
   trunk/MgDev/Web/src/HttpHandler/CMakeLists.txt
   trunk/MgDev/Web/src/JavaApi/CMakeLists.txt
   trunk/MgDev/Web/src/JavaApiEx/CMakeLists.txt
   trunk/MgDev/Web/src/PhpApi/CMakeLists.txt
   trunk/MgDev/Web/src/WebApp/CMakeLists.txt
   trunk/MgDev/Web/src/WebSupport/CMakeLists.txt
   trunk/MgDev/cmake/configs/webconfig.ini.in
   trunk/MgDev/cmake_linuxapt.sh
Log:
#2785: Ensure that web tier libs have RPATHS pointing back up to common libs and ensure absolute prefix is being stamped to webconfig.ini

Modified: trunk/MgDev/Server/src/Core/CMakeLists.txt
===================================================================
--- trunk/MgDev/Server/src/Core/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Server/src/Core/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -83,18 +83,20 @@
 ########### BEGIN Development/Testing environment setup #############
 file(GLOB_RECURSE UNIT_TEST_FILES "${MG_UNIT_TEST_DATA_DIR}/*.*")
 file(COPY ${UNIT_TEST_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFiles)
-file(COPY ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFiles/Shuttle.zip DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFiles/World.mgp)
+# Awkward, can't copy a file to a target file name
+file(COPY ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFiles/Shuttle.zip DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFilesTemp)
+file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFilesTemp/Shuttle.zip ${CMAKE_CURRENT_BINARY_DIR}/../UnitTestFiles/World.mgp)
 
 # Symlink the built copy to facilitate inner loop testing/debugging
 # The actual symlink installation is done in the UnitTesting CMakeLists.txt
 execute_process(COMMAND ln -sf ${CMAKE_CURRENT_BINARY_DIR}/../UnitTesting/libMgUnitTesting.so ${CMAKE_CURRENT_BINARY_DIR}/libMgUnitTesting.so)
-set(ORIG_MG_INSTALL_SERVER_PREFIX "${MG_INSTALL_SERVER_PREFIX}")
-set(ORIG_MG_INSTALL_COORDSYS_PREFIX "${MG_INSTALL_COORDSYS_PREFIX}")
-set(MG_INSTALL_SERVER_PREFIX "${CMAKE_CURRENT_BINARY_DIR}")
-set(MG_INSTALL_COORDSYS_PREFIX "${MG_OEM_ROOT_BUILD_DIR}/CsMapLibrary/CsMap_Install/Dictionaries")
+set(ORIG_MG_INSTALL_SERVER_PREFIX_ABS "${MG_INSTALL_SERVER_PREFIX_ABS}")
+set(ORIG_MG_INSTALL_COORDSYS_PREFIX_ABS "${MG_INSTALL_COORDSYS_PREFIX_ABS}")
+set(MG_INSTALL_SERVER_PREFIX_ABS "${CMAKE_CURRENT_BINARY_DIR}")
+set(MG_INSTALL_COORDSYS_PREFIX_ABS "${MG_OEM_ROOT_BUILD_DIR}/CsMapLibrary/CsMap_Install/Dictionaries")
 configure_file(${CMAKE_MODULE_PATH}/../configs/serverconfig.ini.in ${CMAKE_CURRENT_BINARY_DIR}/serverconfig.ini)
-set(MG_INSTALL_SERVER_PREFIX "${ORIG_MG_INSTALL_SERVER_PREFIX}")
-set(MG_INSTALL_COORDSYS_PREFIX "${ORIG_MG_INSTALL_COORDSYS_PREFIX}")
+set(MG_INSTALL_SERVER_PREFIX_ABS "${ORIG_MG_INSTALL_SERVER_PREFIX_ABS}")
+set(MG_INSTALL_COORDSYS_PREFIX_ABS "${ORIG_MG_INSTALL_COORDSYS_PREFIX_ABS}")
 file(COPY ${MG_COMMON_DIR}/MapGuideCommon/Resources DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY ${MG_COMMON_DIR}/Schema DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 

Modified: trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -48,4 +48,11 @@
 )
 
 # Make sure this doesn't have the "lib" prefix
-set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES PREFIX "")
\ No newline at end of file
+set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES PREFIX "")
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/Web/src/HttpHandler/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/HttpHandler/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -30,4 +30,11 @@
 
 if (INTERNAL_JSON)
     install(FILES ${MG_OEM_WORK_DIR}/jsoncpp/lib/liblib_json.so DESTINATION ${LIB_INSTALL_DIR})
-endif (INTERNAL_JSON)
\ No newline at end of file
+endif (INTERNAL_JSON)
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(MgHttpHandler${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(MgHttpHandler${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/Web/src/JavaApi/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/JavaApi/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/JavaApi/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -86,4 +86,11 @@
 file(COPY "java.i" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY "getclassid.code" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY "catchall.code" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY "org" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
\ No newline at end of file
+file(COPY "org" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(MapGuideJavaApi${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(MapGuideJavaApi${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/Web/src/JavaApiEx/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/JavaApiEx/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/JavaApiEx/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -89,4 +89,11 @@
 file(COPY "catchall.code" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY "org" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 # Specific for JavaApiEx
-file(COPY "javaextensions.i" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
\ No newline at end of file
+file(COPY "javaextensions.i" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(MapGuideJavaApiEx${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(MapGuideJavaApiEx${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/Web/src/PhpApi/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/PhpApi/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/PhpApi/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -76,4 +76,11 @@
 
 file(COPY "php.i" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY "getclassid.code" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY "catchall.code" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
\ No newline at end of file
+file(COPY "catchall.code" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(php_MapGuideApi${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(php_MapGuideApi${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/Web/src/WebApp/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/WebApp/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/WebApp/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -48,4 +48,11 @@
     MgGeometry${MG_VERSION_SUFFIX}
     MgPlatformBase${MG_VERSION_SUFFIX}
     MgMapGuideCommon${MG_VERSION_SUFFIX}
-)
\ No newline at end of file
+)
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(MgWebApp${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(MgWebApp${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/Web/src/WebSupport/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/WebSupport/CMakeLists.txt	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/Web/src/WebSupport/CMakeLists.txt	2019-01-11 16:14:03 UTC (rev 9451)
@@ -18,4 +18,11 @@
     MgFoundation${MG_VERSION_SUFFIX}
     MgPlatformBase${MG_VERSION_SUFFIX}
     MgMapGuideCommon${MG_VERSION_SUFFIX}
-)
\ No newline at end of file
+)
+
+# Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+if(MG_CPU EQUAL 64)
+    set_target_properties(MgWebSupport${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+else(MG_CPU EQUAL 64)
+    set_target_properties(MgWebSupport${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+endif(MG_CPU EQUAL 64)
\ No newline at end of file

Modified: trunk/MgDev/cmake/configs/webconfig.ini.in
===================================================================
--- trunk/MgDev/cmake/configs/webconfig.ini.in	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/cmake/configs/webconfig.ini.in	2019-01-11 16:14:03 UTC (rev 9451)
@@ -61,7 +61,7 @@
 MentorDictionaryPath               = @MG_INSTALL_COORDSYS_PREFIX_ABS@
 ResourcesPath                      = @MG_WWWROOT_ABS@/Resources/
 TcpIpMtu                           = 1460
-TempPath                           = @MG_WWWROOT_ABS@/Temp/
+TempPath                           = @MG_INSTALL_WEB_PREFIX_ABS@/Temp/
 FailoverRetryTime                  = 1
 
 [AdministrativeConnectionProperties]

Modified: trunk/MgDev/cmake_linuxapt.sh
===================================================================
--- trunk/MgDev/cmake_linuxapt.sh	2019-01-11 16:05:46 UTC (rev 9450)
+++ trunk/MgDev/cmake_linuxapt.sh	2019-01-11 16:14:03 UTC (rev 9451)
@@ -226,6 +226,9 @@
 ant deploy -Ddeploy.home=${MG_INSTALL_WEB_PREFIX}/www/fusion
 chown daemon:daemon "${MG_INSTALL_WEB_PREFIX}/www/fusion/lib/tcpdf/cache"
 cp -R "${SOURCE_DIR}/Oem/fusionMG/templates" "${MG_INSTALL_WEB_PREFIX}/www/fusion"
+# Since we're here, set up the temp dir and chown that as well
+mkdir -p "${MG_INSTALL_WEB_PREFIX}/Temp"
+chown daemon:daemon "${MG_INSTALL_WEB_PREFIX}/Temp"
 
 cp -f "$OEM_WORK_DIR/env_vars.stage1.sh" "$OEM_WORK_DIR/env_vars.sh"
 # append vars to setup script



More information about the mapguide-commits mailing list