From cceb4881e2c06082ca637e57641b3fe850c66f12 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 12 Sep 2018 12:57:11 +0200 Subject: [xorg] Pin X driver versions --- core/modules/xorg/module.build | 13 ++++++++++--- core/modules/xorg/module.conf.ubuntu.17 | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'core/modules/xorg') diff --git a/core/modules/xorg/module.build b/core/modules/xorg/module.build index b5f4eb53..390b5922 100644 --- a/core/modules/xorg/module.build +++ b/core/modules/xorg/module.build @@ -2,11 +2,13 @@ fetch_source() { if [ -n "$REQUIRED_XORG_DRIVERS" ]; then + local drv mkdir -p src cd src || perror "No cd to xorg src dir" for drv in $REQUIRED_XORG_DRIVERS; do + drv=${drv%//*} [ -d "${drv}/.git" ] && continue - git clone --depth 1 "git://anongit.freedesktop.org/xorg/driver/${drv}" "${drv}" || perror "Could not clone $drv" + git clone "git://anongit.freedesktop.org/xorg/driver/${drv}" "${drv}" || perror "Could not clone $drv" done cd - fi @@ -33,13 +35,18 @@ build() { # Newer X versions seems to have this fixed, so we included it again # See if we should build more up to date versions of drivers - local drv if [ -n "$REQUIRED_XORG_DRIVERS" ]; then + local repo vers drv pinfo "Compiling requested xorg drivers from source" mkdir -p "${MODULE_BUILD_DIR}/usr/lib/xorg/modules/drivers" for drv in $REQUIRED_XORG_DRIVERS; do + repo=${drv%//*} + vers=${drv#*//} pinfo "Compiling $drv" - cd "${MODULE_WORK_DIR}/src/${drv}" || perror "No src dir for xorg driver $drv" + cd "${MODULE_WORK_DIR}/src/${repo}" || perror "No src dir for xorg driver $repo" + if [ "$drv" != "$vers" ]; then + git checkout "$vers" || pwarn "Could not checkout $vers for $repo" + fi ./autogen.sh || perror "Autogen for $drv failed" ./configure || perror "configure for $drv failed" make || perror "Make for $drv failed" diff --git a/core/modules/xorg/module.conf.ubuntu.17 b/core/modules/xorg/module.conf.ubuntu.17 index 520cc3b5..8678a0a3 100644 --- a/core/modules/xorg/module.conf.ubuntu.17 +++ b/core/modules/xorg/module.conf.ubuntu.17 @@ -93,8 +93,8 @@ REQUIRED_DIRECTORIES+=" # TODO: Required because the shipped ones crash on VT switch as of 2017-11-24 # Remove when fixed in ubuntu repos REQUIRED_XORG_DRIVERS=" - xf86-video-ati - xf86-video-amdgpu + xf86-video-ati//xf86-video-ati-18.0.1 + xf86-video-amdgpu//xf86-video-amdgpu-18.0.1 " REQUIRED_LIBRARIES+=" amdgpu_drv -- cgit v1.2.3-55-g7522