* [PATCH v3] gawk: disable persistent memory allocator due to licensing
@ 2025-09-23 0:52 Randy.MacLeod
2025-09-23 8:14 ` [OE-core] " Alexander Kanavin
0 siblings, 1 reply; 4+ messages in thread
From: Randy.MacLeod @ 2025-09-23 0:52 UTC (permalink / raw)
To: openembedded-core
From: Randy MacLeod <Randy.MacLeod@windriver.com>
In gawk-5.2, a feature that allows gawk to preserve memory between runs:
https://www.gnu.org/software/gawk/manual/html_node/Persistent-Memory.html
was added. The files that implement this, support/pma.[ch], are licensed
under the AGPL which some entities perfer to avoid. Force people to knowingly
opt into using this feature and license using:
PACKAGECONFIG:append:pn-gawk = " pma"
where pma is an abbreviation for persistent memory allocator. Also add AGPL
to LICENSE if using pma.
License-Update: Reflects conditional AGPL use as described above.
Testing requires a non-root account and following the example in the link above:
$ truncate -s <size> data.pma
$ chmod 0600 data.pma
$ GAWK_PERSIST_FILE=data.pma gawk 'BEGIN { print ++i }'
1
$ GAWK_PERSIST_FILE=data.pma gawk 'BEGIN { print ++i }'
2
$ GAWK_PERSIST_FILE=data.pma gawk 'BEGIN { print ++i }'
3
This works on qemu[x86-|arm|riscv]64 but not on qemuarm where the
--enable-pma is ignored for unknown reasons.
Finally, remove an old comment about GPLv2, GPLv3 versions of gawk
since this is no longer important as the GPLv2 version is not maintained.
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
meta/recipes-extended/gawk/gawk_5.3.2.bb | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-extended/gawk/gawk_5.3.2.bb b/meta/recipes-extended/gawk/gawk_5.3.2.bb
index 833fe78bf9..b4b7419c34 100644
--- a/meta/recipes-extended/gawk/gawk_5.3.2.bb
+++ b/meta/recipes-extended/gawk/gawk_5.3.2.bb
@@ -6,14 +6,21 @@ HOMEPAGE = "https://www.gnu.org/software/gawk/"
BUGTRACKER = "bug-gawk@gnu.org"
SECTION = "console/utils"
-# gawk <= 3.1.5: GPL-2.0-only
-# gawk >= 3.1.6: GPL-3.0-only
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+# pma adds AGPL license
+LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', ' & AGPL-3.0-or-later', '', d)}"
+LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', \
+ 'file://support/pma.c;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19 \
+ file://support/pma.h;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19', '', d) \
+}"
+
PACKAGECONFIG ??= "readline mpfr"
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+# pma: persistent memory allocator: off by default due to licensing.
+PACKAGECONFIG[pma] = "--enable-pma,--disable-pma, "
SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
file://run-ptest \
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [OE-core] [PATCH v3] gawk: disable persistent memory allocator due to licensing
2025-09-23 0:52 [PATCH v3] gawk: disable persistent memory allocator due to licensing Randy.MacLeod
@ 2025-09-23 8:14 ` Alexander Kanavin
2025-09-23 13:08 ` Randy MacLeod
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Kanavin @ 2025-09-23 8:14 UTC (permalink / raw)
To: randy.macleod; +Cc: openembedded-core
On Tue, 23 Sept 2025 at 02:52, Randy MacLeod via
lists.openembedded.org
<randy.macleod=windriver.com@lists.openembedded.org> wrote:
> +# pma adds AGPL license
> +LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', ' & AGPL-3.0-or-later', '', d)}"
> +LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', \
> + 'file://support/pma.c;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19 \
> + file://support/pma.h;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19', '', d) \
> +}"
This is incorrect, and has already been discussed in a similar patch.
LICENSE is for the source code license, and should be set
unconditionally regardless of whether pma is enabled. Then you can set
licenses for particular binary packages subject to whether pma is
enabled or not.
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [OE-core] [PATCH v3] gawk: disable persistent memory allocator due to licensing
2025-09-23 8:14 ` [OE-core] " Alexander Kanavin
@ 2025-09-23 13:08 ` Randy MacLeod
2025-09-23 13:17 ` Alexander Kanavin
0 siblings, 1 reply; 4+ messages in thread
From: Randy MacLeod @ 2025-09-23 13:08 UTC (permalink / raw)
To: Alexander Kanavin
Cc: openembedded-core, Ross Burton, Yang, Liezhi, Peter Kjellerstedt
[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]
On 2025-09-23 4:14 a.m., Alexander Kanavin wrote:
> On Tue, 23 Sept 2025 at 02:52, Randy MacLeod via
> lists.openembedded.org
> <randy.macleod=windriver.com@lists.openembedded.org> wrote:
>> +# pma adds AGPL license
>> +LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', ' & AGPL-3.0-or-later', '', d)}"
>> +LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', \
>> + 'file://support/pma.c;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19 \
>> +file://support/pma.h;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19', '', d) \
>> +}"
> This is incorrect, and has already been discussed in a similar patch.
Ah, I had missed Robert's email since I wasn't CCed:
https://lore.kernel.org/openembedded-core/cover.1758264088.git.liezhi.yang@windriver.com/
> LICENSE is for the source code license, and should be set
> unconditionally regardless of whether pma is enabled. Then you can set
> licenses for particular binary packages subject to whether pma is
> enabled or not.
I don't think that rule/guideline applies here since pma.o is added or
excluded from
being linked with the main gawk binary based on the outcome of configure.
That's now determined by what PACKAGECONFIG is set, so one or both
licenses applies to the gawk binary.
There is no separate binary produced using uses pma.o unlike the cairo
case that
Do we really want:
LICENSE = "GPL-3.0-or-later & AGPL-3.0-or-later"
LICENSE:${PN} = "GPL-3.0-or-later"
LICENSE${PN}:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', ' &
AGPL-3.0-or-later', '', d)}"
?
../Randy
>
> Alex
--
# Randy MacLeod
# Wind River Linux
[-- Attachment #2: Type: text/html, Size: 3326 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [OE-core] [PATCH v3] gawk: disable persistent memory allocator due to licensing
2025-09-23 13:08 ` Randy MacLeod
@ 2025-09-23 13:17 ` Alexander Kanavin
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2025-09-23 13:17 UTC (permalink / raw)
To: randy.macleod
Cc: openembedded-core, Ross Burton, Yang, Liezhi, Peter Kjellerstedt
On Tue, 23 Sept 2025 at 15:08, Randy MacLeod via
lists.openembedded.org
<randy.macleod=windriver.com@lists.openembedded.org> wrote:
> I don't think that rule/guideline applies here since pma.o is added or excluded from
> being linked with the main gawk binary based on the outcome of configure.
> That's now determined by what PACKAGECONFIG is set, so one or both licenses applies to the gawk binary.
> There is no separate binary produced using uses pma.o unlike the cairo case that
Neverthless, LICENSE is supposed to cover everything in the source
tree, regardless of build time choices. There are a few recipes that
violate this, they should be fixed as well.
> Do we really want:
> LICENSE = "GPL-3.0-or-later & AGPL-3.0-or-later"
> LICENSE:${PN} = "GPL-3.0-or-later"
> LICENSE${PN}:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma', ' & AGPL-3.0-or-later', '', d)}"
>
> ?
Yes please.
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-23 13:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 0:52 [PATCH v3] gawk: disable persistent memory allocator due to licensing Randy.MacLeod
2025-09-23 8:14 ` [OE-core] " Alexander Kanavin
2025-09-23 13:08 ` Randy MacLeod
2025-09-23 13:17 ` Alexander Kanavin
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.