aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Rui <vowstar@gmail.com>2022-01-18 23:21:24 +0800
committerHuang Rui <vowstar@gmail.com>2022-01-18 23:22:18 +0800
commit5863c81c467adfd66b91761e3420de5b585829b5 (patch)
tree1ea58debab0c0cee551e6319a00917c2f52dbd61 /sys-libs
parentapp-containers/nvidia-container-toolkit: add 1.8.0_rc1 (diff)
downloadguru-5863c81c467adfd66b91761e3420de5b585829b5.tar.gz
guru-5863c81c467adfd66b91761e3420de5b585829b5.tar.bz2
guru-5863c81c467adfd66b91761e3420de5b585829b5.zip
sys-libs/libnvidia-container: add 1.8.0_rc1
Support cgroup v2 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Huang Rui <vowstar@gmail.com>
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libnvidia-container/Manifest1
-rw-r--r--sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-makefile.patch109
-rw-r--r--sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-nvcgomk.patch13
-rw-r--r--sys-libs/libnvidia-container/libnvidia-container-1.8.0_rc1.ebuild55
4 files changed, 178 insertions, 0 deletions
diff --git a/sys-libs/libnvidia-container/Manifest b/sys-libs/libnvidia-container/Manifest
index e105df9a2..6387a8d75 100644
--- a/sys-libs/libnvidia-container/Manifest
+++ b/sys-libs/libnvidia-container/Manifest
@@ -1,2 +1,3 @@
DIST libnvidia-container-1.4.0.tar.gz 158137 BLAKE2B cdf0ce9024b79f9b5ebfc78b5cec8cb026fed47bcc192ce874639b8968d00af40ab9f0446bc65d5496502dd7f9a4c0d060c904c0894d463930795bc1bcd56d04 SHA512 0978a44f6a9c242b6493aadd54cfaac7055447bc1e76708b4f51e398df8575137b120396fc26019c63c78b34bf0aec49dd6870895370b1852b081bfe7cd34dc7
DIST libnvidia-container-1.7.0.tar.gz 164771 BLAKE2B 43026a1f2c823c6ba183f40453f9dd784563533e5afb73be7bbf31d6adcb5d7f2b81d7dfdc53e3f5bc91b56b7359ce0c4415db790f7d8690e922c3b8ac31a5fa SHA512 cb2bedc7f3278c56f9da003257ea1c16116ac52cc4a792e4bdfc7e1739a5504436b61db65abb159f4bd4702d961ebd4c455605ce5e9daac00a2ab282a1b1348f
+DIST libnvidia-container-1.8.0_rc1.tar.gz 1401489 BLAKE2B bb8acd55500765c7b388aea369fad180481b7cc3441da8e8f6f9700d9fa67c339d76192acecdb0424cde65ef524025c73f2b69d472ca15560a9bccdd67dbf2fd SHA512 12e0bad01ba7af050dc615c956e1aa71400551020d76d7b5d57321259636495100bf547ef8111069290804f7ef9e18a858604c4d027588b6d3cdbb7fd1cde3e7
diff --git a/sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-makefile.patch b/sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-makefile.patch
new file mode 100644
index 000000000..1a563f4be
--- /dev/null
+++ b/sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-makefile.patch
@@ -0,0 +1,109 @@
+diff --git a/Makefile b/Makefile
+index 0070ada..8643de0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,22 +14,22 @@
+
+ .PHONY: all tools shared static deps install uninstall dist depsclean mostlyclean clean distclean
+ .DEFAULT_GOAL := all
+-
++STRIP := @echo skipping: strip
+ ##### Global variables #####
+
+-WITH_NVCGO ?= yes
+-WITH_LIBELF ?= no
+-WITH_TIRPC ?= no
++WITH_NVCGO ?= yes
++WITH_LIBELF ?= yes
++WITH_TIRPC ?= yes
+ WITH_SECCOMP ?= yes
+
+ ##### Global definitions #####
+
+-export prefix = /usr/local
++export prefix = /usr
+ export exec_prefix = $(prefix)
+ export bindir = $(exec_prefix)/bin
+-export libdir = $(exec_prefix)/lib
++export libdir = $(exec_prefix)/lib64
+ export docdir = $(prefix)/share/doc
+-export libdbgdir = $(prefix)/lib/debug$(libdir)
++export libdbgdir = $(prefix)/lib64/debug$(libdir)
+ export includedir = $(prefix)/include
+ export pkgconfdir = $(libdir)/pkgconfig
+
+@@ -62,6 +62,8 @@
+ $(SRCS_DIR)/error_generic.c \
+ $(SRCS_DIR)/error.c \
+ $(SRCS_DIR)/ldcache.c \
++ $(SRCS_DIR)/pci-sysfs.c \
++ $(SRCS_DIR)/nvidia-modprobe-utils.c \
+ $(SRCS_DIR)/nvc.c \
+ $(SRCS_DIR)/nvc_ldcache.c \
+ $(SRCS_DIR)/nvc_info.c \
+@@ -144,7 +146,7 @@
+ -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+ -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+ -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+- -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++ -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression -I/usr/include/tirpc $(CFLAGS)
+ LDFLAGS := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS := $(LDLIBS)
+
+@@ -152,8 +154,8 @@
+ LIB_CPPFLAGS = -DNV_LINUX -isystem $(DEPS_DIR)$(includedir) -include $(BUILD_DEFS)
+ LIB_CFLAGS = -fPIC
+ LIB_LDFLAGS = -L$(DEPS_DIR)$(libdir) -shared -Wl,-soname=$(LIB_SONAME)
+-LIB_LDLIBS_STATIC = -l:libnvidia-modprobe-utils.a
+-LIB_LDLIBS_SHARED = -ldl -lcap
++# LIB_LDLIBS_STATIC = -l:libnvidia-modprobe-utils.a
++LIB_LDLIBS_SHARED = -ldl -lcap -ltirpc
+ ifeq ($(WITH_NVCGO), yes)
+ LIB_CPPFLAGS += -DWITH_NVCGO
+ LIB_LDLIBS_SHARED += -lpthread
+@@ -166,7 +168,7 @@
+ endif
+ ifeq ($(WITH_TIRPC), yes)
+ LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC
+-LIB_LDLIBS_STATIC += -l:libtirpc.a
++# LIB_LDLIBS_STATIC += -l:libtirpc.a
+ LIB_LDLIBS_SHARED += -lpthread
+ endif
+ ifeq ($(WITH_SECCOMP), yes)
+@@ -181,7 +183,7 @@
+ LIB_LDLIBS = $(LIB_LDLIBS_STATIC) $(LIB_LDLIBS_SHARED)
+
+ # Binary flags (recursively expanded to handle target-specific flags)
+-BIN_CPPFLAGS = -include $(BUILD_DEFS) $(CPPFLAGS)
++BIN_CPPFLAGS = -include $(BUILD_DEFS) $(CPPFLAGS) -DWITH_TIRPC
+ BIN_CFLAGS = -I$(SRCS_DIR) -fPIE -flto $(CFLAGS)
+ BIN_LDFLAGS = -L. -pie $(LDFLAGS) -Wl,-rpath='$$ORIGIN/../$$LIB'
+ BIN_LDLIBS = -l:$(LIB_SHARED) -ldl -lcap $(LDLIBS)
+@@ -258,15 +260,15 @@
+
+ deps: $(LIB_RPC_SRCS) $(BUILD_DEFS)
+ $(MKDIR) -p $(DEPS_DIR)
+- $(MAKE) -f $(MAKE_DIR)/nvidia-modprobe.mk DESTDIR=$(DEPS_DIR) install
++ # $(MAKE) -f $(MAKE_DIR)/nvidia-modprobe.mk DESTDIR=$(DEPS_DIR) install
+ ifeq ($(WITH_NVCGO), yes)
+ $(MAKE) -f $(MAKE_DIR)/nvcgo.mk DESTDIR=$(DEPS_DIR) MAJOR=$(MAJOR) VERSION=$(VERSION) LIB_NAME=$(LIBGO_NAME) install
+ endif
+ ifeq ($(WITH_LIBELF), no)
+- $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install
++ # $(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install
+ endif
+ ifeq ($(WITH_TIRPC), yes)
+- $(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install
++ # $(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install
+ endif
+
+ install: all
+@@ -283,7 +285,7 @@
+ endif
+ $(LDCONFIG) -n $(DESTDIR)$(libdir)
+ # Install debugging symbols
+- $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir)
++ # $(INSTALL) -m 644 $(DEBUG_DIR)/$(LIB_SONAME) $(DESTDIR)$(libdbgdir)
+ # Install configuration files
+ $(MAKE_DIR)/$(LIB_PKGCFG).in "$(strip $(VERSION))" "$(strip $(LIB_LDLIBS_SHARED))" > $(DESTDIR)$(pkgconfdir)/$(LIB_PKGCFG)
+ # Install binary files
diff --git a/sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-nvcgomk.patch b/sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-nvcgomk.patch
new file mode 100644
index 000000000..19fd492e5
--- /dev/null
+++ b/sys-libs/libnvidia-container/files/libnvidia-container-1.8.0-fix-nvcgomk.patch
@@ -0,0 +1,13 @@
+diff --git a/mk/nvcgo.mk b/mk/nvcgo.mk
+index 0070ada..8643de0 100644
+--- a/mk/nvcgo.mk
++++ b/mk/nvcgo.mk
+@@ -26,7 +26,8 @@
+
+ build:
+ $(RM) -rf $(SRCS_DIR)
+- $(CP) -R $(CURDIR)/src/$(PREFIX) $(SRCS_DIR)
++ mkdir -p $(SRCS_DIR)
++ $(CP) -r $(CURDIR)/src/$(PREFIX)/. $(SRCS_DIR)
+ $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) clean
+ $(MAKE) -C $(SRCS_DIR) VERSION=$(VERSION) build \ No newline at end of file
diff --git a/sys-libs/libnvidia-container/libnvidia-container-1.8.0_rc1.ebuild b/sys-libs/libnvidia-container/libnvidia-container-1.8.0_rc1.ebuild
new file mode 100644
index 000000000..ea6185890
--- /dev/null
+++ b/sys-libs/libnvidia-container/libnvidia-container-1.8.0_rc1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="NVIDIA container runtime library"
+HOMEPAGE="https://github.com/NVIDIA/libnvidia-container"
+
+if [[ "${PV}" == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git"
+else
+ SRC_URI="
+ https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz
+ "
+ S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+IUSE=""
+
+RDEPEND="
+ net-libs/libtirpc
+ sys-libs/libcap
+ sys-libs/libseccomp
+ x11-drivers/nvidia-drivers
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ net-libs/rpcsvc-proto
+ sys-apps/lsb-release
+ sys-devel/bmake
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.1-add-enum-h.patch
+ "${FILESDIR}"/${PN}-1.1.1-add-sysfs-c.patch
+ "${FILESDIR}"/${PN}-1.1.1-add-sysfs-h.patch
+ "${FILESDIR}"/${PN}-1.1.1-add-utils-c.patch
+ "${FILESDIR}"/${PN}-1.1.1-add-utils-h.patch
+ "${FILESDIR}"/${PN}-1.7.0-fix-git.patch
+ "${FILESDIR}"/${PN}-1.8.0-fix-makefile.patch
+ "${FILESDIR}"/${PN}-1.1.1-fix-nvc.patch
+ "${FILESDIR}"/${PN}-1.3.0-fix-nvc-info.patch
+ "${FILESDIR}"/${PN}-1.3.0-fix-nvc-mount.patch
+ "${FILESDIR}"/${PN}-1.3.0-fix-modprobe-utils-c.patch
+ "${FILESDIR}"/${PN}-1.3.0-fix-modprobe-utils-h.patch
+ "${FILESDIR}"/${PN}-1.8.0-fix-nvcgomk.patch
+)