conf: Move selftest config to dedicated inc file
PATCH 1/2 conf: Move selftest config to dedicated inc file
Create a no-gplv3.inc file based upon knowledge currently encoded into one of the selftests.
There is a risk that people try and take this idea too far, or have unrealistic expectations. That said, it would be better to collect this knowledge together in one location rather than handling it piecemeal.
Therefore move the configuration information from the test into a common incude file.
Signed-off-by Richard Purdie <[email protected]>
--- meta/conf/distro/include/no-gplv3.inc | 24 +++++++++++++++++++ .../oeqa/selftest/cases/incompatible_lic.py | 16 ++----------- 2 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 meta/conf/distro/include/no-gplv3.inc
meta/conf/distro/include/no-gplv3.inc new file +24 -0
@@ -0,0 +1,24 @@ +# +# This include file is to document commonly used configuration options to minimise +# GPLv3 content in images. +# +# The intent is to allow some images/configurations to build, not everything. There +# will be a cost in reduced functionality. + +# Settings for full-cmdline +RDEPENDS:packagegroup-core-full-cmdline-utils:remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time" +RDEPENDS:packagegroup-core-full-cmdline-dev-utils:remove = "diffutils m4 make patch" +RDEPENDS:packagegroup-core-full-cmdline-multiuser:remove = "gzip" + +# Settings for weston +# direct gpl3 dependencies +RRECOMMENDS:packagegroup-base-vfat:remove = "dosfstools" +PACKAGECONFIG:remove:pn-bluez5 = "readline" + +# dnf pulls in gpg which is gpl3; it also pulls in python3-rpm which pulls in rpm-build which pulls in bash +# so install rpm but not dnf +IMAGE_FEATURES:remove:pn-core-image-weston = "package-management" +CORE_IMAGE_EXTRA_INSTALL:pn-core-image-weston += "rpm" + +# matchbox-terminal depends on vte, which is gpl3 +CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal"
meta/lib/oeqa/selftest/cases/incompatible_lic.py +2 -14
@@ -144,20 +144,8 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*" IMAGE_CLASSES += "testimage" INCOMPATIBLE_LICENSE:pn-core-image-full-cmdline = "GPL-3.0* LGPL-3.0*" INCOMPATIBLE_LICENSE:pn-core-image-weston = "GPL-3.0* LGPL-3.0*" -# Settings for full-cmdline -RDEPENDS:packagegroup-core-full-cmdline-utils:remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time" -RDEPENDS:packagegroup-core-full-cmdline-dev-utils:remove = "diffutils m4 make patch" -RDEPENDS:packagegroup-core-full-cmdline-multiuser:remove = "gzip" -# Settings for weston -# direct gpl3 dependencies -RRECOMMENDS:packagegroup-base-vfat:remove = "dosfstools" -PACKAGECONFIG:remove:pn-bluez5 = "readline" -# dnf pulls in gpg which is gpl3; it also pulls in python3-rpm which pulls in rpm-build which pulls in bash -# so install rpm but not dnf -IMAGE_FEATURES:remove:pn-core-image-weston = "package-management" -CORE_IMAGE_EXTRA_INSTALL:pn-core-image-weston += "rpm" -# matchbox-terminal depends on vte, which is gpl3 -CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal" + +require conf/distro/include/no-gplv3.inc """) bitbake('core-image-full-cmdline core-image-weston') bitbake('-c testimage core-image-full-cmdline core-image-weston')
Signature · 1 line
2.40.1
PATCH 2/2 bbtests: Tweak to use no-gplv3 inc file
With changes to gcc-runtime around improving debugging, python modules are needed but this pulls in bash which breaks the tests.
Add an exclusion to the no-gplv3 include file to handle this.
Signed-off-by Richard Purdie <[email protected]>
--- meta/conf/distro/include/no-gplv3.inc | 4 ++++ meta/lib/oeqa/selftest/cases/bbtests.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-)
meta/conf/distro/include/no-gplv3.inc +4 -0
@@ -22,3 +22,7 @@ CORE_IMAGE_EXTRA_INSTALL:pn-core-image-weston += "rpm" # matchbox-terminal depends on vte, which is gpl3 CORE_IMAGE_BASE_INSTALL:remove:pn-core-image-weston = "matchbox-terminal" + +# Some python-tests use bash outside of ptest +RDEPENDS:${PN}-tests:remove:class-target:pn-python3 = "${MLPREFIX}bash" +INSANE_SKIP:${PN}-tests:pn-python3 = "file-rdeps"
meta/lib/oeqa/selftest/cases/bbtests.py +3 -1
@@ -232,7 +232,9 @@ INHERIT:remove = \"report-error\" self.assertLess(errorpos,continuepos, msg = "bitbake didn't pass do_fail_task. bitbake output: %s" % result.output) def test_non_gplv3(self): - self.write_config('INCOMPATIBLE_LICENSE = "GPL-3.0-or-later"') + self.write_config('''INCOMPATIBLE_LICENSE = "GPL-3.0-or-later" +require conf/distro/include/no-gplv3.inc +''') result = bitbake('selftest-ed', ignore_status=True) self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output)) lic_dir = get_bb_var('LICENSE_DIRECTORY')
Signature · 1 line
2.40.1