Source: logwatch Version: 7.7-1ubuntu1 Severity: serious Tags: patch ftbfs Justification: fails to build from source (but built successfully in the past)
Recent change added a couple typos that prevent the DEP8 test case from executing. This is reproduced on all architectures in both Debian and Ubuntu. C.f.: - https://ci.debian.net/packages/l/logwatch/testing/amd64/57451983/ - https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-bryce-logwatch-merge-v7.12-2/plucky/s390x/l/logwatch/20250218_145650_2877b@/log.gz 111s autopkgtest [10:02:08]: test packages-and-report: [----------------------- 111s Checking section SSHD exists in logwatch report for package openssh-server 111s cat: {AUTOPKGTEST_ARTIFACTS}/service-sshd.txt: No such file or directory 112s autopkgtest [10:02:09]: test packages-and-report: -----------------------] -- System Information: Debian Release: trixie/sid APT prefers noble-updates APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'), (100, 'noble-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.8.0-52-generic (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
>From 83bda15d2cacdec59b3957ffe99364c97efd7926 Mon Sep 17 00:00:00 2001 From: Bryce Harrington <br...@bryceharrington.org> Date: Tue, 18 Feb 2025 18:40:58 -0800 Subject: [PATCH] tests/packages-and-report: Fix two typos in DEP8 test * Add missing $ on env var * awk pattern should reference $0, not $1 This fixes a test failure seen in Debian and Ubuntu, e.g.: https://ci.debian.net/packages/l/logwatch/testing/amd64/57451983/ 111s autopkgtest [10:02:08]: test packages-and-report: [----------------------- 111s Checking section SSHD exists in logwatch report for package openssh-server 111s cat: {AUTOPKGTEST_ARTIFACTS}/service-sshd.txt: No such file or directory 112s autopkgtest [10:02:09]: test packages-and-report: -----------------------] --- debian/tests/packages-and-report | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/packages-and-report b/debian/tests/packages-and-report index dc57b39..e41fa34 100644 --- a/debian/tests/packages-and-report +++ b/debian/tests/packages-and-report @@ -19,7 +19,7 @@ check_package_report_present(){ PATTERN="- ${key}" /usr/sbin/logwatch --detail High --range all --service "${service}" --output file --filename "${AUTOPKGTEST_ARTIFACTS}/service-${service}.txt" - section_exists="$(cat "{AUTOPKGTEST_ARTIFACTS}/service-${service}.txt" | awk -v var="${PATTERN}" '$1 ~ var && position{print NR-position-1} $0 ~ var {position=NR}')" + section_exists="$(cat "${AUTOPKGTEST_ARTIFACTS}/service-${service}.txt" | awk -v var="${PATTERN}" '$0 ~ var && position{print NR-position-1} $0 ~ var {position=NR}')" echo "Number of lines for the report: ${section_exists}" if [ -z "${section_exists}" ]; then exit 1 -- 2.43.0