Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ports/rdma-core/0001-disable-tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 718b7d2dd..533860ed6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,6 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
# Sub-directories
add_subdirectory(ccan)
add_subdirectory(util)
-add_subdirectory(util/tests)
add_subdirectory(Documentation)
add_subdirectory(kernel-boot)
add_subdirectory(kernel-headers)
@@ -768,7 +767,6 @@ add_subdirectory(infiniband-diags/man)

if (CYTHON_EXECUTABLE)
add_subdirectory(pyverbs)
- add_subdirectory(tests)
endif()

# Binaries
@@ -779,7 +777,6 @@ endif()
if (NOT NL_KIND EQUAL 0)
add_subdirectory(iwpmd)
endif()
-add_subdirectory(libibumad/tests)
add_subdirectory(libibverbs/examples)
add_subdirectory(librdmacm/examples)
if (UDEV_FOUND)
13 changes: 13 additions & 0 deletions ports/rdma-core/0002-disable-examples.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 533860ed6..fa1a57b4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -777,8 +777,6 @@ endif()
if (NOT NL_KIND EQUAL 0)
add_subdirectory(iwpmd)
endif()
-add_subdirectory(libibverbs/examples)
-add_subdirectory(librdmacm/examples)
if (UDEV_FOUND)
add_subdirectory(rdma-ndd)
endif()
12 changes: 12 additions & 0 deletions ports/rdma-core/0003-disable-documentation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa1a57b4f..f0c411792 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,6 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
# Sub-directories
add_subdirectory(ccan)
add_subdirectory(util)
-add_subdirectory(Documentation)
add_subdirectory(kernel-boot)
add_subdirectory(kernel-headers)
# Libraries
14 changes: 14 additions & 0 deletions ports/rdma-core/0004-disable-infiniband-diags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0c411792..ffa784de1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -760,9 +760,6 @@ add_subdirectory(providers/siw)
add_subdirectory(libibmad)
add_subdirectory(libibnetdisc)
add_subdirectory(libibnetdisc/man)
-add_subdirectory(infiniband-diags)
-add_subdirectory(infiniband-diags/scripts)
-add_subdirectory(infiniband-diags/man)

if (CYTHON_EXECUTABLE)
add_subdirectory(pyverbs)
12 changes: 12 additions & 0 deletions ports/rdma-core/0005-disable-srp-daemon.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffa784de1..45d736147 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -776,7 +776,6 @@ endif()
if (UDEV_FOUND)
add_subdirectory(rdma-ndd)
endif()
-add_subdirectory(srp_daemon)

ibverbs_finalize()
rdma_finalize_libs()
12 changes: 12 additions & 0 deletions ports/rdma-core/0006-disable-kernel-boot.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45d736147..cd713f897 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -718,7 +718,6 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT
# Sub-directories
add_subdirectory(ccan)
add_subdirectory(util)
-add_subdirectory(kernel-boot)
add_subdirectory(kernel-headers)
# Libraries
add_subdirectory(libibumad)
33 changes: 33 additions & 0 deletions ports/rdma-core/0007-disable-librspreload.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/librdmacm/CMakeLists.txt b/librdmacm/CMakeLists.txt
index ea1d1550f..400c18f49 100644
--- a/librdmacm/CMakeLists.txt
+++ b/librdmacm/CMakeLists.txt
@@ -25,28 +25,6 @@ target_link_libraries(rdmacm LINK_PRIVATE
${RT_LIBRARIES}
)

-# The preload library is a bit special, it needs to be open coded
-# Since it is a LD_PRELOAD it has no soname, and is installed in sub dir
-add_library(rspreload MODULE
- preload.c
- indexer.c
- )
-# Even though this is a module we still want to use Wl,--no-undefined
-set_target_properties(rspreload PROPERTIES LINK_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
-set_target_properties(rspreload PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
-rdma_set_library_map(rspreload librspreload.map)
-target_link_libraries(rspreload LINK_PRIVATE
- rdmacm
- ${CMAKE_THREAD_LIBS_INIT}
- ${CMAKE_DL_LIBS}
-)
-install(TARGETS rspreload DESTINATION "${CMAKE_INSTALL_LIBDIR}/rsocket/")
-
-# These are for compat with old packaging, these name should not be used.
-# FIXME: Maybe we can get rid of them?
-rdma_install_symlink("librspreload.so" "${CMAKE_INSTALL_LIBDIR}/rsocket/librspreload.so.1")
-rdma_install_symlink("librspreload.so" "${CMAKE_INSTALL_LIBDIR}/rsocket/librspreload.so.1.0.0")
-
if (ENABLE_STATIC)
if (NOT NL_KIND EQUAL 0)
set(REQUIRES "libnl-3.0, libnl-route-3.0, ")
79 changes: 79 additions & 0 deletions ports/rdma-core/0008-enable-static-libs-only.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
diff --git a/buildlib/rdma_functions.cmake b/buildlib/rdma_functions.cmake
index ef77d95d0..84e650497 100644
--- a/buildlib/rdma_functions.cmake
+++ b/buildlib/rdma_functions.cmake
@@ -117,7 +117,10 @@ function(rdma_library DEST VERSION_SCRIPT SOVERSION VERSION)
SOVERSION ${SOVERSION}
VERSION ${VERSION}
LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
- install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+
+ if(NOT ENABLE_STATIC)
+ install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ endif()
endfunction()

# Create a special provider with exported symbols in it The shared provider
@@ -153,20 +156,23 @@ function(rdma_shared_provider DEST VERSION_SCRIPT SOVERSION VERSION)
SOVERSION ${SOVERSION}
VERSION ${VERSION}
LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
- install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
-
- # Compute a relative symlink from VERBS_PROVIDER_DIR to LIBDIR
- execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/buildlib/relpath
- "${CMAKE_INSTALL_FULL_LIBDIR}/lib${DEST}.so.${VERSION}"
- "${VERBS_PROVIDER_DIR}"
- OUTPUT_VARIABLE DEST_LINK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE retcode)
- if(NOT "${retcode}" STREQUAL "0")
- message(FATAL_ERROR "Unable to run buildlib/relpath, do you have python?")
- endif()

- rdma_install_symlink("${DEST_LINK_PATH}" "${VERBS_PROVIDER_DIR}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
- rdma_create_symlink("lib${DEST}.so.${VERSION}" "${BUILD_LIB}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
+ if(NOT ENABLE_STATIC)
+ install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+
+ # Compute a relative symlink from VERBS_PROVIDER_DIR to LIBDIR
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/buildlib/relpath
+ "${CMAKE_INSTALL_FULL_LIBDIR}/lib${DEST}.so.${VERSION}"
+ "${VERBS_PROVIDER_DIR}"
+ OUTPUT_VARIABLE DEST_LINK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
+ RESULT_VARIABLE retcode)
+ if(NOT "${retcode}" STREQUAL "0")
+ message(FATAL_ERROR "Unable to run buildlib/relpath, do you have python?")
+ endif()
+
+ rdma_install_symlink("${DEST_LINK_PATH}" "${VERBS_PROVIDER_DIR}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
+ rdma_create_symlink("lib${DEST}.so.${VERSION}" "${BUILD_LIB}/lib${DEST}${IBVERBS_PROVIDER_SUFFIX}")
+ endif()
endfunction()

# Create a provider shared library for libibverbs
@@ -201,15 +207,17 @@ function(rdma_provider DEST)
# Provider Plugins do not use SONAME versioning, there is no reason to
# create the usual symlinks.

- if (VERBS_PROVIDER_DIR)
- install(TARGETS ${DEST} DESTINATION "${VERBS_PROVIDER_DIR}")
- else()
- install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ if(NOT ENABLE_STATIC)
+ if (VERBS_PROVIDER_DIR)
+ install(TARGETS ${DEST} DESTINATION "${VERBS_PROVIDER_DIR}")
+ else()
+ install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")

- # FIXME: This symlink is provided for compat with the old build, but it
- # never should have existed in the first place, nothing should use this
- # name, we can probably remove it.
- rdma_install_symlink("lib${DEST}${IBVERBS_PROVIDER_SUFFIX}" "${CMAKE_INSTALL_LIBDIR}/lib${DEST}.so")
+ # FIXME: This symlink is provided for compat with the old build, but it
+ # never should have existed in the first place, nothing should use this
+ # name, we can probably remove it.
+ rdma_install_symlink("lib${DEST}${IBVERBS_PROVIDER_SUFFIX}" "${CMAKE_INSTALL_LIBDIR}/lib${DEST}.so")
+ endif()
endif()
endfunction()

55 changes: 55 additions & 0 deletions ports/rdma-core/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO linux-rdma/rdma-core
REF "v${VERSION}"
SHA512 0251340e2b3b90562f903bcc26d489516c6efba3179423932c6b9c2e8dd2c6ef934fa476d9963db26544ddb5232e0da94574774e578ea6c0268c57961a0aeb47
HEAD_REF master
PATCHES
0001-disable-tests.patch
0002-disable-examples.patch
0003-disable-documentation.patch
0004-disable-infiniband-diags.patch
0005-disable-srp-daemon.patch
0006-disable-kernel-boot.patch
0007-disable-librspreload.patch
0008-enable-static-libs-only.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DENABLE_RESOLVE_NEIGH=OFF
-DNO_MAN_PAGES=ON
-DNO_PYVERBS=ON
-DENABLE_STATIC="${ENABLE_STATIC}"
-DVCPKG_LOCK_FIND_PACKAGE_PythonLibs=ON
-DVCPKG_LOCK_FIND_PACKAGE_Systemd=OFF
-DVCPKG_LOCK_FIND_PACKAGE_UDev=OFF
-DVCPKG_LOCK_FIND_PACKAGE_cython=OFF
-DVCPKG_LOCK_FIND_PACKAGE_pandoc=OFF
-DVCPKG_LOCK_FIND_PACKAGE_rst2man=OFF
MAYBE_UNUSED_VARIABLES
VCPKG_LOCK_FIND_PACKAGE_PythonLibs
VCPKG_LOCK_FIND_PACKAGE_cython
VCPKG_LOCK_FIND_PACKAGE_pandoc
VCPKG_LOCK_FIND_PACKAGE_rst2man
)

vcpkg_cmake_install()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/libexec")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/libexec")

vcpkg_install_copyright(FILE_LIST
"${SOURCE_PATH}/COPYING.md"
"${SOURCE_PATH}/COPYING.BSD_MIT"
"${SOURCE_PATH}/COPYING.GPL2"
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(extreme nitpick) Please add the missing newline here

23 changes: 23 additions & 0 deletions ports/rdma-core/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "rdma-core",
"version": "62.0",
"description": "The userspace components for the Linux Kernel's drivers/infiniband subsystem.",
"homepage": "https://github.com/linux-rdma/rdma-core",
"license": "GPL-2.0-only OR Linux-OpenIB",
Comment thread
chris1786 marked this conversation as resolved.
"supports": "linux",
"dependencies": [
{
"name": "python3",
"host": true,
"default-features": false
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8608,6 +8608,10 @@
"baseline": "3.3.1",
"port-version": 0
},
"rdma-core": {
"baseline": "62.0",
"port-version": 0
},
"re2": {
"baseline": "2025-11-05",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/r-/rdma-core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "1df4cdc0f94b5d31e47dddc888516d7ec014d435",
"version": "62.0",
"port-version": 0
}
]
}