diff options
| author | Rutherther <rutherther@ditigal.xyz> | 2025-12-23 14:38:22 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2025-12-28 12:38:28 +0100 |
| commit | f1c1fb93405e6a9ca7904d32cf0a6ac28add1738 (patch) | |
| tree | 34ddfc406c6b3236af864b3a9d5dab67d6d5d61e /gnu | |
| parent | 0c74e5835e6f4f5f7d5e19113ecde5294285486d (diff) | |
tests: foreign: Add Ubuntu test.
This one is a bit more complicated than the other ones, because the qcow2
image is too small to hold the tarball contents. So I have decided to add in
logic to resize the qemu img, the partition and the filesystem.
* gnu/tests/foreign.scm
(ubuntu-qcow2): New variable.
(ubuntu-uidmap-deb-file): New variable.
(ubuntu-libsuid4-deb-file): New variable.
(%test-ubuntu-install): New variable.
Change-Id: Ib705cfe0aeab5e6ede284b8eff06483aea617349e
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Merges: #4997
Change-Id: I17472d160665fa4965d1c1ee00d671746bd5fb74
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/tests/foreign.scm | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/gnu/tests/foreign.scm b/gnu/tests/foreign.scm index a7eca3d2fd6..7ef64534c8d 100644 --- a/gnu/tests/foreign.scm +++ b/gnu/tests/foreign.scm | |||
| @@ -41,7 +41,8 @@ | |||
| 41 | #:use-module ((guix scripts pack) #:prefix pack:) | 41 | #:use-module ((guix scripts pack) #:prefix pack:) |
| 42 | #:use-module (srfi srfi-9) | 42 | #:use-module (srfi srfi-9) |
| 43 | #:export (%test-debian-install | 43 | #:export (%test-debian-install |
| 44 | %test-archlinux-install)) | 44 | %test-archlinux-install |
| 45 | %test-ubuntu-install)) | ||
| 45 | 46 | ||
| 46 | (define marionette-systemd-service | 47 | (define marionette-systemd-service |
| 47 | ;; Definition of the marionette service for systemd. | 48 | ;; Definition of the marionette service for systemd. |
| @@ -424,3 +425,44 @@ script.") | |||
| 424 | script.") | 425 | script.") |
| 425 | (value (run-foreign-install-test archlinux-qcow2 name | 426 | (value (run-foreign-install-test archlinux-qcow2 name |
| 426 | #:device "/dev/vdb3")))) | 427 | #:device "/dev/vdb3")))) |
| 428 | |||
| 429 | (define ubuntu-qcow2 | ||
| 430 | (let ((filename "noble-server-cloudimg-amd64.img")) | ||
| 431 | (origin | ||
| 432 | (uri (string-append "https://cloud-images.ubuntu.com/noble/20251213/" filename)) | ||
| 433 | (method url-fetch) | ||
| 434 | (sha256 | ||
| 435 | (base32 | ||
| 436 | "07zbqlxg8524p7igwrpwrf5kwc6qam78f7023ihfy38qx3zr0prb"))))) | ||
| 437 | |||
| 438 | (define ubuntu-libsuid4-deb-file | ||
| 439 | ;; This package is a dependency of uidmap that's missing in the image. | ||
| 440 | (origin | ||
| 441 | (uri | ||
| 442 | "https://archive.ubuntu.com/ubuntu/pool/main/s/shadow/libsubid4_4.13+dfsg1-4ubuntu3_amd64.deb") | ||
| 443 | (method url-fetch) | ||
| 444 | (sha256 | ||
| 445 | (base32 | ||
| 446 | "1g2rypacgc0gp55wy3lxsa454m072c21cgzdzaf8zlpg4dv9k08l")))) | ||
| 447 | |||
| 448 | (define ubuntu-uidmap-deb-file | ||
| 449 | ;; This package provides 'newgidmap' & co., used by the unprivileged daemon. | ||
| 450 | (origin | ||
| 451 | (uri | ||
| 452 | "https://archive.ubuntu.com/ubuntu/pool/main/s/shadow/uidmap_4.13+dfsg1-4ubuntu3_amd64.deb") | ||
| 453 | (method url-fetch) | ||
| 454 | (sha256 | ||
| 455 | (base32 | ||
| 456 | "1y8sw1shsxaan2icl6ajr2mwm6n69mvqzxmjl98sj4i82hdlm6nw")))) | ||
| 457 | |||
| 458 | (define %test-ubuntu-install | ||
| 459 | (system-test | ||
| 460 | (name "ubuntu-install") | ||
| 461 | (description | ||
| 462 | "Test installation of Guix on Ubuntu using the @file{guix-install.sh} | ||
| 463 | script.") | ||
| 464 | (value (run-foreign-install-test ubuntu-qcow2 name | ||
| 465 | #:deb-files (list ubuntu-libsuid4-deb-file | ||
| 466 | ubuntu-uidmap-deb-file) | ||
| 467 | #:resize-image "+1G" | ||
| 468 | #:resize-proc resize-ext4-partition)))) | ||
