From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SKakOnt6kGTmGAAASxT56A (envelope-from ) for ; Mon, 19 Jun 2023 17:55:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +BKcOnt6kGTlVQAAauVa8A (envelope-from ) for ; Mon, 19 Jun 2023 17:55:39 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8841711E11 for ; Mon, 19 Jun 2023 17:55:39 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBHDY-0006Iz-5O; Mon, 19 Jun 2023 11:55:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBHDW-0006Ip-Qg for Help-Guix@gnu.org; Mon, 19 Jun 2023 11:54:58 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBHDU-0004Kg-QO for Help-Guix@gnu.org; Mon, 19 Jun 2023 11:54:58 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-543c692db30so2980976a12.3 for ; Mon, 19 Jun 2023 08:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687190095; x=1689782095; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=gzyXcLUlB1GdYE39S2jtH29GdOHiDmU5lVdUXLd43Gg=; b=L7algTSvmF0K91dMD75YyAl9hbGh1qcXe6+a7QeWytMoY1JWcbNzvRrcX38NKOSCPA qmC2p/EqAaB3d+Pf8f7JShIWMxVkLiOcFbjSrA0JOqPhCesGK736kzKU5VQhMZRzmflh goYA97GYe1R17pkiqHpgTu2QUWPyVsbO3D+RtsdHFpfSYmY01+LzEmk1Us+1rsiFeGu8 bU5hMzbHprgtjPqqYDIKtwyhm3iJ3zTA4NEzhIuAvB3Bc2v1QmYSCE+jcvtnVhRslAGp x/9b/pOJ+U5z31nQUGg5yPwmNbkje/ptHXHDbdYiQMyaAx++PUqvUpdJm3D2VxS6hKJb Gi5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687190095; x=1689782095; h=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=gzyXcLUlB1GdYE39S2jtH29GdOHiDmU5lVdUXLd43Gg=; b=e5x7hCvGuNbYd7WmGUHLsEEitL7llaLEvuxiPMtEGs/0kGZ1iJ1osX9EFa22Dn9hw0 4IiNqIGGn9vNa+mxQlOnNgpuaeWcbMXjdeQmhTbX9ROCbOQJu0dHBsJmbziQLHOQHgEt C2X0DPQJrtFZu6lC6fJX/35QuiOCC4ZOzOrGZjOrwBrCwlgd4SGp4Qh9T4ChcF/eh+tP 0eXLzEibm1ytHG2Qf42Wh9b15rrg18wfdE5U0c39Ocvtetdac+q4Cym0l2wfeO7T4cn0 okUg5INET2xQnQ6med75G/C7xJoQ4aphAooQ/fJ+e2iPvVP7RHmBfHVtiTo5kdgVDdEn +QdQ== X-Gm-Message-State: AC+VfDx0Q0YFt7eLSD+Or4fD4BVd1IRnkU1DKp/8BALZQQdSPKgeDSyM tyVSlno6Q/XQ4JCZ8MLvlBySuMMLwuUiVO7x4xYxAkRiZ4E= X-Google-Smtp-Source: ACHHUZ6/wgI4wSASGNzyoSrkVWZrcqfhPWNONj+akBIYgyMcTRedVPFrIJKvaNV5UiBzFE7q8XwlsUZR1IprY1sfLRo= X-Received: by 2002:a17:902:d386:b0:1b3:f8db:6f0c with SMTP id e6-20020a170902d38600b001b3f8db6f0cmr10718753pld.58.1687190094750; Mon, 19 Jun 2023 08:54:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Graham Addis Date: Mon, 19 Jun 2023 16:54:43 +0100 Message-ID: Subject: Re: guix docker on gitlab-ci To: Help-Guix@gnu.org, wolf Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=grahamjamesaddis@gmail.com; helo=mail-pg1-x52a.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-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687190139; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gzyXcLUlB1GdYE39S2jtH29GdOHiDmU5lVdUXLd43Gg=; b=W/u9ycssE8lcLiEADl4VhlqcsHP/uCJbprb1LvaBlHtnmFry7vSyfJE/3FWWME36tDBSE0 aX6n0USp4PzUvPOQeovACC6yROeG0MBmJnu31Th7ZjWRjzTEMxNhp269WKA7Em45siXf30 GnPxTIpsaNU/RZApXoA4myFZjB2rf3lB5+rgX8SOYkec78+a/v/gG8vcrPHm23aDhTSau4 bawof1ODSSnd38uNMEtPsnQeS59XBtlMXd6mkoyfAxWq7yRZni1cXO3Z2j7HBTT+SxkKBC Q1t+MTbjuW8lPJ+bk6igB/MZLwQIE2Fh3JcIHiWhXPLEBppKI9oqNq6g+u4jEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=L7algTSv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687190139; a=rsa-sha256; cv=none; b=AS0nl0bVS2Jm7rHqUb5xhhjSSRH06XSzBPyyV534n0/owH0174/rdBsUUZu0IaMA74ayXa 4ZG0uVIWsiTDuVnmoNiWMcMxvzaRR0gSlYac3NuhRNmKoJvVQLI4BI7kDoUqS5edwyTxGB HLZnVyRaWzCLP9gFoGfTxR2TKpX7tyLufoQSFooDeSQghqDbDezkhCHSt5LSvVpKyreQjR snSMl2bUe4IY+waLSpUWBUsEjKNd81/NgHdxkd6TpQYtVkehS1lKArv1AThW1vtbxUOs5Q Xiot8BdZ0IV6uIF64jLYvGkf+/Ga0YZ5+X7Y/tkeN57sT330AUny3mj9YoMs7w== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.90 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=L7algTSv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8841711E11 X-Spam-Score: -4.90 X-TUID: 4A4BmEC+wZk1 Hi Wolf, Patch is now submitted, see following for details. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64171 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64173 Now we find out what I forgot. ;-) Thanks again for your help, Graham On Tue, 13 Jun 2023 at 17:56, Graham Addis wrote: > > Hi Wolf, > > Well I managed to sort it out last weekend. > > I have added a --docker-entry-point option which can be invoked > multiple times to provide the docker EntryPoint value in exec form. > > I have left the --entry-point behaviour alone except the > --docker-entry-point takes precedence. > > I still have the docs to update, and to test the some of the different > cases, but it all seems to work. > > Thanks again, > > Graham > > On Mon, 5 Jun 2023 at 22:38, Graham Addis wrote: > > > > Hi Wolf, > > > > Similar to what I was trying, which didn't work. I'll try to have a go > > one evening and try and work out where I went wrong. > > > > Thanks again. Graham > > > > On Mon, 5 Jun 2023 at 18:35, wolf wrote: > > > > > > On 2023-06-05 16:37:50 +0100, Graham Addis wrote: > > > > Hi Wolf, > > > > > > > > Not a particularly successful weekend... > > > > > > > > As --entry-point was used by other pack methods I thought the best > > > > option would be to add a --docker-entry-point just for the docker > > > > format and pass it into the build as an extra-option like for deb and > > > > rpm formats. > > > > > > > > However I couldn't work out how to pass in a list via the > > > > extra-options, so I'm a bit stuck. > > > > > > > > If there is anyone who knows their way around the pack scripts and can > > > > point me in the right direction, that would help, but other than that > > > > I'll probably get some more time next weekend. > > > > > > I did not try to implement this, so my guess might be completely off, but > > > looking at how -S is implemented, I would suggest trying something like: > > > > > > 1. Introducing new %docker-format-options and friends (similar to already > > > existing %deb-format-options and friends), providing the --entry-point-arg > > > options, that would be specific to a docker format (although I am not sure if > > > it needs to be specific, maybe some other formats support arguments as > > > well?). > > > 2. Writing entry-point-arg-spec-option-parser, while taking inspiration from > > > symlink-spec-option-parser. Yours would be much simpler, since you would be > > > just accumulating values into a list. > > > > > > As for the extra-options, I guess modifying current code (by adding the 'docker > > > option) into something like: > > > > > > (extra-options (match pack-format > > > ('deb > > > (list #:control-file > > > (process-file-arg opts 'control-file) > > > #:postinst-file > > > (process-file-arg opts 'postinst-file) > > > #:triggers-file > > > (process-file-arg opts 'triggers-file))) > > > ('docker > > > (list #:entry-point-args > > > (process-file-arg opts 'entry-point-arg))) > > > ('rpm > > > (list #:relocatable? relocatable? > > > #:prein-file > > > (process-file-arg opts 'prein-file) > > > #:postin-file > > > (process-file-arg opts 'postin-file) > > > #:preun-file > > > (process-file-arg opts 'preun-file) > > > #:postun-file > > > (process-file-arg opts 'postun-file))) > > > (_ '()))) > > > > > > could work? build-docker-image already accepts a list as an #:entry-point, so > > > it should be just a matter of properly composing the list. > > > > > > Not sure if this is helpful. > > > > > > W. > > > > > > > > > > > Graham > > > > > > > > On Fri, 2 Jun 2023 at 09:13, Graham Addis wrote: > > > > > > > > > > Hi Wolf, > > > > > > > > > > On Thu, 1 Jun 2023 at 22:55, wolf wrote: > > > > > > > > > > > > On 2023-05-31 18:47:03 +0100, Graham Addis wrote: > > > > > > > I could use the equivalent format for --entry-point > > > > > > > > > > > > > > --entry-point executable --entry-point param1 --entry-point param2 > > > > > > > > > > > > > I think that is a reasonable idea. Only downside is that it would not be > > > > > > backwards compatible (since currently last --entry-point wins), however I am not > > > > > > sure if someone actually relies on that behavior. > > > > > > > > > > > > Backwards compatible way would be keeping --entry-point as it is and introducing > > > > > > new argument (--entry-point-arg) that could be used to build the argument list, > > > > > > but I might be overthinking it :). > > > > > > > > > > I'll go with extending --entry-point to accept multiple values and use > > > > > all of them for --format=docker and simply use the last one provided > > > > > for the other formats. > > > > > > > > > > I'll try to put a patch together at the weekend. > > > > > > > > > > Thanks for all your input, it really helps. > > > > > > > > > > Graham > > > > > > > > > > -- > > > There are only two hard things in Computer Science: > > > cache invalidation, naming things and off-by-one errors.