Skip to contentSkip to conversation

gawk: Append AGPL-3.0-or-later to LICENSE when pma is enabled

PATCH In review [email protected] 3 participants 5 messages Sep 19, 2025 – Sep 21, 2025

lore
Share & tools
lore
#0 lore raw

cover gawk: Append AGPL-3.0-or-later to LICENSE when pma is enabled

From: Robert Yang <[email protected]>

The support/pma.c and support/pma.h's license is AGPL-3.0-or-later, this patch disables pma by default, and append AGPL-3.0-or-later to LICENSE when pma is enabled, and print a warning for that.

The other option is removing support/pma.c and support/pma.h directly, I'm not sure which is better, please feel free to give your comments.

The scarthgap and walnascar branch also has this problem, we need backport it after master branch is fixed.

// Robert

The following changes since commit fbe5f76ba6af0983cd90a05d4077e453e2ebb475:

expat: upgrade to 2.7.2 (2025-09-18 11:08:20 +0100)

are available in the Git repository at:

https://github.com/robertlinux/yocto rbt/gawk
https://github.com/robertlinux/yocto/tree/rbt/gawk

Robert Yang (1):
gawk: Append AGPL-3.0-or-later to LICENSE when pma is enabled

 meta/recipes-extended/gawk/gawk_5.3.2.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/1 gawk: Append AGPL-3.0-or-later to LICENSE when pma is enabled

From: Robert Yang <[email protected]>

The support/pma.c and support/pma.h's license is AGPL-3.0-or-later, this patch disables pma by default, and append AGPL-3.0-or-later to LICENSE when pma is enabled, and print a warning for that.

---
 meta/recipes-extended/gawk/gawk_5.3.2.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
meta/recipes-extended/gawk/gawk_5.3.2.bb +12 -2
index 833fe78bf9a..75fce0c08a6 100644
@@ -6,14 +6,14 @@ HOMEPAGE = "https://www.gnu.org/software/gawk/"
 BUGTRACKER  = "[email protected]"
 SECTION = "console/utils"
 
-# gawk <= 3.1.5: GPL-2.0-only
-# gawk >= 3.1.6: GPL-3.0-only
+# The LICENSE will be "GPL-3.0-only & AGPL-3.0-or-later" when pma is enabled.
 LICENSE = "GPL-3.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 PACKAGECONFIG ??= "readline mpfr"
 PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
 PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+PACKAGECONFIG[pma] = ",--disable-pma"
 
 SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
            file://run-ptest \
@@ -34,6 +34,16 @@ ALTERNATIVE:${PN} = "awk"
 ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
 ALTERNATIVE_PRIORITY = "100"
 
+python() {
+    packageconfig = (d.getVar('PACKAGECONFIG') or '').split()
+    # The support/pma.c and support/pma.h's license is AGPL-3.0-or-later
+    if 'pma' in packageconfig:
+        bb.warn("Appending AGPL-3.0-or-later to LICENSE since pma is enabled")
+        d.appendVar('LICENSE', ' & AGPL-3.0-or-later')
+        d.appendVar('LIC_FILES_CHKSUM', ' file://support/pma.h;endline=21;md5=32bd750ee5aa5cbcf7978c1be6462b8a \
+                    file://support/pma.c;endline=28;md5=a3f33ec236ab96537cdfd1dcda270c75')
+}
+
 do_install:append() {
 	# remove the link since we don't package it
 	rm ${D}${bindir}/awk
Signature · 1 line
2.49.0
#2 lore raw
Quoted 4 lines · Robert Yang via lists.openembedded.org

PACKAGECONFIG ??= "readline mpfr"
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+PACKAGECONFIG[pma] = ",--disable-pma"

This needs --enable-pma too, to avoid a floating feature enablement/disablement.

meta/recipes-extended/gawk/gawk_5.3.2.bb ALTERNATIVE:${PN} = "awk" · line 44

Quoted 8 lines
meta/recipes-extended/gawk/gawk_5.3.2.bb +8 -0
+python() {
+    packageconfig = (d.getVar('PACKAGECONFIG') or '').split()
+    # The support/pma.c and support/pma.h's license is AGPL-3.0-or-later
+    if 'pma' in packageconfig:
+        bb.warn("Appending AGPL-3.0-or-later to LICENSE since pma is enabled")
+        d.appendVar('LICENSE', ' & AGPL-3.0-or-later')
+        d.appendVar('LIC_FILES_CHKSUM', ' file://support/pma.h;endline=21;md5=32bd750ee5aa5cbcf7978c1be6462b8a \
+                    file://support/pma.c;endline=28;md5=a3f33ec236ab96537cdfd1dcda270c75')

This should be set unconditionally, as it is specifying source code licenses that apply regardless of build time choices. Then you can set licenses for a particular package(s) to include AGPL or not depending on packageconfig, but I believe that too can be done without resorting to anonymous python.

Alex

#3 lore raw
Quoted 25 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 19 september 2025 12:25
To: [email protected]
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] gawk: Append AGPL-3.0-or-later to LICENSE when pma is enabled

Quoted 4 lines · Robert Yang via lists.openembedded.org

PACKAGECONFIG ??= "readline mpfr"
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+PACKAGECONFIG[pma] = ",--disable-pma"

This needs --enable-pma too, to avoid a floating feature enablement/disablement.

meta/recipes-extended/gawk/gawk_5.3.2.bb ALTERNATIVE:${PN} = "awk" · line 44

Quoted 8 lines
meta/recipes-extended/gawk/gawk_5.3.2.bb +8 -0
+python() {
+    packageconfig = (d.getVar('PACKAGECONFIG') or '').split()
+    # The support/pma.c and support/pma.h's license is AGPL-3.0-or-later
+    if 'pma' in packageconfig:
+        bb.warn("Appending AGPL-3.0-or-later to LICENSE since pma is enabled")
+        d.appendVar('LICENSE', ' & AGPL-3.0-or-later')
+        d.appendVar('LIC_FILES_CHKSUM', ' file://support/pma.h;endline=21;md5=32bd750ee5aa5cbcf7978c1be6462b8a \
+                    file://support/pma.c;endline=28;md5=a3f33ec236ab96537cdfd1dcda270c75')
Quoted 7 lines

This should be set unconditionally, as it is specifying source code licenses that apply regardless of build time choices. Then you can set licenses for a particular package(s) to include AGPL or not depending on packageconfig, but I believe that too can be done without resorting to anonymous python.

Alex

You can find an example of this being done in the cairo recipe.

//Peter

#4 lore raw
Quoted 31 lines · Peter Kjellerstedt
Quoted 31 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 19 september 2025 12:25
To: [email protected]
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 1/1] gawk: Append AGPL-3.0-or-later to LICENSE when pma is enabled

Quoted 4 lines · Robert Yang via lists.openembedded.org

PACKAGECONFIG ??= "readline mpfr"
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+PACKAGECONFIG[pma] = ",--disable-pma"

This needs --enable-pma too, to avoid a floating feature enablement/disablement.

meta/recipes-extended/gawk/gawk_5.3.2.bb ALTERNATIVE:${PN} = "awk" · line 44

Quoted 8 lines
meta/recipes-extended/gawk/gawk_5.3.2.bb +8 -0
+python() {
+    packageconfig = (d.getVar('PACKAGECONFIG') or '').split()
+    # The support/pma.c and support/pma.h's license is AGPL-3.0-or-later
+    if 'pma' in packageconfig:
+        bb.warn("Appending AGPL-3.0-or-later to LICENSE since pma is enabled")
+        d.appendVar('LICENSE', ' & AGPL-3.0-or-later')
+        d.appendVar('LIC_FILES_CHKSUM', ' file://support/pma.h;endline=21;md5=32bd750ee5aa5cbcf7978c1be6462b8a \
+                    file://support/pma.c;endline=28;md5=a3f33ec236ab96537cdfd1dcda270c75')

This should be set unconditionally, as it is specifying source code licenses that apply regardless of build time choices. Then you can set licenses for a particular package(s) to include AGPL or not depending on packageconfig, but I believe that too can be done without resorting to anonymous python.

Quoted 3 lines
Quoted 1 line

Alex

You can find an example of this being done in the cairo recipe.

Thanks Alex and Peter, I will send a V2 for it.

// Robert

Quoted 3 lines

//Peter