From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2IeRLApdW2etVAAAe85BDQ:P1 (envelope-from ) for ; Thu, 12 Dec 2024 22:00:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2IeRLApdW2etVAAAe85BDQ (envelope-from ) for ; Thu, 12 Dec 2024 23:00:42 +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=pykPPCtC; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HWBUgGRA; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734040842; 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=Ea4HtQOMyKsJcGc6d2pwsXTPWBGzvbClWVb5kVsgMbtyOHxOau9fFhAnuj7JgfzVZhlPdD 85IHJdG47I+a2nBsmms3bksiQ3tXIDnLyhcyTWmccs4FroCPiK6vhzfUF21p93GP5YBDjk PU/2hu/GXjyWjpZ+wLvtejd16aHxdn7jF+WLYGW8LZQGjQSN0djtwLZQHf52PJJSDIxJyQ Tw9IIDvDVq5zpqRPj8EV/Bru04sneVNibdp+EJk+yC4MypqpHsY+gXMrEMasxHQs04BtOJ G/ig9XmBLA86yr38nZI48XGaaXAFIDk+PX2VFweyMej6iCdLkO2gZwzTzy3m4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=pykPPCtC; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=HWBUgGRA; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734040842; a=rsa-sha256; cv=none; b=GF9cSVNIQo1rdfjo7Ex3MuC29aSkJMyKtZu8GFHfpzJirZR05gkvB9lbCrzGbfVWRcLntT 229+nwUbX5TZD7P/ysScWcMnSWkGper4ONOoissITBLiRtSeBOIbGiKN30psRAUT+Vx0k+ VJ7g3ZkkjKFMF2I98VS83epcA7EzhVDi7xbNl7fryTL+RgOjhqw/tKyk2bYLI/KnZeiunB FjPsqX8NHUlasvSTyx/4fWdhifGehRnVnMPV+O5SmM/ppjDE3gXLwm6YI9WrRlR5XbRBoT C6IIFmHdL2TYJpq0YlO6bYW4g6i4pywBE3n4A8OltvkC6jQKOjeqjz/OzmT1vg== 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 7B31B7FD4D 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 1tLrED-0000RO-6Z; Thu, 12 Dec 2024 17:00:13 -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 1tLrE4-0000Pq-Qa for guix-patches@gnu.org; Thu, 12 Dec 2024 17:00:06 -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-0003i8-OU for guix-patches@gnu.org; Thu, 12 Dec 2024 17:00:04 -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=pykPPCtCs3tm9HtdrzwHTI2ZeWUOx9NGOAwWXh5ufqJAsyZfv45mk1TbHyxP4Mh2+yWqdCZng67ZrPv27ZrVEHhUwMJcZH412X5rA3GMdZBgcdk7FK9Ez32z5weghNs3jq8MSrlBWWSCx1F+Ci7nsac3XafOFMSoarjxPVNJzSKYvpCgCO/1+rlIoTryj49A6luoe9W3O1biZlqRVHcFbQeeK/amjWS4vatM0o5wlc9dtE4wsjdcWHRQKZPxlpJPi+MdD4xrIkXMqB5QQn0Rlv+14jmju+hSx3bR7MPN8gYcZ7qYBeE32KbdA2nJ9J9LQkZDlZ8fP2fxtlrExgDkpQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLrE2-0003ZR-Gb for guix-patches@gnu.org; Thu, 12 Dec 2024 17:00:02 -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:02 +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.173404078013646 (code B ref 74670); Thu, 12 Dec 2024 22:00:02 +0000 Received: (at 74670) by debbugs.gnu.org; 12 Dec 2024 21:59:40 +0000 Received: from localhost ([127.0.0.1]:40692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLrDf-0003Xz-LD for submit@debbugs.gnu.org; Thu, 12 Dec 2024 16:59:40 -0500 Received: from [209.51.188.92] (port=36856 helo=eggs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLrDc-0003X3-1V for 74670@debbugs.gnu.org; Thu, 12 Dec 2024 16:59:37 -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 1tLrDI-0003Zi-5s; Thu, 12 Dec 2024 16:59:18 -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=HWBUgGRA7NPqJf2N0WrJ N5yHAXjRmcs7cBCHoqxtUoe59CzNvak/jCSH6hVE1q3A8of1HoyEjTMvU1wXaBrsC6LnMKbDqFWc5 vFlhemDarSlmG3DOLPe2EE8JTsasG6LXvoyiMt1rktd0rY+6o+b9dqT4S29pR7OirJKlmEz1VPrk5 lNmEJ9nAlvYydlq9aSBKuOnrsBc/8JxXQd0eFElZnfBmV5yi/atin2Xs2UiR9xGCVqw+w/0D3kBpT Inl6SCViAhRP85Xd/rsv0mG0maIjn0p3kMcqDkiatKZkp2UOpexg6vjKKT+9GJJNDXIayvCVP7vHB PyryQ3R30qlxmQ==; 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> Date: Thu, 12 Dec 2024 22:58:28 +0100 Message-ID: <87pllw5zsr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.83 X-Spam-Score: 0.83 X-Migadu-Queue-Id: 7B31B7FD4D X-TUID: b1lfTW2UUu5m --=-=-= 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" --=-=-=--