From f5a24acea31248f98db51d7a2fd1d7b2198bb177 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 20 Dec 2024 12:03:26 +0100 Subject: debian: Plug sqv into the package build Our goal is for each platform to have one blessed OpenPGP verification system: Platforms that support sqv get sqv, platforms that don't get gpgv. To do so we hardcode the architecture list at build time. At build time we check if /usr/bin/sqv exists, which is the condition that apt uses to see if it should build with sqv support. We use a slight hack here to build with sqv on the official Debian buildds but use gpgv on Ubuntu by abusing the fact that Ubuntu resolves alternative build dependencies, and gpgv is installed in the buildd image. --- debian/control | 3 ++- debian/rules | 2 +- debian/tests/control | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 50297362e..1022efa37 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,7 @@ Build-Depends: dpkg-dev (>= 1.22.5) , ninja-build, pkg-config, po4a (>= 0.34-2) , + sqv [amd64 arm64 armel armhf i386 mips64el ppc64el riscv64 s390x hurd-amd64 hurd-i386 loong64 powerpc ppc64 sparc64] | gpgv, triehash, xsltproc , zlib1g-dev @@ -38,7 +39,7 @@ Vcs-Browser: https://salsa.debian.org/apt-team/apt Package: apt Architecture: any Depends: base-passwd (>= 3.6.1) | adduser, - gpgv, + ${openpgp:Depends}, libapt-pkg6.0t64 (>= ${binary:Version}), ${apt:keyring}, ${misc:Depends}, diff --git a/debian/rules b/debian/rules index 56b4a98d0..cd2370931 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,7 @@ override_dh_install-arch: install -m 644 debian/apt.conf.autoremove debian/apt/etc/apt/apt.conf.d/01autoremove override_dh_gencontrol: - dh_gencontrol -- -Vapt:keyring="$(shell ./vendor/getinfo keyring-package)" + dh_gencontrol -- -Vapt:keyring="$(shell ./vendor/getinfo keyring-package)" -Vopenpgp:Depends=$(shell test -e /usr/bin/sqv && echo sqv || echo gpgv) override_dh_installcron: dh_installcron --name=apt-compat diff --git a/debian/tests/control b/debian/tests/control index 428bed456..67cbe25b4 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -8,6 +8,7 @@ Depends: @, @builddeps@, dpkg (>= 1.20.8), expect, fakeroot, wget, stunnel4, lso gpgv, gpgv-sq, sq (>= 0.40), + sqv, moreutils, jq, libfile-fcntllock-perl, python3-apt, aptitude, -- cgit v1.2.3-70-g09d2