package transformations not honored working from a manifest

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • Simon Tournier
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal

Debbugs page

M
M
Maxim Cournoyer wrote on 21 Feb 2023 05:23
(name . bug-guix)(address . bug-guix@gnu.org)
87mt57jgns.fsf@gmail.com
Hi Guix,

I was trying to simplify the Jami packaging tooling using the latest
recursive '--with-source' transformation, like so (in a Makefile):

Toggle snippet (14 lines)
define guix-pack-command
guix pack -C xz -f deb -f extras/packaging/gnu-linux/guix/guix-pack-manifest.scm -v3 \
--with-source=libjami@$(RELEASE_VERSION)=$(RELEASE_TARBALL_FILENAME) \
--with-patch=libjami=extras/packaging/gnu-linux/guix/patches/jami-disable-integration-tests.patch \
--with-source=jami@$(RELEASE_VERSION)=$(RELEASE_TARBALL_FILENAME) \
-S /usr/bin/jami=bin/jami \
-S /usr/share/applications/jami.desktop=share/applications/jami.desktop \
-S /usr/share/icons/hicolor/scalable/apps/jami.svg=share/icons/hicolor/scalable/apps/jami.svg \
-S /usr/share/icons/hicolor/48x48/apps/jami.png=share/icons/hicolor/48x48/apps/jami.png \
-S /usr/share/metainfo/jami.appdata.xml=share/metainfo/jami.appdata.xml \
--postinst-file=extras/packaging/gnu-linux/guix/guix-pack-deb.postinst
endef

But noticed that --with-source and --with-patch were not effective for
the jami-with-certs customized package provided by the
guix-pack-manifest.scm manifest.

It seems to me that the rewriting options should be honored on any
packages being manipulated, whether they come from the Guix collection,
a file, a manifest or another means.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 21 Feb 2023 14:49
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 61676@debbugs.gnu.org)
87r0uid474.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (16 lines)
> I was trying to simplify the Jami packaging tooling using the latest
> recursive '--with-source' transformation, like so (in a Makefile):
>
> define guix-pack-command
> guix pack -C xz -f deb -f extras/packaging/gnu-linux/guix/guix-pack-manifest.scm -v3 \
> --with-source=libjami@$(RELEASE_VERSION)=$(RELEASE_TARBALL_FILENAME) \
> --with-patch=libjami=extras/packaging/gnu-linux/guix/patches/jami-disable-integration-tests.patch \
> --with-source=jami@$(RELEASE_VERSION)=$(RELEASE_TARBALL_FILENAME) \
> -S /usr/bin/jami=bin/jami \
> -S /usr/share/applications/jami.desktop=share/applications/jami.desktop \
> -S /usr/share/icons/hicolor/scalable/apps/jami.svg=share/icons/hicolor/scalable/apps/jami.svg \
> -S /usr/share/icons/hicolor/48x48/apps/jami.png=share/icons/hicolor/48x48/apps/jami.png \
> -S /usr/share/metainfo/jami.appdata.xml=share/metainfo/jami.appdata.xml \
> --postinst-file=extras/packaging/gnu-linux/guix/guix-pack-deb.postinst
> endef

Interesting! :-)

Toggle quote (4 lines)
> But noticed that --with-source and --with-patch were not effective for
> the jami-with-certs customized package provided by the
> guix-pack-manifest.scm manifest.

Indeed, that’s expected.

Toggle quote (4 lines)
> It seems to me that the rewriting options should be honored on any
> packages being manipulated, whether they come from the Guix collection,
> a file, a manifest or another means.

I’m not convinced; I think manifests should be interpreted literally.

Incidentally, changing that would likely break existing workflows…

Ludo’.
M
M
Maxim Cournoyer wrote on 21 Feb 2023 17:20
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 61676@debbugs.gnu.org)
87v8juebrb.fsf@gmail.com
Hi Ludo!

Ludovic Courtès <ludo@gnu.org> writes:

[...]

Toggle quote (12 lines)
>> But noticed that --with-source and --with-patch were not effective for
>> the jami-with-certs customized package provided by the
>> guix-pack-manifest.scm manifest.
>
> Indeed, that’s expected.
>
>> It seems to me that the rewriting options should be honored on any
>> packages being manipulated, whether they come from the Guix collection,
>> a file, a manifest or another means.
>
> I’m not convinced; I think manifests should be interpreted literally.

Perhaps I do not have the full picture in my head, but if someone calls
'guix pack -m my-manifest.scm
--with-source=some-package=the-source.tar.gz', it'd seem the
--with-source option pretty useless in this case if it doesn't touch the
manifest's packages graph. It'd rather it error out with a message
like: "package rewriting options have no effects for manifests",
although I'd rather it was possible.

Is there another alternative for the use case I'm after? The only other
option available seems to be to extend the GUIX_PACKAGE_PATH with a
module and to use -e '(@@ (my module) jami-with-certs)'; would the
jami-with-certs graph get rewritten then?

I also got bit by #61684, which muddied the waters some more :-)

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 22 Feb 2023 01:23
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 61676@debbugs.gnu.org)
87edqi9hp0.fsf@gnu.org
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (29 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> But noticed that --with-source and --with-patch were not effective for
>>> the jami-with-certs customized package provided by the
>>> guix-pack-manifest.scm manifest.
>>
>> Indeed, that’s expected.
>>
>>> It seems to me that the rewriting options should be honored on any
>>> packages being manipulated, whether they come from the Guix collection,
>>> a file, a manifest or another means.
>>
>> I’m not convinced; I think manifests should be interpreted literally.
>
> Perhaps I do not have the full picture in my head, but if someone calls
> 'guix pack -m my-manifest.scm
> --with-source=some-package=the-source.tar.gz', it'd seem the
> --with-source option pretty useless in this case if it doesn't touch the
> manifest's packages graph. It'd rather it error out with a message
> like: "package rewriting options have no effects for manifests",
> although I'd rather it was possible.
>
> Is there another alternative for the use case I'm after? The only other
> option available seems to be to extend the GUIX_PACKAGE_PATH with a
> module and to use -e '(@@ (my module) jami-with-certs)'; would the
> jami-with-certs graph get rewritten then?

How about using transformations right into your manifest? Would that
work for you?

There’s a one-to-one mapping from command-line options to
‘options->transformation’ (info "(guix) Defining Package Variants").

Ludo’.
S
S
Simon Tournier wrote on 22 Feb 2023 05:53
(address . 61676@debbugs.gnu.org)
868rgpu7pp.fsf@gmail.com
Hi,

On Wed, 22 Feb 2023 at 10:23, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (3 lines)
> How about using transformations right into your manifest? Would that
> work for you?

Maxim reported a related issue [1]:

bug#61684: can't compose 'with-patch' with 'with-source'


Cheers,
simon
M
M
Maxim Cournoyer wrote on 22 Feb 2023 10:36
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87v8jtim3s.fsf@gmail.com
Hi Simon and Ludovic,

Simon Tournier <zimon.toutoune@gmail.com> writes:

Toggle quote (13 lines)
> Hi,
>
> On Wed, 22 Feb 2023 at 10:23, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> How about using transformations right into your manifest? Would that
>> work for you?
>
> Maxim reported a related issue [1]:
>
> bug#61684: can't compose 'with-patch' with 'with-source'
>
> 1: <http://issues.guix.gnu.org/msgid/87mt56gac6.fsf@gmail.com>

Yes, that's the one impeding what I'd like to do in the manifest I use;
see
for some of the issues encountered in an actual use case.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 1 Mar 2023 07:53
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 61676@debbugs.gnu.org)
87edq8bh9f.fsf@gnu.org
Hi,

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (2 lines)
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

[...]

Toggle quote (8 lines)
>> It seems to me that the rewriting options should be honored on any
>> packages being manipulated, whether they come from the Guix collection,
>> a file, a manifest or another means.
>
> I’m not convinced; I think manifests should be interpreted literally.
>
> Incidentally, changing that would likely break existing workflows…

Consequently, my inclination would be to close this issue as “wontfix”.

WDYT?

Ludo’.
M
M
Maxim Cournoyer wrote on 1 Mar 2023 09:01
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 61676-done@debbugs.gnu.org)
87cz5sh0ce.fsf@gmail.com
Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (20 lines)
> Hi,
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
> [...]
>
>>> It seems to me that the rewriting options should be honored on any
>>> packages being manipulated, whether they come from the Guix collection,
>>> a file, a manifest or another means.
>>
>> I’m not convinced; I think manifests should be interpreted literally.
>>
>> Incidentally, changing that would likely break existing workflows…
>
> Consequently, my inclination would be to close this issue as “wontfix”.
>
> WDYT?

Sounds reasonable; we can focus our energy on trying to improve #61684 instead.

--
Thanks,
Maxim
Closed
L
L
Ludovic Courtès wrote on 3 Mar 2023 02:54
control message for bug #61676
(address . control@debbugs.gnu.org)
87jzzyxfye.fsf@gnu.org
tags 61676 + wontfix
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 61676@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 61676
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch