mbox series

[bug#64171,0/1] guix: pack: docker add docker-entry-point options

Message ID cover.1687188729.git.graham@addis.org.uk
Headers show
Series guix: pack: docker add docker-entry-point options | expand

Message

Graham James Addis June 19, 2023, 3:37 p.m. UTC
This patch adds an option to guix pack to allow multiple parameters to
be passed to the guix pack --format=docker command.

Currently the although the --entry-point option can be entered multiple
times, only the last entry is used as the docker ENTRYPOINT.

Using the new --docker-entry-point option will take multiple entries
and use them in the docker ENTRYPOINT exec form.

Using --docker-entry-point will override any setting of --entry-point.

The existing behaviour of --entry-point is retained if --docker-entry-point
is not specified.

Graham James Addis (1):
  guix: pack: docker add docker-entry-point options

 doc/guix.texi         |  16 +++++-
 guix/scripts/pack.scm | 113 ++++++++++++++++++++++++++++++++----------
 2 files changed, 103 insertions(+), 26 deletions(-)


base-commit: d884fc9e2efecfba09af4694f5a13ad7fc6f704f

Comments

Graham James Addis June 19, 2023, 3:49 p.m. UTC | #1
Accidently included an emacs backup file in the patch submission.

The correct bugs should be 64171 and 64173. This can be closed.

On Mon, 19 Jun 2023 at 16:39, GNU bug Tracking System
<help-debbugs@gnu.org> wrote:
>
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> As you requested using X-Debbugs-CC, your message was also forwarded to
>   Christopher Baines <mail@cbaines.net>, Josselin Poiret <dev@jpoiret.xyz>, Ludovic Courtès <ludo@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>, Ricardo Wurmus <rekado@elephly.net>, Simon Tournier <zimon.toutoune@gmail.com>, Tobias Geerinckx-Rice <me@tobias.gr>
> (after having been given a bug report number, if it did not have one).
>
> Your message has been sent to the package maintainer(s):
>  guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 64172@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 64172: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64172
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
Ludovic Courtès July 3, 2023, 9:25 a.m. UTC | #2
Hi,

Graham James Addis <grahamjamesaddis@gmail.com> skribis:

> This patch adds an option to guix pack to allow multiple parameters to
> be passed to the guix pack --format=docker command.
>
> Currently the although the --entry-point option can be entered multiple
> times, only the last entry is used as the docker ENTRYPOINT.
>
> Using the new --docker-entry-point option will take multiple entries
> and use them in the docker ENTRYPOINT exec form.

How about this alternative route: support multiple ‘--entry-point’
arguments.  The first one is passed to the backend as #:entry-point (as
is currently the case) and extra instances are passed as a list as
#:entry-point-arguments.

That way one could do:

  guix pack -f docker guile \
    --entry-point=bin/guile --entry-point=--version

Or, perhaps even better, introduce a new ‘--entry-point-argument’ (or
‘-A’) option.

The advantage compared to ‘--docker-entry-point’ is that it could be
supported by all the backends.

WDYT?

Thanks,
Ludo’.
Graham James Addis July 3, 2023, 12:44 p.m. UTC | #3
Hi Ludo,

Happy to rework it either way. I can't think of any showstoppers off
the top of my head.

Which option would make the most sense?

Thanks,

Graham

On Mon, 3 Jul 2023 at 10:26, Ludovic Courtès <ludo@gnu.org> wrote:
>
> Hi,
>
> Graham James Addis <grahamjamesaddis@gmail.com> skribis:
>
> > This patch adds an option to guix pack to allow multiple parameters to
> > be passed to the guix pack --format=docker command.
> >
> > Currently the although the --entry-point option can be entered multiple
> > times, only the last entry is used as the docker ENTRYPOINT.
> >
> > Using the new --docker-entry-point option will take multiple entries
> > and use them in the docker ENTRYPOINT exec form.
>
> How about this alternative route: support multiple ‘--entry-point’
> arguments.  The first one is passed to the backend as #:entry-point (as
> is currently the case) and extra instances are passed as a list as
> #:entry-point-arguments.
>
> That way one could do:
>
>   guix pack -f docker guile \
>     --entry-point=bin/guile --entry-point=--version
>
> Or, perhaps even better, introduce a new ‘--entry-point-argument’ (or
> ‘-A’) option.
>
> The advantage compared to ‘--docker-entry-point’ is that it could be
> supported by all the backends.
>
> WDYT?
>
> Thanks,
> Ludo’.
Giovanni Biscuolo July 3, 2023, 4:40 p.m. UTC | #4
Graham Addis <grahamjamesaddis@gmail.com> writes:

> Hi Ludo,
>
> Happy to rework it either way. I can't think of any showstoppers off
> the top of my head.
>
> Which option would make the most sense?

[...]

>> Or, perhaps even better, introduce a new ‘--entry-point-argument’ (or
>> ‘-A’) option.

IMO ‘--entry-point-argument’ is more semantic, its destination is clearer

[...]

Thanks a lot for this patch!

Happy hacking, Gio'
Graham James Addis July 8, 2023, 4:08 p.m. UTC | #5
One last question, as the proposed changes no longer reflect this bug
description, should I raise a new bug, or just add the replacement
patch to this one?

On Mon, 3 Jul 2023 at 17:40, Giovanni Biscuolo <g@xelera.eu> wrote:
>
> Graham Addis <grahamjamesaddis@gmail.com> writes:
>
> > Hi Ludo,
> >
> > Happy to rework it either way. I can't think of any showstoppers off
> > the top of my head.
> >
> > Which option would make the most sense?
>
> [...]
>
> >> Or, perhaps even better, introduce a new ‘--entry-point-argument’ (or
> >> ‘-A’) option.
>
> IMO ‘--entry-point-argument’ is more semantic, its destination is clearer
>
> [...]
>
> Thanks a lot for this patch!
>
> Happy hacking, Gio'
>
> --
> Giovanni Biscuolo
>
> Xelera IT Infrastructures
Josselin Poiret July 9, 2023, 8:31 a.m. UTC | #6
Hi Graham,

Graham Addis <grahamjamesaddis@gmail.com> writes:

> One last question, as the proposed changes no longer reflect this bug
> description, should I raise a new bug, or just add the replacement
> patch to this one?

You can retitle bugs on debbugs, have a look at [1].

[1] https://debbugs.gnu.org/server-control.html

Best,