From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UEzCHiVWfmTVagAASxT56A (envelope-from ) for ; Mon, 05 Jun 2023 23:39:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MKrVHSVWfmTtNwAAG6o9tA (envelope-from ) for ; Mon, 05 Jun 2023 23:39:49 +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 358611E80F for ; Mon, 5 Jun 2023 23:39:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Hur-0000Wi-OE; Mon, 05 Jun 2023 17:39:05 -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 1q6Hum-0000Vr-33 for Help-Guix@gnu.org; Mon, 05 Jun 2023 17:39:00 -0400 Received: from mail-vs1-xe2e.google.com ([2607:f8b0:4864:20::e2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6Huk-0008LB-CE for Help-Guix@gnu.org; Mon, 05 Jun 2023 17:38:59 -0400 Received: by mail-vs1-xe2e.google.com with SMTP id ada2fe7eead31-43b2fb0afa6so1135936137.1 for ; Mon, 05 Jun 2023 14:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686001137; x=1688593137; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=yHcmQnay86o9e5irMpTC94tTqgK7lX+qu+uQ8Gzzuvw=; b=ZMPsVDgcz81hxNOAeB0kq3UrbZKVzsU+94Vn3OF1yPUiRYP+JamVN1TSuAemkFEOn7 oUPP6pXW+ryuR7Htffq6BEujam5Xhe9bo/QUxM7ek41ghsNR4ePfhVZeafK0Sl31MO3U 3QqNq9rMkuwbF1UGebwofmy783m3hlUL76uUy1/HFovbZLRs4L+fWj+pJWF93Mhngfmk CMz2GP3Y7ReeBuYtwA2ag6esQm0PdQ3ceiQ6fgRoKK8UFUVSPSXiKosQfqyQw9Z+NzK2 EbstTdLWm16PWnWR8/jS79va3gfOPyKBHySpT6KdEMwcZ4lQHV3wbfTvw9Sqj5LRikaz CAJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686001137; x=1688593137; 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=yHcmQnay86o9e5irMpTC94tTqgK7lX+qu+uQ8Gzzuvw=; b=TQkzWozcJDhAlLiHScFraG3BFyVjxac91WEdA+HIe0FjKLseOzMPNPcG2zojJ93sE9 BXaDh+JaRnfB8K8ZP2PDe+XDzYxWfl4MF4Rn3AlqfY9Uno+VgP70uNQ4RNAKjgSlWtar JvnvChTtToz7XOMwcgv/JRh8yW7xNw3CQhq9EpxrRJFnyLciwdmSJDqqHwyN81zj9t1N TCJ8qY04HjG0dw4yUiKV+tb8itQIZFrj30gc87s8xF1lwr1541Y2Zyp3hZwtTcdcg1sW Gd61fd54y8dM2zfn2pYdJ7xfG65Yw2s5lEeTp3Cuc4AKsf7HHvhzwWSOtS6H5PWia3MF qZkA== X-Gm-Message-State: AC+VfDxISCZ2OCLEmzkGneF6ZxTTJJpYLg+lLqrZjyoRDHjzjVCaG0Cy GqTK+hMdMiez3cYOlaHIn/wqC0hNXpL4CbUg1jI= X-Google-Smtp-Source: ACHHUZ7neZlhvgV9iEywImWjQjigJNh+LCkqNnd8xq+hbzXaeLP3uUiwGEEnIZYMK4QLiDsOKtC4pwwc2jNJ2qWJ4xQ= X-Received: by 2002:a67:fa03:0:b0:43b:4542:2262 with SMTP id i3-20020a67fa03000000b0043b45422262mr302934vsq.13.1686001137058; Mon, 05 Jun 2023 14:38:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Graham Addis Date: Mon, 5 Jun 2023 22:38:45 +0100 Message-ID: Subject: Re: guix docker on gitlab-ci To: Graham Addis , Help-Guix@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2e; envelope-from=grahamjamesaddis@gmail.com; helo=mail-vs1-xe2e.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=1686001189; 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=yHcmQnay86o9e5irMpTC94tTqgK7lX+qu+uQ8Gzzuvw=; b=TX3jPmQVOGpMb6HGhFkZamTkseVlymTQlyd6lz0cZ2f0ZLEHm4ciVpwp9Yagn/W3wqgrZF nMztngV6BwqzxCQyWzLwxbyyqVpco6IwRjXIJat49BmKFjm1TPbRBdtn7ZcTfiR0xle6Ov VHtb1ELVuuKKS+Y3lKYon6IuDEbQ3RnqmmCJZFFDaw70FmfexXm7Tn64xPW8aJKImpJphv Kwxr072B5MKRtHs3jm8Yeb5oVwpSaO6a+LWl+HbilaKgDPyfLA/1qWBvmrGA7cYZrirXfi lPj/LOawQaZ9q58aTlcXnJbZ3+vMPic6YY0gM8pL66J2Xc0GJ2N2IKV04Eul0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=ZMPsVDgc; 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=1686001189; a=rsa-sha256; cv=none; b=iQc0QqmaRYDPBvE8885iRt7FqdbcuF1m/3+6WsTyugYda1H77D97xkapcYM1JdKYUY/YgV nHXZhhXVKOCQPB61WZGS78RotJBurjzYHJL4VNdegaBDr4r22iBvpQd2NjdYqIPOOu4Sgn cduZ34GQIH5EOEzDqSmYOZEy2Wm2WfhqBiNt0wmYXPuYS0Xh4ZuEaDN8fv/HbQIynpQ+CQ gXkmU6apsncTVcoBpNzP5i51Cjh9LFjs83vTOC4SrGjSDJkRkLFEPaULTUwWZ7ZF4c+RkA 1zua9Z9FAstJg1hBZAZMejah2q/z3fBhxS0VymydVo0gqvqzbABX4zEptfXYBw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=ZMPsVDgc; 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: 358611E80F X-Spam-Score: -6.35 X-TUID: ytIdMP8vDCyu 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.