summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-12-20 12:03:26 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2024-12-22 23:52:05 +0100
commitf5a24acea31248f98db51d7a2fd1d7b2198bb177 (patch)
treefcfbf6ff05674bb80e5d0d9262a225062d6cf474 /debian
parent153653d449efe121487641303d43ac523b9b17fb (diff)
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.
Diffstat (limited to 'debian')
-rw-r--r--debian/control3
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/tests/control1
3 files changed, 4 insertions, 2 deletions
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) <!pkg.apt.ci>,
ninja-build,
pkg-config,
po4a (>= 0.34-2) <!nodoc>,
+ sqv [amd64 arm64 armel armhf i386 mips64el ppc64el riscv64 s390x hurd-amd64 hurd-i386 loong64 powerpc ppc64 sparc64] <!pkg.apt.nosqv> | gpgv,
triehash,
xsltproc <!nodoc>,
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,