subtree updates
poky: cce6db2a59..76cec94fad:
Alex Kiernan (1):
rust: Upgrade 1.68.2 -> 1.69.0
Alexander Kanavin (10):
selftest/distrodata: clean up exception lists in recipe maintainers test
dhcpcd: use git instead of tarballs
perl: patch out build paths from native binaries
binutils: backport a patch to address failures when time64.inc is in use
time64.inc: add glibc-testsuite to 'special cases'
bitbake.conf: set minimum required target kernel to 5.15
time64.inc: add a comment about how to simulate Y2038 in qemu
oeqa/sdk/assimp: run only when zlib is in the SDK
insane.bbclass: simplify exceptions for 32 bit time API check
vulkan: add a comment explaining upstream version policy
Andrey Zhizhikin (1):
cryptodev: upgrade to 1.13
Armin Kuster (2):
maintainers.inc: remove myself from assignment
os-release: Add CPE_NAME
Changhyeok Bae (1):
iproute2: upgrade 6.2.0 -> 6.3.0
Enrico Jörns (1):
package_manager/ipk: fix config path generation in _create_custom_config()
Frederic Martinsons (3):
ptest-cargo.bbclass: create class
python3-bcrypt: enable build of unit tests
zvariant: add ptest feature for zvariant test suite
Jamin Lin (2):
kernel-fitimage: support 64 bits address
uboot-sign: support 64bits address
Joe Slater (1):
ghostscript: fix CVE-2023-28879
Johannes Schrimpf (1):
python3targetconfig.bbclass: Extend PYTHONPATH instead of overwriting
Khem Raj (8):
musl: Update to latest master
gpgme: Reset ac_cv_sys_file_offset_bits on musl
mpg123: Reset ac_cv_sys_file_offset_bits on musl
quilt: Fix merge.test race condition
systemd: Fix timesyncd runtime assertions with 64bit time_t
qtwebkitgtk: Backport a build fix for GCC 13
cmake: Upgrade to 3.26.3
piglit: Fix c++11-narrowing warnings in tests
Lee Chee Yang (1):
release-notes-4.2: remove/merge duplicates entries
Markus Volk (2):
gtk4: update 4.10.0 -> 4.10.3
gcr: update 4.0.0 -> 4.1.0
Martin Jansa (2):
populate_sdk_ext.bbclass: redirect stderr to stdout so that both end in LOGFILE
image_types_wic: Remove incorrect MLPREFIX to already prefixed virtual/
Martin Siegumfeldt (1):
systemd-systemctl: fix instance template WantedBy symlink construction
Michael Halstead (1):
docs: add support for mickledore (4.2) release
Michael Opdenacker (3):
dev-manual: init-manager.rst: add summary
ref-manual: system-requirements.rst: fix AlmaLinux variable name
ref-manual: variables.rst: don't mention the INIT_MANAGER "none" option
Ming Liu (1):
weston: add xwayland to DEPENDS for PACKAGECONFIG xwayland
Otavio Salvador (2):
glide: remove as 'go mod' has become standard
mesa: 23.0.2 -> 23.0.3
Patrick Williams (1):
perl-version: remove PERL* assignments
Paul Gortmaker (1):
scripts: fix buildstats diff/summary hard bound to host python3
Peter Bergin (1):
update-alternatives.bbclass: fix old override syntax
Peter Kjellerstedt (1):
license.bbclass: Include LICENSE in the output when it fails to parse
Petr Kubizňák (1):
devicetree.bbclass: Allow selection of dts files to build
Qiu Tingting (1):
lz4: Add ptest support
Randolph Sapp (1):
kernel-devicetree: allow specification of dtb directory
Ranjitsinh Rathod (1):
libbsd: Add correct license for all packages
Richard Purdie (13):
bitbake: cooker: Log config and parse cache status changes
binutils: Drop crosssdk suffix from virtual provides to improve dependency handling
gcc/go: Drop crosssdk suffix from virtual provides to improve dependency handling
oeqa/runtime/ptest: Make returning no test results a failure
python3-psutil: Drop nativesdk class extension due to breakage
maintainers.inc: Move apt/dpkg to unassigned
patchelf: Upgrade 0.17.2 -> 0.18.0
maintainers.inc: Fix email address typo
qemu: Add fix for powerpc instruction fallback issue
qemu: Upgrade 7.2.0 -> 8.0.0
maintainers.inc: Move repo to unassigned
recipes: Default to https git protocol where possible
bitbake: tests/fetch: Default to https git protocol where possible
Ross Burton (13):
python3-pytest: add missing tomllib RDEPENDS
libinput: upgrade to 1.23.0
gtk+3: upgrade 3.24.36 -> 3.24.37
piglit: upgrade to latest revision
dmidecode: upgrade to 3.5
connman: backport fix for CVE-2023-28488
vulkan-samples: update to latest SHA
glslang: upgrade to 1.3.243
vulkan-headers: upgrade to 1.3.243
vulkan-loader: upgrade to 1.3.243
vulkan-tools: upgrade to 1.3.243
spirv-headers: remove description
spirv-tools: remove redundant python3native inherit
Sergei Zhmylev (1):
wic: add support for proper kernel name to bootimg-pcbios
Sudip Mukherjee (5):
apt: Upgrade to v2.6.0
libxt: Upgrade to v1.3.0
libxfixes: Upgrade to v6.0.1
xwininfo: upgrade to v1.1.6
xinput: upgrade to v1.6.4
Tim Orling (1):
libmodule-build-perl: upgrade 0.4232 -> 0.4234
Upgrade Helper (1):
waffle: upgrade 1.7.0 -> 1.7.2
Virendra Thakur (1):
qemu: Whitelist CVE-2023-0664
hen Qi (1):
unfs3: fix symlink time setting issue
meta-openembedded: c5f330bc9a..f3cdc9d7ee:
Andrew Geissler (3):
etcd: add recipe
etcd: use v2.1.2 xhash to fix build issue
etcd: remove gobin requirement for build
Bergin, Peter (1):
freediameter: fix typo and old overide syntax
Bhargav Das (2):
tslib: Add native & nativestdk package support
pointercal: Add native & nativestdk package support
Gianfranco Costamagna (1):
dlt-daemon: upgrade 2.18.8 -> 2.18.9 (commit: 9a2312d3512a27620d41b9a325338b6e7b3d42de)
Khem Raj (24):
unixODBC: Update SRC_URI to use updated location of tarball
ttf-arphic-uming: Update to 0.2.20080216-2
thrift: Upgrade to 0.18.1
unicode-ucd: Update license URI to reflect renamed license
libtimezonemap: Point to a working SRC_URI
libx86: Point to working SRC_URI
ctapi-common: Point to working SRC_URI locations
netkit-ftp: Update to debian patch 34
nicstat: Use SOURCEFORGE_MIRROR in SRC_URI
rp-pppoe: Point SRC_URI to valid location
ttf-mplus: Point to valid download location for SRC_URI
geary: Use sysroot prefix with pkg-config in meson
srecord: Upgrade to 1.65.0
ttf-lklug: Point SRC_URI to a working location
radiusclient-ng: Point SRC_URI to archive.ubuntu.com
httpfs2: Do not use S during compile/install tasks
p910nd: Switch to using github for SRC_URI
mosh: Point SRC_URI to https://mosh.org/
xdotool: Upgrade to 3.20211022.1 release
faenza-icon-theme: Switch to a valid download location for SRC_URI
debootstrap: Update SRC_URI to point to valid URL
debootstrap: Use DEBIAN_MIRROR for SRC_URI
ttf-gentium: Switch to debian archive mirror for SRC_URI
nfacct: Update SRC_URI to point to valid URL
Petr Gotthard (1):
gensio: fix QA issue: non -staticdev package with .a libraries
meta-arm: c60d7865dd..0b5724266a:
Rui Miguel Silva (1):
arm-bsp/u-boot: corstone1000: remove debug messages and fix env
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I89bb649b388963a4e16080db6caa8ae1ac2cb3c2
diff --git a/poky/meta/classes-recipe/ptest-cargo.bbclass b/poky/meta/classes-recipe/ptest-cargo.bbclass
new file mode 100644
index 0000000..f28bc7a
--- /dev/null
+++ b/poky/meta/classes-recipe/ptest-cargo.bbclass
@@ -0,0 +1,130 @@
+inherit cargo ptest
+
+# I didn't find a cleaner way to share data between compile and install tasks
+CARGO_TEST_BINARIES_FILES ?= "${B}/test_binaries_list"
+
+# Sadly, generated test binaries have no deterministic names (https://github.com/rust-lang/cargo/issues/1924)
+# This forces us to parse the cargo output in json format to find those test binaries.
+python do_compile_ptest_cargo() {
+ import subprocess
+ import json
+
+ cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True))
+ cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True)
+ rust_flags = d.getVar("RUSTFLAGS", True)
+ manifest_path = d.getVar("MANIFEST_PATH", True)
+
+ env = os.environ.copy()
+ env['RUSTFLAGS'] = rust_flags
+ cmd = f"{cargo} build --tests --message-format json {cargo_build_flags}"
+ bb.note(f"Building tests with cargo ({cmd})")
+
+ try:
+ proc = subprocess.Popen(cmd, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ bb.fatal(f"Cannot build test with cargo: {e}")
+
+ lines = []
+ for line in proc.stdout:
+ data = line.decode('utf-8').strip('\n')
+ lines.append(data)
+ bb.note(data)
+ proc.communicate()
+ if proc.returncode != 0:
+ bb.fatal(f"Unable to compile test with cargo, '{cmd}' failed")
+
+ # Definition of the format: https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages
+ test_bins = []
+ for line in lines:
+ try:
+ data = json.loads(line)
+ except json.JSONDecodeError:
+ # skip lines that are not a json
+ pass
+ else:
+ try:
+ # Filter the test packages coming from the current manifest
+ current_manifest_path = os.path.normpath(data['manifest_path'])
+ project_manifest_path = os.path.normpath(manifest_path)
+ if current_manifest_path == project_manifest_path:
+ if data['target']['test'] or data['target']['doctest'] and data['executable']:
+ test_bins.append(data['executable'])
+ except KeyError as e:
+ # skip lines that do not meet the requirements
+ pass
+
+ # All rust project will generate at least one unit test binary
+ # It will just run a test suite with 0 tests, if the project didn't define some
+ # So it is not expected to have an empty list here
+ if not test_bins:
+ bb.fatal("Unable to find any test binaries")
+
+ cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
+ bb.note(f"Found {len(test_bins)} tests, write their paths into {cargo_test_binaries_file}")
+ with open(cargo_test_binaries_file, "w") as f:
+ for test_bin in test_bins:
+ f.write(f"{test_bin}\n")
+
+}
+
+python do_install_ptest_cargo() {
+ import shutil
+
+ dest_dir = d.getVar("D", True)
+ pn = d.getVar("PN", True)
+ ptest_path = d.getVar("PTEST_PATH", True)
+ cargo_test_binaries_file = d.getVar('CARGO_TEST_BINARIES_FILES', True)
+
+ ptest_dir = os.path.join(dest_dir, ptest_path.lstrip('/'))
+ os.makedirs(ptest_dir, exist_ok=True)
+
+ test_bins = []
+ with open(cargo_test_binaries_file, "r") as f:
+ for line in f.readlines():
+ test_bins.append(line.strip('\n'))
+
+ test_paths = []
+ for test_bin in test_bins:
+ shutil.copy2(test_bin, ptest_dir)
+ test_paths.append(os.path.join(ptest_path, os.path.basename(test_bin)))
+
+ ptest_script = os.path.join(ptest_dir, "run-ptest")
+ if os.path.exists(ptest_script):
+ with open(ptest_script, "a") as f:
+ f.write(f"\necho \"\"\n")
+ f.write(f"echo \"## starting to run rust tests ##\"\n")
+ for test_path in test_paths:
+ f.write(f"{test_path}\n")
+ else:
+ with open(ptest_script, "a") as f:
+ f.write("#!/bin/sh\n")
+ for test_path in test_paths:
+ f.write(f"{test_path}\n")
+ os.chmod(ptest_script, 0o755)
+
+ # this is chown -R root:root ${D}${PTEST_PATH}
+ for root, dirs, files in os.walk(ptest_dir):
+ for d in dirs:
+ shutil.chown(os.path.join(root, d), "root", "root")
+ for f in files:
+ shutil.chown(os.path.join(root, f), "root", "root")
+}
+
+do_install_ptest_cargo[dirs] = "${B}"
+do_install_ptest_cargo[doc] = "Create or update the run-ptest script with rust test binaries generated"
+do_compile_ptest_cargo[dirs] = "${B}"
+do_compile_ptest_cargo[doc] = "Generate rust test binaries through cargo"
+
+addtask compile_ptest_cargo after do_compile before do_compile_ptest_base
+addtask install_ptest_cargo after do_install_ptest_base before do_package
+
+python () {
+ if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+ d.setVarFlag('do_install_ptest_cargo', 'fakeroot', '1')
+ d.setVarFlag('do_install_ptest_cargo', 'umask', '022')
+
+ # Remove all '*ptest_cargo' tasks when ptest is not enabled
+ if not(d.getVar('PTEST_ENABLED') == "1"):
+ for i in ['do_compile_ptest_cargo', 'do_install_ptest_cargo']:
+ bb.build.deltask(i, d)
+}