From ab01e5adb21810f865c6e13e91a6d1ffc349d943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 10 Jun 2025 11:27:24 +0200 Subject: [PATCH] =?UTF-8?q?tests:=20debian-install:=20Install=20the=20?= =?UTF-8?q?=E2=80=98uidmap=E2=80=99=20package.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/tests/foreign.scm (run-foreign-install-test): Add #:deb-files. [test]("install extra .deb packages"): New test. (debian-uidmap-deb-file): New variable. (%test-debian-install): Pass it via #:deb-files. Change-Id: I489056131d6ff20763457c29610af71866a396b2 --- gnu/tests/foreign.scm | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/gnu/tests/foreign.scm b/gnu/tests/foreign.scm index 4e2f10de43857a7adae4273ec605e00835358cf6..2d587953dd2d28a70cdb26ca50b168e615715ad4 100644 --- a/gnu/tests/foreign.scm +++ b/gnu/tests/foreign.scm @@ -159,10 +159,12 @@ system is expected to be on DEVICE." (file-append (package-source guix) "/etc/guix-install.sh")) (define* (run-foreign-install-test image name - #:key (device "/dev/vdb1")) + #:key (device "/dev/vdb1") + (deb-files '())) "Run an installation of Guix in IMAGE, the QCOW2 image of a systemd-based GNU/Linux distro, and check that the installation is functional. The root -partition of IMAGE is expected to be on DEVICE." +partition of IMAGE is expected to be on DEVICE. Prior to that, install all +of DEB-FILES with 'dpkg -i'." (define instrumented-image (qcow-image-with-marionette image #:name (string-append name ".qcow2") @@ -234,6 +236,14 @@ partition of IMAGE is expected to be on DEVICE." #t) marionette)) + (test-assert "install extra .deb packages" + (marionette-eval + '(and #$@(map (lambda (deb) + #~(system* "dpkg" "-i" + (in-vicinity "/host" (basename #$deb)))) + deb-files)) + marionette)) + (test-assert "run install script" (marionette-eval '(system (string-append @@ -283,6 +293,16 @@ partition of IMAGE is expected to be on DEVICE." (base32 "0g7kcvz2yzr0xchlv5kc8d2rd2lzk4akh02i43i92cmys7q3r05c")))) +(define debian-uidmap-deb-file + ;; This package provides 'newgidmap' & co., used by the unprivileged daemon. + (origin + (uri + "http://ftp.debian.org/debian/pool/main/s/shadow/uidmap_4.13+dfsg1-1+deb12u1_amd64.deb") + (method url-fetch) + (sha256 + (base32 + "0iqhljzmnni3k3jc1xb0mrb7cqywkzrmdc2322kd8b1wpw45zv8l")))) + ;; This test starts failing when derivations in repo for GNU Hello and its dependencies ;; differs from versions in current Guix package. The simple way to fix it is to update ;; Guix package version. @@ -292,7 +312,8 @@ partition of IMAGE is expected to be on DEVICE." (description "Test installation of Guix on Debian using the @file{guix-install.sh} script.") - (value (run-foreign-install-test debian-13-qcow2 name)))) + (value (run-foreign-install-test debian-13-qcow2 name + #:deb-files (list debian-uidmap-deb-file))))) (define archlinux-qcow2 ;; Images generated by ;