diff options
| author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2025-10-07 16:46:13 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-13 18:01:03 +0100 |
| commit | 47941252215ffb46a24ed820dd6e94d9c1f6bafe (patch) | |
| tree | c10f3f2579ad9f39cf8b6c8507e18dd36ecf8c4e /meta | |
| parent | 7a43a4a82ded59edabb8aaf5b4dceb669f04515f (diff) | |
| download | poky-47941252215ffb46a24ed820dd6e94d9c1f6bafe.tar.gz | |
gawk: disable persistent memory allocator due to licensing
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 AGPL3 which some entities perfer to avoid. Force people to knowingly
opt into using this feature and license using:
PACKAGECONFIG:append:pn-gawk = " pma-if-64bit"
where pma is an abbreviation for persistent memory allocator and the
"-if-64bit" suffix is a indicator to users that the feature only works
for 64 bit targets. Also add AGPL to LICENSE and LICENSE:${PN}, when using pma.
Correct the license to be AGPL-3.0-or-later. There hasn't been a change in
the license terms, at least for main.c, haven't changed significantly in
the last 15 years:
License-Update: Reflects conditional AGPL use and more 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 qemu[arm|x86] where the
--enable-pma is ignored because there is a requirement and build-time test
for 8 byte void pointers in m4/pma.m4:
if test "$SKIP_PERSIST_MALLOC" = no && test $ac_cv_sizeof_void_p -eq 8
Finally, remove an old comment about GPLv2, GPLv3 versions of gawk
since this is no longer important as the GPLv2 version is not maintained.
(From OE-Core rev: d7b6887dfbe2817ceb03d44a59210f65bbb25390)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-extended/gawk/gawk_5.3.2.bb | 15 |
1 files changed, 11 insertions, 4 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..0448d90ba7 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/" | |||
| 6 | BUGTRACKER = "bug-gawk@gnu.org" | 6 | BUGTRACKER = "bug-gawk@gnu.org" |
| 7 | SECTION = "console/utils" | 7 | SECTION = "console/utils" |
| 8 | 8 | ||
| 9 | # gawk <= 3.1.5: GPL-2.0-only | 9 | LICENSE = "GPL-3.0-or-later & AGPL-3.0-or-later" |
| 10 | # gawk >= 3.1.6: GPL-3.0-only | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
| 11 | LICENSE = "GPL-3.0-only" | 11 | file://support/pma.c;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19 \ |
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | 12 | file://support/pma.h;md5=bb0026ee5e8b950e67d670dd2d60cc93;beginline=8;endline=19" |
| 13 | |||
| 14 | LICENSE:${PN} = "GPL-3.0-or-later" | ||
| 15 | LICENSE:${PN}:append = " ${@bb.utils.contains('PACKAGECONFIG', 'pma-if-64bit', ' & AGPL-3.0-or-later', '', d)}" | ||
| 13 | 16 | ||
| 14 | PACKAGECONFIG ??= "readline mpfr" | 17 | PACKAGECONFIG ??= "readline mpfr" |
| 15 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" | 18 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
| 16 | PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" | 19 | PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" |
| 20 | # pma: persistent memory allocator: | ||
| 21 | # Disabled by default due to AGPL license. | ||
| 22 | # Note that PMA works only for 64-bit targets and is automatically disabled at configure time otherwise. | ||
| 23 | PACKAGECONFIG[pma-if-64bit] = "--enable-pma,--disable-pma, " | ||
| 17 | 24 | ||
| 18 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ | 25 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ |
| 19 | file://run-ptest \ | 26 | file://run-ptest \ |
