chore: Split vgpu_unlock-rs package

It never really made sense being in the nvidia-merged package; I just left it there
because a previous packager made the mistake (techinically by making it a seperate package
in that group I did improve the situation slightly, but only slightly.)
This commit is contained in:
Lily Tsuru 2024-12-06 03:44:23 -05:00
parent 0a9ac0721f
commit 2d13268eb6
18 changed files with 57 additions and 46 deletions

10
.gitignore vendored
View file

@ -1,8 +1,8 @@
pkg
src
**/pkg
**/src
pkgs/
vgpu_unlock-rs
vGPU-Unlock-patcher
*.run
*.tar.zst
*.tar.gz
**/*.run
**/*.tar.zst
**/*.tar.gz

View file

@ -1,17 +1,21 @@
# `nvidia-merged`
This is NVIDIA vGPU R16 horribly hacked to build and work on up to Linux 6.11.
This is NVIDIA vGPU R16 horribly hacked to build and work on up to Linux 6.11, along with `vgpu_unlock` and `vgpu_unlock-rs`.
# Building
`makepkg` will build with linux 6.1x patches.
**NOTICE**: the vGPU VFIO module needs CONFIG_IOMMUFD=n to function properly. No Arch pre-built kernels, to my knowledge, are built with this config option set correctly, so you will have to build your own kernel.
To disable them, use `_use_new_patches="false" makepkg`. This is useful if you're not using a upstream kernel
The nvidia vgpu_unlock patched and merged driver are in `packages/nvidia-merged`.
**NOTICE**: the vGPU VFIO module needs CONFIG_IOMMUFD=n to function properly. No Arch kernels are built with this config option set correctly, so you will have to build your own kernel.
`vgpu_unlock-rs` is in `packages/vgpu-unlock-rs`.
`makepkg` will by default build with linux 6.1x patches.
To disable them, use `_use_new_patches="false" makepkg`. This is useful if you're not using a upstream kernel, since the later patches break building on older kernels.
# Thanks
- Erin-allison originally created the PKGBUILD I based this on.
- Erin-allison originally created the PKGBUILD I based this package tree on.
- Snowman for vGPU-Unlock-Patcher
- vgpu-unlock_rs
- mbilker for vgpu-unlock_rs

View file

@ -8,7 +8,7 @@
[[ -z "${_use_new_patches}" ]] && _use_new_patches="true"
pkgbase='nvidia-merged'
pkgname=('lib32-nvidia-merged-utils' 'lib32-opencl-nvidia-merged' 'nvidia-merged-dkms' 'nvidia-merged-settings' 'nvidia-merged-utils' 'opencl-nvidia-merged' 'vgpu-unlock-rs')
pkgname=('lib32-nvidia-merged-utils' 'lib32-opencl-nvidia-merged' 'nvidia-merged-dkms' 'nvidia-merged-settings' 'nvidia-merged-utils' 'opencl-nvidia-merged')
pkgrel=2
arch=('x86_64')
makedepends=('git' 'rust')
@ -30,7 +30,6 @@ _patchedpkg="NVIDIA-Linux-${CARCH}-${pkgver}-merged-vgpu-kvm-patched"
# revs for git repos
_patcher_rev="3765eee908858d069e7b31842f3486095b0846b5"
_vgpu_unlock_rev="ba66a6c6eeb16eb8e2d2ec368d6605b974070d4b"
source=(
'0001-Fix-NVIDIA-blob-patch-not-using-BASEDIR.patch'
@ -51,25 +50,8 @@ source=(
"https://us.download.nvidia.com/XFree86/Linux-${CARCH}/${pkgver}/${_generalpkg}.run"
"file://${_vgpupkg}.run"
"git+https://github.com/VGPU-Community-Drivers/vGPU-Unlock-patcher.git#commit=${_patcher_rev}"
"git+https://github.com/mbilker/vgpu_unlock-rs.git#commit=${_vgpu_unlock_rev}")
)
sha256sums=('ae6b1cf5cc5e177e5502ebed4b64f058524bf5514e1d6cda911e2966b2749b16'
'a66368ac6e409d002238dc6f5b1833bee1573e65386b0537bbcca9cc130b9d2a'
'594339458c2208936ee12e51de515173801566256983e524d67e1da1081e2260'
'437232dfa868999dd252ee95ee88625fb3e8231c0b705510904b6822512c56ba'
'f1e9e0d4ebbd35d14ef28c79f8ed8a0c22ff5e49765dd42119106f39078b4682'
'a26f0ee66e140be1f93e52ff965da59490a33b13f40c56629071eab2553ce48f'
'bd3f975e4b87bdc5135f4268bb99c6ae9c2719448221e80409bc10bdb9493764'
'eb51808257e7898d37d4575f40ada424cabf5dcad61017dd677ff5a0b25dead4'
'5ea0d9edfcf282cea9b204291716a9a4d6d522ba3a6bc28d78edf505b6dc7949'
'eafb28461fbe8a37cef3121f4b0ad53ad459ba389d9afb91e79c6c8d93ba5ea9'
'be99ff3def641bb900c2486cce96530394c5dc60548fc4642f19d3a4c784134d'
'd8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167'
'0e54249a7754b668b436f0f7aa7e95fff68edbb12a93dbee4660e09a8c695f84'
'e6dca5626a2608c6bb2a046cfcb7c1af338b9e961a7dd90ac09bb8a126ff002e'
'2a53940da16c7c8bf001e5da0f53983192f4d09ec84cab713fbb424ac11df743'
'f3363d6cfef99147017329d08bedb81e473af91e7cda06d59576768a5a27b62f'
'5ac78e9c1cd940917c41db74fab893f1181559e9993ab041b07cc82d2c020b60')
create_links() {
# create soname links
@ -313,21 +295,6 @@ popd
install -D -m644 "${_patchedpkg}/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
package_vgpu-unlock-rs() {
pkgdesc='vGPU unlock library'
url='https://github.com/mbilker/vgpu_unlock-rs'
arch=('x86_64')
# vgpu_unlock-rs
install -D -m755 "vgpu_unlock-rs/target/release/libvgpu_unlock_rs.so" "${pkgdir}/usr/lib/vgpu_unlock_rs/libvgpu_unlock_rs.so"
# vGPU service overrides (I think it's cleaner to put them in this package. )
install -D -m644 "${srcdir}/vgpu_unlock-rs.conf" "${pkgdir}/usr/lib/systemd/system/nvidia-vgpud.service.d/30-vgpu_unlock-rs.conf"
install -D -m644 "${srcdir}/vgpu_unlock-rs.conf" "${pkgdir}/usr/lib/systemd/system/nvidia-vgpu-mgr.service.d/30-vgpu_unlock-rs.conf"
install -D -m644 "vgpu_unlock-rs/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
package_nvidia-merged-settings() {
pkgdesc='Tool for configuring the NVIDIA graphics driver (merged)'
url='https://github.com/NVIDIA/nvidia-settings'

View file

@ -0,0 +1,40 @@
# Maintainer: Lily Tsuru <lily.modeco80@protonmail.ch>
pkgname=vgpu-unlock-rs
pkgver=2.5.0
pkgrel=1
pkgdesc='Rust vGPU unlock user-mode library (injected into nvidia-vgpud and nvidia-vgpu-mgr)'
url='https://github.com/mbilker/vgpu_unlock-rs'
arch=('x86_64')
makedepends=('git' 'rust')
license=('MIT')
options=('!strip')
#groups=('nvidia-merged')
# This is post 2.5.0, but..
_vgpu_unlock_rev="ba66a6c6eeb16eb8e2d2ec368d6605b974070d4b"
source=(
"git+https://github.com/mbilker/vgpu_unlock-rs.git#commit=${_vgpu_unlock_rev}"
'vgpu_unlock-rs.conf'
)
sha256sums=('5ac78e9c1cd940917c41db74fab893f1181559e9993ab041b07cc82d2c020b60'
'eafb28461fbe8a37cef3121f4b0ad53ad459ba389d9afb91e79c6c8d93ba5ea9')
build() {
cd "${srcdir}/vgpu_unlock-rs"
cargo build -j `nproc` --release
}
package() {
install -D -m755 "vgpu_unlock-rs/target/release/libvgpu_unlock_rs.so" "${pkgdir}/usr/lib/vgpu_unlock_rs/libvgpu_unlock_rs.so"
# vGPU service overrides (I think it's cleaner to put them in this package. )
install -D -m644 "${srcdir}/vgpu_unlock-rs.conf" "${pkgdir}/usr/lib/systemd/system/nvidia-vgpud.service.d/30-vgpu_unlock-rs.conf"
install -D -m644 "${srcdir}/vgpu_unlock-rs.conf" "${pkgdir}/usr/lib/systemd/system/nvidia-vgpu-mgr.service.d/30-vgpu_unlock-rs.conf"
install -D -m644 "vgpu_unlock-rs/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}