mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-08-28 20:06:05 +00:00
feat: Use Intel Mesa package from base image (#1371)
This commit is contained in:
+1
-23
@@ -35,6 +35,7 @@ if ! enabled "$GPU" || isAmdCpu || [[ "$ARCH" != "amd64" ]]; then
|
||||
fi
|
||||
|
||||
msg="Configuring display drivers..."
|
||||
|
||||
html "$msg"
|
||||
enabled "$DEBUG" && echo "$msg"
|
||||
|
||||
@@ -65,27 +66,4 @@ if [ ! -c "$RENDERNODE" ] || [ ! -r "$RENDERNODE" ] || [ ! -w "$RENDERNODE" ]; t
|
||||
warn "render device '${RENDERNODE}' is unavailable or inaccessible."
|
||||
fi
|
||||
|
||||
addDsmPackage() {
|
||||
|
||||
local pkg=$1
|
||||
local desc=$2
|
||||
|
||||
if ! apt-mark showinstall | grep -qx "$pkg"; then
|
||||
[ -z "$COUNTRY" ] && setCountry
|
||||
|
||||
# Use a mainland mirror only for on-demand package installation, avoiding
|
||||
# slow or inaccessible Debian endpoints in that region.
|
||||
if [[ "${COUNTRY^^}" == "CN" ]]; then
|
||||
sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
|
||||
fi
|
||||
fi
|
||||
|
||||
addPackage "$pkg" "$desc"
|
||||
}
|
||||
|
||||
# Install acceleration packages lazily so non-GPU deployments keep the base
|
||||
# image small and do not require OpenGL modules.
|
||||
addDsmPackage "xserver-xorg-video-intel" "Intel GPU drivers"
|
||||
addDsmPackage "qemu-system-modules-opengl" "OpenGL module"
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user