From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fN0G2-0001NR-Eb for guix-patches@gnu.org; Sun, 27 May 2018 14:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fN0Fz-0001G4-7E for guix-patches@gnu.org; Sun, 27 May 2018 14:19:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43343) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fN0Fz-0001Fy-3M for guix-patches@gnu.org; Sun, 27 May 2018 14:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fN0Fx-0006NP-HI for guix-patches@gnu.org; Sun, 27 May 2018 14:19:02 -0400 Subject: [bug#31592] [PATCH 4/4] pack: Add support for squashfs images. Resent-Message-ID: References: <20180525154730.23955-1-ricardo.wurmus@mdc-berlin.de> <20180525154730.23955-4-ricardo.wurmus@mdc-berlin.de> <87lgc5xnli.fsf@gnu.org> From: Ricardo Wurmus In-Reply-To: <87lgc5xnli.fsf@gnu.org> Date: Sun, 27 May 2018 20:17:46 +0200 Message-ID: <87po1hhsj9.fsf@mdc-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31592@debbugs.gnu.org Ludovic Courtès writes: > Woohoo! > > Ricardo Wurmus skribis: > >> * guix/scripts/pack.scm (%formats): Add "squashfs" format. >> (guix-pack): Adjust "archiver" dependent on pack-format. >> (squashfs-image): New procedure. > > [...] > >> + (exit >> + (and >> + ;; Add all store items. Unfortunately mksquashfs throws away all >> + ;; ancestor directories and only keeps the basename. We fix this >> + ;; in the following invocations of mksquashfs. >> + (zero? (apply system* "mksquashfs" > > This code should use ‘invoke’ everywhere, which would alleviate the need > for the clumsy (exit (and …)) idiom. Okay. >> + (reverse (filter (negate string-null?) >> + (string-split (%store-directory) #\/)))) > > I think this is equivalent to: > > (reverse (string-tokenize (%store-directory) > (char-set-complement (char-set #\/)))) > > Alternately, you can use (remove …) instead of (filter (negate …) …). Good points. > One last thing: could you update guix.texi and the ‘--help’ output? Absolutely! > I suppose using the squashfs format allows us to bypass the bug > described at > , right? I generated an image containing “emacs”, “bash”, and “coreutils” and both “singularity shell” and “singularity exec” worked fine, so I think this problem does not affect squashfs images. Thanks for the review! I’ll update the patches, write some documentation, and push them in the coming days. -- Ricardo