From: "Noé Lopez via Guix-patches via" <guix-patches@gnu.org>
To: 74670@debbugs.gnu.org
Cc: "Noé Lopez" <noe@xn--no-cja.eu>, "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#74670] [PATCH] tests: pack: Fix AppImage tests.
Date: Tue, 3 Dec 2024 16:13:24 +0100 [thread overview]
Message-ID: <3f75445c04184678b357e777bfbc5eb751b9f363.1733238317.git.noelopez@free.fr> (raw)
From: Noé Lopez <noelopez@free.fr>
* tests/pack.scm: Add glibc to AppImage tests’ profiles.
Change-Id: I7890b902f65a2944ae8fa03db8a964deda3c725c
---
Hi,
This patch fixes the tests failing for AppImage pack. I believe the issue was
that without the AppImage runtime (--appimage-extract-and-run), the glibc is
not available to the AppRun binary, causing a file not found error.
This is an issue caused because AppRun is built using the relocatable runtime,
which requires (or at least is built with) the glibc.
This is not an issue when using the AppImage runtime with FUSE, since it
correctly mounts the store payload before starting the AppRun.
Have a nice day,
Noé
tests/pack.scm | 39 ++++++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 11 deletions(-)
diff --git a/tests/pack.scm b/tests/pack.scm
index 1c1e312557..2cb643f136 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017-2021, 2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017-2021, 2023, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Oleg Pykhalov <go.wigust@gmail.com>
@@ -34,7 +34,7 @@ (define-module (test-pack)
#:use-module ((guix build utils) #:select (%store-directory))
#:use-module (gnu packages)
#:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target
- hello))
+ hello glibc))
#:use-module (gnu packages bootstrap)
#:use-module ((gnu packages package-management) #:select (rpm))
#:use-module ((gnu packages compression) #:select (squashfs-tools))
@@ -347,36 +347,53 @@ (define rpm-for-tests
(mlet* %store-monad
((guile (set-guile-for-build (default-guile)))
(profile -> (profile
- (content (packages->manifest (list %bootstrap-guile hello)))
+ (content (packages->manifest (list %bootstrap-guile hello glibc)))
(hooks '())
(locales? #f)))
(image (self-contained-appimage "hello-appimage" profile
#:entry-point "bin/hello"
#:extra-options
- (list #:relocatable? #t)))
+ '(#:relocatable? #t)))
(check (gexp->derivation
"check-appimage"
- #~(invoke #$image))))
- (built-derivations (list check))))
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (ice-9 popen)
+ (guix build utils))
+ (let ((pipe (open-pipe* OPEN_READ
+ #$image "--appimage-extract-and-run")))
+ (call-with-output-file #$output
+ (lambda (port)
+ (dump-port pipe port)))
+ (exit (status:exit-val (close-pipe pipe)))))))))
+ (built-derivations (list (pk 'APPIMAGE-drv check)))))
(unless store (test-skip 1))
(test-assertm "appimage + localstatedir"
(mlet* %store-monad
((guile (set-guile-for-build (default-guile)))
(profile -> (profile
- (content (packages->manifest (list %bootstrap-guile hello)))
+ (content (packages->manifest (list %bootstrap-guile hello glibc)))
(hooks '())
(locales? #f)))
(image (self-contained-appimage "hello-appimage" profile
#:entry-point "bin/hello"
#:localstatedir? #t
#:extra-options
- (list #:relocatable? #t)))
+ '(#:relocatable? #t)))
(check (gexp->derivation
"check-appimage"
- #~(begin
- (invoke #$image)))))
- (built-derivations (list check))))
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (ice-9 popen)
+ (guix build utils))
+ (let ((pipe (open-pipe* OPEN_READ
+ #$image "--appimage-extract-and-run")))
+ (call-with-output-file #$output
+ (lambda (port)
+ (dump-port pipe port)))
+ (exit (status:exit-val (close-pipe pipe)))))))))
+ (built-derivations (list (pk 'APPIMAGE-drv check)))))
(unless store (test-skip 1))
(test-assertm "deb archive with symlinks and control files"
base-commit: bb8a6f0ac47296d3a18e1e0a26ea3a833eb77c4a
--
2.46.0
next reply other threads:[~2024-12-03 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 15:13 Noé Lopez via Guix-patches via [this message]
2024-12-12 21:58 ` [bug#74670] [PATCH] tests: pack: Fix AppImage tests Ludovic Courtès
2024-12-12 21:59 ` Ludovic Courtès
2024-12-18 23:58 ` [bug#74670] [PATCH v2 0/2] " Noé Lopez via Guix-patches
2024-12-18 23:59 ` [bug#74670] [PATCH v2 1/2] pack: Support localstatedir in AppImage format Noé Lopez via Guix-patches
2024-12-19 0:23 ` [bug#74670] [PATCH v3 0/2] tests: pack: Fix AppImage tests Noé Lopez via Guix-patches via
2024-12-19 0:23 ` [bug#74670] [PATCH v3 1/2] pack: Support localstatedir in AppImage format Noé Lopez via Guix-patches via
2024-12-19 0:23 ` [bug#74670] [PATCH v3 2/2] tests: pack: Improve AppImage tests Noé Lopez via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f75445c04184678b357e777bfbc5eb751b9f363.1733238317.git.noelopez@free.fr \
--to=guix-patches@gnu.org \
--cc=74670@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=noe@xn--no-cja.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.