Skip to contentSkip to conversation

lvm2: disable thin provisioning support if GPLv3 incompatible

PATCH In review [email protected] 3 participants 5 messages Sep 21, 2017 – Sep 22, 2017

lore
Share & tools
lore
#0 lore raw

cover lvm2: disable thin provisioning support if GPLv3 incompatible

From: Kai Kang <[email protected]>

Test steps:
1 add layer meta-gplv2 to conf/bblayers.conf
2 echo INCOMPATIBLE_LICENSE += \"GPLv3 LGPLv3 GPLv3+ LGPLv3+ AGPL-3.0\" >> conf/local.conf 3 bitbake lvm2

Without the patch, lvm2 fails with:

ERROR: Nothing RPROVIDES 'thin-provisioning-tools' (but /buildarea2/kkang/Yocto/repo/meta-openembedded/meta-oe /recipes-support/lvm2/lvm2_2.02.171.bb, /buildarea2/kkang/Yocto/repo/meta-openembedded/meta-oe/recipes-support /lvm2/libdevmapper_2.02.171.bb RDEPENDS on or otherwise requires it)
thin-provisioning-tools was skipped: it has an incompatible license: GPLv3
NOTE: Runtime target 'thin-provisioning-tools' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['thin-provisioning-tools']
ERROR: Required build target 'lvm2' has no buildable providers.
Missing or unbuildable dependency chain was: ['lvm2', 'thin-provisioning-tools']

Kai Kang (1):
lvm2: disable thin provisioning support if GPLv3 incompatible

 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 lvm2: disable thin provisioning support if GPLv3 incompatible

From: Kai Kang <[email protected]>

Disable thin provisioning support for lvm2 if it is set GPLv3 incompatible.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2.inc +1 -1
index ab8db9cba..9791554a9 100644
@@ -23,7 +23,7 @@ inherit autotools-brokensep pkgconfig systemd
 LVM2_PACKAGECONFIG = "dmeventd lvmetad"
 LVM2_PACKAGECONFIG_append_class-target = " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
-    thin-provisioning-tools \
+    ${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPLv3', '', 'thin-provisioning-tools', d)} \
     udev \
 "
 
Signature · 1 line
2.14.1
#2 lore raw
Quoted 15 lines · On Wed, Sep 20, 2017 at 11:47 PM, <[email protected]> wrote:

From: Kai Kang <[email protected]>

Disable thin provisioning support for lvm2 if it is set GPLv3 incompatible.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2.inc +0 -0
index ab8db9cba..9791554a9 100644

meta-oe/recipes-support/lvm2/lvm2.inc inherit autotools-brokensep pkgconfig systemd · line 28

Quoted 7 lines
meta-oe/recipes-support/lvm2/lvm2.inc +1 -1
@@ -23,7 +23,7 @@ inherit autotools-brokensep pkgconfig systemd
 LVM2_PACKAGECONFIG = "dmeventd lvmetad"
 LVM2_PACKAGECONFIG_append_class-target = " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
-    thin-provisioning-tools \
+    ${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPLv3', '', 'thin-provisioning-tools', d)} \
     udev \
 "

there are other strings like GPL-3.0, as well as other types of GPL 3 derivative licenses, I wonder if this will work for all

#3 lore raw
Quoted 11 lines · Khem Raj
Quoted 10 lines · On Wed, Sep 20, 2017 at 11:47 PM, <[email protected]> wrote:

From: Kai Kang <[email protected]>

Disable thin provisioning support for lvm2 if it is set GPLv3 incompatible.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

meta-oe/recipes-support/lvm2/lvm2.inc inherit autotools-brokensep pkgconfig systemd · line 28

Quoted 12 lines
meta-oe/recipes-support/lvm2/lvm2.inc +1 -1
index ab8db9cba..9791554a9 100644
@@ -23,7 +23,7 @@ inherit autotools-brokensep pkgconfig systemd
 LVM2_PACKAGECONFIG = "dmeventd lvmetad"
 LVM2_PACKAGECONFIG_append_class-target = " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
-    thin-provisioning-tools \
+    ${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPLv3', '', 'thin-provisioning-tools', d)} \
     udev \
 "

there are other strings like GPL-3.0, as well as other types of GPL 3 derivative licenses, I wonder if this will work for all

Perhaps something like:

  ${@incompatible_license_contains('GPLv3', '', 'thin-provisioning-tools', d)}

would work more reliably?

Quoted 4 lines

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

author
#4 lore raw
Quoted 26 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 10 lines · On Wed, Sep 20, 2017 at 11:47 PM, <[email protected]> wrote:

From: Kai Kang <[email protected]>

Disable thin provisioning support for lvm2 if it is set GPLv3 incompatible.

---
  meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

meta-oe/recipes-support/lvm2/lvm2.inc inherit autotools-brokensep pkgconfig systemd · line 28

Quoted 12 lines
meta-oe/recipes-support/lvm2/lvm2.inc +1 -1
index ab8db9cba..9791554a9 100644
@@ -23,7 +23,7 @@ inherit autotools-brokensep pkgconfig systemd
  LVM2_PACKAGECONFIG = "dmeventd lvmetad"
  LVM2_PACKAGECONFIG_append_class-target = " \
      ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
-    thin-provisioning-tools \
+    ${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPLv3', '', 'thin-provisioning-tools', d)} \
      udev \
  "

there are other strings like GPL-3.0, as well as other types of GPL 3 derivative licenses, I wonder if this will work for all

Quoted 5 lines

Perhaps something like:

   ${@incompatible_license_contains('GPLv3', '', 'thin-provisioning-tools', d)}

would work more reliably?

OK. Thanks. I'll send V2.

--Kai

Quoted 4 lines
Quoted 4 lines

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 2 lines
Regards,
Neil | Kai Kang