Acknowledgement sent
to Dariqq <dariqq@posteo.net>:
New bug report received and forwarded. Copy sent to pelzflorian@pelzflorian.de, ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org.
(Wed, 04 Sep 2024 16:28:02 GMT) (full text, mbox, link).
Subject: [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Wed, 4 Sep 2024 16:26:00 +0000
Followup to 220546810830422f8ec3e6a4145fec85429914a1.
* doc/guix.texi (meson-build-system): Document #:out-of-source? parameter.
Change-Id: I730e1aef15010006a68710f8e46ce75dc50e6c67
---
doc/guix.texi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 16c697586a..2302e0f15c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10146,6 +10146,10 @@ Build Systems
of inputs, and they can be changed with the parameters @code{#:meson}
and @code{#:ninja} if needed.
+As Meson only supports out-of-source builds the @code{#:out-of-source?}
+parameter specifies whether to search for license files in the source
+or build directory.
+
This build system is an extension of @code{gnu-build-system}, but with the
following phases changed to some specific for Meson:
base-commit: 9a03ab25ba889be27b34d5cebea05d5ac3b0a033
--
2.45.2
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Wed, 11 Sep 2024 06:11:01 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Wed, 11 Sep 2024 15:09:10 +0900
Hi Dariqq,
Dariqq <dariqq@posteo.net> writes:
> Followup to 220546810830422f8ec3e6a4145fec85429914a1.
>
> * doc/guix.texi (meson-build-system): Document #:out-of-source? parameter.
>
> Change-Id: I730e1aef15010006a68710f8e46ce75dc50e6c67
> ---
> doc/guix.texi | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 16c697586a..2302e0f15c 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -10146,6 +10146,10 @@ Build Systems
> of inputs, and they can be changed with the parameters @code{#:meson}
> and @code{#:ninja} if needed.
>
> +As Meson only supports out-of-source builds the @code{#:out-of-source?}
> +parameter specifies whether to search for license files in the source
> +or build directory.
> +
That strikes me as odd; is it useful in practice? Otherwise I'd rather
we keep it undocumented, so that it can be removed without notice in a
future cleanup (in a 'private API' way).
--
Thanks,
Maxim
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Wed, 11 Sep 2024 15:19:02 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Wed, 11 Sep 2024 15:18:34 +0000
Hi Maxim,
On 11.09.24 08:09, Maxim Cournoyer wrote:
> Hi Dariqq,
>
> Dariqq <dariqq@posteo.net> writes:
>
>
> That strikes me as odd; is it useful in practice? Otherwise I'd rather
> we keep it undocumented, so that it can be removed without notice in a
> future cleanup (in a 'private API' way).
>
Ludovic asked me to document the new parameter, so I added something for
the current behaviour.
Because I don't think the message arrived at the original issue, i
copied below. I hope this is ok:
> On 04.09.24 16:02, Ludovic Courtès wrote:
> AFAICS these changes are not sufficient because ‘configure’ in
> meson-build-system.scm does not honor #:out-of-source? (unlike
> ‘configure’ in gnu-build-system.scm).
>
> So if I’m not mistaken, you’ll need to change ‘configure’ as well.
>
> You can also update doc/guix.texi under “Build Systems” to mention this
> parameter.
>
> Last: ‘guix refresh -l meson’ shows that this is almost a world-rebuild
> change (23K dependents), so we’ll need to have this change in a separate
> branch.
>
> Could you send an updated patch?
>
> Thanks,
> Ludo’.
I have sent this patch for the documentation part but am still unsure
what is meant by *sufficient* because meson cannot do in source builds.
Maybe it should not be an option at all and instead be #t
unconditionally in 'install-license-files phase in meson-build-system?
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Thu, 12 Sep 2024 00:58:01 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Thu, 12 Sep 2024 09:56:20 +0900
Hi Dariqq,
Dariqq <dariqq@posteo.net> writes:
> Hi Maxim,
>
>
> On 11.09.24 08:09, Maxim Cournoyer wrote:
>> Hi Dariqq,
>> Dariqq <dariqq@posteo.net> writes:
>> That strikes me as odd; is it useful in practice? Otherwise I'd
>> rather
>> we keep it undocumented, so that it can be removed without notice in a
>> future cleanup (in a 'private API' way).
>>
>
> Ludovic asked me to document the new parameter, so I added something
> for the current behaviour.
>
> Because I don't think the message arrived at the original issue, i
> copied below. I hope this is ok:
>
>> On 04.09.24 16:02, Ludovic Courtès wrote:
>> AFAICS these changes are not sufficient because ‘configure’ in
>> meson-build-system.scm does not honor #:out-of-source? (unlike
>> ‘configure’ in gnu-build-system.scm).
>> So if I’m not mistaken, you’ll need to change ‘configure’ as well.
>> You can also update doc/guix.texi under “Build Systems” to mention
>> this
>> parameter.
>> Last: ‘guix refresh -l meson’ shows that this is almost a
>> world-rebuild
>> change (23K dependents), so we’ll need to have this change in a separate
>> branch.
>> Could you send an updated patch?
>> Thanks,
>> Ludo’.
>
> I have sent this patch for the documentation part but am still unsure
> what is meant by *sufficient* because meson cannot do in source
> builds.
I'm still out of context; is there an original bug number to refer to to
better understand what was the root problem being addressed?
> Maybe it should not be an option at all and instead be #t
> unconditionally in 'install-license-files phase in meson-build-system?
Given most build phases of the gnu-build-system, which support
#:out-of-source? are reused in the meson-build-system, this argument
needs to be set to #t (which it currently is). But perhaps there's a
way to hide it from the users, perhaps via the 'private-keywords'
variable defined in the 'lower' procedure of the (guix build-system
meson) module (I haven't tested).
--
Thanks,
Maxim
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Thu, 12 Sep 2024 07:14:01 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Thu, 12 Sep 2024 07:12:22 +0000
Hi,
On 12.09.24 02:56, Maxim Cournoyer wrote:
> Hi Dariqq,
>
> Dariqq <dariqq@posteo.net> writes:
>
>> Hi Maxim,
>>
>>
>> On 11.09.24 08:09, Maxim Cournoyer wrote:
>>> Hi Dariqq,
>>> Dariqq <dariqq@posteo.net> writes:
>>> That strikes me as odd; is it useful in practice? Otherwise I'd
>>> rather
>>> we keep it undocumented, so that it can be removed without notice in a
>>> future cleanup (in a 'private API' way).
>>>
>>
>> Ludovic asked me to document the new parameter, so I added something
>> for the current behaviour.
>>
>> Because I don't think the message arrived at the original issue, i
>> copied below. I hope this is ok:
>>
>>> On 04.09.24 16:02, Ludovic Courtès wrote:
>>> AFAICS these changes are not sufficient because ‘configure’ in
>>> meson-build-system.scm does not honor #:out-of-source? (unlike
>>> ‘configure’ in gnu-build-system.scm).
>>> So if I’m not mistaken, you’ll need to change ‘configure’ as well.
>>> You can also update doc/guix.texi under “Build Systems” to mention
>>> this
>>> parameter.
>>> Last: ‘guix refresh -l meson’ shows that this is almost a
>>> world-rebuild
>>> change (23K dependents), so we’ll need to have this change in a separate
>>> branch.
>>> Could you send an updated patch?
>>> Thanks,
>>> Ludo’.
>>
>> I have sent this patch for the documentation part but am still unsure
>> what is meant by *sufficient* because meson cannot do in source
>> builds.
>
> I'm still out of context; is there an original bug number to refer to to
> better understand what was the root problem being addressed?
>
Sorry I should have added that. The problem I was trying to solve is
https://issues.guix.gnu.org/70999.
TLDR is that meson-build-system was failing to find and install license
files for many packages because it would search for licenses in the
build directory rather than the source directory. (which might be
against the terms of the license)
>> Maybe it should not be an option at all and instead be #t
>> unconditionally in 'install-license-files phase in meson-build-system?
>
> Given most build phases of the gnu-build-system, which support
> #:out-of-source? are reused in the meson-build-system, this argument
> needs to be set to #t (which it currently is). But perhaps there's a
> way to hide it from the users, perhaps via the 'private-keywords'
> variable defined in the 'lower' procedure of the (guix build-system
> meson) module (I haven't tested).
>
Something like that might be a better solution. I am not sure how these
'private-keywords' work: It looks like #:meson is one but you can
definitly override the default meson being used. Also the
private-arguments seem to get stripped from the arguments in the bag
(not sure what that is exactly) so they might not be passed to the build
phases
Would such a change require rebuilding (basically) everything given that
currently all packages are already built with #:out-of-source? set to
the default value #t?
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Thu, 12 Sep 2024 12:04:02 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Thu, 12 Sep 2024 21:02:19 +0900
Hi Dariqq,
Dariqq <dariqq@posteo.net> writes:
[...]
>>> Maybe it should not be an option at all and instead be #t
>>> unconditionally in 'install-license-files phase in meson-build-system?
>> Given most build phases of the gnu-build-system, which support
>> #:out-of-source? are reused in the meson-build-system, this argument
>> needs to be set to #t (which it currently is). But perhaps there's a
>> way to hide it from the users, perhaps via the 'private-keywords'
>> variable defined in the 'lower' procedure of the (guix build-system
>> meson) module (I haven't tested).
>>
>
> Something like that might be a better solution. I am not sure how
> these 'private-keywords' work: It looks like #:meson is one but you
> can definitly override the default meson being used. Also the
> private-arguments seem to get stripped from the arguments in the bag
> (not sure what that is exactly) so they might not be passed to the
> build phases
I think your understanding is correct. The private options are accepted
on the build system, but not propagated to the lower build strata
(applied to phases). So what we'd like here is to *not* expose an
#:out-of-source argument at the build system level, and enforce
#:out-of-source #t for the lower build code. I guess the static #t
argument could be added to the bag arguments.
>
> Would such a change require rebuilding (basically) everything given
> that currently all packages are already built with #:out-of-source?
> set to the default value #t?
Yes. To test this kind of change without having to wait for the world
to rebuild first, I sometimes make a copy of the build system files and
suffix them with -v2 or something. It's a bit of a pain, but faster than
waiting for 20k packages to be built.
--
Thanks,
Maxim
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Thu, 12 Sep 2024 19:20:02 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Thu, 12 Sep 2024 19:19:02 +0000
On 12.09.24 14:02, Maxim Cournoyer wrote:
> Hi Dariqq,
>
> Dariqq <dariqq@posteo.net> writes:
>
> [...]
>
>>>> Maybe it should not be an option at all and instead be #t
>>>> unconditionally in 'install-license-files phase in meson-build-system?
>>> Given most build phases of the gnu-build-system, which support
>>> #:out-of-source? are reused in the meson-build-system, this argument
>>> needs to be set to #t (which it currently is). But perhaps there's a
>>> way to hide it from the users, perhaps via the 'private-keywords'
>>> variable defined in the 'lower' procedure of the (guix build-system
>>> meson) module (I haven't tested).
>>>
>>
>> Something like that might be a better solution. I am not sure how
>> these 'private-keywords' work: It looks like #:meson is one but you
>> can definitly override the default meson being used. Also the
>> private-arguments seem to get stripped from the arguments in the bag
>> (not sure what that is exactly) so they might not be passed to the
>> build phases
>
> I think your understanding is correct. The private options are accepted
> on the build system, but not propagated to the lower build strata
> (applied to phases). So what we'd like here is to *not* expose an
> #:out-of-source argument at the build system level, and enforce
> #:out-of-source #t for the lower build code. I guess the static #t
> argument could be added to the bag arguments.
>
This does not work. I tried adding that to the arguments in the bag (and
reverting the previous patch) but get an error:
Unrecognized keyword: #:out-of-source?
I guess this is because meson-(cross-)build now get a keyword they don't
know.
Maybe we could replace the install-license-files function with a version
that has #:out-of-source? set to #t?. Not sure if there is an elegant
way to do this?
>>
>> Would such a change require rebuilding (basically) everything given
>> that currently all packages are already built with #:out-of-source?
>> set to the default value #t?
>
> Yes. To test this kind of change without having to wait for the world
> to rebuild first, I sometimes make a copy of the build system files and
> suffix them with -v2 or something. It's a bit of a pain, but faster than
> waiting for 20k packages to be built.
>
Previously i have been using the tio package for testing because it had
no other dependencies depending on meson. However since it got upgraded
it now depends on glib ...
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Sat, 14 Sep 2024 13:43:02 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Sat, 14 Sep 2024 22:41:16 +0900
Hi Dariqq,
Dariqq <dariqq@posteo.net> writes:
> On 12.09.24 14:02, Maxim Cournoyer wrote:
>> Hi Dariqq,
>> Dariqq <dariqq@posteo.net> writes:
>> [...]
>>
>>>>> Maybe it should not be an option at all and instead be #t
>>>>> unconditionally in 'install-license-files phase in meson-build-system?
>>>> Given most build phases of the gnu-build-system, which support
>>>> #:out-of-source? are reused in the meson-build-system, this argument
>>>> needs to be set to #t (which it currently is). But perhaps there's a
>>>> way to hide it from the users, perhaps via the 'private-keywords'
>>>> variable defined in the 'lower' procedure of the (guix build-system
>>>> meson) module (I haven't tested).
>>>>
>>>
>>> Something like that might be a better solution. I am not sure how
>>> these 'private-keywords' work: It looks like #:meson is one but you
>>> can definitly override the default meson being used. Also the
>>> private-arguments seem to get stripped from the arguments in the bag
>>> (not sure what that is exactly) so they might not be passed to the
>>> build phases
>> I think your understanding is correct. The private options are
>> accepted
>> on the build system, but not propagated to the lower build strata
>> (applied to phases). So what we'd like here is to *not* expose an
>> #:out-of-source argument at the build system level, and enforce
>> #:out-of-source #t for the lower build code. I guess the static #t
>> argument could be added to the bag arguments.
>>
>
> This does not work. I tried adding that to the arguments in the bag
> (and reverting the previous patch) but get an error:
>
> Unrecognized keyword: #:out-of-source?
>
> I guess this is because meson-(cross-)build now get a keyword they
> don't know.
Hm. Thanks for trying it out.
> Maybe we could replace the install-license-files function with a
> version that has #:out-of-source? set to #t?. Not sure if there is an
> elegant way to do this?
Is this really the only reused phase from gnu-build-system that makes
use of #:out-of-source? I'd expect the 'configure' to be one, also.
And in general it'd be a bit more risky; new gnu-build-system phases
that would make use of #:out-of-source could start breaking in the
future until thye are specially handled.
--
Thanks,
Maxim
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Thu, 19 Sep 2024 14:09:02 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Thu, 19 Sep 2024 14:07:10 +0000
On 14.09.24 15:41, Maxim Cournoyer wrote:
> Hi Dariqq,
>
> Dariqq <dariqq@posteo.net> writes:
>
>>
>> This does not work. I tried adding that to the arguments in the bag
>> (and reverting the previous patch) but get an error:
>>
>> Unrecognized keyword: #:out-of-source?
>>
>> I guess this is because meson-(cross-)build now get a keyword they
>> don't know.
>
> Hm. Thanks for trying it out.
>
Not an expert on how this works but it looks like when a phase has a
keyword that is not being passed in by the build-system it is treated as
#f even if there is no default parameter specified in
install-license-files function itself.
If there is no easy other way what about leaving the parameter
undocumented as is? Maybe Ludo can elaborate on what the original
concern was?
>> Maybe we could replace the install-license-files function with a
>> version that has #:out-of-source? set to #t?. Not sure if there is an
>> elegant way to do this?
>
> Is this really the only reused phase from gnu-build-system that makes
> use of #:out-of-source? I'd expect the 'configure' to be one, also.
> And in general it'd be a bit more risky; new gnu-build-system phases
> that would make use of #:out-of-source could start breaking in the
> future until thye are specially handled.
>
As far as I can see only the configure phase and the
install-license-phase in gnu-build-system use that parameter. As meson
overwrites configure with its own it only the install-license-files
phase uses it.
Information forwarded
to guix-patches@gnu.org: bug#73028; Package guix-patches.
(Sun, 22 Sep 2024 06:00:02 GMT) (full text, mbox, link).
Subject: Re: [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for
meson-build-system.
Date: Sun, 22 Sep 2024 14:57:58 +0900
Hi Dariqq,
Dariqq <dariqq@posteo.net> writes:
> On 14.09.24 15:41, Maxim Cournoyer wrote:
>> Hi Dariqq,
>> Dariqq <dariqq@posteo.net> writes:
>>
>>>
>>> This does not work. I tried adding that to the arguments in the bag
>>> (and reverting the previous patch) but get an error:
>>>
>>> Unrecognized keyword: #:out-of-source?
>>>
>>> I guess this is because meson-(cross-)build now get a keyword they
>>> don't know.
>> Hm. Thanks for trying it out.
>>
> Not an expert on how this works but it looks like when a phase has a
> keyword that is not being passed in by the build-system it is treated
> as #f even if there is no default parameter specified in
> install-license-files function itself.
>
> If there is no easy other way what about leaving the parameter
> undocumented as is? Maybe Ludo can elaborate on what the original
> concern was?
Unless someone is able to explain what the use case is for its behavior,
I think that's what I would do. It's easy and we don't have to commit to
preserving that behavior forever if it doesn't have an actual use.
--
Thanks,
Maxim
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.