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 0ANrEYZnY2dwggEAe85BDQ:P1 (envelope-from ) for ; Thu, 19 Dec 2024 00:23:34 +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 0ANrEYZnY2dwggEAe85BDQ (envelope-from ) for ; Thu, 19 Dec 2024 01:23:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sVqeWFdA; dkim=fail ("headers rsa verify failed") header.d=xn--no-cja.eu header.s=ds202402 header.b="o RI4ueF"; 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=1734567814; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=nDMMbeuBcHQ7jtu87PmbEm7tUXhID5o/acnNvAP3uE4=; b=R+2h3sU08l6AYPBvPX2P5GjvBPZ/wAU2VoiDCcgjf/2t7gVmJhEIN72/kwpW+VKNLdomnV bQx9XJ4lJOw7XnKXoPldPR8ePL7l6/04PdT1SFLpEo4ZQYufFbLeAwxDSUOrSSBNPZ22gX 6X8emITX2Syj+c6n4Wg4nEOFkfN5XaOE53uw8XXJUelT54L/HckcTx6lz6CbwRH687WLWn A9fkF9AIRHh8Q9fmA9cGpwDXKEjnWtVJ9+qa9eoCj3aYflP9pte7oWmtd95fBfqdV8LVmO fNI03VOfwEXRCRLseqYg67RtGyM9Who+amiQtVeUoI7SODv9gvxg1a/LlujvTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734567814; a=rsa-sha256; cv=none; b=V2B0RcQQP/JL3nENG7fNuYpwEb1O+JEQjROX0nrg5H5KmdbKA1bFZjpDiWS1GODto8aI45 T6yXaiPZN0dPBO8xrL75dYjmxnrKx8Xvc/nhYRaX/BNdnwxpF1jdc/VtEwQ2gdgrq0+bTL N3KxbS33SlbjyNvytdDbNdqa9Jt5szv//P1LwQNX5bSPomuAeplclrt6A2mwcMPWa1UL4X AF37KuXbc/GgQJfTkIqmim3AlzYdSidHvX6d1xqyc40ierKE5FTv/asK6sXjrVQq0nYOIa G4ZvS4N4TbtyujGy7meyFjlDcOJmL83uhao6RfRisqahcAuToEWcmhLdCxwQfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=sVqeWFdA; dkim=fail ("headers rsa verify failed") header.d=xn--no-cja.eu header.s=ds202402 header.b="o RI4ueF"; 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 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 E4C1F81091 for ; Thu, 19 Dec 2024 01:23:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tO4Jl-0001Gx-FD; Wed, 18 Dec 2024 19:23:05 -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 1tO4Jk-0001GA-2f for guix-patches@gnu.org; Wed, 18 Dec 2024 19:23: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 1tO4Jj-0006Mw-Pr; Wed, 18 Dec 2024 19:23: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:References:In-Reply-To:Date:From:To:Subject; bh=nDMMbeuBcHQ7jtu87PmbEm7tUXhID5o/acnNvAP3uE4=; b=sVqeWFdAA3lr9/Y531TrJNofTogisQGgvBZLjcHfmp0GgaENvJa81PE3YoLHN/PfWQuDAlJ4m4ohmYL06xdb97QRy+mbUF/nqlbf4KxB6gaVGXaj/djqa5fTSDbWNW3Fm6D+6UMrIl66pu1Mk+F453py2o/4TUIGgZA8l6vWOCEhG7WO1iKv2opv0orcWLvhmD/wBYnA7SkUTMvzEAzBiCpB+G6zdCrwgVI3jTUEJytaL80CdpA1sGBzU/ETdpjgHOxkNPdMsDaOmAmAQwfEM8iVoetUG9dyTQABVbOxQvE7KVV1nvJMbqte3KRYVROyyaRjp/JtLRPvzo1LYJw9NA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tO4Jj-0002EK-Ky; Wed, 18 Dec 2024 19:23:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74670] [PATCH v3 2/2] tests: pack: Improve AppImage tests. Resent-From: =?UTF-8?Q?No=C3=A9?= Lopez Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Thu, 19 Dec 2024 00:23: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: 74670@debbugs.gnu.org Cc: =?UTF-8?Q?No=C3=A9?= Lopez , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 74670-submit@debbugs.gnu.org id=B74670.17345677338457 (code B ref 74670); Thu, 19 Dec 2024 00:23:03 +0000 Received: (at 74670) by debbugs.gnu.org; 19 Dec 2024 00:22:13 +0000 Received: from localhost ([127.0.0.1]:36534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tO4Iu-0002CK-DY for submit@debbugs.gnu.org; Wed, 18 Dec 2024 19:22:12 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:45471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tO4Ip-0002Bc-CQ for 74670@debbugs.gnu.org; Wed, 18 Dec 2024 19:22:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xn--no-cja.eu; s=ds202402; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=nDMMbeuBcHQ7jtu87PmbEm7tUXhID5o/acnNvAP3uE4=; b=o RI4ueF45mlF3Jh8n9dU95WTTG6NHAd5x2uuNoBXWl34FoC8zcv73emx5TnF7oKv43EHU24Std0WB0 E0NSg3FLLU16V5Tq0LgqZlxcPI+0kWKctrQ+tKZ4Dfu37qEr067xzAZRWGebbS+Ev6ruXPWq3pKqj 37ZNfRrIfbxNlHI+8oA3JfUH5lxIF9OpmWyOVbbdYAuNvddkYSV4IqabO7J1XkAxJgnhLFloaE3yR RDuSFlvcBXbtxL2NDjNCOjGeeP5HM9vMhz/cWYX0UJ0H5D8GkhdEOabmeASJxPQty7Wx7O0bnKRuq Jnv6krLxflceN2S8R3AN0XkJVJSLmAbKg==; Received: from smtp by smtp.domeneshop.no with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) id 1tO4Ij-00CPhh-N2; Thu, 19 Dec 2024 01:22:01 +0100 Date: Thu, 19 Dec 2024 01:23:03 +0100 Message-ID: <7faf45d433e43621cbf3194f306e0177d21679f2.1734566923.git.noelopez@free.fr> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Reply-to: =?UTF-8?Q?No=C3=A9?= Lopez X-ACL-Warn: , =?utf-8?q?No=C3=A9_Lopez_via_Guix-patches?= From: =?utf-8?q?No=C3=A9_Lopez_via_Guix-patches?= via 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -2.21 X-Spam-Score: -2.21 X-Migadu-Queue-Id: E4C1F81091 X-TUID: kUhI66V6Sqx6 From: Noé Lopez * tests/pack.scm: Improve AppImage tests. Change-Id: I7890b902f65a2944ae8fa03db8a964deda3c725c --- tests/pack.scm | 60 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/tests/pack.scm b/tests/pack.scm index 1c1e312557..4eac98fbdd 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 +;;; Copyright © 2017-2021, 2023, 2024 Ludovic Courtès ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2021, 2023 Maxim Cournoyer ;;; Copyright © 2023 Oleg Pykhalov @@ -34,14 +34,15 @@ (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)) #: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,36 +348,67 @@ (define rpm-for-tests (mlet* %store-monad ((guile (set-guile-for-build (default-guile))) (profile -> (profile - (content (packages->manifest (list %bootstrap-guile hello))) + ;; 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 #: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))))))))) + (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))) + ;; 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 - (list #:relocatable? #t))) + '(#:relocatable? #t))) (check (gexp->derivation - "check-appimage" + "check-appimage-with-localstatedir" #~(begin - (invoke #$image))))) - (built-derivations (list check)))) + (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" + (object->string + '(exit + (pk 'db? (getcwd) + (file-exists? "squashfs-root/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" -- 2.46.0