From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 eNgmASbHiGQIAgAASxT56A (envelope-from ) for ; Tue, 13 Jun 2023 21:44:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aMkoACbHiGTbPwAAG6o9tA (envelope-from ) for ; Tue, 13 Jun 2023 21:44:38 +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 9F340396DF for ; Tue, 13 Jun 2023 21:44:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q97KB-00042l-KD; Tue, 13 Jun 2023 12:56:55 -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 1q97K9-00042T-UI for Help-Guix@gnu.org; Tue, 13 Jun 2023 12:56:53 -0400 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q97K7-0007Me-Pv for Help-Guix@gnu.org; Tue, 13 Jun 2023 12:56:53 -0400 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-39ca0c2970aso3181361b6e.3 for ; Tue, 13 Jun 2023 09:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686675410; x=1689267410; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=tlLlhOuoD+5x0xsd6SBitIi5WBT5ucoSCBStHuKuwsY=; b=puo9dY0i3Urbn/sKqfJsV8FP7FfyMVp7j/XDKWtaoenMCLb5O8Y9dFJZOHfKAcuhqM icq4ZF9HzYsVqyn923zPMD93zaNRw7DS0Rf19264MjaOY53KFfBOMlLuPHtL7HzxY5Ly XWm+yXh1RSrHK+j0gs19KbLZxZoGxVZWqYv9s9O5CoWCyp8+FRmzqNgZbigi3QZy7xDC Yz5amBLLs08a8dP3sc9DImxZGWQMStwrOWHaay7WPFO3VV08v/zcTf5ETJ8YAlXW6QAP Tvb24/IgnZW/Ik4q4AWk2BeKZDox3OcEcZyzobQtdfkQ7mAesxnWxMHj3ia9MO0kpS74 9K7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686675410; x=1689267410; 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=tlLlhOuoD+5x0xsd6SBitIi5WBT5ucoSCBStHuKuwsY=; b=KvM8jq3SNZ4DkRBNTWys+DXaZx+o1+IanvUt74EUUnfLw041wpeS8XxIzvBrNogmFy bYkA3vVSi5LGg/NrAACDeDK4ZzBcjFGibhd7Ch3yv0VEszHyVgaHCpc5+RpiiEFUaE/L nZT7FpSEJ4FcLIyLyVSCHJs1wm0eMOmS5yNnUp8kxC0W0DzgoyZTMxE+W9a+rDC5+cZ0 vIeGUly4h40cfH9RilPM0dSPthOqNi8mNa7j5m+ax4JTTzQxHxbZMR6bWRWOMGLe/gt9 DWiC8J2jug+ZtrrLE/D4jiJbaXsmndMRq62FQIwMfDZyIPHk1vPQ0VAS/16qqBBVTcPV pikA== X-Gm-Message-State: AC+VfDwbSo0f5f+ucZDjeQwBKCH1S1Im49zp3rFuhMcZE/JibDix/+F6 RzynX4q1gVgy1Zp6GLLNieoi+wYwtv8NJ+lcy1Y= X-Google-Smtp-Source: ACHHUZ5GHx3E3OweA+7v5/74WdmOOrT0pQLFQi64VMM+iYC0mJb3C+w1Uft4gO7lt1OhiKVmM9+0KEjQvjJRbcfm+GM= X-Received: by 2002:a05:6808:f11:b0:398:43a7:e9fe with SMTP id m17-20020a0568080f1100b0039843a7e9femr9441109oiw.20.1686675409983; Tue, 13 Jun 2023 09:56:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Graham Addis Date: Tue, 13 Jun 2023 17:56:38 +0100 Message-ID: Subject: Re: guix docker on gitlab-ci To: Graham Addis , Help-Guix@gnu.org, wolf Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=grahamjamesaddis@gmail.com; helo=mail-oi1-x230.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=1686685477; 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=tlLlhOuoD+5x0xsd6SBitIi5WBT5ucoSCBStHuKuwsY=; b=JU8GT/Bi/Tv80fT5zKnxAHY8ikR5lcMZG/aaPvuiPz9y6gUidlb2FSQd+nbIAUZrn9WE3S lnHwmbSZaZdog4DutACFe1WQIAInt59kGBeCzvNCRHfY5VnFZgWoYb6WUwO7Kkdb47GGLu 5eAD0BwWZZN5IFnqEEyzrHs+cRNdeHI3O3MfNfnVTIYYF8Y3t6bhIrLIqHP0P5FDc2vAUX D6PHYc8gj+xxp7/HzlZqpIHvGswNo8JxKEd7pCuB4ObFwnb1QLXFjnkCuYRNJvS4CXzGIp I6ISqSS1iN51ooUY+ZaAo8CukRWnnh23aja9emw2TfbOeLiJG9kLxMXKC6ereQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=puo9dY0i; 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=1686685477; a=rsa-sha256; cv=none; b=eeLrCoNunfITq7R77vUCN9t8jhz+AcDv3Mez4QIlgv5/4YXK8Pb3l/X556UTxO0XzJtBxf xoP5T5Sa8dha3CqZAGn9+XLnU4yItG9YyjTBsY+atALx+OZhIYLEzlJSBy0UHNgudyquta BRH2G+9f4ulx0xtQjjy6md/pccB+0CnMXiViwfpyOWwTR7rIYUbQR4DmWMSuWPT/0vCaoZ vaFnr0k06Mt0mMs8ljDf8ZLXJQipXICGFA0KuhUS1NhHg012bDHUQr0eHS156K1O/9lgdU ETVKGqNomkuLYCz/i4ZUecdfpwLm0gPiDur25rlfSP2SIfxrkp8WeJ4Ii8z/RA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.37 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=puo9dY0i; 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: 9F340396DF X-Spam-Score: -6.37 X-TUID: B45QMLLzz+CQ 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.