#!/bin/bash set -e -u # -x cd /mnt/build-storage declare -a skip=( python-trml2pdf samba tdb talloc tevent ldb univention-ldb-modules python3-smbpasswd python-docker docker.io runc containerd golang-1.13 golang-defaults python-notifier univention-system-setup univention-archive-key univention-net-installer crudesaml php-krb5 univention-heimdal eapol python-pam partman-btrfs user-setup -dbgsym_ -dbg_ base-files # AGPL added libtext-iconv-perl # binNMU libvirt # UCS disables Xen slapd_2.4.47+dfsg-3+deb10u6_amd64.deb # translog squid # SSL enabled ) grep-dctrl --not -F Section univention --and -F Version 'A~5.0.0' -s Source:Package,Filename -n buildsystem/apt/ucs_5.0-0/a*/Packages | paste - - - | ( IFS='|'; grep -Eve "${skip[*]}" ) | sort | while IFS=' ' read -r src apt do src="${src%% *}" ucs="buildsystem/apt/$apt" [[ "$src" =~ (lib.|.) ]] sub=${BASH_REMATCH[1]} [[ "$apt" =~ .*/(.*)_(.*)_(.*)[.](.*) ]] pkg=${BASH_REMATCH[1]} ver=${BASH_REMATCH[2]} arch=${BASH_REMATCH[3]} type=${BASH_REMATCH[4]} case "$src" in apt) v='1.8.2.3' ;; libtext-iconv-perl) ver='1.7-5+b7' ;; *) v='*deb10*' ;; esac deb="$(for ver in "${ver/A~5.0.0.20??????????}" "${ver%-*}-${v}" "${v}" do ls -1 "upstream/debian/pool/main/${sub}/$src/${pkg}_"${ver}"_${arch}.${type}" 2>/dev/null && break done)" out="$([ -f "$deb" ] && debdiff --nocontrol --quiet "$deb" "$ucs")" || printf '*** %s *** %s *** %s ***\n%s\n\n' "$src" "$deb" "$ucs" "${out/\[The following lists of changes regard files as different if they have?different names, permissions or owners.\]??}" done 2>&1 | tee "${0%.sh}.diff"