all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Graham Addis <grahamjamesaddis@gmail.com>
To: Graham Addis <grahamjamesaddis@gmail.com>,
	Help-Guix@gnu.org, wolf <wolf@wolfsden.cz>
Subject: Re: guix docker on gitlab-ci
Date: Tue, 13 Jun 2023 17:56:38 +0100	[thread overview]
Message-ID: <CAA4DTeyfZC02qxK9w4UL6VV4jq0cHyYrkwPECHC+6xVf3sY=sg@mail.gmail.com> (raw)
In-Reply-To: <CAA4DTeyZ59QeFcinR-O1Rvv6fWpjkVq0DqfUmn=6d1+iM6uuXQ@mail.gmail.com>

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 <grahamjamesaddis@gmail.com> 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 <wolf@wolfsden.cz> 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 <grahamjamesaddis@gmail.com> wrote:
> > > >
> > > > Hi Wolf,
> > > >
> > > > On Thu, 1 Jun 2023 at 22:55, wolf <wolf@wolfsden.cz> 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.


  reply	other threads:[~2023-06-13 19:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 17:04 guix docker on gitlab-ci Graham Addis
2023-05-29 19:41 ` wolf
2023-05-30  6:52   ` Graham Addis
2023-05-31 17:47     ` Graham Addis
2023-06-01 21:55       ` wolf
2023-06-02  8:13         ` Graham Addis
2023-06-05 15:37           ` Graham Addis
2023-06-05 17:35             ` wolf
2023-06-05 21:38               ` Graham Addis
2023-06-13 16:56                 ` Graham Addis [this message]
2023-06-19 15:54                   ` Graham Addis
2023-06-01 22:04     ` wolf
2023-06-02  8:06       ` Graham Addis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA4DTeyfZC02qxK9w4UL6VV4jq0cHyYrkwPECHC+6xVf3sY=sg@mail.gmail.com' \
    --to=grahamjamesaddis@gmail.com \
    --cc=Help-Guix@gnu.org \
    --cc=wolf@wolfsden.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.