#!/bin/sh # This program is free software, licensed under the terms of the GNU GPL. # See the Bongo COPYING file for full details. # Copyright (c) 2026 Bongo Project contributors set -eu source_tree=${1:-$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)} work=${2:-/tmp/bongo-debian-source-probe} export DEBIAN_FRONTEND=noninteractive if [ "$(id -u)" -ne 0 ]; then echo 'Run this probe as root inside a disposable Debian Trixie container.' >&2 exit 1 fi . /etc/os-release if [ "${ID:-}" != debian ] || [ "${VERSION_CODENAME:-}" != trixie ]; then echo 'This probe requires a Debian Trixie container.' >&2 exit 1 fi if ! grep -q 'Types: deb deb-src' /etc/apt/sources.list.d/debian.sources; then sed -i 's/^Types: deb$/Types: deb deb-src/' \ /etc/apt/sources.list.d/debian.sources fi apt-get update apt-get install -y --no-install-recommends \ ca-certificates dpkg-dev patch xz-utils mkdir -p "$work" cd "$work" apt-get source mailutils=1:3.19-1 apt-get source libspf2=1.2.10-8.3 for patch_file in "$source_tree"/contrib/debian/mailutils/patches/*.patch; do echo "mailutils: ${patch_file##*/}" patch --dry-run -d mailutils-3.19 -p1 <"$patch_file" patch -d mailutils-3.19 -p1 <"$patch_file" done for patch_file in "$source_tree"/contrib/debian/libspf2/patches/*.patch; do echo "libspf2: ${patch_file##*/}" patch --dry-run -d libspf2-1.2.10 -p1 <"$patch_file" patch -d libspf2-1.2.10 -p1 <"$patch_file" done