From: "Noé Lopez via Guix-patches via" <guix-patches@gnu.org>
To: 74670@debbugs.gnu.org
Cc: "Noé Lopez" <noe@xn--no-cja.eu>,
"Christopher Baines" <guix@cbaines.net>,
"Josselin Poiret" <dev@jpoiret.xyz>,
"Ludovic Courtès" <ludo@gnu.org>,
"Mathieu Othacehe" <othacehe@gnu.org>,
"Simon Tournier" <zimon.toutoune@gmail.com>,
"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#74670] [PATCH v3 1/2] pack: Support localstatedir in AppImage format.
Date: Thu, 19 Dec 2024 01:23:02 +0100 [thread overview]
Message-ID: <91137c795a6d4ac347893a7388fba240962225ef.1734566923.git.noelopez@free.fr> (raw)
In-Reply-To: <cover.1734566923.git.noelopez@free.fr>
From: Noé Lopez <noelopez@free.fr>
* guix/scripts/pack.scm (self-contained-appimage): Support localstatedir
option.
Change-Id: I296b3d3e442aa90f36de62a9b23aba4a2c3de9a0
---
guix/scripts/pack.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index d0e66c3013..7f5a5f2aa7 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1018,15 +1018,22 @@ (define* (self-contained-appimage name profile
compressor-name
%valid-compressors)))
+ (define database
+ (and localstatedir?
+ (file-append (store-database (list profile))
+ "/db/db.sqlite")))
+
(define builder
(with-extensions (list guile-gcrypt)
(with-imported-modules (source-module-closure
'((guix build store-copy)
- (guix build utils))
+ (guix build utils)
+ (gnu build install))
#:select? not-config?)
#~(begin
(use-modules (guix build utils)
(guix build store-copy)
+ (gnu build install)
(rnrs io ports)
(srfi srfi-1)
(srfi srfi-26))
@@ -1060,6 +1067,10 @@ (define* (self-contained-appimage name profile
(string-append appdir "/" #$name ".desktop")
#:name #$name
#:exec #$entry-point)
+ ;; Install database and gc roots.
+ (when #+database
+ ;; Initialize /var/guix.
+ (install-database-and-gc-roots appdir #+database profile))
;; Compress the AppDir.
(invoke #+(file-append squashfs-tools "/bin/mksquashfs") appdir
squashfs "-root-owned" "-noappend"
--
2.46.0
next prev parent reply other threads:[~2024-12-19 0:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 15:13 [bug#74670] [PATCH] tests: pack: Fix AppImage tests Noé Lopez via Guix-patches via
2024-12-12 21:58 ` 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 ` Noé Lopez via Guix-patches via [this message]
2024-12-19 0:23 ` [bug#74670] [PATCH v3 2/2] tests: pack: Improve " 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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91137c795a6d4ac347893a7388fba240962225ef.1734566923.git.noelopez@free.fr \
--to=guix-patches@gnu.org \
--cc=74670@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=ludo@gnu.org \
--cc=me@tobias.gr \
--cc=noe@xn--no-cja.eu \
--cc=othacehe@gnu.org \
--cc=zimon.toutoune@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).