From patchwork Sun Nov 4 22:01:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 110 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 05E8D167B1; Sun, 4 Nov 2018 22:03:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id 96F15167AF for ; Sun, 4 Nov 2018 22:03:07 +0000 (GMT) Received: from localhost ([::1]:60335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJQU6-0008O8-DX for patchwork@mira.cbaines.net; Sun, 04 Nov 2018 17:03:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJQU3-0008LB-T9 for guix-patches@gnu.org; Sun, 04 Nov 2018 17:03:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJQU2-0002xI-Ox for guix-patches@gnu.org; Sun, 04 Nov 2018 17:03:03 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:58309) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJQU2-0002uk-IC for guix-patches@gnu.org; Sun, 04 Nov 2018 17:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJQU2-0001R2-D9 for guix-patches@gnu.org; Sun, 04 Nov 2018 17:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33259] [PATCH 0/8] 'guix pack': Better '--localstatedir' handling and more tests Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Nov 2018 22:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33259 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33259@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15413689285446 (code B ref -1); Sun, 04 Nov 2018 22:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2018 22:02:08 +0000 Received: from localhost ([127.0.0.1]:34334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQT9-0001Pl-W3 for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:02:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJQT8-0001PK-Pf for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJQT1-00074h-0G for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:02:00 -0500 Received: from lists.gnu.org ([2001:4830:134:3::11]:37418) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJQSz-000720-Ex for submit@debbugs.gnu.org; Sun, 04 Nov 2018 17:01:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJQSy-0007n0-6v for guix-patches@gnu.org; Sun, 04 Nov 2018 17:01:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJQSs-0006pa-KU for guix-patches@gnu.org; Sun, 04 Nov 2018 17:01:52 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJQSi-0006T0-Lk; Sun, 04 Nov 2018 17:01:40 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33918 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gJQSi-0000jx-90; Sun, 04 Nov 2018 17:01:40 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sun, 4 Nov 2018 23:01:30 +0100 Message-Id: <20181104220130.4551-1-ludo@gnu.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello Guix! These patches ensure ‘--localstatedir’ is properly handled by the Docker and Squashfs backends of ‘guix pack’ (until now they ignored this option.) They also add ‘guix pack’ tests, which were severely lacking until now, including a ‘guix pack -R’ test using the user’s store. While doing that, I also fixed a bug whereby ‘guix pack’ tarballs would contain writable directories (whereas normally every file in the store is read-only.) Feedback welcome! Ludo’. Ludovic Courtès (8): pack: Move store database creation to a separate derivation. pack: Import (guix store database) only when '--localstatedir' is passed. install: Add 'install-database-and-gc-roots'. pack: Docker backend now honors '--localstatedir'. pack: Squashfs backend now honors '--localstatedir'. pack: Add test for 'self-contained-tarball' with localstatedir. store-copy: Canonicalize the mtime and permissions of the store copy. pack: Add test for '--relocatable'. Makefile.am | 1 + gnu/build/install.scm | 77 ++++--- gnu/build/vm.scm | 19 +- guix/build/store-copy.scm | 28 +++ guix/docker.scm | 16 +- guix/scripts/pack.scm | 379 +++++++++++++++++++-------------- tests/guix-pack-relocatable.sh | 61 ++++++ tests/guix-pack.sh | 28 +-- tests/pack.scm | 156 ++++++++++++-- 9 files changed, 525 insertions(+), 240 deletions(-) create mode 100644 tests/guix-pack-relocatable.sh