unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61676: package transformations not honored working from a manifest
@ 2023-02-21 13:23 Maxim Cournoyer
  2023-02-21 22:49 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2023-02-21 13:23 UTC (permalink / raw)
  To: 61676

Hi Guix,

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

--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-02-21 13:23 bug#61676: package transformations not honored working from a manifest Maxim Cournoyer
@ 2023-02-21 22:49 ` Ludovic Courtès
  2023-02-22  1:20   ` Maxim Cournoyer
  2023-03-01 15:53   ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2023-02-21 22:49 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 61676

Hi,

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

> 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!  :-)

> 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.

Incidentally, changing that would likely break existing workflows…

Ludo’.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-02-21 22:49 ` Ludovic Courtès
@ 2023-02-22  1:20   ` Maxim Cournoyer
  2023-02-22  9:23     ` Ludovic Courtès
  2023-03-01 15:53   ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2023-02-22  1:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 61676

Hi Ludo!

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?

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

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-02-22  1:20   ` Maxim Cournoyer
@ 2023-02-22  9:23     ` Ludovic Courtès
  2023-02-22 13:53       ` Simon Tournier
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2023-02-22  9:23 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 61676

Hello,

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

> 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’.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-02-22  9:23     ` Ludovic Courtès
@ 2023-02-22 13:53       ` Simon Tournier
  2023-02-22 18:36         ` Maxim Cournoyer
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Tournier @ 2023-02-22 13:53 UTC (permalink / raw)
  To: Ludovic Courtès, Maxim Cournoyer; +Cc: 61676

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>

Cheers,
simon




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-02-22 13:53       ` Simon Tournier
@ 2023-02-22 18:36         ` Maxim Cournoyer
  0 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2023-02-22 18:36 UTC (permalink / raw)
  To: Simon Tournier; +Cc: Ludovic Courtès, 61676

Hi Simon and Ludovic,

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

> 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
https://review.jami.net/c/jami-client-qt/+/23978/2/extras/packaging/gnu-linux/guix/guix-pack-manifest.scm
for some of the issues encountered in an actual use case.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-02-21 22:49 ` Ludovic Courtès
  2023-02-22  1:20   ` Maxim Cournoyer
@ 2023-03-01 15:53   ` Ludovic Courtès
  2023-03-01 17:01     ` Maxim Cournoyer
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2023-03-01 15:53 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 61676

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?

Ludo’.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#61676: package transformations not honored working from a manifest
  2023-03-01 15:53   ` Ludovic Courtès
@ 2023-03-01 17:01     ` Maxim Cournoyer
  0 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2023-03-01 17:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 61676-done

Hi Ludovic,

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

> 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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-01 17:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21 13:23 bug#61676: package transformations not honored working from a manifest Maxim Cournoyer
2023-02-21 22:49 ` Ludovic Courtès
2023-02-22  1:20   ` Maxim Cournoyer
2023-02-22  9:23     ` Ludovic Courtès
2023-02-22 13:53       ` Simon Tournier
2023-02-22 18:36         ` Maxim Cournoyer
2023-03-01 15:53   ` Ludovic Courtès
2023-03-01 17:01     ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).