commit 4292a7ea16a653a22c4cd0d65f06d6cf5c53f877
parent 8fe630dcc8eb4a2729003975242c20e56bf41b68
Author: Florian Dold <florian@dold.me>
Date: Mon, 25 Aug 2025 00:06:17 +0200
packaging: cache cargo, run post-build lld checks
Diffstat:
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/packaging/ng/buildscripts/generic.sh b/packaging/ng/buildscripts/generic.sh
@@ -76,4 +76,26 @@ for deb in ../*.deb; do
echo $(basename $deb) >>/pkgdir/$PACKAGE.built.current
done
+# Now do some basic tests to check the packages actually work
+
+# We need to re-scan packages to account for the newly built packages.
+pushd /pkgdir
+dpkg-scanpackages . | xz - >/pkgdir/Packages.xz
+echo "deb [trusted=yes] file:/pkgdir ./" >/etc/apt/sources.list.d/taler-packaging-local.list
+apt-get update
+popd
+
+apt install -y ../*.deb
+
+for deb in ../*.deb; do
+ for f in $(dpkg --contents $deb | awk '{ print $6 }' | grep "bin" | sed -e 's|^[.]/|/|'); do
+ if file $f | grep -q 'ELF.*executable'; then
+ echo "checking $f"
+ if ! ldd "$f"; then
+ echo "Installed binary $f has linker issue"
+ fi
+ fi
+ done
+done
+
echo $TAG >/pkgdir/$PACKAGE.built.tag
diff --git a/packaging/ng/taler-pkg b/packaging/ng/taler-pkg
@@ -130,6 +130,10 @@ def build(cfg):
dockerfile = f"distros/Dockerfile.{distro}"
image_tag = f"taler-packaging-{distro}:latest"
pkgdir = Path(f"packages/{distro}").absolute()
+ cachedir = Path(f"cache")
+ cachedir.mkdir(exist_ok=True)
+ (cachedir / "cargo-git").mkdir(exist_ok=True)
+ (cachedir / "cargo-registry").mkdir(exist_ok=True)
if not cfg.dry:
subprocess.run(
@@ -164,6 +168,10 @@ def build(cfg):
"--security-opt",
"label=disable",
"--mount",
+ f"type=bind,source={cachedir}/cargo-registry,target=/root/.cargo/registry",
+ "--mount",
+ f"type=bind,source={cachedir}/cargo-git,target=/root/.cargo/git",
+ "--mount",
f"type=bind,source={mydir}/buildscripts,target=/buildscripts,readonly",
"--mount",
f"type=bind,source={mydir}/buildconfig,target=/buildconfig,readonly",