Files
Dimitri John Ledkov 5f068dd3bc UBUNTU: [Packaging] Remove in-tree abi checks
linux-buildinfo packages are now externally compared by swm, with
results approving or rejecting updates based on the stable
tracker. Those checks also allow hints and overrides to accept
intentional changes.

Also these are done on the correct pair-wise comparisons, especially
when two streams are being cranked.

The above eliminates the need to identify previous build abi,
download, extract it, vendor it in, and assert it at build time.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2024-03-11 09:41:23 +01:00

48 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
debian="$1"
abi="$2"
archs=$(awk '/^Architecture:/ { $1=""; for (i=1; i<=NF; i++) { if ($i != "all") { print $i }}}' debian/control | sort -u)
fail=0
failure()
{
echo "EE: $*" 1>&2
fail=1
}
for arch in $archs
do
if [ ! -f "$debian/rules.d/$arch.mk" ]; then
continue
fi
image_pkg=$(awk -F '\\s*=\\s*' '$1 == "do_flavour_image_package" { print $2 }' "$debian/rules.d/$arch.mk")
if [ "$image_pkg" = "false" ]; then
continue
fi
flavours=$(
awk '/^\s*flavours\s*=/{
sub(/^\s*flavours\s*=\s*/, "");
print
}' "$debian/rules.d/$arch.mk")
for flavour in $flavours
do
if [ -d debian/certs ]; then
if ! python3 debian/scripts/misc/annotations --export -c CONFIG_SYSTEM_TRUSTED_KEYS --arch "$arch" --flavour "$flavour" | grep -q '^CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"$' ; then
failure "'CONFIG_SYSTEM_TRUSTED_KEYS=\"debian/canonical-certs.pem\"' is required"
fi
fi
if [ -d debian/revoked-certs ]; then
if ! python3 debian/scripts/misc/annotations --export -c CONFIG_SYSTEM_REVOCATION_KEYS --arch "$arch" --flavour "$flavour" | grep -q '^CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem"$' ; then
failure "'CONFIG_SYSTEM_REVOCATION_KEYS=\"debian/canonical-revoked-certs.pem\"' is required"
fi
fi
done
done
exit "$fail"