Commit Graph

191 Commits

Author SHA1 Message Date
Richard Purdie
204653a519 uninative/utils: Drop workarounds for gcc 4.8/4.9
We require at least gcc 8.0 in sanity.bbclass so drop the 4.8/4.9
special case handling in uninative.

(From OE-Core rev: 552e037bf598ac523f35b69d2dafc99e5ba59c5f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-07-03 10:40:16 +01:00
Ross Burton
8e70eeb0b1 files/license-hashes.csv: add more hashes
Add a slew of license hashes harvested by building some Go recipes in
meta-oe.

(From OE-Core rev: b281340ac099058e3483419366c25c9e28839aef)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Ross Burton
6496804bac oe/license_finder: consolidate hash->license maps
There are two locations where mappings of checksums to license names
are: the license-hashes.csv file and a hard-coded set of assignments in
the code.

There's no need for two, so remove the assignments and move the hashes
into the CSV file.

(From OE-Core rev: a775c6cb5a2bf1f30a94ba3b88af9aa491e98b1a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 17:57:30 +01:00
Ross Burton
36adc8135d lib/oe/license_finder: extract license finding code from recipetool
This code is 99% identical to the original code in recipetool/create.py,
but with two minor changes:
- The implicit recipetool logger is changed to an explicit logger
- The CSV of license hashes is moved to meta/files/

(From OE-Core rev: b132652c6e520121c6b0e7e873b0d33ede0309b5)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-16 17:57:30 +01:00
Pavel Zhukov
9863ffc50f overlayfs-etc: Unmount /sys and /proc before init
/sys filesystem mounted by the preinit script causes shadowing of
/sys/firmware/efi/ by double /sys mounting on systemd enabled systems
[1]. As the result EFI tooling is broken

[1]
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,relatime)

(From OE-Core rev: 94b3f86bac16ac3be468e23e1f6aad69cdf502d3)

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-27 11:19:04 +00:00
Ross Burton
d8e3567d85 common-licenses/OASIS: remove unused license
This isn't a common license as it's the DocBook v4 XML DTD license, and
that is now part of the recipe itself.

(From OE-Core rev: 11c366ebff98dad34d95aac0cfee571f78b87252)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-19 11:49:45 +00:00
Hongxu Jia
4ed99ca9b4 toolchain-shar-relocate.sh: support multiple dynamic loaders for multilib
While nativesdk support multilib, there are two dynamic loaders,

    $OECORE_NATIVE_SYSROOT/lib64/ld-linux-x86-64.so.2
    $OECORE_NATIVE_SYSROOT/lib/ld-linux.so.2

Search them with wildcard and call relocate_sdk.py separately

[ YOCTO #15722 ]

(From OE-Core rev: 703187755244b1a45dd9f90aeaf620d4c92a6757)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-11 11:44:19 +00:00
Moritz Haase
10dce263f0 meta: Enable '-o pipefail' for the SDK installer
When testing a Yocto SDK installer on Alpine 3.21, we recently ended up with a
broken SDK. One of the commands the relocation script calls in a piped
multi-command chain failed (see [0]), but the installer did not realize that -
since it doesn't use 'set -o pipefail'. Thus, the error was never reported to
the user and the installer claimed to have set up the SDK correctly - which
wasn't the case.

Given that the SDK installer is a POSIX-compliant shell script and that the
'pipefail' option used to be missing from the standard, it's not surprising that
it isn't used. Thankfully however, in June of 2024, a new version of POSIX
(POSIX.1-2024) was released - and that one finally includes the 'pipefail'
option (see [1]). A number of shells already support it, so let's enable it if
available to make the SDK installer more robust.

The change has been tested locally using SDK installers for internal projects,
based on both Kirkstone and Scarthgap.

[0]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16797
[1]: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/V3_chap02.html#set

(From OE-Core rev: 1cb4b41c7faf77fcc347b1276d86d4288968c926)

Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-05 13:00:45 +00:00
Bastian Germann
7b59d11d01 docbook-xsl-stylesheets: Use SPDX identifier
The XSL license was standardized by SPDX as DocBook-XML.
Copy the license file to the new name and use it in
docbook-xsl-stylesheets.

License-Update: use new DocBook-XML SPDX ID, copy text from existing XSL

(From OE-Core rev: e172e27e19fc09160cfee2a29af8e8c5c2426c9c)

Signed-off-by: Bastian Germann <bage@debian.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-05 12:49:55 +00:00
Esben Haabendal
1537ceb1c3 files: overlayfs-create-dirs: Improve mount unit dependency
The RequiresMountsFor configuration option of systemd.unit (added in
systemd version 201) not only adds the Requires and After options for
the required mount unit, but it adds them for all mount units required
to access the specified path.

So this change is both a simplification, and an improvement.

Not only will all needed mount units be added to Requires and After, but
the overlay path does not have to be a mountpoint, but can be at any
directory level beneath a mountpoint.

(From OE-Core rev: fa2422232a143b21aeea3728abca82100946dbc4)

Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
2025-01-23 12:14:29 +00:00
Derek Straka
30af2f18b9 classes/ptest-python-pytest: simplify python ptest file overriding
The complexity of overriding files from the bbclass made the behavior at
times hard to follow and predict. This change replaces the default file with a
heredoc equivalent that creates a default file if the user does not provide their
own version of run-ptest in the SRC_URI.

(From OE-Core rev: be3db5f4f1b857b93d08211019d9ff796ec389b6)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-14 11:57:52 +00:00
Derek Straka
095beae008 classes/ptest-python-pytest: add a new class to consolidate pytest ptest functionality
A large number of python packages leverage the pytest unit test
framework for their ptest functionality.  Currently, many of the tests
have duplicate code for:
    1. Installing pytest files
    2. Declaring ptest dependencies
    3. Script for executing tests (run-ptes)

To simplify adding common pytest based ptests, added a new class
enabling base functionality.  Users can also override the location of
the pytest files in addition to using their own version of run-ptest

[RP: Minor whitespace tweaks to shell function and missing prepend space]
(From OE-Core rev: d66009e608256d42b2d6573d4614a99eb13fd3f1)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-08 12:37:20 +00:00
Chen Qi
19f1ab574f toolchain-shar-relocate.sh: fix the replacing commands
There're two cases that the current replacing commands cannot handle well:
1. Files with whitespace in their names
2. Installation path with keyword such as 'script'

This results in installation failure of a buildtools. We can use the following
commands to reproduce the problem.
1. bitbake buildtools-tarball
2. ./tmp/deploy/sdk/x86_64-buildtools-nativesdk-standalone-5.1.sh -d dir-with-keyword-script -y

The error message is like below:

  Setting it up...sed: can't read /PATH/TO/dir-with-keyword-script/sysroots/x86_64-wrlinuxsdk-linux
    /usr/lib/python3.13/site-packages/setuptools/_vendor/jaraco/text/Lorem: No such file or directory
  Failed to replace perl. Relocate script failed. Abort!

The actual file name is /PATH/TO/dir-with-keyword-script/sysroots/x86_64-pokysdk-linux/usr/lib/python3.13
/site-packages/setuptools/_vendor/jaraco/text/Lorem ipsum.txt

Note that the file path matches "script.*text". In fact, if we install the SDK into
some directory containing both 'script' and 'text', all files will be matched. This
is not expected.

This patch fixes the replacing commands by doing the following two things:
1. Use '\n' as the field separator for xargs so that files with white spaces are not splitted.
2. Use awk to match the second filed of the file command's output so that the file
   path does not mess up with the matching process.

(From OE-Core rev: 443912d512edbb75f16c52de489b33b6f8687431)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-12-09 15:23:28 +00:00
Denis OSTERLAND-HEIM
a5dcb91954 linux-yocto: add and use GPL-2.0-with-syscall-note license
See Linux COPYING, LICENSES/preferred/GPL-2.0
and LICENSES/exceptions/Linux-syscall-note.

(From OE-Core rev: 762aecc750229047394be72ea2a5bbcb86a1cef0)

Signed-off-by: Denis Osterland-Heim <denis.osterland@diehl.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-12-05 17:07:10 +00:00
Esben Haabendal
76c5b7ebd0 files: Amend overlayfs unit descriptions with path information
Having something like

Starting Overlayfs directories setup /home...
Starting Overlayfs directories setup /root...
Finished Overlayfs directories setup /home.
Finished Overlayfs directories setup /root.
Mounting Overlayfs mount unit /home...
Mounting Overlayfs mount unit /root...
Mounted Overlayfs mount unit /root.
Mounted Overlayfs mount unit /home.

is much more informative than

Starting Overlayfs directories setup...
Starting Overlayfs directories setup...
Finished Overlayfs directories setup.
Finished Overlayfs directories setup.
Mounting Overlayfs mount unit...
Mounting Overlayfs mount unit...
Mounted Overlayfs mount unit.
Mounted Overlayfs mount unit.

Especially as the number of overlayfs mount units increase.

(From OE-Core rev: 7308b4fc6f51bdf2b8f3b7899ff3758c5968e418)

Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-29 11:19:57 +00:00
Ming Liu
d296b21d56 meta: support tar.zst SDK_ARCHIVE_TYPE
zst is much faster than the default xz, test result on my Precision
5680 machine:

Installing a tar.xz SDK takes 37 seconds while tar.zst only takes 17
seconds.

Let's introduce support for tar.zst.

Also add a sanity check for supported archive types.

(From OE-Core rev: 1d22562a89e91f19b818b8f9bc214be941303980)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 11:58:22 +00:00
Ming Liu
afc74c1e17 toolchain-shar-extract.sh: check required tool before extracting SDK
To extract the SDK archive, the proper tools need to be present on
system, check unzip for zip archive type, check xz for tar.xz archive
type.

(From OE-Core rev: 718328588e832c0a59dc9b76ff4e5e3def6e8834)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 11:58:22 +00:00
Ming Liu
d7e4664169 toolchain-shar-extract.sh: replace which with "command -v"
Command 'which' is not POSIX or even universally installed on Linux
systems, replace it with 'command -v'.

(From OE-Core rev: f604e059bdf0ebd23f4b9c6af3f6249c9acdc551)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 11:58:22 +00:00
Chen Qi
a248752604 toolchain-shar-extract.sh: exit when post-relocate-setup.sh fails
When LD_LIBRARY_PATH is set, post-relocate-setup.sh will fail and
exit properly. But such failure is ignored and the SDK installation
will continue and tell user that things succeed. This is misleading.
So exit immediately if post-relocate-setup.sh fails.

Fixes [Yocto #15586]

(From OE-Core rev: c8e2dcc1f71aa33cc6e56dfdebebbe7ef010c944)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-11 12:17:02 +01:00
Changqing Li
2f46b6f27d bitbake.conf: drop VOLATILE_TMP_DIR, use FILESYSTEM_PERMS_TABLES instead
* Drop VOLATILE_TMP_DIR, use FILESYSTEM_PERMS_TABLES instead. By default,
FILESYSTEM_PERMS_TABLES ?=  "files/fs-perms.txt \
                             files/fs-perms-volatile-log.txt \
                             files/fs-perms-volatile-tmp.txt"
it contains 'files/fs-perms-volatile-tmp.txt', which means volatile tmp
is enabled. User can disable volatile tmp by remove
'files/fs-perms-volatile-tmp.txt' from FILESYSTEM_PERMS_TABLES.
* If volatile tmp is disabled, both /tmp and /var/tmp are persistent

(From OE-Core rev: 8d1ae67b89c45f78162e070228086c7ef88c3264)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-28 09:14:26 +01:00
Changqing Li
2f8806deb7 bitbake.conf: drop VOLATILE_LOG_DIR, use FILESYSTEM_PERMS_TABLES instead
Drop VOLATILE_LOG_DIR, use FILESYSTEM_PERMS_TABLES instead. By default,
it contains 'files/fs-perms-volatile-log.txt', which means volatile log
is enabled. User can disable volatile log by remove
'files/fs-perms-volatile-log.txt' from FILESYSTEM_PERMS_TABLES.

(From OE-Core rev: 91128c6517066715f2afe6b46aa3206c7cf3653e)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-28 09:14:26 +01:00
Joshua Watt
cd000e08b8 licenses: Update to SPDX license version 3.24.0
Updates to the latest version of the SPDX license list and pulls in all
the missing license files

[YOCTO #15502]

(From OE-Core rev: e9c1f48af10ccb58251ecc7e041babb99b94d6df)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-02 22:29:13 +01:00
Robert Kovacsics
ec478262ac sdk: Fix path length limit to match reserved size
There were two different interpreter lengths in use, make them match.

(From OE-Core rev: b175f9cdc3d87bef5c89cc337c2a7e2674732b29)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-14 12:43:23 +01:00
Tom Hochstein
084fe2241b toolchain-shar-relocate.sh: Add check for missing command 'file'
On a machine without the file command, the SDK install fails with a
cryptic error message.

```
xargs: file: No such file or directory
sed: no input files
Failed to replace perl. Relocate script failed. Abort!
```

Add a test for 'file' to print a clear error message.

```
The command 'file' is required by the relocation script, please install it first. Abort!
```

(From OE-Core rev: 1aa19b9e34ebe6f39a25364073fed4c069f650e8)

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-23 10:18:20 +00:00
Eilís 'pidge' Ní Fhlannagáin
f4665afc3c screenshot-tests: Add initial screenshot test png files for core-image-sato
This is an initial commit of png's we can use to test qemu image testing
against.

Also add symlinks for core-image-sato-sdk

[RP: Add symlinks and missing image]
(From OE-Core rev: 06b7a8c02fbf89258034a0a258efc0bd23902f03)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 17:27:51 +00:00
baruch@tkos.co.il
6f32769afb overlayfs-etc: add option to skip creation of mount dirs
The 'preinit' script can't create mount directories when rootfs is
read-only. Add an option to skip this step. The user must make sure that
all required directories are already in the rootfs directory layout.

Cc: Vyacheslav Yurkov <uvv.mail@gmail.com>
(From OE-Core rev: 3d433d8559467d255bd19af2d0999c65ea24a48d)

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19 15:21:14 +00:00
Maanya Goenka
3ef63361b4 toolchain-shar-relocate: allow 'find' access to libraries in symlinked directories
If the '/' is not added to the end of the dynamic loader path, only directories
that are not symlinks will be looked into for libraries such as ld-linux*,
so the slash is added to allow the 'find' command to have symlinked directory access too.

(From OE-Core rev: 8468f24e3e81d5248eb1424e43accd2ea8bf0568)

Signed-off-by: Maanya Goenka <maanyagoenka@microsoft.com>
Signed-off-by : Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08 10:53:13 +00:00
Richard Purdie
0769e8ef6b bitbake.conf: Drop oldincludedir
Autoconf defines this as:

"The directory for installing C header files for non-GCC compilers."

Whilst this is something autoconf does allow changing, I find it hard
to believe it has much use in the wild now and that headers don't get
split like this in reality, it would probably only be useful on really
old unixes.. The values are the same in our configuration anyway.

Drop the value and just use includedir everywhere.

(From OE-Core rev: 506c91cbc6a604a84e37e53ccff430436369802e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-20 15:30:52 +00:00
Alexander Kanavin
63e53fb8b6 build-sysroots: target or native sysroot population need to be selected explicitly
Running them in parallel is prone to races as postinsts from target sysroots
rely on executables from native sysroots which may or may not be fully prepared
yet. This was observed for example here:

https://autobuilder.yoctoproject.org/typhoon/#/builders/146/builds/468/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/147/builds/467/steps/12/logs/stdio

(From OE-Core rev: 38d7a2e45b883cf999a86af05bcc0eaa875bb47c)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-09 12:04:55 +01:00
Remi Peuvergne
7ff2e05a5b common-licenses: Add LGPL-3.0-with-zeromq-exception
ZeroMQ is not exactly LGPL-3.0 and has a specific exception.

(From OE-Core rev: 21b08f04a1eda343e230c01ef1993ace81614f3c)

Signed-off-by: Remi Peuvergne <remi.peuvergne@non.se.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-13 22:10:32 +01:00
Vyacheslav Yurkov
c3ec554ba5 classes: files: Extend overlayfs-etc class
Add the ability to expose the lower layer of /etc when mounting overlay.
This is the similar to what overlayroot script from initramfs-framework does.

By default, this option is turned off to keep an old behavior intact.

(From OE-Core rev: 791e8a8bacce5a7f31f4d7bcbfb17df2967fd258)

Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-09 12:24:43 +01:00
Vyacheslav Yurkov
d99391f035 files: overlayfs-etc: refactor preinit template
(From OE-Core rev: ad5b2bffbee6ddcf51bc146d1e76c980b498b399)

Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-09 12:24:43 +01:00
Alexander Kanavin
2bdc042d9c meta/files/layers.schema.json: drop the layers property
This is a leftover from one of the RFC iterations, where
the property contained available machines, distros and templates.
As all of those were dropped from the final version, there is no
reason to list the layers either anymore.

Normally this would be a backwards incompatible change, but as
the layer setup itself was just merged, I think we can do a quick
fixup :-)

(From OE-Core rev: 64a774de0e154ef81f20853fec903b17d9985a72)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-02 15:58:26 +01:00
Joshua Watt
f5d6792d68 meta/files: add layer setup JSON schema and example
Defines a common schema for layer setup that can be consumed by tools to
know how to fetch and assemble layers for end users. Also includes an
example of the layer setup that constructs poky/meta-intel/imaginary product layer
for reference.

The schema can be used to validate a layer setup file with the commands:

 $ python3 -m pip install jsonschema
 $ jsonschema -i meta/files/layers.example.json meta/files/layers.schema.json

(From OE-Core rev: 72740b5dd635579e373b4bfe6ccacfe6a02aa998)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>

Alex: I made the following modifications to Joshua's original commit:

- moved the files from meta/lib to meta/files

- the example json showcases a multi-repo, multi-layer setup
instead of just poky - closer to a typical product

- added oe-selftest that validates the example json against the schema using python3-jsonschema-native

- the schema is modified so that:

-- all lists (sources, layers, remotes) are replaced by objects keyed by 'name' properties of the list items.
This allows using them as dicts inside Python, and makes the json more compact and readable.

-- added 'contains_this_file' property to source object

-- replaced 'remote' property with a 'oneOf' definition for git with a specific
'git-remote' property. 'oneOf' is problematic when schema validation fails:
the diagnostic is only that none of oneOf variants matched, which is too non-specific.

-- added 'describe' property to 'git-remote' object.

-- removed description property for a layer source: it is not clear how to add that
when auto-generating the json

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-01 10:07:02 +01:00
Vyacheslav Yurkov
366e7e620b files: respect overlayfs owner from lower layer
Permission model of overlayfs uses permissions/ownership from the upper
layer after mounting. Fix up UID/GID of the upper layer, when lower
layer already uses something custom.

(From OE-Core rev: b19b734ec3c031ee594229e728ee077cd58b34a9)

Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-04 11:28:23 +01:00
Vyacheslav Yurkov
5fc131c5a9 files: rootfs-postcommands: move helper commands to script
OverlayFS systemd helper unit might require more pre-processing
commands. It gets more complicated to embed them in a unit file, because
systemd shell subset is limited and might require additional escaping.
Move the command to a separate script, thus simplifying systemd unit.

(From OE-Core rev: 86a457016e7f3fc7acacf86cd87f5d8d882132dd)

Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-04 11:28:23 +01:00
Claudius Heine
6dd32f4a3b files: overlayfs-etc: add overlay mount options to preinit
Overlayfs-etc is useful if the rootfs is read-only. One reason to have
the rootfs read-only is to allow image based updating.

Image based updating will change the underlying root file system, which
is unsupported by overlayfs when with some mount options [1].

This disables those options.

[1] https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html?highlight=overlayfs#changes-to-underlying-filesystems

(From OE-Core rev: 13a057d6ffc3110f891224d7af9455b53581e8a8)

Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-11 06:56:02 +00:00
Claudius Heine
3653b9d37a files: overlayfs-etc: wrap long lines of preinit file
Make it easier to see what is happening by wrapping the overly long
lines in the preinit file for the overlayfs-etc.

(From OE-Core rev: 2e116bbc1afbc571b99f2605839e3c90839471be)

Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-11 06:56:02 +00:00
Stefan Herbrechtsmeier
6452862674 files: overlayfs-create-dirs: split ExecStart into two commands
Split ExecStart into two commands because systemd interpret an ExecStart
entry as a single executable with multiple parameters.

systemd[1]: Starting Overlayfs directories setup...
mkdir: cannot create directory '&&': Read-only file system
mkdir: cannot create directory 'mkdir': Read-only file system

(From OE-Core rev: 209204f7f9d294543fd57b90e29a95c2cde66d99)

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 12:41:24 +00:00
Christian Eggers
e56ac9e229 sdk: fix search for dynamic loader
if the package "nativesdk-glibc-dbg" is installed as part of the SDK,
the existing search expression finds two files:

$OECORE_NATIVE_SYSROOT/lib/.debug/ld-linux-x86-64.so.2
$OECORE_NATIVE_SYSROOT/lib/ld-linux-x86-64.so.2

The generated relocate_sdk.sh shell script contains then an extra
newline and segfaults during SDK relocation.

Limit the search depth to 1, to avoid finding the file in the .debug
directory.

(From OE-Core rev: baec04b936ab6b3d2039978fd568c3824cd0a501)

Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-12 17:05:35 +00:00
Ross Burton
56fe6d575e common-licences: remove ambiguous "BSD" license
Our "BSD" license is the 3-clause BSD license, but many recipes were
using "BSD" for any variation of the license.

We've mostly moved recipes away from the vague "BSD" license to concrete
names such as "BSD-3-Clause", so delete the BSD license to force the
remaining users to update their license statements.

[ YOCTO #14539 ]

(From OE-Core rev: 14d4c007c49652d836d325a12bdbcd3bfa42e6d5)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-07 10:08:59 +00:00
Vyacheslav Yurkov
9fc8c38658 overlayfs: move templates to files directory
(From OE-Core rev: b08ce6d23f2c6c89073ddff90b758360f9ce9fea)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:24 +00:00
Vyacheslav Yurkov
167bc05b7f files: add overlayfs-etc-preinit.sh.in
A template init script for overlayfs-etc class

(From OE-Core rev: c0173002f3f2118f72307b7e60515287a1b56bda)

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:24 +00:00
Alexander Kanavin
4abd6ee9d4 rust-common.bbclass: rewrite toolchain wrappers in (native) python
librsvg on centos 7 and friends exhibits the same libtinfo leakage
problem, this time coming from the compiler and not the linker.
Simply covering the compiler by the existing C wrapper-of-wrapper
does not work, as rust-native builds put Important Stuff into
LD_LIBRARY_PATH and unsetting it breaks things badly.

Rather than try to figure out which combination of wrappers and
LD_LIBRARY_PATH settings works for which situation, or provide
some kind of sh-native, let's simply use python3-native for the
wrappers, which should insulate builds from the the host shell.
rust-native already depends on python3-native, so this does not
lengthen the builds.

This also reverts:
rust-common: Hack around LD_LIBRARY_PATH issues on centos7
(commit 63b1fd2226).

I'd also like to say boo to Red Hat (or GNU?) for breaking ABI
compatibility for stat() in glibc 2.33, we ended up sorting
this mess because of it.

(From OE-Core rev: 997d54363a3cb3a0e949b3626855f2fa41afeb2b)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 11:48:45 +01:00
Saul Wold
0e80ffc6c8 spdx-licenses.json: Use 3.14 tagged version
The validation tools expect the licenseListVersion to be a proper X.Y version,
not an intermedite git hash version.

(From OE-Core rev: b96bb3fe6e17a194db0dcb86d2877946eaa77341)

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-28 17:55:04 +01:00
Peter Kjellerstedt
f97a29af63 common-licenses, licenses.conf: Remove duplicate licenses
This removes BSD-0-Clause, Nauman, tcl and vim and adds mappings for
them to their SPDX counterparts (0BSD, Naumen, TCL and Vim).

It also removes FreeType, which already had a mapping to FTL.

(From OE-Core rev: 35d699c479b6ce6acafbf75fb003618aaad094d7)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-06 09:49:50 +01:00
Joshua Watt
d521ba8c32 Add SPDX licenses
Adds the SPDX license database from https://github.com/spdx/license-list-data

(From OE-Core rev: a8048931701438e2f267a52a43869c27743907e3)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-03 09:53:28 +01:00
Ross Burton
2220839599 common-licenses: add missing SPDX licences
As part of the work to converge our license support with SPDX, ensure
that we have all of the licenses that SPDX supports.

(From OE-Core rev: e2f9092c37395f4e3ee9d0777e28c83cce6007ee)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-03 09:03:34 +01:00
Richard Purdie
63b1fd2226 rust-common: Hack around LD_LIBRARY_PATH issues on centos7
When building cargo-native on centos7 with buildtools tarball installed,
we see failures:

/bin/sh: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /home/pokybuild/yocto-worker/reproducible-centos/build/build-st/tmp/work/x86_64-linux/cargo-native/1.54.0-r0/recipe-sysroot-native/usr/lib/libtinfo.so.5)

We also see this for libstd-rs once cargo-native is fixed.

The reason for this is that the wrapper script
cargo-native/1.54.0-r0/wrapper/target-rust-ccld has /bin/sh as it's
interpreter and cargo calls this with LD_LIBRARY_PATH set to include the
recipe-sysroot-native. The host /bin/sh links to libtinfo from the host
but it finds the version in the sysroot which needs a newer libc. This
results in the above error since the loader is an older libc and the two
are incompatible.

Our ccld wrapper calls gcc/ld which don't need the LD_LIBRARY_PATH
variable set. We can't patch this out the source since we're using
a prebuilt binary to generate a new cargo binary so this is impossible
to bootstrap.

Instead, put a binary wrapper into place which removes LD_LIBRARY_PATH
from the environment before calling the original wrapper (left in shell
as it is simpler to maintain).

(From OE-Core rev: 8feeeb7f76c6725e5226458c8f22999b67c52694)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-02 21:22:54 +01:00
hongxu
7c88e08e62 sdk: fix relocate symlink failed
Install SDK to non-default dir, sysmlink mkfs.vfat is invalid

$ ./sdk.sh -y -d ./dnf-2 -S -D
$ ls sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat -al
lrwxrwxrwx 1 hjia users 99 Aug 10 20:38 sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat -> /opt/windriver/wrlinux-graphics/21.32/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat.dosfstools

Since commit [bc4ee54535 sdk: Decouple default install path from
built in path] applied, sdk relocates symlink failed, it should
replace $SDK_BUILD_PATH rather than $DEFAULT_INSTALL_DIR, just
like above commit did

Without this commit:
...
|+ for l in $($SUDO_EXEC find $native_sysroot -type l)
|++ readlink path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat
|++ sed -e s:/usr/local/oecore-x86_64:path-to:
|+ ln -sfn /opt/windriver/wrlinux-graphics/21.32/sysroots/x86_64-wrlinuxsdk-linux/
usr/bin/mkfs.vfat.dosfstools path-to//sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat
...

After appling this commit:
...
|+ for l in $($SUDO_EXEC find $native_sysroot -type l)
|++ readlink path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat
|++ sed -e s:/opt/windriver/wrlinux-graphics/21.31:path-to:
|+ ln -sfn path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat.dosfstools
path-to/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/mkfs.vfat
...

(From OE-Core rev: 942c06a7348070b92f722fa5c439c8c4404485b7)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-13 14:44:06 +01:00