smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

xpClassifiedRepo git protocol #384

Closed smanders closed 1 year ago

smanders commented 1 year ago

newer releases of GitHub Enterprise have removed support for the git:// protocol -- see issue https://github.com/smanders/externpro/issues/342

the cmake function xpClassifiedRepo(), which clones classified repos in a secure space is still using the git:// protocol https://github.com/smanders/externpro/blob/23.02/modules/xpfunmac.cmake#L1588 -- and the secure space has started using GitHub Enterprise

smanders commented 1 year ago

completed with commit referenced above

verified by modifying LinPIPlugin with the following:

diff --git a/LinPIPlugin/CMakeLists.txt b/LinPIPlugin/CMakeLists.txt
index a60ce97..d3f5cff 100644
--- a/LinPIPlugin/CMakeLists.txt
+++ b/LinPIPlugin/CMakeLists.txt
@@ -33,11 +33,10 @@ set_property(TARGET ${plugin_name} PROPERTY FOLDER ${folder})
 #######################################
 set(repoDir ${CMAKE_CURRENT_BINARY_DIR}/UTAS)
 if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
-  xpClassifiedRepo(REPO clas_external VERBOSE
-    HASH c767d66 # processImages 3.10.20
+  xpClassifiedRepo(REPO dummy VERBOSE
+    HASH 5228769
     WORKING_TREE ${repoDir}
-    PATH_UNIX /mnt/gitRepo
-    PATH_MSW //dev-isilon.vip.local/gitrepo
+    PATH_URL isrhub.usurf.usu.edu/smanders
     )
 endif()
 #######################################

with PlugniLibraries using current PluginLibraries hash (externpro 23.02), classified clone fails because it uses git:// protocol

-- =====================================================================
--  Classified repo found. Classified build configuration proceeding... 
-- =====================================================================
-- Found Git: /usr/bin/git (found version "2.36.3") 
-- Cloning git://isrhub.usurf.usu.edu/smanders/dummy.git to /bpvol/LinPIPlugin/_bldx/LinPIPlugin/UTAS
-- Checkout hash '5228769'
CMake Error at /opt/extern/externpro-23.02-gcc931-64-Linux/share/cmake/xpfunmac.cmake:1566 (message):
  Failed to checkout: verify hash correct
Call Stack (most recent call first):
  /opt/extern/externpro-23.02-gcc931-64-Linux/share/cmake/xpfunmac.cmake:1623 (xpGitCheckout)
  LinPIPlugin/CMakeLists.txt:36 (xpClassifiedRepo)

after setting PluginLibraries hash to HEAD of xpro branch, classified clone succeeds

-- =====================================================================
--  Classified repo found. Classified build configuration proceeding... 
-- =====================================================================
-- Cloning https://isrhub.usurf.usu.edu/smanders/dummy to /bpvol/linpiplugin/_bld/LinPIPlugin/UTAS
-- Checkout hash '5228769'