fix: latest glibc, use Arch based build for nvidia-container-toolkit
This commit is contained in:
parent
60e3a56d4c
commit
195932adef
@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Sasha Gerrand <alpine-pkgs@sgerrand.com>
|
# Maintainer: Sasha Gerrand <alpine-pkgs@sgerrand.com>
|
||||||
|
|
||||||
pkgname="glibc"
|
pkgname="glibc"
|
||||||
pkgver="2.34"
|
pkgver="2.35"
|
||||||
_pkgrel="0"
|
_pkgrel="0"
|
||||||
pkgrel="0"
|
pkgrel="0"
|
||||||
pkgdesc="GNU C Library compatibility layer"
|
pkgdesc="GNU C Library compatibility layer"
|
||||||
@ -16,6 +16,7 @@ triggers="$pkgname-bin.trigger=/lib:/usr/lib:/usr/glibc-compat/lib"
|
|||||||
options="!check lib64"
|
options="!check lib64"
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
conflicts="libc6-compat"
|
||||||
mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc
|
mkdir -p "$pkgdir/lib" "$pkgdir/lib64" "$pkgdir/usr/glibc-compat/lib/locale" "$pkgdir"/usr/glibc-compat/lib64 "$pkgdir"/etc
|
||||||
cp -a "$srcdir"/usr "$pkgdir"
|
cp -a "$srcdir"/usr "$pkgdir"
|
||||||
cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf
|
cp "$srcdir"/ld.so.conf "$pkgdir"/usr/glibc-compat/etc/ld.so.conf
|
||||||
@ -35,7 +36,7 @@ package() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bin() {
|
bin() {
|
||||||
depends="$pkgname libgcc"
|
depends="$pkgname libgcc bash"
|
||||||
mkdir -p "$subpkgdir"/usr/glibc-compat
|
mkdir -p "$subpkgdir"/usr/glibc-compat
|
||||||
cp -a "$srcdir"/usr/glibc-compat/bin "$subpkgdir"/usr/glibc-compat
|
cp -a "$srcdir"/usr/glibc-compat/bin "$subpkgdir"/usr/glibc-compat
|
||||||
cp -a "$srcdir"/usr/glibc-compat/sbin "$subpkgdir"/usr/glibc-compat
|
cp -a "$srcdir"/usr/glibc-compat/sbin "$subpkgdir"/usr/glibc-compat
|
||||||
@ -48,6 +49,8 @@ i18n() {
|
|||||||
cp -a "$srcdir"/usr/glibc-compat/share "$subpkgdir"/usr/glibc-compat
|
cp -a "$srcdir"/usr/glibc-compat/share "$subpkgdir"/usr/glibc-compat
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="77e772a8edd55812e94f99087ea2a2307ac48b09d58fe0bbcb41f9b9861ef3a15b177699e2e1fb7e49fdeb42c64c33b81c0fdf4d44e043cd9f54c72b93f40d98 glibc-bin-2.34-0-x86_64.tar.gz
|
sha512sums="
|
||||||
|
0aff0ec76f4d341957a792b8635c0770148eba9a5cb64f9bbd85228c14d9cb93c1a402063cab533a9f536f5f7be92c27bc5be8ed13c2b4f7aa416510c754d071 glibc-bin-2.35-0-x86_64.tar.gz
|
||||||
478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf
|
478bdd9f7da9e6453cca91ce0bd20eec031e7424e967696eb3947e3f21aa86067aaf614784b89a117279d8a939174498210eaaa2f277d3942d1ca7b4809d4b7e nsswitch.conf
|
||||||
2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf"
|
2912f254f8eceed1f384a1035ad0f42f5506c609ec08c361e2c0093506724a6114732db1c67171c8561f25893c0dd5c0c1d62e8a726712216d9b45973585c9f7 ld.so.conf
|
||||||
|
"
|
||||||
|
@ -1,47 +1,58 @@
|
|||||||
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
||||||
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
||||||
|
|
||||||
pkgname=nvidia-container-toolkit
|
pkgname=nvidia-container-toolkit
|
||||||
|
|
||||||
pkgver=1.10.0
|
pkgver=1.10.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="NVIDIA Container toolkit incl. cri hooks"
|
|
||||||
url="https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html"
|
|
||||||
arch="x86_64"
|
|
||||||
license="Apache"
|
|
||||||
makedepends="xz"
|
|
||||||
options="!check !tracedeps"
|
|
||||||
|
|
||||||
source="https://nvidia.github.io/libnvidia-container/stable/debian10/amd64/libnvidia-container1_"$pkgver"-"$pkgrel"_amd64.deb
|
pkgdesc='NVIDIA container runtime toolkit'
|
||||||
https://nvidia.github.io/libnvidia-container/stable/debian10/amd64/libnvidia-container-tools_"$pkgver"-"$pkgrel"_amd64.deb
|
arch='x86_64'
|
||||||
https://nvidia.github.io/libnvidia-container/stable/debian10/amd64/nvidia-container-toolkit_"$pkgver"-"$pkgrel"_amd64.deb"
|
url='https://github.com/NVIDIA/nvidia-container-toolkit'
|
||||||
|
license='Apache'
|
||||||
|
|
||||||
|
makedepends='go bash'
|
||||||
|
#depends='libnvidia-container-tools>=1.9.0'
|
||||||
|
options='!lto'
|
||||||
|
|
||||||
|
source="${pkgname}-v${pkgver}-${pkgrel}.tar.gz"::"${url}/archive/v${pkgver}.tar.gz"
|
||||||
|
_srcdir="${srcdir}/${pkgname}-${pkgver}"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
return 0
|
mkdir bin
|
||||||
|
|
||||||
|
export GOPATH="${srcdir}"
|
||||||
|
export GOBIN="$GOPATH/bin"
|
||||||
|
|
||||||
|
go get "./..."
|
||||||
|
|
||||||
|
# Patch Nvidia dl loader
|
||||||
|
sed -i '/RTLD_DEEPBIND/d' vendor/github.com/NVIDIA/go-nvml/pkg/dl/dl.go
|
||||||
|
|
||||||
|
go build -v \
|
||||||
|
-modcacherw \
|
||||||
|
-buildmode=pie \
|
||||||
|
-gcflags "all=-trimpath=${PWD}" \
|
||||||
|
-asmflags "all=-trimpath=${PWD}" \
|
||||||
|
-ldflags "-s -w -extldflags ${LDFLAGS}" \
|
||||||
|
-trimpath \
|
||||||
|
-o bin \
|
||||||
|
"./..."
|
||||||
|
#-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
depends="glibc=2.34-r0 libcap nvidia-gpu-driver"
|
install -D -m755 "${_srcdir}/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||||
|
|
||||||
mkdir -p "$pkgdir"/usr/lib "$pkgdir"/usr/bin "$pkgdir"/etc/nvidia-container-runtime
|
cd "${pkgdir}/usr/bin/"
|
||||||
|
ln -sf "${pkgname}" "nvidia-container-runtime-hook"
|
||||||
|
cd -
|
||||||
|
install -D -m644 "${_srcdir}/config/config.toml.centos" "${pkgdir}/etc/nvidia-container-runtime/config.toml"
|
||||||
|
install -D -m644 "${_srcdir}/oci-nvidia-hook.json" "${pkgdir}/usr/share/containers/oci/hooks.d/00-oci-nvidia-hook.json"
|
||||||
|
|
||||||
# libnvidia-container1
|
install -D -m644 "${_srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
|
||||||
ar -x "$srcdir"/libnvidia-container1_"$pkgver"-"$pkgrel"_amd64.deb && tar xfJ data.tar.xz
|
|
||||||
mv usr/lib/x86_64-linux-gnu/* "$pkgdir"/usr/lib
|
|
||||||
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
||||||
|
|
||||||
# libnvidia-container-tools
|
|
||||||
ar -x "$srcdir"/libnvidia-container-tools_"$pkgver"-"$pkgrel"_amd64.deb && tar xfJ data.tar.xz
|
|
||||||
mv usr/bin/nvidia-container-cli "$pkgdir"/usr/bin
|
|
||||||
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
||||||
|
|
||||||
# nvidia-container-toolkit
|
|
||||||
ar -x "$srcdir"/nvidia-container-toolkit_"$pkgver"-"$pkgrel"_amd64.deb && tar xfJ data.tar.xz
|
|
||||||
mv usr/bin/nvidia* "$pkgdir"/usr/bin
|
|
||||||
mv etc/nvidia-container-runtime/config.toml "$pkgdir"/etc/nvidia-container-runtime
|
|
||||||
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums='
|
sha512sums='
|
||||||
23ba2aec28f01c0037bbb4812ea542589e96f6527cf49468a4a7c54ca05808cf0984a8dfe13ee3455b8c6ae8468c58590f9e1e6996927c710bcf3e545772a356 libnvidia-container1_1.10.0-1_amd64.deb
|
4f35918811edf7ea0f24d04eba12e4670b039edd0bb29ed4f16b47c4208f8a3d4316042f5ca52a278fedd1dce549070df69807080b1a7bda4a859369ad707bf9 nvidia-container-toolkit-v1.10.0-1.tar.gz
|
||||||
c5369c832bd91703e6e6e86a4431c2eebb2ddeaadff126174b41ed11e969dc8cc49dcab26b3ac18abb43b466a86ce76908eaa2f5e4109c689a0c3a4fa47548b5 libnvidia-container-tools_1.10.0-1_amd64.deb
|
|
||||||
3043729bd96dd153db1dc317685167f34da6b9d202134335212fb7d861532a265a59e002c86fff2664c67687f4c8bcc75913c74018930a6c68c0f2044eceacf0 nvidia-container-toolkit_1.10.0-1_amd64.deb
|
|
||||||
'
|
'
|
||||||
|
@ -23,7 +23,7 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
||||||
depends="glibc<2.35 linux-virt=~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
depends="glibc linux-virt=~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
||||||
|
|
||||||
modules="nvidia.ko \
|
modules="nvidia.ko \
|
||||||
nvidia-drm.ko \
|
nvidia-drm.ko \
|
||||||
|
Loading…
Reference in New Issue
Block a user