Received: (at 64173) by debbugs.gnu.org; 26 Dec 2023 02:41:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 25 21:41:10 2023 Received: from localhost ([127.0.0.1]:55667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rHxNW-0003vX-Dh for submit <at> debbugs.gnu.org; Mon, 25 Dec 2023 21:41:10 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:38239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <go.wigust@HIDDEN>) id 1rHxNT-0003v9-9g; Mon, 25 Dec 2023 21:41:08 -0500 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50e79299da9so152231e87.1; Mon, 25 Dec 2023 18:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703558454; x=1704163254; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=StihbCwtZIccK/iQz2hr0HlNhJyiwYTRwsM7QPheyAs=; b=ULU/nUIifJJay0fxiGJR+qkzoaAy9twwWfKAn2eo6tYO3IMJ7gYPD6NL3akRAJXx7e x10x0aJsSKt63yK79ZJTIjRG/g6yTL9URf6TjpXFrWPVDO8e2SeXjYFZ2U+t2NVQ/1bp 60cUEa6LL/1mwJpKwvQGM4FPB/00x3BxhMpkiOf8QEiLvKvHuuVIbXoaJo6ssMkMgLhQ bXe/kJAjFL5mnFN99KITwxhtQPcK7MBhf52HOKDHuyN+M0as7dWFRNtFAh/HHtNuywPL BX79ALZM0UJ3VNPXUf+t/xvMubGv4NP+0J3ePcwO7InOg9oBxNLZjoQNlqh7zNyS2atW BomQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703558454; x=1704163254; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=StihbCwtZIccK/iQz2hr0HlNhJyiwYTRwsM7QPheyAs=; b=QHIhzVDgz5KbMp9+zGWTCx8rXZlIYU7v/lN41tLTQekGTznj+jDhDPyZ4rMsXHrkqC Gj8bnqWRw4eDFzJYcb1L17s6X8730e5HmF4/W6vCnnSoiVGHzVYZ3OvEcVw8gU1Zfv8P eellwul2HPAOe8O13KStnokpPuekN1IsM88DqXVvt6cmeYUZ/d5Vn/qqOu1bHamcJfcm eVfl7jqTR9RL8KH+Jnmw/8UbkugB1weXM6cd/8jXMwrMYjDM9ur9kMh4WA1NeFgxcuAj WStvrdu+Tcgd01/l7HoG/nvn5mJKdA65/tR9Fdl2Kai7/DBk22eRmn5JzuYfOC0C/sTu nTWA== X-Gm-Message-State: AOJu0YwhJzwsiOPYnO94A8xgXprumOgKZ7u04HPU3LukIwz/3YBkYDqd WjePD+KxaNBrVxjyxcKoq2Q= X-Google-Smtp-Source: AGHT+IHslTkt/P+oQU6CM7JZzMIOtx1bq5VtCsyGLum6EJxG/ogEd17Pjc8SXji60RTd5YJ2fkDOxg== X-Received: by 2002:a2e:8883:0:b0:2cc:9882:4ca2 with SMTP id k3-20020a2e8883000000b002cc98824ca2mr4667261lji.5.1703558454196; Mon, 25 Dec 2023 18:40:54 -0800 (PST) Received: from localhost ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id ce26-20020a2eab1a000000b002ccabbc3c5asm1473979ljb.8.2023.12.25.18.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 18:40:53 -0800 (PST) From: Oleg Pykhalov <go.wigust@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: [bug#62153] Merging guix pack changes for Docker containers packaging In-Reply-To: <875y0p99c4.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 22 Dec 2023 23:11:07 +0100") References: <20230313003012.14325-1-go.wigust@HIDDEN> <878r9xb2e6.fsf@HIDDEN> <875y0p99c4.fsf@HIDDEN> Date: Tue, 26 Dec 2023 05:40:52 +0300 Message-ID: <87il4l4rez.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64173 Cc: 64173 <at> debbugs.gnu.org, 62153 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludovic, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Apologies for not replying earlier. I occasionally get reminded of the > fact that building single-layer images is a problem, but only now did I > take the time to look more closely at the latest version of these > patches. > > Oleg Pykhalov <go.wigust@HIDDEN> skribis: > >> I would like to merge 62153. After 64173 will be merge, merging 62153 >> is not possible without conflict resolving with Git. >> >> 64173 introduces =E2=80=98%docker-format-options=E2=80=99 variable. Wit= h this variable >> it's possible in 62153 to replace =E2=80=98--image-type=3Ddocker-layered= =E2=80=99 with >> =E2=80=98--docker-layers=3DN=E2=80=99 option, where: >> >> if =E2=80=98N=E2=80=99 is zero, then use current non layered format >> if =E2=80=98N=E2=80=99 is bigger than zero, then use layered format > > OK we should do that. However, the original submitter of #64173 > apparently dropped the ball as we were approaching the final version. > > Would you like to adopt it and submit/push a version that incorporates > the latest comments? > > Alternatively, we could do the opposite: merge the Docker layer patches > first, and then rebase the =E2=80=98%docker-format-options=E2=80=99 patch= , after which > we could add the =E2=80=98--docker-layers=E2=80=99 option. > > What=E2=80=99s your preference? [=E2=80=A6] Patches 64173 and 62153 (v5) have been sent to 62153. If you don't mind, I have changed the option naming to '--max-layers=3DN' instead of '--docker-layers=3DN' to align with the format of '--entry-point-argument' (without specifying Docker as the only image format that utilizes layers). I did not include code to check if 'N' is zero and use the current non-layered format. Instead, I opted for the default value of '#false' as it was easier to implement. Regards, Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmWKPTQUHGdvLndpZ3Vz dEBnbWFpbC5jb20ACgkQFn+OpQAa+pzYpBAAuIqdacRLFs0TgY6PKw6yiUARQSRb AKT1b/9dryTHfxL9STKiHdgkSXzCK7SvfXX/SkQrACybakckunGf0BD8ZTCZ47i8 d3vLKOA8iRlewHStIVeuJUzzJgwb+CefTkkXX4WwEVrrfvdFbCqs6iDZPsGZzI90 KmYfRkbNwfwEGXV+efZMKZ982gs+56dCMbJk6rK9TYAXxx4zxQJdQ7zGHyG9J2I2 zAMK/YsfvmaVVzcgtDkiFn0FBZ1hrXtL2EipzEGs3VtUO0l1XdHmei4auTyaxpD5 xlMYEhSXrTlW0JxXzEEQigJMeoKECesj9CzO1C18ByVTnJNT5ABJAcwXKMO7JT7i iJlrlO1vce+u2XdeAlIaNU0225Nn21NZWoAce2O424wrIUvmtp0w835R+Zgp9OTR uan2o5XTYXTRp6F9IRdTiDORBF5C7T7vay+f7TVPBafJDMpz2it87FXp9FlICFPl HqNW56R0780AOl0N+Qg6UOlr8rQ2wlmjeIRCeLiSuQBvKE/eJzaXL1i72b/koHn6 c47tZbWbjTJqJgoDXC7QnJiUlvhlLvbR7c9cH+QKgj4Oi7IejG96prSZXrDli12z IVPERJM9UsPmFSNoqOlgaVChbda3i8gPJjzZro6TxFPlk7JorMlmsUURvMWYhi5z HAhQvJxZLviRjEY= =Dj7B -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Received: (at 64173) by debbugs.gnu.org; 22 Dec 2023 22:11:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 22 17:11:23 2023 Received: from localhost ([127.0.0.1]:48013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rGnjm-000737-O1 for submit <at> debbugs.gnu.org; Fri, 22 Dec 2023 17:11:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1rGnjk-00072o-Tx; Fri, 22 Dec 2023 17:11:21 -0500 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 <ludo@HIDDEN>) id 1rGnja-00077A-If; Fri, 22 Dec 2023 17:11:10 -0500 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=4V949yqYxOTNxiTYPqRVEZr4h/YjcFRIeFuKluGjCYc=; b=fwgyCj70X49QOzA51mGd 10tM7wWb8jtBkp6NVFMs8D9Qmj6dDfb9scn4jO0bCkMfa3sRRvEYyFwykQOIm3jZuom0GWpdUiFA0 y/VFCcNCwUBSmm6jW4KShM0lFiES+Vy8giNCy9+RQZBsKrlPqEv+s7cdg/QZhcFSOIp75ByMCKizt Uxj+O2m62LPOsF4bJmwJvLMRJONBLbNup51BSGKJ63V+u2cAOU3Q9OpoHTX/DwIYOqfWmeLxCK9/C EJ2vB2W4PZa76nD9Fn8jm/jeChp48NA5EMTCYf6YiRIex8DgM4vQyeS2m7Lst7QKZ9jRCG35VRczA vbl8vjA3VrrIdQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Oleg Pykhalov <go.wigust@HIDDEN> Subject: Re: [bug#62153] Merging guix pack changes for Docker containers packaging In-Reply-To: <878r9xb2e6.fsf@HIDDEN> (Oleg Pykhalov's message of "Sun, 27 Aug 2023 06:16:49 +0300") References: <20230313003012.14325-1-go.wigust@HIDDEN> <878r9xb2e6.fsf@HIDDEN> Date: Fri, 22 Dec 2023 23:11:07 +0100 Message-ID: <875y0p99c4.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64173 Cc: guix-devel <guix-devel@HIDDEN>, 62153 <at> debbugs.gnu.org, 64173 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Oleg, Apologies for not replying earlier. I occasionally get reminded of the fact that building single-layer images is a problem, but only now did I take the time to look more closely at the latest version of these patches. Oleg Pykhalov <go.wigust@HIDDEN> skribis: > I would like to merge 62153. After 64173 will be merge, merging 62153 > is not possible without conflict resolving with Git. > > 64173 introduces =E2=80=98%docker-format-options=E2=80=99 variable. With= this variable > it's possible in 62153 to replace =E2=80=98--image-type=3Ddocker-layered= =E2=80=99 with > =E2=80=98--docker-layers=3DN=E2=80=99 option, where: > > if =E2=80=98N=E2=80=99 is zero, then use current non layered format > if =E2=80=98N=E2=80=99 is bigger than zero, then use layered format OK we should do that. However, the original submitter of #64173 apparently dropped the ball as we were approaching the final version. Would you like to adopt it and submit/push a version that incorporates the latest comments? Alternatively, we could do the opposite: merge the Docker layer patches first, and then rebase the =E2=80=98%docker-format-options=E2=80=99 patch, = after which we could add the =E2=80=98--docker-layers=E2=80=99 option. What=E2=80=99s your preference? > Number of layers specification is nice to have, because Docker layers > are limited. So if user would like to modify a Docker image by adding > more layers on top, then hacks like squashing layers are not required. > Also, it will be possible to delete code which builds non layered Docker > image without deprecating command line options. Agreed. Anyway, apart from the stylistic issues I reported, v4 of this patch set looks great to me. (For clarity I=E2=80=99d have preferred three patches, = one for (guix docker), one for =E2=80=98guix pack=E2=80=99, and one for =E2=80= =98guix system=E2=80=99; but it=E2=80=99s really a detail, let=E2=80=99s not block this patch series any= longer.) Thanks, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Received: (at 64173) by debbugs.gnu.org; 27 Aug 2023 03:17:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 26 23:17:10 2023 Received: from localhost ([127.0.0.1]:43725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qa6Gz-0000dj-So for submit <at> debbugs.gnu.org; Sat, 26 Aug 2023 23:17:10 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:40396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <go.wigust@HIDDEN>) id 1qa6Gs-0000cw-Nq; Sat, 26 Aug 2023 23:17:07 -0400 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2bcb5423dc7so6315371fa.1; Sat, 26 Aug 2023 20:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693106211; x=1693711011; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=gCr6X5zu05YfQsUceHTN3oMLBVOXaAl8PrVaR7LDphA=; b=Vwyhb8LRJBGsY9rZXZ23mDDufWgOJxUWei3H1tDjtkj9ZsmuxYABIIsY1/ElP5//2P cgZmv3lbcxrb9NAOA0+LMCq6lH20sDakZ1Dp+4gXeX9l/YA8GzcWTZwdA9Bh8oFvWtBL ms5ACYavGCIeL6UMiUzBrKzEBWMebewhWf2VjiYVwY2LMlw2rnPDWu8VAsCoMI2pUNge d+SKP+unRrYKUtQLO87UGedJ+5Mw0zW+6qBx/SU0BESc32C3UrlCVozVyiKNpnm+Ntfq 09ymFbe4JYXBIGV3s7kPTS8OLIyCZvX7zZ/cwSzNrVCtNUcnTm3OTV+jZm1ldUqDyruZ OKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693106211; x=1693711011; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gCr6X5zu05YfQsUceHTN3oMLBVOXaAl8PrVaR7LDphA=; b=i/jbY5jdddwumE1Hbofj1kC3VuDpsilAh1jOGZxhPKPb7S0UHvDTXvbK0bcaPGUC9d hAbst5ipJ7IWgauSyxYLJRaxLYXggf3yGad05mP1amUk6qC5Cqpb8FrAggD68qiXxvzm mblOSjHUsEh6Y3XjwJJtcPrlUlnOkAPAfJhDBOfHMo2E7HRROJNE3rz6xwku78w6uGD2 4FOT5l7HsB2lpGymjAmaknVjru85/2ycThxWpjCDhxUCj/7+2vZnchLU2fmJkCq7e6aV IHxL1UJtW+ia6ZH5y7usCaEKb+FPp53nYPZKsUeAMceIYd8BF4CUnSm4gkFLWHi3BXqn WQjg== X-Gm-Message-State: AOJu0Yz8to5wplWcJ97ZWeO9S4bXrGkf1XPjVytv36nACOl9UIJEPHyY 4wb7CkbRvJmt8UV1DlKotDA= X-Google-Smtp-Source: AGHT+IEzzYbVbDfIur1aD9HdRnL9TL2ZhrkTwRHsyMMV7eF9OtVa0JTH3Vkiq76pEl2Lpj0qeR/kUQ== X-Received: by 2002:a2e:3509:0:b0:2b9:7034:9bbe with SMTP id z9-20020a2e3509000000b002b970349bbemr13876844ljz.4.1693106210854; Sat, 26 Aug 2023 20:16:50 -0700 (PDT) Received: from localhost ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id n12-20020a2e878c000000b002bcd3761ba9sm1046610lji.24.2023.08.26.20.16.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Aug 2023 20:16:50 -0700 (PDT) From: Oleg Pykhalov <go.wigust@HIDDEN> To: guix-devel <guix-devel@HIDDEN> Subject: Merging guix pack changes for Docker containers packaging Date: Sun, 27 Aug 2023 06:16:49 +0300 Message-ID: <878r9xb2e6.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64173 Cc: 64173 <at> debbugs.gnu.org, 62153 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Guix, I would like to merge 62153. After 64173 will be merge, merging 62153 is not possible without conflict resolving with Git. 64173 introduces =E2=80=98%docker-format-options=E2=80=99 variable. With t= his variable it's possible in 62153 to replace =E2=80=98--image-type=3Ddocker-layered=E2= =80=99 with =E2=80=98--docker-layers=3DN=E2=80=99 option, where: if =E2=80=98N=E2=80=99 is zero, then use current non layered format if =E2=80=98N=E2=80=99 is bigger than zero, then use layered format Number of layers specification is nice to have, because Docker layers are limited. So if user would like to modify a Docker image by adding more layers on top, then hacks like squashing layers are not required. Also, it will be possible to delete code which builds non layered Docker image without deprecating command line options. Is it possible to partially merge 64173, specifically =E2=80=98%docker-format-options=E2=80=99 variable and it requirements, so i= t can be used in 62153 for =E2=80=98--docker-layers=3DN=E2=80=99 option? [1]: https://issues.guix.gnu.org/issue/62153 [2]: https://issues.guix.gnu.org/64173 Regards, Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmTqwCEUHGdvLndpZ3Vz dEBnbWFpbC5jb20ACgkQFn+OpQAa+pwLNg//XqUbjKOGD1st7X1i7XAZKAwkPN/j yOzVa1agcRi2bIwLqoh+/WWLf4afG0tE7b52VQKUbgSMdSfJi2RJoLs7PmTjhhhJ /QKl35ffdDr4C6MgutK/nir/Dh2wYuZ4KtKdmj6VmXkC5uSd+GA4mNriwZGUf5IX Oo2YqvEv9e9wkilRRX7BN/iVboKPlPWHxNT82x/gB2UTdgXxcICqUHa9L/h+4obl 7xrsBiGtIJMWmC0A6bZXscDrWTxlKdqAXZTkGRAh2XJ1EWdZeh6ED3s1n4lZySsE gapcNf8112Th0+TRhSV3FP7OUc5LHK8nvosNCnr3WtLMEOG/TGeTx5POc6YwUVwA oJQQu9Z9k8GCQKD58Uo4Bq7f8uhbq+iVfChESn0+ezNeJagir63CAD9eqegaQI1f e2EVxEC3sjEe264ue4fW3L7zx5SkHTHehv8mVfDKAJJTmNgCXx1t+jjP51T1vmxg n3wzP9hU4Ugg10r+whWC2BuH6k2B+wS/bJ1mkg/qSqHAB9/3wvhVikSSFFBmpI+s FmRkjTDguLW9rfZQW8Q9EJtAqOF74FRt4JXkGZffOClTdLrYNuf958wN6r4uuW00 MTBRKy753fJrU7PlwvPi7SQEe6ziaCY7w+tvYOKSV8DPPShMZBhuYnrzRM4IvuDB 5Xgx6marsPHb7AA= =VfnU -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Received: (at 64173) by debbugs.gnu.org; 18 Aug 2023 14:15:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 18 10:15:33 2023 Received: from localhost ([127.0.0.1]:48491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qX0GD-0003mU-03 for submit <at> debbugs.gnu.org; Fri, 18 Aug 2023 10:15:33 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:38940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zimon.toutoune@HIDDEN>) id 1qX0GB-0003RZ-7e; Fri, 18 Aug 2023 10:15:32 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b9eaa7c83dso2911911fa.0; Fri, 18 Aug 2023 07:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692368125; x=1692972925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=soLDLY927qWxftQ8NnXG4LjnUiBhDZY+9uiEA+oMKTs=; b=LsQd4Qsv8diIunKJjHq5KfNjm5SkRpK2vLx9+SCDYe+gtL7lQSwGB9pu0JVrKFUPnn kPNW0OG+e5amSUPelqy1F55BOsd38i69RCoHPnWk0AEecUrhdIPUYkdqKYI5PhLZettq /xLH+ugP9V7VjxKIDAy34hA0qPURlwbcAr77eaLywcQibp51B6y1GdNpuAwGLpp775oj AYdwVfmnilnGp55fqihkU+wDVSDN4mtMbiXDETUdAYKWeJqlBetZeKgaFjGqp2xsIKO7 5qwHrvMn7RQHLbfD1ii1IxcP9BfHR3yITnUNz9wurBlUvCKdQRIAVRwaG7DYZEVMebOy V83Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692368125; x=1692972925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=soLDLY927qWxftQ8NnXG4LjnUiBhDZY+9uiEA+oMKTs=; b=CpeDAagdjyCGgZDSnuKrsmtmB0iYvvIc4JrDy1A1WF4TDYje8vxdPuFs74ULoQLHIp q/+tQPaeHhaQZOYYwSTJCPmUm1IkUKSoTXX2UHemWHjPGhuBqafK/MBFHqhvhmbRqPII HAYDk6tdvq5XkYwrn6utb5jgg4YNB+ysUeo77vZKvjKSP8RMhryuVpu7v9oLgNafAEDT cIXaaNIVia/F5p0zfs1ITkh2qCqDfPopMTUSjIbrERcM6KZ5tuG4U2BB4z+yh+0KvSmS 9g0Ji5euIeYVPKyorxUsbjLe2EQIB3zhh9YyOEy/MN8sHQC0Lc07Pf9A6WuKFNaNRgxf 0m8A== X-Gm-Message-State: AOJu0YwCF5zNRd3VHm9MjI/oJ9wANkLgPUiEybw8wyEMWvsRABFwnviT LDmtAhT2d+PMrWe9sBHzQZzETH57CVUyuQ7QDdw= X-Google-Smtp-Source: AGHT+IFeaM8+4BMxkpKaLLv6tnVIM0k8axAvJWbbMCejuImJHIMoqLL2Gnclw/GbgD71QyH4JsJxhlMDnENveL6wKW4= X-Received: by 2002:a2e:aa13:0:b0:2b9:54bd:caed with SMTP id bf19-20020a2eaa13000000b002b954bdcaedmr1850651ljb.1.1692368124438; Fri, 18 Aug 2023 07:15:24 -0700 (PDT) MIME-Version: 1.0 References: <cover.1687188729.git.graham@HIDDEN> <53f0c51cabbd317469721fb7f47b47af50d42177.1689149161.git.graham@HIDDEN> <87wmxuxax2.fsf_-_@HIDDEN> <87sf8h51pq.fsf@HIDDEN> <87zg2oqwkv.fsf@HIDDEN> In-Reply-To: <87zg2oqwkv.fsf@HIDDEN> From: Simon Tournier <zimon.toutoune@HIDDEN> Date: Fri, 18 Aug 2023 16:15:08 +0200 Message-ID: <CAJ3okZ1LbkaSydP_m=712D4LTLDwRUBbowp7tQ24LKjp6jWBkg@HIDDEN> Subject: Re: [bug#64173] [PATCH 0/1] guix: pack: add --entry-point-argument option To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64173 Cc: Graham James Addis <graham@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Christopher Baines <mail@HIDDEN>, 64173 <at> debbugs.gnu.org, Mathieu Othacehe <othacehe@HIDDEN>, Graham James Addis <grahamjamesaddis@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, 64171 <at> debbugs.gnu.org, Ricardo Wurmus <rekado@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, On Fri, 18 Aug 2023 at 16:00, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote: > > Well, since the order of the various command-line arguments might > > matter, and since a =E2=80=99reverse=E2=80=99 is suggested, and since a= ll the Guix > > command-lines do not behave the same way =E2=80=93 for instance =E2=80= =9Cguix package=E2=80=9D > > processes command-line argument from right to left; see #43585 or #5047= 3 > > [1,2]; anyway :-) =E2=80=93 I would suggest to add a sentence in the > > documentation (manual) that the command-line arguments are parsed from > > left to right. > > No: the =E2=80=98reverse=E2=80=99 puts them back in the right order (beca= use > =E2=80=98args-fold*=E2=80=99 traverses the option list from left to right= and thus > conses the result in reverse order.) Is "no" for not adding a sentence in the documentation? :-) BTW, what means the "right order"? :-) I point that "guix package" and "guix show" process the command-line option in different order -- from right to left vs from left to right respectively. Thus, this "right order" you are assuming can be confusing, IMHO. Therefore, applying POLA, it appears to me worth to add under the option description of this new "--entry-point-argument" in the manual: "The @code{--entry-point-arguement} option is applied from left to right." Or something along this line. My 2 cents. Cheers, simon
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Received: (at 64173) by debbugs.gnu.org; 18 Aug 2023 14:01:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 18 10:01:01 2023 Received: from localhost ([127.0.0.1]:48454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qX028-0001oB-S6 for submit <at> debbugs.gnu.org; Fri, 18 Aug 2023 10:01:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qX026-0001nq-Vi; Fri, 18 Aug 2023 10:00:59 -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 <ludo@HIDDEN>) id 1qX01z-0002XM-NR; Fri, 18 Aug 2023 10:00:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=JhtAixlJdVTxmFpSU+3fqCvtJyXg1vCx85TjPRo9cNo=; b=Hoxa4lMOj32y5fwLedhW pSWlv46DHMMv5USI2nGLp0OttPzdLhxxLBjM1w9XUWWDP9OmLtCJr8c5qoSQm3rTBzsK+zLxkirk/ Z2TFhuHXTu2o6Fuk3d6fjTBhg5VGDUFX7nKP9Tp5FuDNn9wEF9rgzgkPTH2TLIP3UiTDX4KJxFPNJ yf7broYM6Di6r2741/kSIQnqvic72k048TayNRx4WEly8o20SLC00tlLMLL4PHpbiuAX+op8JQ8Ql 61EyF1MO4bfJi7kRlKQmdS2JRWO8py0qHRwuzrnDAqUEPBRrrk9SKzexWL0nP/kOBFalXcwyI+Eb7 PIzxU/+hS0ZguQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Simon Tournier <zimon.toutoune@HIDDEN> Subject: Re: [bug#64173] [PATCH 0/1] guix: pack: add --entry-point-argument option References: <cover.1687188729.git.graham@HIDDEN> <53f0c51cabbd317469721fb7f47b47af50d42177.1689149161.git.graham@HIDDEN> <87wmxuxax2.fsf_-_@HIDDEN> <87sf8h51pq.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Primidi 1 Fructidor an 231 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour de la Prune 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: Fri, 18 Aug 2023 16:00:48 +0200 In-Reply-To: <87sf8h51pq.fsf@HIDDEN> (Simon Tournier's message of "Thu, 17 Aug 2023 13:48:33 +0200") Message-ID: <87zg2oqwkv.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64173 Cc: Graham James Addis <graham@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Christopher Baines <mail@HIDDEN>, 64173 <at> debbugs.gnu.org, Mathieu Othacehe <othacehe@HIDDEN>, Graham James Addis <grahamjamesaddis@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, 64171 <at> debbugs.gnu.org, Ricardo Wurmus <rekado@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Simon Tournier <zimon.toutoune@HIDDEN> skribis: > Just to be sure to understand, the command-line could list several > --entry-point-argument options, right? Yes. > Well, since the order of the various command-line arguments might > matter, and since a =E2=80=99reverse=E2=80=99 is suggested, and since all= the Guix > command-lines do not behave the same way =E2=80=93 for instance =E2=80=9C= guix package=E2=80=9D > processes command-line argument from right to left; see #43585 or #50473 > [1,2]; anyway :-) =E2=80=93 I would suggest to add a sentence in the > documentation (manual) that the command-line arguments are parsed from > left to right. No: the =E2=80=98reverse=E2=80=99 puts them back in the right order (because =E2=80=98args-fold*=E2=80=99 traverses the option list from left to right a= nd thus conses the result in reverse order.) HTH! Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Received: (at 64173) by debbugs.gnu.org; 17 Aug 2023 14:07:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 17 10:07:16 2023 Received: from localhost ([127.0.0.1]:45255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qWdee-0007WA-GA for submit <at> debbugs.gnu.org; Thu, 17 Aug 2023 10:07:16 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zimon.toutoune@HIDDEN>) id 1qWdea-0007Vp-Ub; Thu, 17 Aug 2023 10:07:15 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fe8d816a40so12940405e9.1; Thu, 17 Aug 2023 07:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692281227; x=1692886027; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZsoI3nzONheWXBjGPK4RyHGMt1L2bXcPY2xSHnkfI/U=; b=QkoQHL2kkU9zIJDGO77vIWrrflA+1a47dMhBUtmmX9aEzV6y0lR/i2DYGbWJYvJdj9 PucKllJ6BomCRSQmafvaSamiJDOn5v4tv9Nnh5KRPUgcLoiovKtXUqceEsR7tx0RzgnK nzalATEJHjeDefdPfx+6unLTLoqEP+BHIPo4AX6BhqHT4W1aFMcqbc8pwgSiw/68t2zf 5wwM+zE+XV21LFg0u939dWCWveio4y31JE+xCeHoMt3Yq4gr5dhEQzIGy3gdruogzHdV azoBIVyDd9muon2zY6ko0Yq6F7J86mq0ebwp7ZgharbgH0OHkKTtEBFtiy5IiRML3KQz h4lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692281227; x=1692886027; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZsoI3nzONheWXBjGPK4RyHGMt1L2bXcPY2xSHnkfI/U=; b=Y5VLoqljc7NBsZHu1COqOCTusK4tW5KsfPcwmOQceCeq7l1bblHwISUSuvIbbxoH9p v6vn+CPq22TiMktrNoVP/XQpzQzP3rGd+WsvYOTOZqlEQQF7oKcf0g7/N3CoYFMBr75q +roW1UqQ4X06IE7pJhIItsUnLSAoYDsq34q/Q2L9YxTFBvOzNmUG+Fg4liRWO9+0lJXw GyJdyhrVwNDCTooMsai58Mfs+QAYm4nab1iQmHw6e6Fb5inSLdRt2OQdVpb7nAX26a3M y4L6zxIKolbbokjX8urIADon1e+a/EzJe+5PraVxrGYUUK9bdQDLTeEFFVUQPi/QISeM 9xHA== X-Gm-Message-State: AOJu0YyL/ZYJ7JSxZ0Xp0nNH86LIbuDaI4WV0xDblTHzWGnOWTc2zOgi z4IoZPWiO0Rtzq68wqVXqsc= X-Google-Smtp-Source: AGHT+IHsPxZBPIhDy+fMSHSbobm6QRDF4LtKVxU6Vt1sVtKylCmm4KF/duH63b25d9Y11EnRFiFfJg== X-Received: by 2002:a05:600c:3108:b0:3fc:2d8:b1f2 with SMTP id g8-20020a05600c310800b003fc02d8b1f2mr4589896wmo.3.1692281226636; Thu, 17 Aug 2023 07:07:06 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id p11-20020a1c740b000000b003fbb0c01d4bsm3141328wmc.16.2023.08.17.07.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 07:07:06 -0700 (PDT) From: Simon Tournier <zimon.toutoune@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Graham James Addis <grahamjamesaddis@HIDDEN> Subject: Re: [bug#64173] [PATCH 0/1] guix: pack: add --entry-point-argument option In-Reply-To: <87wmxuxax2.fsf_-_@HIDDEN> References: <cover.1687188729.git.graham@HIDDEN> <53f0c51cabbd317469721fb7f47b47af50d42177.1689149161.git.graham@HIDDEN> <87wmxuxax2.fsf_-_@HIDDEN> Date: Thu, 17 Aug 2023 13:48:33 +0200 Message-ID: <87sf8h51pq.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64173 Cc: Graham James Addis <graham@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Christopher Baines <mail@HIDDEN>, 64173 <at> debbugs.gnu.org, Mathieu Othacehe <othacehe@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, 64171 <at> debbugs.gnu.org, Ricardo Wurmus <rekado@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, On Thu, 17 Aug 2023 at 11:42, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote: >> +(define (entry-point-argument-spec-option-parser opt name arg result) >> + "A SRFI-37 opion parser for the --entry-point-argument option. The sp= ec >> +takes multiple occurances. The entries are used in the exec form for the >> +docker entry-point. The values are used as parameters in conjunction wi= th >> +the --entry-point option which is used as the first value in the exec f= orm." >> + (let ((entry-point-argument (assoc-ref result 'entry-point-argument))) >> + (alist-cons 'entry-point-argument >> + (append entry-point-argument (list arg)) >> + (alist-delete 'entry-point-argument result eq?)))) > > I would just keep a regular option parser that does: > > (alist-cons 'entry-point-argument arg result) > > Later on, we=E2=80=99d collect all these arguments: > > (reverse > (filter-map (match-lambda > (('entry-point-argument . arg) arg) > (_ #f)) > opts)) > > I think this would be a bit clearer; this is what =E2=80=98guix repl=E2= =80=99 does, for > instance. [...] > This can be omitted if you take the approach suggested above, with one > =E2=80=98entry-point-argument=E2=80=99 pair per argument. [...] > This would become #:entry-point-arguments (plural), with the > =E2=80=98filter-map=E2=80=99 trick shown above. Just to be sure to understand, the command-line could list several --entry-point-argument options, right? Well, since the order of the various command-line arguments might matter, and since a =E2=80=99reverse=E2=80=99 is suggested, and since all t= he Guix command-lines do not behave the same way =E2=80=93 for instance =E2=80=9Cgu= ix package=E2=80=9D processes command-line argument from right to left; see #43585 or #50473 [1,2]; anyway :-) =E2=80=93 I would suggest to add a sentence in the documentation (manual) that the command-line arguments are parsed from left to right. 1: https://issues.guix.gnu.org/issue/43585 2: https://issues.guix.gnu.org/issue/50473 Cheers, simon
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Received: (at 64173) by debbugs.gnu.org; 17 Aug 2023 09:42:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 17 05:42:31 2023 Received: from localhost ([127.0.0.1]:42777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qWZWQ-0000HB-Gl for submit <at> debbugs.gnu.org; Thu, 17 Aug 2023 05:42:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qWZWO-0000Gv-3i; Thu, 17 Aug 2023 05:42:28 -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 <ludo@HIDDEN>) id 1qWZWH-000548-Gv; Thu, 17 Aug 2023 05:42:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=9PFGrYCpoXycpLt0tHRB0LM8Phjn29++3lGHcvslrJc=; b=CFSSTTgfAQk9q5U6dg1E 8e7ksQPHhlhhdvGeopsustjY0S7DciBeVIHyfl1D6qDwNieDMalIYtUer7pIJnZuyVT7sqJkKdii9 kY9v7Yl9+vqI7p+JaHpWJAH8xeKAdDDo31+OmKliTWxJ2TTgrTO6bs5wAyI/7zhYzuK6lbgHb3j0K Z2xem/pOIGTLyJUjVkxONcpQhy+il6Je7eX2Ga7i38kUf/kgBQtjV0jLx/gPLlds5tPZ0nIYEQTLB pMhGwb/ncGniQRe6WBPxy2toPv8Txx/sKvKVpwZONGtu6eicWfUoXa9V2HK7T0EahV7DtuSN8ur5d 2uMBhZOt0ltAgA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Graham James Addis <grahamjamesaddis@HIDDEN> Subject: Re: bug#64173: [PATCH 0/1] guix: pack: add --entry-point-argument option References: <cover.1687188729.git.graham@HIDDEN> <53f0c51cabbd317469721fb7f47b47af50d42177.1689149161.git.graham@HIDDEN> Date: Thu, 17 Aug 2023 11:42:17 +0200 In-Reply-To: <53f0c51cabbd317469721fb7f47b47af50d42177.1689149161.git.graham@HIDDEN> (Graham James Addis's message of "Wed, 12 Jul 2023 09:17:13 +0100") Message-ID: <87wmxuxax2.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64173 Cc: Graham James Addis <graham@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, 64173 <at> debbugs.gnu.org, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Christopher Baines <mail@HIDDEN>, 64171 <at> debbugs.gnu.org, Ricardo Wurmus <rekado@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Graham, Apologies for the delay (holiday time!). Graham James Addis <grahamjamesaddis@HIDDEN> skribis: > * guix/scripts/pack.scm: add support for parameters in entry-point > (entry-point-argument-spec-option-parser): add function to parse --entry-= point-argument > (docker-image): Add function (form_entry_point) to handle --entry-point > vs --entry-point-argument merging > (docker-image): change call to (build-docker-image) to use (form-entry-po= int) > (%default-options): add dafault for --entry-point-argument option > (%docker-format-options): parser for --entry-point-argument > (show-docker-format-options): help for --docker-format-options > (show-docker-format-options/detailed): detailed help for --docker-format-= options > (%options): add flag for --help-docker-format and add parser for --docker= -format-options > (extra-options): add entry-point-argument option This is really a minor issue and I don=E2=80=99t mind fixing it for you, but note that the ChangeLog style just needs to say what has been changed/added/removed. For example: (entry-point-argument-spec-option-parser): New procedure. > (guix.texi): add documentation And here: * doc/guix.texi (Inovking guix pack): Document it. I like this new version. Here are a few things that I think would need to be changed before we can push: > +@cindex entry point arguments, for docker images > +@item --entry-point-argument=3D@var{command} > +@itemx -A @var{command} Maybe @var{argument} for consistency and clarity? > +Use @var{command} as an argument to @dfn{entry point} of the resulting p= ack. > +This option is only valid in conjunction with @code{--entry-point} and c= an > +appear multiple times on the command line. Maybe add: =E2=80=9CThe example below shows illustrates that, passing @option{--help} to the @command{guile} command:=E2=80=9D > +@example > +guix pack -f docker --entry-point=3Dbin/guile --entry-point-argument=3D"= --help" guile > +@end example [...] > +(define (entry-point-argument-spec-option-parser opt name arg result) > + "A SRFI-37 opion parser for the --entry-point-argument option. The spec > +takes multiple occurances. The entries are used in the exec form for the > +docker entry-point. The values are used as parameters in conjunction with > +the --entry-point option which is used as the first value in the exec fo= rm." > + (let ((entry-point-argument (assoc-ref result 'entry-point-argument))) > + (alist-cons 'entry-point-argument > + (append entry-point-argument (list arg)) > + (alist-delete 'entry-point-argument result eq?)))) I would just keep a regular option parser that does: (alist-cons 'entry-point-argument arg result) Later on, we=E2=80=99d collect all these arguments: (reverse (filter-map (match-lambda (('entry-point-argument . arg) arg) (_ #f)) opts)) I think this would be a bit clearer; this is what =E2=80=98guix repl=E2=80= =99 does, for instance. > + (define (form-entry-point > + prefix entry-point > + entry-point-argument) > + ;; construct entry-point parameter for build-docker-image > + ;; the first entry is constructed by prefixing the entry-p= oint > + ;; with the supplied index subsequent entries are taken fr= om > + ;; the --entry-point-argument options > + (cond > + (entry-point > + (cons* > + (string-append prefix "/" entry-point) > + entry-point-argument) > + ) I=E2=80=99d avoid this extra procedure. > + ('()))) ;empty list returned if no conditions are met > + > + (let-keywords '#$extra-options #f ((entry-point-argument #f)) > + (setenv "PATH" #+(file-append archiver "/bin")) > + > + (build-docker-image #$output > + (map store-info-item > + (call-with-input-file "profile" > + read-reference-graph)) > + #$profile > + #:repository (manifest->friendly-name > + (profile-manifest #$prof= ile)) > + #:database #+database > + #:system (or #$target %host-type) > + #:environment environment > + #:entry-point (form-entry-point > + #$profile > + #$entry-point > + entry-point-argument) How about keeping it similar to what it looks like currently: #:entry-point #$(and entry-point #~(cons (string-append #$profile "/" #$entry-point) '#$(or (assoc-ref extra-options #:entry-point-arguments) '()))) ? > @@ -1346,6 +1375,7 @@ (define %default-options > (debug . 0) > (verbosity . 1) > (symlinks . ()) > + (entry-point-argument . ()) This can be omitted if you take the approach suggested above, with one =E2=80=98entry-point-argument=E2=80=99 pair per argument. > +(define %docker-format-options > + (list (option '(#\A "entry-point-argument") #t #f > + entry-point-argument-spec-option-parser))) > + > +(define (show-docker-format-options) > + (display (G_ " > + --help-docker-format > + list options specific to the DOCKER format"))) > + > +(define (show-docker-format-options/detailed) > + (display (G_ " > + -A, --entry-point-argument=3DCOMMAND/PARAMETER > + Value(s) to use for the Docker EntryPoint argum= ents. > + Multiple instances are accepted. This is only v= alid > + in conjunction with the --entry-point option.")) > + (newline) > + (exit 0)) > + > (define %options > ;; Specifications of the command-line options. > (cons* (option '(#\h "help") #f #f > @@ -1508,8 +1557,13 @@ (define %options > (lambda args > (show-rpm-format-options/detailed))) >=20=20 > + (option '("help-docker-format") #f #f > + (lambda args > + (show-docker-format-options/detailed))) > + > (append %deb-format-options > %rpm-format-options > + %docker-format-options > @@ -1528,6 +1582,7 @@ (define (show-help) > (newline) > (show-deb-format-options) > (show-rpm-format-options) > + (show-docker-format-options) Leftover, can be removed. > @@ -1696,6 +1751,8 @@ (define-command (guix-pack . args) > (process-file-arg opts 'preun= -file) > #:postun-file > (process-file-arg opts 'postu= n-file))) > + ('docker > + (list #:entry-point-argument (assoc= -ref opts 'entry-point-argument))) This would become #:entry-point-arguments (plural), with the =E2=80=98filter-map=E2=80=99 trick shown above. Also, it should be possible to make it work for the Singularity backend, right? We can keep it for a subsequent commit if you prefer, but then please add a TODO comment. Could you send an updated patch? Thanks in advance! Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.Graham Addis <grahamjamesaddis@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Ludovic Courtès <ludo@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at submit) by debbugs.gnu.org; 19 Jun 2023 15:38:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 19 11:38:36 2023 Received: from localhost ([127.0.0.1]:57039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qBGxg-00031j-4x for submit <at> debbugs.gnu.org; Mon, 19 Jun 2023 11:38:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:52422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <grahamjamesaddis@HIDDEN>) id 1qBGxd-00031a-2q for submit <at> debbugs.gnu.org; Mon, 19 Jun 2023 11:38:34 -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 <grahamjamesaddis@HIDDEN>) id 1qBGxc-0000Fv-Rq for guix-patches@HIDDEN; Mon, 19 Jun 2023 11:38:32 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <grahamjamesaddis@HIDDEN>) id 1qBGxa-0007yS-PM for guix-patches@HIDDEN; Mon, 19 Jun 2023 11:38:32 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f907f311ccso26055385e9.1 for <guix-patches@HIDDEN>; Mon, 19 Jun 2023 08:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687189109; x=1689781109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/KBTE5bbZSlxHdWXXgpjYwi12ZxAJzPcpAPDN/T0Sao=; b=UqMPaV0fUq2XlwUVUo51k9dEQZb4vBKyNonRdmyyVqplfVlypD2tUER8YLeol40ly+ 9JuRcxX8QQ6TQA/1tCZAXv0S9vKkHesYG3qMeHutS9FRs+IRJHLXzrzAGLEzqhs89vwe 9nHZPx8d4PDJ8+e/WZqN/6w61gGtE0IPu6RVrLN3Mj5kcWWdDu3tmOPuVP+AStsOADlN AfLvcE8wSP5QNOVphf2tcHuWxU2h2Zw6XXX4uCfXjnJbV+Ha7Vx+1iw/vTS0v8//atSo wzxvrg3G0p98trDUr1a8JNTRE7lZ0Qz6KPUd2kwdvE0/KMSizgmInaH0IR1mu+VF7Azz nYPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687189109; x=1689781109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/KBTE5bbZSlxHdWXXgpjYwi12ZxAJzPcpAPDN/T0Sao=; b=gFk1rJQ5ZAom1Li+63zN3Q6r4vZLCFhMhYwv0yg1JTCK6VP+arSX4HehPYRV2eHal6 2mmZ211zBhW8sHAjFXyeypM05Z8eBKMGCzDDe2W2pJcyT70U9rz1MdxJrpsYuK3JRRPJ pzWuDUpqkntlkrzt3tdIL0zsLzZX7EGE54/lovc6FgLiWXfrXzRadTJu+1n7yFYIUQxv c3tB8MKiVarQTq16SlV4dsXacNGnRx0P4A4FebfCOEDRwWKyjiS92yIGQnRXYDfzA8Ak DiWuE0jLEOWcwHqUJjOLGjY+8uNFNFS9TY46k7m8+uBszujcGWm19UKpg+NJTEpOG3/s +Imw== X-Gm-Message-State: AC+VfDy7P2TjbMEdX0rVQN+s3eU5TokM4c9oAuV8bNHQSWHlSQkfvkdn 2ngR3KGj45m+hEDOBP3brJyN2Pav8Zk= X-Google-Smtp-Source: ACHHUZ7TsNAJFnL6yMqz+OFPrFvUGYWFEVVCsrik+jcFzLmcuHtHDQ41hMwX9PgdLhcoRqBev6H+Hg== X-Received: by 2002:a05:600c:290b:b0:3f8:d8f7:ce23 with SMTP id i11-20020a05600c290b00b003f8d8f7ce23mr8211101wmd.5.1687189108937; Mon, 19 Jun 2023 08:38:28 -0700 (PDT) Received: from guix-test.home ([2a00:23c7:59a9:c901:41c8:db68:b8b1:9808]) by smtp.gmail.com with ESMTPSA id y17-20020a1c4b11000000b003f7f249e7dfsm10306432wma.4.2023.06.19.08.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:38:28 -0700 (PDT) From: Graham James Addis <grahamjamesaddis@HIDDEN> X-Google-Original-From: Graham James Addis <graham@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH 1/1] guix: pack: docker add docker-entry-point options Date: Mon, 19 Jun 2023 16:38:01 +0100 Message-Id: <3c7d4e0a42d650f808882f8b425284809b077220.1687188729.git.graham@HIDDEN> X-Mailer: git-send-email 2.40.1 In-Reply-To: <cover.1687188729.git.graham@HIDDEN> References: <cover.1687188729.git.graham@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines <mail@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=grahamjamesaddis@HIDDEN; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Graham James Addis <graham@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) * guix/scripts/pack.scm: add support for parameters in entry-point (docker-entry-point-spec-option-parser): add function to parse --docker-entry-point (docker-image): Add function (form_entry_point) to handle --entry-point vs --docker-entry-point precedence (docker-image): change call to (build-docker-image) to use (form-entry-point) (%default-options): add dafault for --docker-entry-point option (%docker-format-options): parser for --docker-entry-point (show-docker-format-options): help for --docker-format-options (show-docker-format-options/detailed): detailed help for --docker-format-options (%options): add flag for --help-docker-format and add parser for --docker-format-options (extra-options): add extra options for docker (guix.texi): add documentation --- doc/guix.texi | 16 +++++- guix/scripts/pack.scm | 113 ++++++++++++++++++++++++++++++++---------- 2 files changed, 103 insertions(+), 26 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index c961f706ec..8d8044f73c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -116,6 +116,7 @@ Copyright @copyright{} 2023 Karl Hallsby@* Copyright @copyright{} 2023 Nathaniel Nicandro@* Copyright @copyright{} 2023 Tanguy Le Carrour@* +Copyright @copyright{} 2023 Graham James Addis@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -7346,7 +7347,7 @@ Invoking guix pack @env{GUIX_EXECUTION_ENGINE} environment variable accordingly. @end quotation -@cindex entry point, for Docker images +@cindex entry point, for Docker and Singularity images @item --entry-point=@var{command} Use @var{command} as the @dfn{entry point} of the resulting pack, if the pack format supports it---currently @code{docker} and @code{squashfs} (Singularity) @@ -7369,6 +7370,19 @@ Invoking guix pack docker run @var{image-id} @end example +@cindex entry point, for Docker images +@item --docker-entry-point=@var{command} +Use @var{command} as the @dfn{entry point} of the resulting pack. This option +overrides any value passed to @code{--entry-point} and can appear multiple +times on the command line. The first instance of @var{command} is used as th +@dfn{entry point} and subsequent values are used as the parameters. +@var{command} must be relative to the profile contained in the +pack. + +@example +guix pack -f docker --docker-entry-point=bin/guile --docker-entry-point="--help" guile +@end example + @item --expression=@var{expr} @itemx -e @var{expr} Consider the package @var{expr} evaluates to. diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 0dc9979194..79739cb465 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2020 Eric Bavier <bavier@HIDDEN> ;;; Copyright © 2022 Alex Griffin <a@HIDDEN> +;;; Copyright © 2023 Graham James Addis <graham@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -193,6 +194,16 @@ (define (symlink-spec-option-parser opt name arg result) (leave (G_ "~a: invalid symlink specification~%") arg)))) +(define (docker-entry-point-spec-option-parser opt name arg result) + "A SRFI-37 opion parser for the --docker-entry-point option. The spec +takes multiple occurances. The entries are used in the exec form for the +docker entry-point. The first is used as the command and subsequent values +are used as parameters." + (let ((docker-entry-point (assoc-ref result 'docker-entry-point))) + (alist-cons 'docker-entry-point + (append docker-entry-point (list arg)) + (alist-delete 'docker-entry-point result eq?)))) + (define (set-utf8-locale profile) "Configure the environment to use the \"en_US.utf8\" locale provided by the GLIBC-UT8-LOCALES package." @@ -626,6 +637,7 @@ (define* (docker-image name profile (guix build utils) (guix profiles) (guix search-paths) (srfi srfi-1) (srfi srfi-19) + (ice-9 optargs) (ice-9 match)) #$(procedure-source manifest->friendly-name) @@ -653,31 +665,50 @@ (define* (docker-image name profile `((directory "/tmp" ,(getuid) ,(getgid) #o1777) ,@(append-map symlink->directives '#$symlinks))) - (setenv "PATH" #+(file-append archiver "/bin")) - - (build-docker-image #$output - (map store-info-item - (call-with-input-file "profile" - read-reference-graph)) - #$profile - #:repository (manifest->friendly-name - (profile-manifest #$profile)) - #:database #+database - #:system (or #$target %host-type) - #:environment environment - #:entry-point - #$(and entry-point - #~(list (string-append #$profile "/" - #$entry-point))) - #:extra-files directives - #:compressor #+(compressor-command compressor) - #:creation-time (make-time time-utc 0 1)))))) - - (gexp->derivation (string-append name ".tar" - (compressor-extension compressor)) - build - #:target target - #:references-graphs `(("profile" ,profile)))) + (define (form-entry-point + docker-entry-point + prefix entry-point) + ;; construct entry-point parameter for build-docker-image + ;; overriding the legacy use of --entry-point from the command + ;; line when the --docker-entry-point options are used + (cond + ;; if CLI --docker-entry-point values are available use them + ((and docker-entry-point (not (null? docker-entry-point)) + (cons + (string-append prefix "/" (car docker-entry-point)) + (cdr docker-entry-point)))) + ;; legacy behaviour uses --entry-point and prefixes with #$profile + (entry-point (list (string-append prefix "/" entry-point))) + ('()))) ;empty list returned if no conditions are met + + (let-keywords '#$extra-options #f ((docker-entry-point #f)) + + (setenv "PATH" #+(file-append archiver "/bin")) + + (build-docker-image #$output + (map store-info-item + (call-with-input-file "profile" + read-reference-graph)) + #$profile + #:repository (manifest->friendly-name + (profile-manifest #$profile)) + #:database #+database + #:system (or #$target %host-type) + #:environment environment + #:entry-point (form-entry-point + docker-entry-point + #$profile + #$entry-point) + #:extra-files directives + #:compressor #+(compressor-command compressor) + #:creation-time (make-time time-utc 0 1)))))) + ) + + (gexp->derivation (string-append name ".tar" + (compressor-extension compressor)) + build + #:target target + #:references-graphs `(("profile" ,profile)))) ;;; @@ -1346,6 +1377,7 @@ (define %default-options (debug . 0) (verbosity . 1) (symlinks . ()) + (docker-entry-point . ()) (compressor . ,(first %compressors)))) (define %formats @@ -1428,6 +1460,29 @@ (define (show-rpm-format-options/detailed) (newline) (exit 0)) + +(define %docker-format-options + (list (option '("docker-entry-point") #t #f + docker-entry-point-spec-option-parser))) + +(define (show-docker-format-options) + (display (G_ " + --help-docker-format + list options specific to the DOCKER format"))) + +(define (show-docker-format-options/detailed) + (display (G_ " + --docker-entry-point=COMMAND/PARAMETER + Value(s) to use for the Docker EntryPoint field. + Multiple instances are accepted. The first use is + supplied as the COMMAND in the Docker EntryPoint, + subsequent uses are supplied as PARAMETERs in the + Docker EntryPoint. + This overrides any COMMAND provided in the + --entry-point option.")) + (newline) + (exit 0)) + (define %options ;; Specifications of the command-line options. (cons* (option '(#\h "help") #f #f @@ -1508,8 +1563,13 @@ (define %options (lambda args (show-rpm-format-options/detailed))) + (option '("help-docker-format") #f #f + (lambda args + (show-docker-format-options/detailed))) + (append %deb-format-options %rpm-format-options + %docker-format-options %transformation-options %standard-build-options %standard-cross-build-options @@ -1528,6 +1588,7 @@ (define (show-help) (newline) (show-deb-format-options) (show-rpm-format-options) + (show-docker-format-options) (newline) (display (G_ " -f, --format=FORMAT build a pack in the given FORMAT")) @@ -1696,6 +1757,8 @@ (define-command (guix-pack . args) (process-file-arg opts 'preun-file) #:postun-file (process-file-arg opts 'postun-file))) + ('docker + (list #:docker-entry-point (assoc-ref opts 'docker-entry-point))) (_ '()))) (target (assoc-ref opts 'target)) (bootstrap? (assoc-ref opts 'bootstrap?)) -- 2.39.2
Graham James Addis <grahamjamesaddis@HIDDEN>
:mail@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN
.
Full text available.mail@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN
:bug#64173
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.