Date   

[PATCH 1/2] oeqa/selftest: Add test for conflicting sysroot provider

Richard Purdie
 

sysroot-test depends on virtual/sysroot-test which we build for one machine,
switch machine, switch provider of virtual/sysroot-test and check that the
sysroot is correctly cleaned up. The files in the two providers overlap
so can cause errors if the sysroot code doesn't function correctly.

Yes, sysroot-test should be machine specific really to avoid this, however
the sysroot cleanup should also work.

This adds a test for bug:

[YOCTO #13702]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../sysroot-test/sysroot-test-arch1_1.0.bb | 12 ++++++
.../sysroot-test/sysroot-test-arch2_1.0.bb | 12 ++++++
.../sysroot-test/sysroot-test_1.0.bb | 4 ++
meta/lib/oeqa/selftest/cases/sysroot.py | 37 +++++++++++++++++++
4 files changed, 65 insertions(+)
create mode 100644 meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb
create mode 100644 meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb
create mode 100644 meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb
create mode 100644 meta/lib/oeqa/selftest/cases/sysroot.py

diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb
new file mode 100644
index 00000000000..0b4ed2ef052
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch1_1.0.bb
@@ -0,0 +1,12 @@
+LICENSE = "CLOSED"
+
+PROVIDES = "virtual/sysroot-test"
+INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+TESTSTRING ?= "1"
+
+do_install() {
+ install -d ${D}${includedir}
+ echo "# test ${TESTSTRING}" > ${D}${includedir}/sysroot-test.h
+}
\ No newline at end of file
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb
new file mode 100644
index 00000000000..f8b50acda2c
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test-arch2_1.0.bb
@@ -0,0 +1,12 @@
+LICENSE = "CLOSED"
+
+PROVIDES = "virtual/sysroot-test"
+INHIBIT_DEFAULT_DEPS = "1"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+TESTSTRING ?= "2"
+
+do_install() {
+ install -d ${D}${includedir}
+ echo "# test ${TESTSTRING}" > ${D}${includedir}/sysroot-test.h
+}
\ No newline at end of file
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb
new file mode 100644
index 00000000000..bec0eecb980
--- /dev/null
+++ b/meta-selftest/recipes-test/sysroot-test/sysroot-test_1.0.bb
@@ -0,0 +1,4 @@
+SUMMARY = "Virtual provider sysroot test"
+LICENSE = "CLOSED"
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "virtual/sysroot-test"
diff --git a/meta/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py
new file mode 100644
index 00000000000..6e34927c909
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/sysroot.py
@@ -0,0 +1,37 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import uuid
+
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake
+
+class SysrootTests(OESelftestTestCase):
+ def test_sysroot_cleanup(self):
+ """
+ Build sysroot test which depends on virtual/sysroot-test for one machine,
+ switch machine, switch provider of virtual/sysroot-test and check that the
+ sysroot is correctly cleaned up. The files in the two providers overlap
+ so can cause errors if the sysroot code doesn't function correctly.
+ Yes, sysroot-test should be machine specific really to avoid this, however
+ the sysroot cleanup should also work [YOCTO #13702].
+ """
+
+ uuid1 = uuid.uuid4()
+ uuid2 = uuid.uuid4()
+
+ self.write_config("""
+PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch1"
+MACHINE = "qemux86"
+TESTSTRING_pn-sysroot-test-arch1 = "%s"
+TESTSTRING_pn-sysroot-test-arch2 = "%s"
+""" % (uuid1, uuid2))
+ bitbake("sysroot-test")
+ self.write_config("""
+PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch2"
+MACHINE = "qemux86copy"
+TESTSTRING_pn-sysroot-test-arch1 = "%s"
+TESTSTRING_pn-sysroot-test-arch2 = "%s"
+""" % (uuid1, uuid2))
+ bitbake("sysroot-test")
--
2.25.1


Re: Yocto Documentation files

Richard Purdie
 

On Tue, 2020-04-14 at 14:38 -0700, akuster wrote:
Hello,

The Yocto manuals are licensed under "Creative Commons Attribution-
Share Alike 2.0".

1) Do the source files used to create each manual need a "SPDX"
header ?
Yes!

<!--
SPDX-License-Identifier: XXX
-->

should work.

2) Does the source repository need to contain a "LICENSE" file ?
Yes, it should have one.


3) Should the Project use the International version (CC-BY-SA-4.0) of
this License?

https://git.yoctoproject.org/git/yocto-docs
That doesn't seem possible as it would mean re-licensing and I'd
suspect we don't have all the copyright?

Cheers,

Richard


Yocto Documentation files

Armin Kuster
 

Hello,

 The Yocto manuals  are licensed under "Creative Commons Attribution-Share Alike 2.0".

1) Do the source files used to create each manual need a "SPDX" header ?

2) Does the  source repository need to contain a "LICENSE" file ?

3) Should the Project use the International version (CC-BY-SA-4.0) of this License?

https://git.yoctoproject.org/git/yocto-docs

regards,
Armin


[PATCH] bzip2/pbzip2: Correct license information

Richard Purdie
 

The license of pbzip2 looks slightly BSD like but is in fact the bzip2
license. The SPDX identifier for this is "bzip-1.0.6" since there is
another version of the bzip license out there.

To clear up all the confusion, use the SPDX license name and update
both recipes to refer to it. The copyright information is slightly
different between the codebases but the license looks the same.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/files/common-licenses/{bzip2 => bzip2-1.0.6} | 0
meta/recipes-extended/bzip2/bzip2_1.0.8.bb | 2 +-
meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
rename meta/files/common-licenses/{bzip2 => bzip2-1.0.6} (100%)

diff --git a/meta/files/common-licenses/bzip2 b/meta/files/common-licenses/bzip2-1.0.6
similarity index 100%
rename from meta/files/common-licenses/bzip2
rename to meta/files/common-licenses/bzip2-1.0.6
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
index 8e9b779e672..d58f553a49a 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
@@ -4,7 +4,7 @@ Huffman coding. Compression is generally considerably better than that achieved
LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
HOMEPAGE = "https://sourceware.org/bzip2/"
SECTION = "console/utils"
-LICENSE = "bzip2"
+LICENSE = "bzip2-1.0.6"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"

SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
diff --git a/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb b/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
index 1275cc00972..d7450c73c11 100644
--- a/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
+++ b/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
@@ -5,7 +5,7 @@ machines. The output of this version is fully compatible with bzip2 v1.0.2 or \
newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)."
HOMEPAGE = "http://compression.ca/pbzip2/"
SECTION = "console/utils"
-LICENSE = "BSD-4-Clause"
+LICENSE = "bzip-1.0.6"
LIC_FILES_CHKSUM = "file://COPYING;md5=398b8832c6f840cfebd20ab2be6a3743"

DEPENDS = "bzip2"
--
2.25.1

41 - 44 of 44