Source: ghdl Followup-For: Bug #916475 Hello.
The remaining suggestions are rebased and attached. > Dh-builtusing If you agree in principle with attachment #1 but do not want to apply it for now, please keep a reminder (this bug, a pull request or whatever fits your workflow). > This is kind of obscure, think of the (lack of an) error message. If we > skip this we'll get an "undefined $2" error due to set -u, which I find is > more helpful than a quiet exit rv>0. Attachment #2 should answer your concern. > I've finally pushed your patches through to salsa after build testing and > verifying the resulting binary packages packages are equivalent using > debdiff. Differences are seem to come down to to dependency versions > changing: This seems OK to me, or unrelated for the dependency on libzstd1.
>From ea21a75e408397b0ed6e926ad4c34179f5d13e3b Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Sun, 1 Oct 2023 01:14:25 +0200 Subject: [PATCH 1/2] Delegate computation of Built-Using to dh-builtusing --- debian/control | 7 ++++--- debian/rules | 9 --------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/debian/control b/debian/control index 585ee55e..545c44b4 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Maintainer: Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.o Uploaders: Andreas Bombe <a...@debian.org> Build-Depends: debhelper-compat (= 13), dh-ada-library (>= 8.1), + dh-sequence-builtusing, gnat-12, gcc-12, g++-12, gcc-12-source <!pkg.ghdl.nogcc>, libisl-dev (>= 0.14) <!pkg.ghdl.nogcc>, @@ -80,7 +81,7 @@ Description: VHDL compiler/simulator (mcode backend) Package: ghdl-gcc Architecture: any Build-Profiles: <!pkg.ghdl.nogcc> -Built-Using: ${Built-Using-GCC} +Built-Using: ${dh-builtusing:gcc-S-source} Depends: ghdl-common (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, gcc, zlib1g-dev Description: VHDL compiler/simulator (GCC backend) @@ -122,7 +123,7 @@ Description: VHDL compiler/simulator (tools) Package: libghdl-3-0-0 Architecture: any -Built-Using: ${Built-Using-GCC} +Built-Using: ${dh-builtusing:gcc-S-source} <!pkg.ghdl.nogcc> Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same Description: VHDL compiler/simulator (shared library) @@ -135,7 +136,7 @@ Description: VHDL compiler/simulator (shared library) Package: libghdl-dev Architecture: any -Built-Using: ${Built-Using-GCC} +Built-Using: ${dh-builtusing:gcc-S-source} <!pkg.ghdl.nogcc> Depends: libghdl-3-0-0 (= ${binary:Version}), ${misc:Depends} Multi-Arch: same Description: VHDL compiler/simulator (library development files) diff --git a/debian/rules b/debian/rules index 5821f85d..138b8581 100755 --- a/debian/rules +++ b/debian/rules @@ -95,15 +95,6 @@ override_dh_strip: dh_strip -N libghdl-3-0-0 dh_strip -p libghdl-3-0-0 --dbgsym-migration='libghdl-2-0-0' -override_dh_gencontrol: -ifneq ($(filter gcc,$(BACKENDS)),) - dh_gencontrol -- -VBuilt-Using-GCC="$(shell dpkg-query -f '$${Source} (= $${Version})' -W gcc-$(DEB_GNAT_VERSION)-source)" -else - dh_gencontrol -endif - - - configure-llvm-stamp configure-mcode-stamp: configure-%-stamp: $(announce) mkdir -p $(BUILDDIR)/$* -- 2.39.2
>From 07b885622c11d970f3e3c5102578c9265b5491d4 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Thu, 5 Oct 2023 14:39:35 +0200 Subject: [PATCH 2/2] test driver: move error reporting to a separate procedure --- debian/tests/ghdl-tests | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/debian/tests/ghdl-tests b/debian/tests/ghdl-tests index 871d594b..eae5e43c 100755 --- a/debian/tests/ghdl-tests +++ b/debian/tests/ghdl-tests @@ -6,29 +6,32 @@ set -C -e -f -u # Debian yet. TESTS="sanity gna vests synth vpi vhpi" -test $# = 2 +error() { + echo >&2 "$0: $1" + exit 1 +} + +test $# = 2 || error "bad argument count: $#" case "$2" in gcc|llvm|mcode) - BACKEND=$2 - ;; + BACKEND=$2 + ;; *) - echo >&2 "Invalid backend specification" - exit 1 + error "invalid backend specification: $2" esac case "$1" in buildtest) - RUNDIR=testrundir/$BACKEND - GHDL="$PWD/$RUNDIR/usr/bin/ghdl-$BACKEND" - ;; + RUNDIR=testrundir/$BACKEND + GHDL="$PWD/$RUNDIR/usr/bin/ghdl-$BACKEND" + ;; autopkgtest) - RUNDIR="$AUTOPKGTEST_TMP" - GHDL=/usr/bin/ghdl-$BACKEND - ;; + RUNDIR="$AUTOPKGTEST_TMP" + GHDL=/usr/bin/ghdl-$BACKEND + ;; *) - echo >&2 "Invalid test environment specification" - exit 1 + error "invalid test environment specification: $1" esac # Copy testsuite into $RUNDIR to execute there, so that no cleanup is necessary @@ -50,6 +53,5 @@ if ./testsuite.sh $TESTS -- --keep-going; then elif test $BACKEND = llvm; then echo "Tests for backend llvm failed (but ignored for now)." else - echo >&2 "Tests for backend $BACKEND failed." - exit 1 + error "tests for backend $BACKEND failed." fi -- 2.39.2