From patchwork Tue Jun 3 08:39:07 2025 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: 42999 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 53D0527BC4B; Wed, 4 Jun 2025 09:52:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0D24727BC49 for ; Wed, 4 Jun 2025 09:52:37 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uMjqw-0006lv-Fw; Wed, 04 Jun 2025 04:52:06 -0400 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 1uMjqu-0006lM-Rs for guix-patches@gnu.org; Wed, 04 Jun 2025 04:52:04 -0400 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 1uMjqu-0002FV-KW for guix-patches@gnu.org; Wed, 04 Jun 2025 04:52:04 -0400 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=258DR1y2DNb00soKhGDhc57YzyZXHgNFFnxdw/uIlDM=; b=cTS38Q7pWKD0VNCClKg3tdDZ7WUFNCNJCVuc9IVEi1d0u9zbMTQu9OSCIvb331Oz7liKmj5bl/aYucMx+biSH3SB4nerqkIBw7pF12j1KlOJbM74rOIW9iWwhDav2KXEvTu9i60T0xhGSRW5QFL7ZXx6fWOTT80vJTuqut5CqrTO4KmFVW/DWilix8VYkxkMnIMEP1k6dtZ3pN//v6PDMzHDNcdFjhaFl1RbqjDFY1BUH+/mJbshXoiLRQ3I/916z8lfn8u+bF/iDlzMIGdQmCQlOXocv7HV47d99p/AYmHR/K1oUz3yqMzT2uww0+K/tr28w2sk4cSygWUyGdQotw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uMjqu-0008G1-FA for guix-patches@gnu.org; Wed, 04 Jun 2025 04:52:04 -0400 Subject: bug#78210: [PATCH] guix: include store parent dirs in docker layer Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 04 Jun 2025 08:52:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 78210 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ray Miller Cc: 78210-done@debbugs.gnu.org Mail-Followup-To: 78210@debbugs.gnu.org, ludo@gnu.org, ray@1729.org.uk Received: via spool by 78210-done@debbugs.gnu.org id=D78210.174902708231606 (code D ref 78210); Wed, 04 Jun 2025 08:52:04 +0000 Received: (at 78210-done) by debbugs.gnu.org; 4 Jun 2025 08:51:22 +0000 Received: from localhost ([127.0.0.1]:46964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uMjqE-0008Dh-BK for submit@debbugs.gnu.org; Wed, 04 Jun 2025 04:51:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56282) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uMjqB-0008DM-PU for 78210-done@debbugs.gnu.org; Wed, 04 Jun 2025 04:51:20 -0400 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 1uMjq5-0002AO-LA; Wed, 04 Jun 2025 04:51:13 -0400 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=258DR1y2DNb00soKhGDhc57YzyZXHgNFFnxdw/uIlDM=; b=h/fRPzmmrxhHCPHNhINE 6izJs1IqKhnJ7Rg0bq11UmHnvh61Z7ao07OlDF1TUsIhR1/9ufBM5auAU2K+qt69EaYQJCOw3gLaG 5xn/bepIk0FeH+j3OOGN0HZXhTeatSrPXB8b3rWFIXxL8RlJCTt6OplYjTJJ3CsSyq6+rRegHY8N6 D0fGY0/0w8MnM5h+jhOXbJHze9QarSnZpjEPod75A8YYUKSZetfZ7Q3AJ+EonAx3dJeuxxB77kgIV dbDSBGVdPzzU3pqkzfj+OP1nM2KtP6IOHEKKZpG28bUOVriNL2tq97BxUzT9RJVkK73b1qRbdABfe iuaJnYYeynfe7A==; From: Ludovic =?utf-8?q?Court=C3=A8s?= In-Reply-To: <23550b3b-f732-4869-99a5-cbcad868736c@1729.org.uk> (Ray Miller's message of "Sat, 24 May 2025 17:55:09 +0100") References: <87ecwllkts.fsf@gnu.org> <23550b3b-f732-4869-99a5-cbcad868736c@1729.org.uk> Date: Tue, 03 Jun 2025 10:39:07 +0200 Message-ID: <87o6v5md78.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Ray, Ray Miller writes: > * guix/scripts/pack.scm: add store directory to the docker > layer. > * guix/docker.scm: change order of arguments to tar so parent > directories are added before their contents. > > Fixes > > Change-Id: I2b103c59981e828c965564ccc5d2415b00a7e52e I tweaked the commit log and applied it with the changes below. Thanks! Ludo’. diff --git a/guix/docker.scm b/guix/docker.scm index 9911bb84bb5..bb6d896a635 100644 --- a/guix/docker.scm +++ b/guix/docker.scm @@ -365,6 +365,7 @@ (define* (build-docker-image image paths prefix (apply invoke "tar" "-cf" "../layer.tar" `(,@transformation-options ,@(tar-base-options) + ;; Add parent directories before their contents. ,@(scandir "." (lambda (file) (not (member file '("." ".."))))) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index e69316089d8..857cb46af37 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -580,7 +580,7 @@ (define* (docker-image name profile (,source -> ,target)))))) (define directives - ;; Create /tmp and %store-prefix directories, as some + ;; Create the /tmp and %store-prefix directories, as some ;; programs expect them, and create SYMLINKS. `((directory "/tmp" ,(getuid) ,(getgid) #o1777) (directory #$(%store-prefix) ,(getuid) ,(getgid) #o755)