diff --git a/sysutils/rshim-user-space/Makefile b/sysutils/rshim-user-space/Makefile index 1e37e42c1c90..f7b896bfe145 100644 --- a/sysutils/rshim-user-space/Makefile +++ b/sysutils/rshim-user-space/Makefile @@ -1,33 +1,36 @@ PORTNAME= rshim-user-space -DISTVERSIONPREFIX= rshim- -DISTVERSION= 2.0.9 -PORTREVISION= 1 -PORTEPOCH= 1 +DISTVERSION= 2.8.5 +PORTEPOCH= 1 +CATEGORIES= sysutils +MASTER_SITES= https://github.com/Mellanox/${PORTNAME}/releases/download/rshim-${DISTVERSION}/ +DISTNAME= rshim-src-${DISTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Userspace daemon for the Mellanox BlueField SoC WWW= https://github.com/Mellanox/rshim-user-space/ LICENSE= BSD3CLAUSE -CATEGORIES= sysutils - LIB_DEPENDS= libepoll-shim-interpose.so:devel/libepoll-shim \ - libpci.so:devel/libpci \ - libpciaccess.so:devel/libpciaccess + libpci.so:devel/libpci +RUN_DEPENDS= bash:shells/bash -USES= autoreconf compiler:c11 localbase gmake pkgconfig tar:bzip2 +USES= autoreconf compiler:c11 pkgconfig python:build,run shebangfix -USE_GITHUB= yes -GH_ACCOUNT= Mellanox +SHEBANG_FILES= scripts/bf-pldm-ver \ + scripts/bfb-install \ + scripts/bfb-tool \ + scripts/mlx-mkbfb \ + third_party/PLDM-unpack/fwpkg_unpack.py GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX=${PREFIX}/share + +NO_WRKSUBDIR= yes .include .if ${OPSYS} != FreeBSD || !exists(/usr/lib/libcuse.so) IGNORE= not supported on this operating system combination .endif .include diff --git a/sysutils/rshim-user-space/distinfo b/sysutils/rshim-user-space/distinfo index 6df65c9ba0e4..3a0d3f036291 100644 --- a/sysutils/rshim-user-space/distinfo +++ b/sysutils/rshim-user-space/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1687158804 -SHA256 (Mellanox-rshim-user-space-rshim-2.0.9_GH0.tar.gz) = 7bf0ca004dea09b3d60d9a4cde337ad2d188c702b8dd6af1a038c82f3376218f -SIZE (Mellanox-rshim-user-space-rshim-2.0.9_GH0.tar.gz) = 69540 +TIMESTAMP = 1787117871 +SHA256 (rshim-src-2.8.5.tar.gz) = 527bac1e2e1b60e9d499b8963c955ec78c51c9c65eb5d257adecb0877a717c33 +SIZE (rshim-src-2.8.5.tar.gz) = 146541 diff --git a/sysutils/rshim-user-space/files/patch-configure.ac b/sysutils/rshim-user-space/files/patch-configure.ac index f9ea602c64ac..450f4b433338 100644 --- a/sysutils/rshim-user-space/files/patch-configure.ac +++ b/sysutils/rshim-user-space/files/patch-configure.ac @@ -1,16 +1,16 @@ ---- configure.ac.orig 2022-07-05 09:38:08 UTC +--- configure.ac.orig 2026-08-16 14:25:19 UTC +++ configure.ac -@@ -91,10 +91,9 @@ fi +@@ -95,10 +95,9 @@ if test $backend = freebsd; then ]) if test $backend = freebsd; then -AC_SUBST(CPPFLAGS, "$CPPFLAGS -I${prefix}/include/libepoll-shim") -AC_SUBST(LDFLAGS, "$LDFLAGS -L${prefix}/lib") -AC_CHECK_HEADERS([sys/epoll.h],[],[AC_MSG_ERROR([Missing libepoll-shim])]) -AC_CHECK_LIB(epoll-shim, epoll_create1) +PKG_CHECK_MODULES([EPOLLSHIM], [epoll-shim-interpose]) +AC_SUBST(CPPFLAGS, "$CPPFLAGS $EPOLLSHIM_CFLAGS") +AC_SUBST(LDFLAGS, "$LDFLAGS $EPOLLSHIM_LIBS") AC_SUBST(CPPFLAGS, "$CPPFLAGS -DDEFAULT_RSHIM_CONFIG_FILE='\"${prefix}/etc/rshim.conf\"'") else AC_SUBST(CPPFLAGS, "$CPPFLAGS -DDEFAULT_RSHIM_CONFIG_FILE='\"/etc/rshim.conf\"'") diff --git a/sysutils/rshim-user-space/files/patch-src_rshim__pcie.c b/sysutils/rshim-user-space/files/patch-src_rshim__pcie.c new file mode 100644 index 000000000000..ff3e3438f1b8 --- /dev/null +++ b/sysutils/rshim-user-space/files/patch-src_rshim__pcie.c @@ -0,0 +1,15 @@ +--- src/rshim_pcie.c.orig 2026-08-16 14:25:19 UTC ++++ src/rshim_pcie.c +@@ -1585,7 +1585,11 @@ int rshim_pcie_init(void) + * If DROP mode is set and this device got auto-bound during ID + * registration, unbind it now. + */ +- if (rshim_drop_mode > 0 && rshim_sys_pci_path) { ++ if (rshim_drop_mode > 0 ++#ifdef __linux__ ++ && rshim_sys_pci_path ++#endif /* __linux__ */ ++ ) { + char pci_addr[32]; + char cmd[RSHIM_CMD_MAX]; + snprintf(pci_addr, sizeof(pci_addr), "%04x:%02x:%02x.%x", diff --git a/sysutils/rshim-user-space/pkg-plist b/sysutils/rshim-user-space/pkg-plist index c0168a47ee30..48066c8d2d86 100644 --- a/sysutils/rshim-user-space/pkg-plist +++ b/sysutils/rshim-user-space/pkg-plist @@ -1,7 +1,16 @@ etc/rc.d/rshim etc/rshim.conf +sbin/bf-pldm-ver +sbin/bf-reg @comment sbin/bfb-install +sbin/bfb-tool +sbin/fwpkg_unpack.py +sbin/mlx-mkbfb sbin/rshim share/doc/rshim/README.md -share/man/man8/rshim.8.gz +share/man/man1/mlx-mkbfb.1.gz +share/man/man8/bf-pldm-ver.8.gz +share/man/man8/bf-reg.8.gz @comment share/man/man8/bfb-install.8.gz +share/man/man8/bfb-tool.8.gz +share/man/man8/rshim.8.gz