From 4b0a3c1a0bc8451f814f8ede2f2d984532e8059b Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 28 Aug 2026 12:15:20 +0200 Subject: [PATCH 1/6] nvidia_current: Install Vulkan and GLVND-EGL loader JSON for all versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Vulkan ICD, implicit layer and GLVND-EGL vendor JSON differ between driver versions – 580.178.04 uses api_version 1.4.312 and adds the VK_LAYER_NV_present layer referencing libnvidia-present.so.580.178.04 – so they cannot be kept as a single hardcoded copy in nvidiactl. Install them verbatim below /usr/share/nvidia/VERSION, which is on no loader search path, and let nvidiactl link the selected version into /etc. Resolves: https://github.molgen.mpg.de/mariux64/mariux64-issues/issues/161 Assisted-by: qwen3.5-397b-a17b --- nvidia_current-510.108.03-1.bee | 101 ++++++++++++++++++++++++++++ nvidia_current-510.60.02-2.bee | 101 ++++++++++++++++++++++++++++ nvidia_current-535.104.05-1.bee | 110 +++++++++++++++++++++++++++++++ nvidia_current-535.230.02-1.bee | 110 +++++++++++++++++++++++++++++++ nvidia_current-570.144-1.bee | 110 +++++++++++++++++++++++++++++++ nvidia_current-580.178.04-1.bee | 113 ++++++++++++++++++++++++++++++++ 6 files changed, 645 insertions(+) create mode 100755 nvidia_current-510.108.03-1.bee create mode 100755 nvidia_current-510.60.02-2.bee create mode 100755 nvidia_current-535.104.05-1.bee create mode 100755 nvidia_current-535.230.02-1.bee create mode 100755 nvidia_current-570.144-1.bee create mode 100755 nvidia_current-580.178.04-1.bee diff --git a/nvidia_current-510.108.03-1.bee b/nvidia_current-510.108.03-1.bee new file mode 100755 index 000000000..860fac3c4 --- /dev/null +++ b/nvidia_current-510.108.03-1.bee @@ -0,0 +1,101 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/a225bcb0373cbf6c552ed906bc5c614e/NVIDIA-Linux-x86_64-510.108.03.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + +} diff --git a/nvidia_current-510.60.02-2.bee b/nvidia_current-510.60.02-2.bee new file mode 100755 index 000000000..1685548b5 --- /dev/null +++ b/nvidia_current-510.60.02-2.bee @@ -0,0 +1,101 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/2288e18f3b767e66d465fb4add1df080/NVIDIA-Linux-x86_64-510.60.02.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + +} diff --git a/nvidia_current-535.104.05-1.bee b/nvidia_current-535.104.05-1.bee new file mode 100755 index 000000000..dea4a8caa --- /dev/null +++ b/nvidia_current-535.104.05-1.bee @@ -0,0 +1,110 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/0bb10ef32e86d5e1ad37b710dac6e079/NVIDIA-Linux-x86_64-535.104.05.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-cuda-mps-server" \ + "nvidia-debugdump" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + + # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + if [ -e ${i}.1.gz ]; then + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + fi + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_ga10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_tu10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + +} diff --git a/nvidia_current-535.230.02-1.bee b/nvidia_current-535.230.02-1.bee new file mode 100755 index 000000000..47ccf8bfe --- /dev/null +++ b/nvidia_current-535.230.02-1.bee @@ -0,0 +1,110 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/2e34184b91fa9bcc7cc5d4f8707ef0d6/NVIDIA-Linux-x86_64-535.230.02.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-cuda-mps-server" \ + "nvidia-debugdump" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + + # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + if [ -e ${i}.1.gz ]; then + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + fi + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_ga10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_tu10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + +} diff --git a/nvidia_current-570.144-1.bee b/nvidia_current-570.144-1.bee new file mode 100755 index 000000000..8001f321a --- /dev/null +++ b/nvidia_current-570.144-1.bee @@ -0,0 +1,110 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/c2a4ccbd3d29ed83d0d9dcd742eb034a/NVIDIA-Linux-x86_64-570.144.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-cuda-mps-server" \ + "nvidia-debugdump" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + + # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + if [ -e ${i}.1.gz ]; then + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + fi + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_ga10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_tu10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + +} diff --git a/nvidia_current-580.178.04-1.bee b/nvidia_current-580.178.04-1.bee new file mode 100755 index 000000000..1fcc7be6a --- /dev/null +++ b/nvidia_current-580.178.04-1.bee @@ -0,0 +1,113 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/d20f1e92e9cbea30c9f0fa995d6c76ee/NVIDIA-Linux-x86_64-580.178.04.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-cuda-mps-server" \ + "nvidia-debugdump" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + + # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + + # libnvidia-nvvm70 was introduced with 580, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-nvvm70.so.4 + + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + if [ -e ${i}.1.gz ]; then + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + fi + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_ga10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_tu10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + +} From e643a3abfeac27f37d62a23f6bc477e387baff64 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 28 Aug 2026 16:05:09 +0200 Subject: [PATCH 2/6] nvidia_current: Install the EGL external platform libraries and JSON The `for i in lib*.so.$PKGVERSION` loop never matches the EGL external platform libraries -- 580.178.04 ships libnvidia-egl-wayland.so.1.1.20, libnvidia-egl-gbm.so.1.1.3, libnvidia-egl-xlib.so.1.0.5 and libnvidia-egl-xcb.so.1.0.5, 570.144 the older 1.1.19, 1.1.2 and 1.0.1 -- because upstream versions those libraries independently of the driver. They were absent from the package, and with them Wayland and GBM EGL, without anything saying so on the node. Install them below ${LIBDIR}, together with 10_nvidia_wayland.json, 15_nvidia_gbm.json and, where the driver ships them, 20_nvidia_xlib.json and 20_nvidia_xcb.json. The one-line comment above each loop records the driver the files came in with: Wayland with 378.13, GBM with 495.44 and xlib/xcb with 560. The .manifest of the archived beebuilds agrees -- 460.39 and 470.74 carry the Wayland files only, 510.60.02 and 535.230.02 the Wayland and GBM ones, and 570.144 all four. The file names are the same in every driver, so the libraries must not be linked into /usr/lib the way the ${PKGVERSION}-qualified ones are: two installed drivers would collide. nvidia-mxlinks links the sonames the JSON files name instead. 580.178.04-1 is built and in the repository already, so it gets a new revision; the other five have not been built yet and are changed in place. The JSON stays inert until nvidiactl learns the relative path egl/egl_external_platform.d/, just like everything else below /usr/share/nvidia/. Issue: https://github.molgen.mpg.de/mariux64/mariux64-issues/issues/161 Assisted-by: claude-opus-5 --- nvidia_current-510.108.03-1.bee | 14 ++++ nvidia_current-510.60.02-2.bee | 14 ++++ nvidia_current-535.104.05-1.bee | 14 ++++ nvidia_current-535.230.02-1.bee | 14 ++++ nvidia_current-570.144-1.bee | 15 ++++ nvidia_current-580.178.04-2.bee | 128 ++++++++++++++++++++++++++++++++ 6 files changed, 199 insertions(+) create mode 100755 nvidia_current-580.178.04-2.bee diff --git a/nvidia_current-510.108.03-1.bee b/nvidia_current-510.108.03-1.bee index 860fac3c4..c67f9740d 100755 --- a/nvidia_current-510.108.03-1.bee +++ b/nvidia_current-510.108.03-1.bee @@ -66,6 +66,14 @@ mee_install() { fi done + # EGL external platform libraries: wayland 378.13, gbm 495.44 + for i in libnvidia-egl-*.so.*; do + install -v -t ${D}${LIBDIR} "$i" + if soname="$(soname "$i")"; then + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. # Additional note: don't put/link libglx.so into /usr/lib. @@ -98,4 +106,10 @@ mee_install() { install -v -c -m 644 -D 10_nvidia.json \ ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + # EGL external platform JSON: wayland 378.13, gbm 495.44 + for i in 10_nvidia_wayland.json 15_nvidia_gbm.json ; do + install -v -c -m 644 -D "$i" \ + ${D}${PREFIX}/egl/egl_external_platform.d/"$i" + done + } diff --git a/nvidia_current-510.60.02-2.bee b/nvidia_current-510.60.02-2.bee index 1685548b5..a1fa29332 100755 --- a/nvidia_current-510.60.02-2.bee +++ b/nvidia_current-510.60.02-2.bee @@ -66,6 +66,14 @@ mee_install() { fi done + # EGL external platform libraries: wayland 378.13, gbm 495.44 + for i in libnvidia-egl-*.so.*; do + install -v -t ${D}${LIBDIR} "$i" + if soname="$(soname "$i")"; then + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. # Additional note: don't put/link libglx.so into /usr/lib. @@ -98,4 +106,10 @@ mee_install() { install -v -c -m 644 -D 10_nvidia.json \ ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + # EGL external platform JSON: wayland 378.13, gbm 495.44 + for i in 10_nvidia_wayland.json 15_nvidia_gbm.json ; do + install -v -c -m 644 -D "$i" \ + ${D}${PREFIX}/egl/egl_external_platform.d/"$i" + done + } diff --git a/nvidia_current-535.104.05-1.bee b/nvidia_current-535.104.05-1.bee index dea4a8caa..456480382 100755 --- a/nvidia_current-535.104.05-1.bee +++ b/nvidia_current-535.104.05-1.bee @@ -76,6 +76,14 @@ mee_install() { # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + # EGL external platform libraries: wayland 378.13, gbm 495.44 + for i in libnvidia-egl-*.so.*; do + install -v -t ${D}${LIBDIR} "$i" + if soname="$(soname "$i")"; then + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + mkdir -vp ${D}/usr/lib/xorg/modules/extensions cd ${D}/usr/lib/xorg/modules/extensions @@ -107,4 +115,10 @@ mee_install() { install -v -c -m 644 -D 10_nvidia.json \ ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + # EGL external platform JSON: wayland 378.13, gbm 495.44 + for i in 10_nvidia_wayland.json 15_nvidia_gbm.json ; do + install -v -c -m 644 -D "$i" \ + ${D}${PREFIX}/egl/egl_external_platform.d/"$i" + done + } diff --git a/nvidia_current-535.230.02-1.bee b/nvidia_current-535.230.02-1.bee index 47ccf8bfe..840c6f04d 100755 --- a/nvidia_current-535.230.02-1.bee +++ b/nvidia_current-535.230.02-1.bee @@ -76,6 +76,14 @@ mee_install() { # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + # EGL external platform libraries: wayland 378.13, gbm 495.44 + for i in libnvidia-egl-*.so.*; do + install -v -t ${D}${LIBDIR} "$i" + if soname="$(soname "$i")"; then + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + mkdir -vp ${D}/usr/lib/xorg/modules/extensions cd ${D}/usr/lib/xorg/modules/extensions @@ -107,4 +115,10 @@ mee_install() { install -v -c -m 644 -D 10_nvidia.json \ ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + # EGL external platform JSON: wayland 378.13, gbm 495.44 + for i in 10_nvidia_wayland.json 15_nvidia_gbm.json ; do + install -v -c -m 644 -D "$i" \ + ${D}${PREFIX}/egl/egl_external_platform.d/"$i" + done + } diff --git a/nvidia_current-570.144-1.bee b/nvidia_current-570.144-1.bee index 8001f321a..6114f21ee 100755 --- a/nvidia_current-570.144-1.bee +++ b/nvidia_current-570.144-1.bee @@ -76,6 +76,14 @@ mee_install() { # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + # EGL external platform libraries: wayland 378.13, gbm 495.44, xlib/xcb 560 + for i in libnvidia-egl-*.so.*; do + install -v -t ${D}${LIBDIR} "$i" + if soname="$(soname "$i")"; then + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + mkdir -vp ${D}/usr/lib/xorg/modules/extensions cd ${D}/usr/lib/xorg/modules/extensions @@ -107,4 +115,11 @@ mee_install() { install -v -c -m 644 -D 10_nvidia.json \ ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + # EGL external platform JSON: wayland 378.13, gbm 495.44, xlib/xcb 560 + for i in 10_nvidia_wayland.json 15_nvidia_gbm.json \ + 20_nvidia_xlib.json 20_nvidia_xcb.json ; do + install -v -c -m 644 -D "$i" \ + ${D}${PREFIX}/egl/egl_external_platform.d/"$i" + done + } diff --git a/nvidia_current-580.178.04-2.bee b/nvidia_current-580.178.04-2.bee new file mode 100755 index 000000000..d27180a76 --- /dev/null +++ b/nvidia_current-580.178.04-2.bee @@ -0,0 +1,128 @@ +#!/bin/env beesh + +# resources: +# http://www.nvidia.com/object/unix.html +# ./README.txt +# ./.manifest +# https://github.com/NVIDIA/nvidia-installer +# ./nvidia-installer -A +# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert +# + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run" + +#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run" +SRCURL[0]="https://beehive.molgen.mpg.de/d20f1e92e9cbea30c9f0fa995d6c76ee/NVIDIA-Linux-x86_64-580.178.04.run" + + +BEE_CONFIGURE=none + +build_in_sourcedir + +PREFIX=/usr/share/nvidia/${PKGVERSION} +LIBDIR=${PREFIX}/lib +BINDIR=${PREFIX}/bin + +# fix tar option for user namespace usage (`unshare -U -r BEEFILE`) +export TAR_OPTIONS=--no-same-owner + +mee_extract() { + rmdir ${S} + sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} +} + +#mee_patch() { +# bee_patch +#} + +mee_build() { + #bee_build + true +} + +mee_install() { + #bee_install + + mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1} + mkdir -pv ${D}/usr/lib + + NVDRV="nvidia_drv.so" + + NVBIN=( \ + "nvidia-cuda-mps-control" \ + "nvidia-cuda-mps-server" \ + "nvidia-debugdump" \ + "nvidia-modprobe" \ + "nvidia-persistenced" \ + "nvidia-settings" \ + "nvidia-smi" \ + "nvidia-xconfig" \ + ) + + for i in lib*.so.$PKGVERSION; do + install -v -t ${D}${LIBDIR} "$i" + ln -sv "${LIBDIR}/$i" ${D}/usr/lib/ + if soname="$(soname "$i")"; then + #echo "$soname\n" + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + # libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions, + # here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism. + # Additional note: don't put/link libglx.so into /usr/lib. + ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so + + # libnvidia-api was introduced with 525, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-api.so.1 + + # libnvidia-nvvm70 was introduced with 580, but w/o a 'PKGVERSION' + install -v -t ${D}${LIBDIR} libnvidia-nvvm70.so.4 + + # EGL external platform libraries: wayland 378.13, gbm 495.44, xlib/xcb 560 + for i in libnvidia-egl-*.so.*; do + install -v -t ${D}${LIBDIR} "$i" + if soname="$(soname "$i")"; then + test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}" + fi + done + + mkdir -vp ${D}/usr/lib/xorg/modules/extensions + + cd ${D}/usr/lib/xorg/modules/extensions + ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so + cd $B + + echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})"; + install -c -v ${NVDRV} ${D}${PREFIX}/drivers + + mkdir -pv ${D}/usr/share/man/man1 + + for i in ${NVBIN[@]} ; do + echo "installing ${i} as bin/${i}" + install -v -c -m 755 ${i} ${D}${BINDIR} + if [ -e ${i}.1.gz ]; then + install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1 + fi + done + + mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_ga10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + install -v -c -m 644 firmware/gsp_tu10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION} + + # Vulkan and GLVND-EGL loader JSON. nvidiactl links it into /etc. + install -v -c -m 644 -D nvidia_icd.json \ + ${D}${PREFIX}/vulkan/icd.d/nvidia_icd.json + install -v -c -m 644 -D nvidia_layers.json \ + ${D}${PREFIX}/vulkan/implicit_layer.d/nvidia_layers.json + install -v -c -m 644 -D 10_nvidia.json \ + ${D}${PREFIX}/glvnd/egl_vendor.d/10_nvidia.json + + # EGL external platform JSON: wayland 378.13, gbm 495.44, xlib/xcb 560 + for i in 10_nvidia_wayland.json 15_nvidia_gbm.json \ + 20_nvidia_xlib.json 20_nvidia_xcb.json ; do + install -v -c -m 644 -D "$i" \ + ${D}${PREFIX}/egl/egl_external_platform.d/"$i" + done + +} From a0e0bf3bb82790856eb355a1d394ed5792cbc896 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 28 Aug 2026 16:05:21 +0200 Subject: [PATCH 3/6] nvidia-mxlinks: Link the Vulkan SC core soname Update the version from 0.16 to 0.17. nvidia_icd_vksc.json names the bare soname libnvidia-vksc-core.so.1, while the driver package links the ${PKGVERSION}-qualified file names into /usr/lib only and keeps the soname link below /usr/share/mxgfx/lib. /usr/share/mxgfx/lib is on none of the ld.so search paths, so the bare name resolves through a link in /usr/lib alone: $ cat /etc/ld.so.conf /lib /usr/lib /usr/local/lib $ ldconfig -N -v 2>/dev/null | grep '^/' /lib: (from /etc/ld.so.conf:1) /usr/local/lib: (from /etc/ld.so.conf:3) /usr/lib is absent from the second listing only because /lib is a symbolic link to it and ldconfig drops the duplicate: "ldconfig: Path `/usr/lib' given more than once". The driver ships the library already, so the link is overdue rather than new. It looked resolvable so far only because /etc/ld.so.cache is stale on hotelcalifornia: $ ldconfig -p | grep vksc libnvidia-vksc-core.so.1 (libc6,x86-64) => /lib/libnvidia-vksc-core.so.1 $ ls -l /usr/lib/libnvidia-vksc-core.so.1 ls: cannot access '/usr/lib/libnvidia-vksc-core.so.1': No such file or directory With the link shipped here the cache entry becomes true; a host that already carries the stale one needs `ldconfig` once. On a driver without Vulkan SC -- 510 and 535 -- the entry dangles, as libnvidia-api.so.1 already does on drivers older than 525. Issue: https://github.molgen.mpg.de/mariux64/mariux64-issues/issues/161 Assisted-by: claude-opus-5 --- nvidia-mxlinks.be0 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvidia-mxlinks.be0 b/nvidia-mxlinks.be0 index 1cf035eed..58c55ff81 100755 --- a/nvidia-mxlinks.be0 +++ b/nvidia-mxlinks.be0 @@ -1,6 +1,6 @@ #!/bin/env beesh -# BEE_VERSION nvidia-mxlinks-0.16-0 +# BEE_VERSION nvidia-mxlinks-0.17-0 EXCLUDE=("^/usr/lib/(X11|xorg)(|/modules(|/drivers))$") @@ -25,6 +25,7 @@ mee_install() { "libnvidia-opencl.so.1" "libnvidia-opticalflow.so.1" "libnvidia-ptxjitcompiler.so.1" + "libnvidia-vksc-core.so.1" "libnvoptix.so.1" "libvdpau_nvidia.so.1" ) From ff3326e4e82276246737800507a35d3eff9f8c98 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 28 Aug 2026 16:05:21 +0200 Subject: [PATCH 4/6] nvidia-mxlinks: Link the EGL external platform sonames Update the version from 0.17 to 0.18. The EGL external platform JSON names bare sonames -- 10_nvidia_wayland.json libnvidia-egl-wayland.so.1, 15_nvidia_gbm.json libnvidia-egl-gbm.so.1, 20_nvidia_xlib.json libnvidia-egl-xlib.so.1 and 20_nvidia_xcb.json libnvidia-egl-xcb.so.1. The libraries are installed below /usr/share/mxgfx/lib, which is on none of the ld.so search paths, so those names resolve through a link in /usr/lib alone; see the previous commit for the search paths. The file names carry no ${PKGVERSION}, so the libraries themselves must not be linked into /usr/lib the way the qualified ones are -- two installed drivers would collide -- and only the sonames are linked here. Entries for a library a driver does not ship dangle -- 510 and 535 have no libnvidia-egl-x{lib,cb}.so.1 -- as libnvidia-api.so.1 already does on drivers older than 525. Issue: https://github.molgen.mpg.de/mariux64/mariux64-issues/issues/161 Assisted-by: claude-opus-5 --- nvidia-mxlinks.be0 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nvidia-mxlinks.be0 b/nvidia-mxlinks.be0 index 58c55ff81..cf255634a 100755 --- a/nvidia-mxlinks.be0 +++ b/nvidia-mxlinks.be0 @@ -1,6 +1,6 @@ #!/bin/env beesh -# BEE_VERSION nvidia-mxlinks-0.17-0 +# BEE_VERSION nvidia-mxlinks-0.18-0 EXCLUDE=("^/usr/lib/(X11|xorg)(|/modules(|/drivers))$") @@ -18,6 +18,10 @@ mee_install() { "libnvidia-allocator.so.1" "libnvidia-api.so.1" "libnvidia-cfg.so.1" + "libnvidia-egl-gbm.so.1" + "libnvidia-egl-wayland.so.1" + "libnvidia-egl-xcb.so.1" + "libnvidia-egl-xlib.so.1" "libnvidia-encode.so.1" "libnvidia-fbc.so.1" "libnvidia-ml.so.1" From f5b7ba6b1a50c6d3e2d63ac0e50aa4d945863d32 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 28 Aug 2026 16:05:29 +0200 Subject: [PATCH 5/6] scripts: Add a build script for the NVIDIA loader JSON revisions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seven bee-files have to be built for the loader JSON to reach a node, in an order that puts the two driver revisions in use today first, and each of them installs files whose absence is silent on the node. Collect that in one script instead of seven beesh invocations typed by hand. The packages compile nothing – the .run payload is unpacked and copied – so the builds run locally and sequentially; no cluster node is needed. After each driver the script lists the loader JSON in the built package and names the ones that are missing. Assisted-by: claude-opus-5 --- scripts/build-nvidia-loader-json.sh | 246 ++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100755 scripts/build-nvidia-loader-json.sh diff --git a/scripts/build-nvidia-loader-json.sh b/scripts/build-nvidia-loader-json.sh new file mode 100755 index 000000000..ee3962517 --- /dev/null +++ b/scripts/build-nvidia-loader-json.sh @@ -0,0 +1,246 @@ +#! /bin/bash + +# Build the NVIDIA packages that carry the loader JSON. +# +# scripts/build-nvidia-loader-json.sh [options] [ ...] +# +# Without arguments the whole set is built in the order below: first the two +# driver revisions that are selected on the machines running today, then the +# four that only older kernels pick, and last nvidia-mxlinks, which links the +# sonames the JSON files name into /usr/lib. +# +# Nothing is compiled here -- the .run payload is unpacked and copied -- so the +# builds run sequentially on the local host and no cluster node is needed. Each +# driver unpacks to roughly 4 GiB below --tmpdir while it builds. +# +# beesh runs under fakeroot, because mee_install() creates root-owned files. +# Under fakeroot the UID looks like 0, so beerc points the repository at +# /src/mariux/beeroot, which is where a release belongs; pass --repository to +# build into a private tree instead. + +set -u + +self=$(readlink -f "$0") +topdir=${self%/scripts/*} + +# The loader JSON only takes effect for the driver nvidiactl selected, so a +# node booting a kernel whose driver has not been rebuilt simply keeps the +# behaviour of before. The order is therefore priority, not dependency. +declare -a default_set=( + nvidia_current-580.178.04-1.bee # selected for 6.18.45, 6.18.46 + nvidia_current-570.144-1.bee # selected for 6.12.29 ... 6.12.100 + nvidia_current-535.230.02-1.bee # 6.12.11 only + nvidia_current-535.104.05-1.bee # 5.15.160, 6.1.53, 6.6.12, 6.6.35 + nvidia_current-510.108.03-1.bee # 5.15.131 + nvidia_current-510.60.02-2.bee # 5.15.77, 5.15.86, 5.15.94, 5.15.112 + nvidia-mxlinks.be0 # /usr/lib/ -> /usr/share/mxgfx/lib +) + +# The paths every rebuilt driver has to end up with, relative to the package +# root. nvidiactl links /etc/ to /usr/share/mxgfx/, so a +# missing one is silent on the node -- check it here instead. +declare -a want_json=( + vulkan/icd.d/nvidia_icd.json + vulkan/implicit_layer.d/nvidia_layers.json + glvnd/egl_vendor.d/10_nvidia.json + egl/egl_external_platform.d/10_nvidia_wayland.json + egl/egl_external_platform.d/15_nvidia_gbm.json +) + +tmpdir=/dev/shm +buildroot= +repository= +use_fakeroot=1 +verify=1 +dry_run=0 +keep_going=0 +logdir=/scratch/tmp + +usage() { + cat < ...] + +Options: + -t, --tmpdir DIR BEE_TMP_TMPDIR (default: ${tmpdir}) + --buildroot DIR BEE_TMP_BUILDROOT (default: /bee-\$USER) + --repository DIR BEE_REPOSITORY_PREFIX + (default: bee's, /src/mariux/beeroot under fakeroot) + --logdir DIR directory for the build logs (default: ${logdir}) + --no-fakeroot call beesh without fakeroot + --no-verify do not list the loader JSON in the built package + -k, --keep-going build the remaining bee-files after a failure + -n, --dry-run print what would be built and exit + -l, --list print the default set and exit + -h, --help print this help and exit + +Examples: + # everything, into the release repository + scripts/${0##*/} + # only the two drivers in use, into a private tree + scripts/${0##*/} --repository ~/.local/src/bee \\ + nvidia_current-580.178.04-2.bee nvidia_current-570.144-1.bee +EOF +} + +die() { + echo "${0##*/}: $*" >&2 + exit 1 +} + +# Accept --option=value as well as --option value. +declare -a argv=() +for arg in "$@"; do + case ${arg} in + --?*=*) argv+=("${arg%%=*}" "${arg#*=}") ;; + *) argv+=("${arg}") ;; + esac +done +set -- ${argv[@]+"${argv[@]}"} + +while (( $# )); do + case $1 in + -t|--tmpdir) tmpdir=$2; shift 2 ;; + --buildroot) buildroot=$2; shift 2 ;; + --repository) repository=$2; shift 2 ;; + --logdir) logdir=$2; shift 2 ;; + --no-fakeroot) use_fakeroot=0; shift ;; + --no-verify) verify=0; shift ;; + -k|--keep-going) keep_going=1; shift ;; + -n|--dry-run) dry_run=1; shift ;; + -l|--list) printf '%s\n' "${default_set[@]}"; exit 0 ;; + -h|--help) usage; exit 0 ;; + --) shift; break ;; + -*) die "unknown option '$1', see --help" ;; + *) break ;; + esac +done + +declare -a set_to_build=() +if (( $# )); then + set_to_build=("$@") +else + set_to_build=("${default_set[@]}") +fi + +: "${buildroot:=${tmpdir}/bee-${USER}}" + +# Where beesh will drop the package, for --verify. Only the fakeroot case has a +# well-known answer: beerc sets the prefix for UID 0 alone, and bee's own +# default for a real user is not worth guessing here. +if [ -n "${repository}" ]; then + pkgdir=${repository}/packages +elif (( use_fakeroot )); then + pkgdir=/src/mariux/beeroot/packages +else + pkgdir= +fi + +# The package name beesh will write: the file name for a versioned bee-file, +# the '# BEE_VERSION' line for a .be0, which carries the version instead. +pkgfullpkg() { + local beefile=$1 name + + name=${beefile##*/} + if [ "${name}" = "${name%.be0}" ]; then + echo "${name%.bee}" + return + fi + name=$(sed -n 's/^# BEE_VERSION *//p' "${beefile}" | head -1) + [ -n "${name}" ] || die "no '# BEE_VERSION' line in ${beefile}" + echo "${name}" +} + +# List the loader JSON in the built package, so that a driver that silently +# stopped shipping one of the files does not reach a node. +check_package() { + local pkg=$1 tarball found=0 missing=0 relpath + local -a contents=() + + if [ -z "${pkgdir}" ]; then + echo " package directory unknown, skipping the check" >&2 + return 0 + fi + + tarball=${pkgdir}/${pkg}.x86_64.bee.tar.bz2 + if [ ! -e "${tarball}" ]; then + echo " no package at ${tarball}, skipping the check" >&2 + return 0 + fi + + echo " checking ${tarball}" + mapfile -t contents < <(tar tjf "${tarball}" | grep -F '.json') + printf ' %s\n' ${contents[@]+"${contents[@]}"} + for relpath in "${want_json[@]}"; do + if printf '%s\n' ${contents[@]+"${contents[@]}"} \ + | grep -q "/${relpath}\$"; then + found=$(( found + 1 )) + else + echo " MISSING: ${relpath}" >&2 + missing=$(( missing + 1 )) + fi + done + echo " ${found} of ${#want_json[@]} expected JSON files present" + + return $(( missing > 0 )) +} + +command -v beesh >/dev/null || die "beesh not found" +if (( use_fakeroot )); then + command -v fakeroot >/dev/null || die "fakeroot not found, see --no-fakeroot" +fi + +mkdir -p "${logdir}" || die "cannot create log directory ${logdir}" + +export BEE_TMP_TMPDIR=${tmpdir} +export BEE_TMP_BUILDROOT=${buildroot} +[ -z "${repository}" ] || export BEE_REPOSITORY_PREFIX=${repository} + +failed=0 +for beefile in "${set_to_build[@]}"; do + path=${beefile} + [ -f "${path}" ] || path=${topdir}/${beefile} + [ -f "${path}" ] || die "bee-file '${beefile}' not found in . or ${topdir}" + path=$(readlink -f "${path}") + + pkg=$(pkgfullpkg "${path}") || exit 1 + log=${logdir}/$(date +%Y%m%d)-${pkg}.log + + if (( dry_run )); then + echo "would build ${pkg} from ${path}, log ${log}" + continue + fi + + echo "=== ${pkg}: $(date '+%F %T'), log ${log}" + # A .be0/.bee is a beesh script: its mee_* hooks are called by beesh, so + # running it with plain bash only defines the functions and builds + # nothing. -c forces cleanup of a build tree left behind by an earlier + # run, which is the usual reason a rebuild refuses to start. + if (( use_fakeroot )); then + fakeroot beesh -c "${path}" > "${log}" 2>&1 + else + beesh -c "${path}" > "${log}" 2>&1 + fi + status=$? + + if (( status )); then + echo "=== ${pkg}: beesh failed with ${status}, see ${log}" >&2 + tail -20 "${log}" >&2 + failed=$(( failed + 1 )) + (( keep_going )) || exit ${status} + continue + fi + + echo "=== ${pkg}: built" + # nvidia-mxlinks ships symlinks, not JSON; only the drivers are checked. + if (( verify )) && [ "${pkg}" != "${pkg#nvidia_current-}" ]; then + check_package "${pkg}" || failed=$(( failed + 1 )) + fi +done + +(( dry_run )) || rm -rf "${buildroot}" + +if (( failed )); then + die "${failed} of ${#set_to_build[@]} bee-files failed" +fi + +(( dry_run )) || echo "=== all ${#set_to_build[@]} bee-files built" From a3851712dea10d84224e733a6a34d1bcf30721bb Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 31 Aug 2026 23:14:49 +0200 Subject: [PATCH 6/6] scripts: Remove `build-nvidia-loader-json.sh` Not needed anymore. --- scripts/build-nvidia-loader-json.sh | 246 ---------------------------- 1 file changed, 246 deletions(-) delete mode 100755 scripts/build-nvidia-loader-json.sh diff --git a/scripts/build-nvidia-loader-json.sh b/scripts/build-nvidia-loader-json.sh deleted file mode 100755 index ee3962517..000000000 --- a/scripts/build-nvidia-loader-json.sh +++ /dev/null @@ -1,246 +0,0 @@ -#! /bin/bash - -# Build the NVIDIA packages that carry the loader JSON. -# -# scripts/build-nvidia-loader-json.sh [options] [ ...] -# -# Without arguments the whole set is built in the order below: first the two -# driver revisions that are selected on the machines running today, then the -# four that only older kernels pick, and last nvidia-mxlinks, which links the -# sonames the JSON files name into /usr/lib. -# -# Nothing is compiled here -- the .run payload is unpacked and copied -- so the -# builds run sequentially on the local host and no cluster node is needed. Each -# driver unpacks to roughly 4 GiB below --tmpdir while it builds. -# -# beesh runs under fakeroot, because mee_install() creates root-owned files. -# Under fakeroot the UID looks like 0, so beerc points the repository at -# /src/mariux/beeroot, which is where a release belongs; pass --repository to -# build into a private tree instead. - -set -u - -self=$(readlink -f "$0") -topdir=${self%/scripts/*} - -# The loader JSON only takes effect for the driver nvidiactl selected, so a -# node booting a kernel whose driver has not been rebuilt simply keeps the -# behaviour of before. The order is therefore priority, not dependency. -declare -a default_set=( - nvidia_current-580.178.04-1.bee # selected for 6.18.45, 6.18.46 - nvidia_current-570.144-1.bee # selected for 6.12.29 ... 6.12.100 - nvidia_current-535.230.02-1.bee # 6.12.11 only - nvidia_current-535.104.05-1.bee # 5.15.160, 6.1.53, 6.6.12, 6.6.35 - nvidia_current-510.108.03-1.bee # 5.15.131 - nvidia_current-510.60.02-2.bee # 5.15.77, 5.15.86, 5.15.94, 5.15.112 - nvidia-mxlinks.be0 # /usr/lib/ -> /usr/share/mxgfx/lib -) - -# The paths every rebuilt driver has to end up with, relative to the package -# root. nvidiactl links /etc/ to /usr/share/mxgfx/, so a -# missing one is silent on the node -- check it here instead. -declare -a want_json=( - vulkan/icd.d/nvidia_icd.json - vulkan/implicit_layer.d/nvidia_layers.json - glvnd/egl_vendor.d/10_nvidia.json - egl/egl_external_platform.d/10_nvidia_wayland.json - egl/egl_external_platform.d/15_nvidia_gbm.json -) - -tmpdir=/dev/shm -buildroot= -repository= -use_fakeroot=1 -verify=1 -dry_run=0 -keep_going=0 -logdir=/scratch/tmp - -usage() { - cat < ...] - -Options: - -t, --tmpdir DIR BEE_TMP_TMPDIR (default: ${tmpdir}) - --buildroot DIR BEE_TMP_BUILDROOT (default: /bee-\$USER) - --repository DIR BEE_REPOSITORY_PREFIX - (default: bee's, /src/mariux/beeroot under fakeroot) - --logdir DIR directory for the build logs (default: ${logdir}) - --no-fakeroot call beesh without fakeroot - --no-verify do not list the loader JSON in the built package - -k, --keep-going build the remaining bee-files after a failure - -n, --dry-run print what would be built and exit - -l, --list print the default set and exit - -h, --help print this help and exit - -Examples: - # everything, into the release repository - scripts/${0##*/} - # only the two drivers in use, into a private tree - scripts/${0##*/} --repository ~/.local/src/bee \\ - nvidia_current-580.178.04-2.bee nvidia_current-570.144-1.bee -EOF -} - -die() { - echo "${0##*/}: $*" >&2 - exit 1 -} - -# Accept --option=value as well as --option value. -declare -a argv=() -for arg in "$@"; do - case ${arg} in - --?*=*) argv+=("${arg%%=*}" "${arg#*=}") ;; - *) argv+=("${arg}") ;; - esac -done -set -- ${argv[@]+"${argv[@]}"} - -while (( $# )); do - case $1 in - -t|--tmpdir) tmpdir=$2; shift 2 ;; - --buildroot) buildroot=$2; shift 2 ;; - --repository) repository=$2; shift 2 ;; - --logdir) logdir=$2; shift 2 ;; - --no-fakeroot) use_fakeroot=0; shift ;; - --no-verify) verify=0; shift ;; - -k|--keep-going) keep_going=1; shift ;; - -n|--dry-run) dry_run=1; shift ;; - -l|--list) printf '%s\n' "${default_set[@]}"; exit 0 ;; - -h|--help) usage; exit 0 ;; - --) shift; break ;; - -*) die "unknown option '$1', see --help" ;; - *) break ;; - esac -done - -declare -a set_to_build=() -if (( $# )); then - set_to_build=("$@") -else - set_to_build=("${default_set[@]}") -fi - -: "${buildroot:=${tmpdir}/bee-${USER}}" - -# Where beesh will drop the package, for --verify. Only the fakeroot case has a -# well-known answer: beerc sets the prefix for UID 0 alone, and bee's own -# default for a real user is not worth guessing here. -if [ -n "${repository}" ]; then - pkgdir=${repository}/packages -elif (( use_fakeroot )); then - pkgdir=/src/mariux/beeroot/packages -else - pkgdir= -fi - -# The package name beesh will write: the file name for a versioned bee-file, -# the '# BEE_VERSION' line for a .be0, which carries the version instead. -pkgfullpkg() { - local beefile=$1 name - - name=${beefile##*/} - if [ "${name}" = "${name%.be0}" ]; then - echo "${name%.bee}" - return - fi - name=$(sed -n 's/^# BEE_VERSION *//p' "${beefile}" | head -1) - [ -n "${name}" ] || die "no '# BEE_VERSION' line in ${beefile}" - echo "${name}" -} - -# List the loader JSON in the built package, so that a driver that silently -# stopped shipping one of the files does not reach a node. -check_package() { - local pkg=$1 tarball found=0 missing=0 relpath - local -a contents=() - - if [ -z "${pkgdir}" ]; then - echo " package directory unknown, skipping the check" >&2 - return 0 - fi - - tarball=${pkgdir}/${pkg}.x86_64.bee.tar.bz2 - if [ ! -e "${tarball}" ]; then - echo " no package at ${tarball}, skipping the check" >&2 - return 0 - fi - - echo " checking ${tarball}" - mapfile -t contents < <(tar tjf "${tarball}" | grep -F '.json') - printf ' %s\n' ${contents[@]+"${contents[@]}"} - for relpath in "${want_json[@]}"; do - if printf '%s\n' ${contents[@]+"${contents[@]}"} \ - | grep -q "/${relpath}\$"; then - found=$(( found + 1 )) - else - echo " MISSING: ${relpath}" >&2 - missing=$(( missing + 1 )) - fi - done - echo " ${found} of ${#want_json[@]} expected JSON files present" - - return $(( missing > 0 )) -} - -command -v beesh >/dev/null || die "beesh not found" -if (( use_fakeroot )); then - command -v fakeroot >/dev/null || die "fakeroot not found, see --no-fakeroot" -fi - -mkdir -p "${logdir}" || die "cannot create log directory ${logdir}" - -export BEE_TMP_TMPDIR=${tmpdir} -export BEE_TMP_BUILDROOT=${buildroot} -[ -z "${repository}" ] || export BEE_REPOSITORY_PREFIX=${repository} - -failed=0 -for beefile in "${set_to_build[@]}"; do - path=${beefile} - [ -f "${path}" ] || path=${topdir}/${beefile} - [ -f "${path}" ] || die "bee-file '${beefile}' not found in . or ${topdir}" - path=$(readlink -f "${path}") - - pkg=$(pkgfullpkg "${path}") || exit 1 - log=${logdir}/$(date +%Y%m%d)-${pkg}.log - - if (( dry_run )); then - echo "would build ${pkg} from ${path}, log ${log}" - continue - fi - - echo "=== ${pkg}: $(date '+%F %T'), log ${log}" - # A .be0/.bee is a beesh script: its mee_* hooks are called by beesh, so - # running it with plain bash only defines the functions and builds - # nothing. -c forces cleanup of a build tree left behind by an earlier - # run, which is the usual reason a rebuild refuses to start. - if (( use_fakeroot )); then - fakeroot beesh -c "${path}" > "${log}" 2>&1 - else - beesh -c "${path}" > "${log}" 2>&1 - fi - status=$? - - if (( status )); then - echo "=== ${pkg}: beesh failed with ${status}, see ${log}" >&2 - tail -20 "${log}" >&2 - failed=$(( failed + 1 )) - (( keep_going )) || exit ${status} - continue - fi - - echo "=== ${pkg}: built" - # nvidia-mxlinks ships symlinks, not JSON; only the drivers are checked. - if (( verify )) && [ "${pkg}" != "${pkg#nvidia_current-}" ]; then - check_package "${pkg}" || failed=$(( failed + 1 )) - fi -done - -(( dry_run )) || rm -rf "${buildroot}" - -if (( failed )); then - die "${failed} of ${#set_to_build[@]} bee-files failed" -fi - -(( dry_run )) || echo "=== all ${#set_to_build[@]} bee-files built"