From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IIAaHQldW2dkYwEAqHPOHw:P1 (envelope-from ) for ; Thu, 12 Dec 2024 22:00:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id IIAaHQldW2dkYwEAqHPOHw (envelope-from ) for ; Thu, 12 Dec 2024 23:00:41 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=iV7QTAp2; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JQTFtbb9; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734040841; a=rsa-sha256; cv=none; b=NRo4bz8SIMN2xZikYJ03yVXbXlV6GDuy1kmYon2vjbIEmjJtW5YRgxMBJqhcw67BgkfJb5 fO6/ercEbwODm2cQ3pf3qSn9QhuKXOw2AwNTO40b8mLoq7DhphwgCsp49Gj8dnJIRMGx4X Y961KYD8cWtpKOP8MoyaPNHGytHpIpSEKd+vI15LUA8nuuoQ1f8zsMnpKkr6Sq5Moi6Oam 6gQ/Pd4sNw0EOSZjp5VR8aTSUV98bxD2C7LNULU8AzriYxHZTYyb8Y1I4in2Cr/q6AhXZp xS6JlR1cn5W++DRs/Wvh6JPLevlmMfP7aSOjQ1YEllTNtuoL+A2/3iJhVc2xlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=iV7QTAp2; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JQTFtbb9; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734040841; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=LsYtjaKozU0lSI/faQkP3e8MzgqR9itQeMSZbZG9xVk=; b=dThVKj07GO+lioPrknTuovnZwm8F/QXpdRq4ma5IEosOKV4xnfDoXABIhmutrXjf1scEc2 zUy03uIvNUT4JWufNU6fT2PAcWHvfLB02kg10HFhn8vAMWzfxCr96pdOAAkbkpd7i1Ywd/ OcDieYEWoyDuU4qVr6UDh4oNa2EAyBb69KH/S1JPu5DmQQGKxbeni5mLyfs5B6UAvHt+XM /YPHMFdqEJQUr7BzlEBU6iFKUYaBCJbyGg513v6Hv3yL/paFlr8njmrIYMkTheylZXY+oq TkcaTwE/tVH2VN+2c5LkhahD49RfsdlQRYmALpmoongxTM5wlHIfBFYY8Ib8gg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3E3C47813 for ; Thu, 12 Dec 2024 23:00:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLrE9-0000Pv-TK; Thu, 12 Dec 2024 17:00:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLrE3-0000Pg-TM for guix-patches@gnu.org; Thu, 12 Dec 2024 17:00:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLrE3-0003oq-Lo for guix-patches@gnu.org; Thu, 12 Dec 2024 17:00:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=LsYtjaKozU0lSI/faQkP3e8MzgqR9itQeMSZbZG9xVk=; b=iV7QTAp29OXTNe9KwJyT4Lf0+QjNop0lBA7MMLRMS5oLeZL+8wsmEuP3HoTlq5p3a/5Ujt6Vk769umy4c0ldFl/ACvaW2EISXxzBYKVXcoDIjjaayfNuTDnGypknefhpv0+K1rD6is5VImdl3UN9t8A04zaLP/KS5Lh+3U3ZmezImbi4dtlYwqXWeo4pHyjoNPCly37b6mYsNRsown8L+197s1xfsXgeyM0APm+4bH4Z8xvVKvfMMDRItFcP7Y0bcYKweGSOnl4O/IUJxnerBQ3mikjGVT51PLNlFhaGhwo8Hm5fogORgJfKYmmOvAgZjt2ckEPbLcu2c2SmR9nTZg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLrE3-0003Ze-7I for guix-patches@gnu.org; Thu, 12 Dec 2024 17:00:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74670] [PATCH] tests: pack: Fix AppImage tests. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 12 Dec 2024 22:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74670 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?No=C3=A9?= Lopez Cc: 74670@debbugs.gnu.org Received: via spool by 74670-submit@debbugs.gnu.org id=B74670.173404078113654 (code B ref 74670); Thu, 12 Dec 2024 22:00:03 +0000 Received: (at 74670) by debbugs.gnu.org; 12 Dec 2024 21:59:41 +0000 Received: from localhost ([127.0.0.1]:40694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLrDg-0003Y8-BQ for submit@debbugs.gnu.org; Thu, 12 Dec 2024 16:59:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLrDO-0003X1-MD for 74670@debbugs.gnu.org; Thu, 12 Dec 2024 16:59:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLrDH-0003Zb-QU; Thu, 12 Dec 2024 16:59:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=LsYtjaKozU0lSI/faQkP3e8MzgqR9itQeMSZbZG9xVk=; b=JQTFtbb9y7ie+MSZop1C r0aH47A2yBlnf4VFZQZrHOINkXo/zJ4VrK4QrlI9alYQFpqb+vBkJ4tr6aqP2QBdQ130/jCShVJyh I9iHp4JLG7LQ1blke59nfncSRMjN2wBKn+SuyHpUnEcC8hUPaESmDjeEAxCQdTstWZHQxe2qq1T3v vt9/WiLKxGlRajcycxbOnUhuxPcQg0S/ThAFDlVTloGDGLRSPBZ9imssK2xxt3HDqsbXx+5ZW+zph 8Rpq4u8hJHwCC5pfggzS+yPy4pmoIDQSGZTbrnQeSecKVflTCl6wQCsupz4mq1ZtK20jOfbyDyH7t 9LJf6QOweZm+sw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <3f75445c04184678b357e777bfbc5eb751b9f363.1733238317.git.noelopez@free.fr> ("=?UTF-8?Q?No=C3=A9?= Lopez"'s message of "Tue, 3 Dec 2024 16:13:24 +0100") References: <3f75445c04184678b357e777bfbc5eb751b9f363.1733238317.git.noelopez@free.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 12 Dec 2024 22:59:03 +0100 Message-ID: <87o71g5zrs.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -0.37 X-Spam-Score: -0.37 X-Migadu-Queue-Id: 3E3C47813 X-Migadu-Scanner: mx12.migadu.com X-TUID: 4GFX+/9Wigrf --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi No=C3=A9, No=C3=A9 Lopez skribis: > From: No=C3=A9 Lopez > > * tests/pack.scm: Add glibc to AppImage tests=E2=80=99 profiles. > > Change-Id: I7890b902f65a2944ae8fa03db8a964deda3c725c > --- > Hi, > > This patch fixes the tests failing for AppImage pack. I believe the issu= e 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 run= time, > which requires (or at least is built with) the glibc. Hmm, that further limits the applicability of AppImage, but OK. (Not our fault!) I noticed that the tests were not going very far, so I tried the patch below to: (1) check the output of =E2=80=98hello=E2=80=99 in the first test= , (2) change the second test to check for the existence of /var/guix/db/db.sqlite. The second test doesn=E2=80=99t work though, because where=E2=80=99s that f= ile supposed to live? The image is apparently extracted in an unguessable directory, so cannot tell where it is. Am I right? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/tests/pack.scm b/tests/pack.scm index 2cb643f136..7fcae1ec1f 100644 --- a/tests/pack.scm +++ b/tests/pack.scm @@ -39,9 +39,10 @@ (define-module (test-pack) #:use-module ((gnu packages package-management) #:select (rpm)) #:use-module ((gnu packages compression) #:select (squashfs-tools)) #:use-module ((gnu packages debian) #:select (dpkg)) - #:use-module ((gnu packages guile) #:select (guile-sqlite3)) + #:use-module ((gnu packages guile) #:select (guile-sqlite3 guile-3.0)) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module ((gnu packages linux) #:select (fakeroot)) + #:use-module ((ice-9 textual-ports) #:select (get-string-all)) #:use-module (srfi srfi-64)) (define %store @@ -347,7 +348,9 @@ (define rpm-for-tests (mlet* %store-monad ((guile (set-guile-for-build (default-guile))) (profile -> (profile - (content (packages->manifest (list %bootstrap-guile hello glibc))) + ;; When using '--appimage-extract-and-run', the dynamic + ;; linker is necessary, hence glibc below. + (content (packages->manifest (list hello glibc))) (hooks '()) (locales? #f))) (image (self-contained-appimage "hello-appimage" profile @@ -366,34 +369,46 @@ (define rpm-for-tests (lambda (port) (dump-port pipe port))) (exit (status:exit-val (close-pipe pipe))))))))) - (built-derivations (list (pk 'APPIMAGE-drv check))))) + (mbegin %store-monad + (built-derivations (list (pk 'APPIMAGE-drv check))) + (return (string=? (call-with-input-file (derivation->output-path check) + get-string-all) + "Hello, world!\n"))))) (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 glibc))) + ;; When using '--appimage-extract-and-run', the dynamic + ;; linker is necessary, hence glibc below. + (content (packages->manifest (list guile-3.0 glibc))) (hooks '()) (locales? #f))) - (image (self-contained-appimage "hello-appimage" profile - #:entry-point "bin/hello" + (image (self-contained-appimage "guile-appimage" profile + #:entry-point "bin/guile" #:localstatedir? #t #:extra-options '(#:relocatable? #t))) (check (gexp->derivation - "check-appimage" - (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))))) + "check-appimage-with-localstatedir" + #~(begin + (system* #$image "--appimage-extract-and-run" "-c" + (object->string + `(call-with-output-file #$output + (lambda (port) + (display "Hello from Guile!\n" + port))))) + (execl #$image #$image "--appimage-extract-and-run" "-c" + (object->string + '(exit + (pk 'db? (getcwd) + (file-exists? "var/guix/db/db.sqlite"))))))))) + (mbegin %store-monad + (built-derivations (list (pk 'APPIMAGE-drv check))) + (return (string=? (call-with-input-file (derivation->output-path check) + get-string-all) + "Hello from Guile!\n"))))) (unless store (test-skip 1)) (test-assertm "deb archive with symlinks and control files" --=-=-=--