Version in base suite: 1.2.0 Base version: glx-alternatives_1.2.0 Target version: glx-alternatives_1.2.1~deb11u1 Base file: /srv/ftp-master.debian.org/ftp/pool/contrib/g/glx-alternatives/glx-alternatives_1.2.0.dsc Target file: /srv/ftp-master.debian.org/policy/pool/contrib/g/glx-alternatives/glx-alternatives_1.2.1~deb11u1.dsc changelog | 15 ++++++++++++ control | 2 - copyright | 2 - glx-diversions.postinst | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 2 deletions(-) diff -Nru glx-alternatives-1.2.0/debian/changelog glx-alternatives-1.2.1~deb11u1/debian/changelog --- glx-alternatives-1.2.0/debian/changelog 2020-07-02 20:31:56.000000000 +0000 +++ glx-alternatives-1.2.1~deb11u1/debian/changelog 2022-03-16 09:34:39.000000000 +0000 @@ -1,3 +1,18 @@ +glx-alternatives (1.2.1~deb11u1) bullseye; urgency=medium + + * Rebuild for bullseye. + + -- Andreas Beckmann Wed, 16 Mar 2022 10:34:39 +0100 + +glx-alternatives (1.2.1) unstable; urgency=medium + + * glx-diversions: After initial setup of the diversions, install a minimal + alternative to the diverted files s.t. libGL.so.1 etc. are not missing + until glx-alternative-mesa processes its triggers. (Closes: #993338) + * Bump Standards-Version to 4.6.0. No changes needed. + + -- Andreas Beckmann Fri, 01 Oct 2021 23:06:54 +0200 + glx-alternatives (1.2.0) unstable; urgency=medium * Build for arm64. diff -Nru glx-alternatives-1.2.0/debian/control glx-alternatives-1.2.1~deb11u1/debian/control --- glx-alternatives-1.2.0/debian/control 2020-07-02 20:31:56.000000000 +0000 +++ glx-alternatives-1.2.1~deb11u1/debian/control 2022-03-16 09:34:39.000000000 +0000 @@ -7,7 +7,7 @@ Build-Depends: debhelper-compat (= 13), Rules-Requires-Root: no -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/nvidia-team/glx-alternatives Vcs-Git: https://salsa.debian.org/nvidia-team/glx-alternatives.git diff -Nru glx-alternatives-1.2.0/debian/copyright glx-alternatives-1.2.1~deb11u1/debian/copyright --- glx-alternatives-1.2.0/debian/copyright 2020-07-02 20:31:56.000000000 +0000 +++ glx-alternatives-1.2.1~deb11u1/debian/copyright 2022-03-16 09:34:39.000000000 +0000 @@ -6,7 +6,7 @@ GNU GPL version 2 or later. Files: * -Copyright: © 2010-2019 Andreas Beckmann +Copyright: © 2010-2022 Andreas Beckmann License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru glx-alternatives-1.2.0/debian/glx-diversions.postinst glx-alternatives-1.2.1~deb11u1/debian/glx-diversions.postinst --- glx-alternatives-1.2.0/debian/glx-diversions.postinst 2020-07-02 20:31:56.000000000 +0000 +++ glx-alternatives-1.2.1~deb11u1/debian/glx-diversions.postinst 2022-03-16 09:34:39.000000000 +0000 @@ -102,6 +102,62 @@ fi +add_slave() +{ + local target_link name source_path prefix + target_link="$1" + name="$2" + source_path="$3" + prefix="glx--" + + if [ -f "${source_path}" ] && [ -d "$(dirname "${target_link}")" ]; then + echo --slave "${target_link}" "${prefix}${name}" "${source_path}" + fi +} + +add_multiarch_slave() +{ + local target_dir target_sub_dir file source_dir source_sub_dir prefix suffix triplet + target_dir="$1" + target_sub_dir="$2" + file="$3" + source_dir="$4" + source_sub_dir="$5" + prefix="$6" + srcfile="${7:-$file}" + + for triplet in $TRIPLETS ; do + # s|/$||; s|^/|-|; + suffix="${triplet%/}" + suffix="${suffix:+-${suffix#/}}" + add_slave \ + "${target_dir}${triplet}${target_sub_dir}${file}" \ + "${prefix}${file}${suffix}" \ + "${source_dir}${triplet}${source_sub_dir}${srcfile}" + done +} + +if [ "$1" = "configure" ]; then + + # after initial diversion setup add a minimal glx alternative + # s.t. libGL.so.1 etc. are not missing until glx-alternative-mesa + # processed the triggers to properly create the alternative + if [ -z "$2" ]; then + + # libGL.so.1 (from /usr/lib/mesa-diverted/) + slaves="$(add_multiarch_slave /usr/lib "" libGL.so.1 /usr/lib/mesa-diverted) + $(add_multiarch_slave /usr/lib "" libEGL.so.1 /usr/lib/mesa-diverted) + $(add_multiarch_slave /usr/lib "" libGLESv1_CM.so.1 /usr/lib/mesa-diverted) + $(add_multiarch_slave /usr/lib "" libGLESv2.so.2 /usr/lib/mesa-diverted) + " + if echo "$slaves" | grep -q "slave" ; then + update-alternatives --install /usr/lib/glx glx /usr/lib/mesa-diverted 5 $slaves + fi + fi + +fi + + if [ "$1" = "configure" ]; then # activate triggers