From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 11:43:41 2019 Received: (at submit) by debbugs.gnu.org; 13 Sep 2019 15:43:41 +0000 Received: from localhost ([127.0.0.1]:45505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8njX-0000ta-V8 for submit@debbugs.gnu.org; Fri, 13 Sep 2019 11:43:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:41683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8njW-0000tS-7d for submit@debbugs.gnu.org; Fri, 13 Sep 2019 11:43:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55720) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8njV-0003CY-5P for guix-patches@gnu.org; Fri, 13 Sep 2019 11:43:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_20 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i8njV-0003yT-0s; Fri, 13 Sep 2019 11:43:37 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36346 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i8njU-00045l-FS; Fri, 13 Sep 2019 11:43:36 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/2] 'guix pack -f docker' uses a meaningful "repository name" Date: Fri, 13 Sep 2019 17:43:26 +0200 Message-Id: <20190913154326.19020-1-ludo@gnu.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! This changes ‘guix pack -f docker’ so that the “repository name” that shows up in the output of ‘docker images’ is more meaningful than just “profile”, as it was until now (I think it was zimoun who initially reported that this could be improved. :-)). Namely, that name is now constructed using the names of the packages available in the pack. Thoughts? Thanks, Ludo’. Ludovic Courtès (2): pack: Provide a meaningful "repository name" for Docker. pack: Add packages in the order in which they appear on the command line. guix/docker.scm | 43 ++++++++++++++++++++++++++++++------------- guix/scripts/pack.scm | 16 +++++++++++++++- 2 files changed, 45 insertions(+), 14 deletions(-) -- 2.23.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 11:51:37 2019 Received: (at 37401) by debbugs.gnu.org; 13 Sep 2019 15:51:37 +0000 Received: from localhost ([127.0.0.1]:45516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8nrE-00016w-Js for submit@debbugs.gnu.org; Fri, 13 Sep 2019 11:51:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8nrC-00016d-QQ for 37401@debbugs.gnu.org; Fri, 13 Sep 2019 11:51:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i8nr7-0001Wf-9F; Fri, 13 Sep 2019 11:51:29 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36380 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i8nr6-0004ew-LX; Fri, 13 Sep 2019 11:51:29 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 37401@debbugs.gnu.org Subject: [PATCH 1/2] pack: Provide a meaningful "repository name" for Docker. Date: Fri, 13 Sep 2019 17:51:15 +0200 Message-Id: <20190913155116.19225-1-ludo@gnu.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37401 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: Ludovic Courtès Previously, images produced by 'guix pack -f docker' would always show up as "profile" in the output of 'docker images'. With this change, 'docker images' shows a name constructed from the packages found in the image--e.g., "bash-coreutils-grep-sed". * guix/docker.scm (canonicalize-repository-name): New procedure. (generate-tag): Remove. (manifest): Add optional 'tag' parameter and honor it. (repositories): Likewise. (build-docker-image): Add #:repository parameter and pass it to 'manifest' and 'repositories'. * guix/scripts/pack.scm (docker-image)[build]: Compute 'tag' and pass it as #:repository to 'build-docker-image'. --- guix/docker.scm | 43 ++++++++++++++++++++++++++++++------------- guix/scripts/pack.scm | 13 +++++++++++++ 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/guix/docker.scm b/guix/docker.scm index 757bdeb458..97ac6d982b 100644 --- a/guix/docker.scm +++ b/guix/docker.scm @@ -57,22 +57,36 @@ (created . ,time) (container_config . #nil))) -(define (generate-tag path) - "Generate an image tag for the given PATH." - (match (string-split (basename path) #\-) - ((hash name . rest) (string-append name ":" hash)))) +(define (canonicalize-repository-name name) + "\"Repository\" names are restricted to roughtl [a-z0-9_.-]. +Return a version of TAG that follows these rules." + (define ascii-letters + (string->char-set "abcdefghijklmnopqrstuvwxyz")) -(define (manifest path id) + (define separators + (string->char-set "_-.")) + + (define repo-char-set + (char-set-union char-set:digit ascii-letters separators)) + + (string-map (lambda (chr) + (if (char-set-contains? repo-char-set chr) + chr + #\.)) + (string-trim (string-downcase name) separators))) + +(define* (manifest path id #:optional (tag "guix")) "Generate a simple image manifest." - `#(((Config . "config.json") - (RepoTags . #(,(generate-tag path))) - (Layers . #(,(string-append id "/layer.tar")))))) + (let ((tag (canonicalize-repository-name tag))) + `#(((Config . "config.json") + (RepoTags . #(,(string-append tag ":latest"))) + (Layers . #(,(string-append id "/layer.tar"))))))) ;; According to the specifications this is required for backwards ;; compatibility. It duplicates information provided by the manifest. -(define (repositories path id) +(define* (repositories path id #:optional (tag "guix")) "Generate a repositories file referencing PATH and the image ID." - `((,(generate-tag path) . ((latest . ,id))))) + `((,(canonicalize-repository-name tag) . ((latest . ,id))))) ;; See https://github.com/opencontainers/image-spec/blob/master/config.md (define* (config layer time arch #:key entry-point (environment '())) @@ -112,6 +126,7 @@ (define* (build-docker-image image paths prefix #:key + (repository "guix") (extra-files '()) (transformations '()) (system (utsname:machine (uname))) @@ -121,7 +136,9 @@ compressor (creation-time (current-time time-utc))) "Write to IMAGE a Docker image archive containing the given PATHS. PREFIX -must be a store path that is a prefix of any store paths in PATHS. +must be a store path that is a prefix of any store paths in PATHS. REPOSITORY +is a descriptive name that will show up in \"REPOSITORY\" column of the output +of \"docker images\". When DATABASE is true, copy it to /var/guix/db in the image and create /var/guix/gcroots and friends. @@ -243,10 +260,10 @@ SRFI-19 time-utc object, as the creation time in metadata." #:entry-point entry-point)))) (with-output-to-file "manifest.json" (lambda () - (scm->json (manifest prefix id)))) + (scm->json (manifest prefix id repository)))) (with-output-to-file "repositories" (lambda () - (scm->json (repositories prefix id))))) + (scm->json (repositories prefix id repository))))) (apply invoke "tar" "-cf" image "-C" directory `(,@%tar-determinism-options diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index dd91a24284..ed8c177055 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -516,6 +516,18 @@ the image." `((directory "/tmp" ,(getuid) ,(getgid) #o1777) ,@(append-map symlink->directives '#$symlinks))) + (define tag + ;; Compute a meaningful "repository" name, which will show up in + ;; the output of "docker images". + (let ((manifest (profile-manifest #$profile))) + (let loop ((names (map manifest-entry-name + (manifest-entries manifest)))) + (define str (string-join names "-")) + (if (< (string-length str) 40) + str + (match names + ((_) str) + ((names ... _) (loop names))))))) ;drop one entry (setenv "PATH" (string-append #$archiver "/bin")) @@ -524,6 +536,7 @@ the image." (call-with-input-file "profile" read-reference-graph)) #$profile + #:repository tag #:database #+database #:system (or #$target (utsname:machine (uname))) #:environment environment -- 2.23.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 11:51:37 2019 Received: (at 37401) by debbugs.gnu.org; 13 Sep 2019 15:51:37 +0000 Received: from localhost ([127.0.0.1]:45518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8nrF-00016z-38 for submit@debbugs.gnu.org; Fri, 13 Sep 2019 11:51:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8nrD-00016e-8R for 37401@debbugs.gnu.org; Fri, 13 Sep 2019 11:51:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i8nr8-0001Wr-2z; Fri, 13 Sep 2019 11:51:30 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=36380 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i8nr7-0004ew-KZ; Fri, 13 Sep 2019 11:51:29 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 37401@debbugs.gnu.org Subject: [PATCH 2/2] pack: Add packages in the order in which they appear on the command line. Date: Fri, 13 Sep 2019 17:51:16 +0200 Message-Id: <20190913155116.19225-2-ludo@gnu.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913155116.19225-1-ludo@gnu.org> References: <20190913155116.19225-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37401 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages): Reverse order of packages taken fro OPTS. --- guix/scripts/pack.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index ed8c177055..2543f0c0b5 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -957,7 +957,8 @@ Create a bundle of PACKAGE.\n")) (list (transform store package) output)) ((? package? package) (list (transform store package) "out"))) - (filter-map maybe-package-argument opts))) + (reverse + (filter-map maybe-package-argument opts)))) (manifest-file (assoc-ref opts 'manifest))) (define properties (if (assoc-ref opts 'save-provenance?) -- 2.23.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 12:16:49 2019 Received: (at 37401) by debbugs.gnu.org; 13 Sep 2019 16:16:49 +0000 Received: from localhost ([127.0.0.1]:45525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8oFd-0001lY-Aq for submit@debbugs.gnu.org; Fri, 13 Sep 2019 12:16:49 -0400 Received: from sender4-of-o52.zoho.com ([136.143.188.52]:21273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8oFb-0001lP-KH for 37401@debbugs.gnu.org; Fri, 13 Sep 2019 12:16:48 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1568391400; cv=none; d=zoho.com; s=zohoarc; b=nlCSsyhKtmMML+Qfk3mIIjXV/UMNPFxHpSixPE2V2eu9RYX8NIiiIPSk7CAf13+Oa/k5NDnXTx8UH1pM838Z97AV6H6rpupAX0JFEkK6sLVSQm7R/aCbZmg4CasGrOFhFUZAxQgTIqKhj9TAKxB84A7W4CN9UpmxHVm+MkCqgII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568391400; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=S6J8vSfA43tWJI+7BkKsE14BmYHH3u+ad0N6hyvrRqY=; b=k6EMeY5XhS5iHGvlALVEzw6wvN1pyTzHLhDI9zY/Vn4djnxvRCOItdpRuIgiPaiDPaPxU9RHVW9gNNViNJhtJMih2KGg8Cl1m6FWY063UrCC19avT1ow7elH1YEB9+TstiMGO+EpReKDfNiovs8+KNpyJ7/uQe34B9g4cRDjhK0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1568391400; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=357; bh=S6J8vSfA43tWJI+7BkKsE14BmYHH3u+ad0N6hyvrRqY=; b=Sl4bv/gNaOHyXWktWik+lSw/9aMZIyI3EXDxEXITn4RJ60JvexPsuPBI3k8U//UP PIctZewxokl0fLLBwU1V2LhvvNrIHIns8Y0Ir++Kcn0xTU4nigXj8ZoKgJKs2rg+UsB SgQNgRQvs4XQI/owwli0BljV4iAsFryzafeMBpBQ= Received: from localhost (p54AD4BE3.dip0.t-ipconnect.de [84.173.75.227]) by mx.zohomail.com with SMTPS id 1568391398166495.8731323251342; Fri, 13 Sep 2019 09:16:38 -0700 (PDT) References: <20190913155116.19225-1-ludo@gnu.org> <20190913155116.19225-2-ludo@gnu.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#37401] [PATCH 2/2] pack: Add packages in the order in which they appear on the command line. In-reply-to: <20190913155116.19225-2-ludo@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Fri, 13 Sep 2019 18:16:34 +0200 Message-ID: <87pnk4qihp.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37401 Cc: 37401@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > * guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages): > Reverse order of packages taken fro OPTS. Typo: =E2=80=9Cfrom=E2=80=9D. > - (filter-map maybe-package-argument opts))) > + (reverse > + (filter-map maybe-package-argument opts)= ))) Why is this necessary? --=20 Ricardo From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 13 12:18:40 2019 Received: (at 37401) by debbugs.gnu.org; 13 Sep 2019 16:18:40 +0000 Received: from localhost ([127.0.0.1]:45529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8oHP-0001ot-Nl for submit@debbugs.gnu.org; Fri, 13 Sep 2019 12:18:39 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8oHO-0001ok-BV for 37401@debbugs.gnu.org; Fri, 13 Sep 2019 12:18:38 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1568391508; cv=none; d=zoho.com; s=zohoarc; b=W/TTR/lFug01M1Qv7EbybMJGvMsX0BdZR3kFDvgolveA3M8fdEwIxCNBnzzs9vGcH8kZbYh2HG7tsqYzQ8R/ffWeyk70mYR322ubpzWTslomRwfYTFA4cA3JEdMpLxgYnjt79+PVsTxjtiiBKqv9bAdGkTKX8D+6gdCqEI7MQos= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568391508; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=UNm4DLHonW6ufCOY3XSaHuNmoMgmv2sw3VEFHuWW+rA=; b=khgiRp/JwoCVUmrBk+u5A+RtbR9K8MNSaWtV9SKznbjVbqR5nWa7rzSuyHeSKmKqyrKRRt1UHdTdl2NWikjIYPUCWbjwYsOzECCG1Rr4MWsUlioO/XsUfZAyrMRoSUVu46Q7kE3QAdgnKMKGW/z2BYmyWrKwZxA1Nyf3SX+hvXU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1568391508; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=646; bh=UNm4DLHonW6ufCOY3XSaHuNmoMgmv2sw3VEFHuWW+rA=; b=SBuNADsnI0Cpcn7ObMQAYvAuDlAftcTMqsZYSAV7sZ1L08z7vNnn+mSjBVEcOnZg 5Xsnep5wsgcYtcXHZxoFgrGQBQ+qGBTfL0hiweiD49Kn1qUVQwr3WAQVYfWM+wFZ9V1 JfU/z5i3k/oH8nM1LOz6SPc+pQzY8NUG39RwtsqM= Received: from localhost (p54AD4BE3.dip0.t-ipconnect.de [84.173.75.227]) by mx.zohomail.com with SMTPS id 1568391507033462.6553361486208; Fri, 13 Sep 2019 09:18:27 -0700 (PDT) References: <20190913154326.19020-1-ludo@gnu.org> <20190913155116.19225-1-ludo@gnu.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#37401] [PATCH 1/2] pack: Provide a meaningful "repository name" for Docker. In-reply-to: <20190913155116.19225-1-ludo@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Fri, 13 Sep 2019 18:18:23 +0200 Message-ID: <87o8zoqieo.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37401 Cc: 37401@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > From: Ludovic Court=C3=A8s > > Previously, images produced by 'guix pack -f docker' would always show > up as "profile" in the output of 'docker images'. With this change, > 'docker images' shows a name constructed from the packages found in the > image--e.g., "bash-coreutils-grep-sed". This looks good to me, thanks! Just one thing to note: packages from other channels might have names with characters outside of a-z. All of those would show up as dots. Also, a few package names include numbers, which are probably fine to include. -- Ricardo From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 05:42:17 2019 Received: (at 37401) by debbugs.gnu.org; 14 Sep 2019 09:42:17 +0000 Received: from localhost ([127.0.0.1]:45878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i94ZN-0001ta-65 for submit@debbugs.gnu.org; Sat, 14 Sep 2019 05:42:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i94ZL-0001tN-AF for 37401@debbugs.gnu.org; Sat, 14 Sep 2019 05:42:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i94ZG-0002l1-5I; Sat, 14 Sep 2019 05:42:10 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58470 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i94ZF-0005Y5-JZ; Sat, 14 Sep 2019 05:42:09 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#37401] [PATCH 2/2] pack: Add packages in the order in which they appear on the command line. References: <20190913155116.19225-1-ludo@gnu.org> <20190913155116.19225-2-ludo@gnu.org> <87pnk4qihp.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 Fructidor an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 14 Sep 2019 11:42:07 +0200 In-Reply-To: <87pnk4qihp.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 13 Sep 2019 18:16:34 +0200") Message-ID: <87zhj75i4w.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37401 Cc: 37401@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> * guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages): >> Reverse order of packages taken fro OPTS. > > Typo: =E2=80=9Cfrom=E2=80=9D. > >> - (filter-map maybe-package-argument opts)= )) >> + (reverse >> + (filter-map maybe-package-argument opts= )))) > > Why is this necessary? It=E2=80=99s mostly so that if you do =E2=80=98guix pack -f docker sed grep= findutils=E2=80=99 the repo name is =E2=80=9Csed-grep-findutils=E2=80=9D and not =E2=80=9Cfind= utils-grep-sed=E2=80=9D. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 05:45:13 2019 Received: (at 37401) by debbugs.gnu.org; 14 Sep 2019 09:45:14 +0000 Received: from localhost ([127.0.0.1]:45882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i94cD-0001yQ-M4 for submit@debbugs.gnu.org; Sat, 14 Sep 2019 05:45:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i94cC-0001yA-8N for 37401@debbugs.gnu.org; Sat, 14 Sep 2019 05:45:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i94c6-00044w-Sm; Sat, 14 Sep 2019 05:45:06 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58480 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i94c3-0005AO-HM; Sat, 14 Sep 2019 05:45:05 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#37401] [PATCH 1/2] pack: Provide a meaningful "repository name" for Docker. References: <20190913154326.19020-1-ludo@gnu.org> <20190913155116.19225-1-ludo@gnu.org> <87o8zoqieo.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 Fructidor an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 14 Sep 2019 11:45:01 +0200 In-Reply-To: <87o8zoqieo.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 13 Sep 2019 18:18:23 +0200") Message-ID: <87tv9f5i02.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37401 Cc: 37401@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> From: Ludovic Court=C3=A8s >> >> Previously, images produced by 'guix pack -f docker' would always show >> up as "profile" in the output of 'docker images'. With this change, >> 'docker images' shows a name constructed from the packages found in the >> image--e.g., "bash-coreutils-grep-sed". > > This looks good to me, thanks! Cool, thanks for checking! > Just one thing to note: packages from other channels might have names > with characters outside of a-z. All of those would show up as dots. Yes. > Also, a few package names include numbers, which are probably fine to > include. =E2=80=98canonical-repository-name=E2=80=99 lets digits through, that=E2=80= =99s fine. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 05:00:13 2019 Received: (at 37401-done) by debbugs.gnu.org; 16 Sep 2019 09:00:13 +0000 Received: from localhost ([127.0.0.1]:49189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9mrl-0007Nh-0O for submit@debbugs.gnu.org; Mon, 16 Sep 2019 05:00:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9mri-0007MZ-Ck for 37401-done@debbugs.gnu.org; Mon, 16 Sep 2019 05:00:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9mrc-0006FT-W7; Mon, 16 Sep 2019 05:00:05 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=46244 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i9mra-0003Iw-OT; Mon, 16 Sep 2019 05:00:03 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#37401] [PATCH 1/2] pack: Provide a meaningful "repository name" for Docker. References: <20190913154326.19020-1-ludo@gnu.org> <20190913155116.19225-1-ludo@gnu.org> <87o8zoqieo.fsf@elephly.net> <87tv9f5i02.fsf@gnu.org> Date: Mon, 16 Sep 2019 10:59:59 +0200 In-Reply-To: <87tv9f5i02.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 14 Sep 2019 11:45:01 +0200") Message-ID: <878sqod3ao.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37401-done Cc: 37401-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Pushed as commit 0074844366381e3056d09492b8b437836c7adb61. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 18 12:28:01 2019 Received: (at 37401) by debbugs.gnu.org; 18 Sep 2019 16:28:01 +0000 Received: from localhost ([127.0.0.1]:54762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAcoD-0008V3-1e for submit@debbugs.gnu.org; Wed, 18 Sep 2019 12:28:01 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:38585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAcoB-0008Ul-3E for 37401@debbugs.gnu.org; Wed, 18 Sep 2019 12:27:59 -0400 Received: by mail-qt1-f196.google.com with SMTP id j31so472842qta.5 for <37401@debbugs.gnu.org>; Wed, 18 Sep 2019 09:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nREgG2TlkUW16WH3oTTHrCkdnwZcPMfdTu4UBHSJpxU=; b=cbMkh7w0giQixC+xFKx8jhQsctLIoE76FTV9tAQ4DUc6A1U596YQHlQeWOYzFah3sm p1qSacCPrT6PQcF1GddOIWGRlqEGVL975L1JTYzlkTXmbZm7eCRIBz69a0khRrku0Jd2 38Mqsi7TDVhoRhHdiKlfAR6HsSPRHup1z8NiUtPptpcvp2mbSBJ+k/nTddWWSig4/vGX Ex98n9y0JG2tk/Y840f5vmNARRutuF8ylAdwx5BpBWQ5kMdpeMQHi57dwi4/sIItWYze muJLAInd86qc8AQfgqknSSDvhkNCMRtIf/qcGqhtQI8YsqkgNV3raaxaadVqmAwrFgca OYyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nREgG2TlkUW16WH3oTTHrCkdnwZcPMfdTu4UBHSJpxU=; b=Qv1R32FhyorJehcy6WndNBomFNCpBBU5JrOWEiypUiW2kOJdlqzPuP6KjtX8fJJCDw QP5zljgdv8+Vqx/V3fIIrO1o+Bi+lI2JP+FiCIoPMmeXZajKPK58MPl7M2OOwM1VdFvV AN1S69F387VD1uXGQ1yOMpIfBxqoPMbs1KNAQHwlrSZ/s3TDC8axFo+m0upBK6RTshZx 4ojspnqExbYmxNhQFAx59uM93F0TMy3XpZ8/Hp7nTriaNA6cKA7mY+4Bq0It1CtD3X5Y krHhLFTa7WWRno1OhkruTHj1bSCKn6XVVVNY+x6SIwumU1IjRCB6uA3QdVcCH866M5uz 1voQ== X-Gm-Message-State: APjAAAW4CE/2DJAZL9V56Hir7WpGK/AOqNGtUJhK8QKYSz4ENvxSTz88 BqGjdKftNy5aUNe+NaQybxCJTTwDtiWeM5u2k58= X-Google-Smtp-Source: APXvYqyblohpeOPfKcmFurPe6n4gPhXpK3EmyB0PTzs8I5hpv0UCCEdgPhRI55B+CtoMw29PWO3uqP5x06yhUA5kAvk= X-Received: by 2002:ac8:428e:: with SMTP id o14mr5209767qtl.186.1568824073553; Wed, 18 Sep 2019 09:27:53 -0700 (PDT) MIME-Version: 1.0 References: <20190913155116.19225-1-ludo@gnu.org> <20190913155116.19225-2-ludo@gnu.org> <87pnk4qihp.fsf@elephly.net> <87zhj75i4w.fsf@gnu.org> In-Reply-To: <87zhj75i4w.fsf@gnu.org> From: zimoun Date: Wed, 18 Sep 2019 18:27:42 +0200 Message-ID: Subject: Re: [bug#37401] [PATCH 2/2] pack: Add packages in the order in which they appear on the command line. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37401 Cc: Ricardo Wurmus , 37401@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, That really nice! Thank you. On Sat, 14 Sep 2019 at 11:43, Ludovic Court=C3=A8s wrote: > It=E2=80=99s mostly so that if you do =E2=80=98guix pack -f docker sed gr= ep findutils=E2=80=99 > the repo name is =E2=80=9Csed-grep-findutils=E2=80=9D and not =E2=80=9Cfi= ndutils-grep-sed=E2=80=9D. It is not in the doc, right? If I want to create a "profile" with a meaningful name, then the order after '-f' becomes important. Maybe one line explaining, something like: (current doc) The result is a tarball that can be passed to the =E2=80=98docker load=E2= =80=99 command. See the Docker documentation (https://docs.docker.com/engine/reference/commandline/load/) for more information. (addition) Note that the profile name is built using the package names. Well, and what happens if there is 10 or more packages? Is the name trimmed= ? All the best, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 18 16:49:09 2019 Received: (at 37401) by debbugs.gnu.org; 18 Sep 2019 20:49:09 +0000 Received: from localhost ([127.0.0.1]:54896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAgsv-0007DN-28 for submit@debbugs.gnu.org; Wed, 18 Sep 2019 16:49:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAgst-0007D8-DI for 37401@debbugs.gnu.org; Wed, 18 Sep 2019 16:49:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iAgso-0006hE-3p; Wed, 18 Sep 2019 16:49:02 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56610 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iAgsn-0008Dl-JX; Wed, 18 Sep 2019 16:49:01 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: [bug#37401] [PATCH 2/2] pack: Add packages in the order in which they appear on the command line. References: <20190913155116.19225-1-ludo@gnu.org> <20190913155116.19225-2-ludo@gnu.org> <87pnk4qihp.fsf@elephly.net> <87zhj75i4w.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Jour du =?utf-8?Q?G=C3=A9nie?= de =?utf-8?Q?l'Ann?= =?utf-8?Q?=C3=A9e?= 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 18 Sep 2019 22:48:59 +0200 In-Reply-To: (zimoun's message of "Wed, 18 Sep 2019 18:27:42 +0200") Message-ID: <87r24d72kk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37401 Cc: Ricardo Wurmus , 37401@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: > On Sat, 14 Sep 2019 at 11:43, Ludovic Court=C3=A8s wrote: > >> It=E2=80=99s mostly so that if you do =E2=80=98guix pack -f docker sed g= rep findutils=E2=80=99 >> the repo name is =E2=80=9Csed-grep-findutils=E2=80=9D and not =E2=80=9Cf= indutils-grep-sed=E2=80=9D. > > It is not in the doc, right? > If I want to create a "profile" with a meaningful name, then the order > after '-f' becomes important. Maybe one line explaining, something > like: > > (current doc) > The result is a tarball that can be passed to the =E2=80=98docker load=E2= =80=99 command. > See the Docker documentation > (https://docs.docker.com/engine/reference/commandline/load/) for more > information. > (addition) > Note that the profile name is built using the package names. Good idea, I=E2=80=99ve committed something along these lines. > Well, and what happens if there is 10 or more packages? Is the name trimm= ed? Yes, it=E2=80=99s trimmed (there are apparently no hard limits but the outp= ut of =E2=80=9Cdocker images=E2=80=9D becomes hard to read if the first column is= too wide.) Ludo=E2=80=99. From unknown Sat Jun 14 19:03:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Oct 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator