From 6c1c3157a2298129cfc0573a00c551b82c0250d8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann <daniel.baumann@progress-linux.org> Date: Sun, 28 Apr 2024 11:36:24 +0200 Subject: Adding debian version 15.1. Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org> --- debian/armv8-support.preinst | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 debian/armv8-support.preinst (limited to 'debian/armv8-support.preinst') diff --git a/debian/armv8-support.preinst b/debian/armv8-support.preinst new file mode 100644 index 0000000..57e57d6 --- /dev/null +++ b/debian/armv8-support.preinst @@ -0,0 +1,50 @@ +#!/bin/sh +set -e + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + FILE="/usr/libexec/x86_64-linux-gnu/isa-support/test-ARMv8" + # "exec >;command" instead of "command >" looks strange but regular + # redirections don't fully work within qemu-user. + ret=0;(exec >/dev/null 2>&1; "$FILE") || ret=$? + if [ $ret -ne 0 ] && [ -n "$IGNORE_ISA" ]; then + cat >&2 <<END +This machine doesn't support ARMv8, but override (IGNORE_ISA) is enabled. +Continuing... +END + ret=0 + fi + + if [ $ret -eq 126 ]; then + cat >&2 <<END +Couldn't execute test binary for ARMv8, you either do foreign multi-arch +without qemu or do something strange. Assuming you know what you're doing. +Continuing... +END + ret=0 + fi + + if [ $ret -ne 0 ]; then + # Fail noisily, first via debconf (if installed). + if [ -e /usr/share/debconf/confmodule ]; then + + . /usr/share/debconf/confmodule + db_version 2.0 + + db_fset ARMv8-support/fail seen false ||: + db_reset ARMv8-support/fail ||: + db_input critical ARMv8-support/fail ||: + db_go ||: + db_stop ||: + fi + + cat >&2 <<END +This machine doesn't support ARMv8, sorry. +Aborting. +END + exit 2 + fi +fi + +#DEBHELPER# + +exit 0 -- cgit v1.2.3