summaryrefslogtreecommitdiff
path: root/poky/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/classes')
-rw-r--r--poky/meta/classes/create-spdx.bbclass12
-rw-r--r--poky/meta/classes/cve-check.bbclass2
-rw-r--r--poky/meta/classes/devshell.bbclass4
-rw-r--r--poky/meta/classes/externalsrc.bbclass19
-rw-r--r--poky/meta/classes/go.bbclass4
-rw-r--r--poky/meta/classes/image.bbclass7
-rw-r--r--poky/meta/classes/image_types_wic.bbclass2
-rw-r--r--poky/meta/classes/kernel-yocto.bbclass20
-rw-r--r--poky/meta/classes/kernel.bbclass2
-rw-r--r--poky/meta/classes/license_image.bbclass2
-rw-r--r--poky/meta/classes/package.bbclass8
-rw-r--r--poky/meta/classes/qemu.bbclass6
-rw-r--r--poky/meta/classes/sanity.bbclass6
-rw-r--r--poky/meta/classes/sign_package_feed.bbclass1
-rw-r--r--poky/meta/classes/staging.bbclass2
15 files changed, 57 insertions, 40 deletions
diff --git a/poky/meta/classes/create-spdx.bbclass b/poky/meta/classes/create-spdx.bbclass
index 137db81a5b..37b6b569a1 100644
--- a/poky/meta/classes/create-spdx.bbclass
+++ b/poky/meta/classes/create-spdx.bbclass
@@ -35,8 +35,6 @@ SPDX_SUPPLIER[doc] = "The SPDX PackageSupplier field for SPDX packages created f
is the contact information for the person or organization who is doing the \
build."
-do_image_complete[depends] = "virtual/kernel:do_create_spdx"
-
def extract_licenses(filename):
import re
@@ -835,16 +833,14 @@ python image_combine_spdx() {
combine_spdx(d, image_name, imgdeploydir, img_spdxid, packages)
- if image_link_name:
- image_spdx_path = imgdeploydir / (image_name + ".spdx.json")
- image_spdx_link = imgdeploydir / (image_link_name + ".spdx.json")
- image_spdx_link.symlink_to(os.path.relpath(image_spdx_path, image_spdx_link.parent))
-
def make_image_link(target_path, suffix):
if image_link_name:
link = imgdeploydir / (image_link_name + suffix)
- link.symlink_to(os.path.relpath(target_path, link.parent))
+ if link != target_path:
+ link.symlink_to(os.path.relpath(target_path, link.parent))
+ image_spdx_path = imgdeploydir / (image_name + ".spdx.json")
+ make_image_link(image_spdx_path, ".spdx.json")
spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst")
make_image_link(spdx_tar_path, ".spdx.tar.zst")
spdx_index_path = imgdeploydir / (image_name + ".spdx.index.json")
diff --git a/poky/meta/classes/cve-check.bbclass b/poky/meta/classes/cve-check.bbclass
index 78516d0bb6..7cf206299b 100644
--- a/poky/meta/classes/cve-check.bbclass
+++ b/poky/meta/classes/cve-check.bbclass
@@ -126,7 +126,7 @@ python do_cve_check () {
}
-addtask cve_check before do_build after do_fetch
+addtask cve_check before do_build
do_cve_check[depends] = "cve-update-db-native:do_fetch"
do_cve_check[nostamp] = "1"
diff --git a/poky/meta/classes/devshell.bbclass b/poky/meta/classes/devshell.bbclass
index 62dc958d9a..247d04478c 100644
--- a/poky/meta/classes/devshell.bbclass
+++ b/poky/meta/classes/devshell.bbclass
@@ -2,6 +2,8 @@ inherit terminal
DEVSHELL = "${SHELL}"
+PATH:prepend:task-devshell = "${COREBASE}/scripts/git-intercept:"
+
python do_devshell () {
if d.getVarFlag("do_devshell", "manualfakeroot"):
d.prependVar("DEVSHELL", "pseudo ")
@@ -21,6 +23,7 @@ addtask devshell after do_patch do_prepare_recipe_sysroot
DEVSHELL_STARTDIR ?= "${S}"
do_devshell[dirs] = "${DEVSHELL_STARTDIR}"
do_devshell[nostamp] = "1"
+do_devshell[network] = "1"
# devshell and fakeroot/pseudo need careful handling since only the final
# command should run under fakeroot emulation, any X connection should
@@ -154,3 +157,4 @@ python do_pydevshell() {
addtask pydevshell after do_patch
do_pydevshell[nostamp] = "1"
+do_pydevshell[network] = "1"
diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass
index abfe24bace..b2f216f361 100644
--- a/poky/meta/classes/externalsrc.bbclass
+++ b/poky/meta/classes/externalsrc.bbclass
@@ -90,15 +90,16 @@ python () {
# Since configure will likely touch ${S}, ensure only we lock so one task has access at a time
d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
- # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
- cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '')
- setvalue = False
- for cleandir in cleandirs[:]:
- if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
- cleandirs.remove(cleandir)
- setvalue = True
- if setvalue:
- d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs))
+ for funcname in [task, "base_" + task, "kernel_" + task]:
+ # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
+ cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(funcname, 'cleandirs', False) or '')
+ setvalue = False
+ for cleandir in cleandirs[:]:
+ if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
+ cleandirs.remove(cleandir)
+ setvalue = True
+ if setvalue:
+ d.setVarFlag(funcname, 'cleandirs', ' '.join(cleandirs))
fetch_tasks = ['do_fetch', 'do_unpack']
# If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one
diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass
index 9c4c92bffd..1a9a0bc1d4 100644
--- a/poky/meta/classes/go.bbclass
+++ b/poky/meta/classes/go.bbclass
@@ -1,4 +1,5 @@
inherit goarch
+inherit linuxloader
GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
@@ -44,7 +45,7 @@ GO_LINKMODE ?= ""
GO_LINKMODE:class-nativesdk = "--linkmode=external"
GO_LINKMODE:class-native = "--linkmode=external"
GO_EXTRA_LDFLAGS ?= ""
-GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"'
+GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -I ${@get_linuxloader(d)} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"'
export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath"
export GOPATH_OMIT_IN_ACTIONID ?= "1"
export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
@@ -67,6 +68,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
B = "${WORKDIR}/build"
export GOPATH = "${B}"
+export GOENV = "off"
export GOTMPDIR ?= "${WORKDIR}/build-tmp"
GOTMPDIR[vardepvalue] = ""
diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass
index 7f1f6f80a4..47776db2b0 100644
--- a/poky/meta/classes/image.bbclass
+++ b/poky/meta/classes/image.bbclass
@@ -132,7 +132,12 @@ def rootfs_variables(d):
do_rootfs[vardeps] += "${@rootfs_variables(d)}"
-do_build[depends] += "virtual/kernel:do_deploy"
+# This is needed to have kernel image in DEPLOY_DIR.
+# This follow many common usecases and user expectations.
+# But if you are building an image which doesn't need the kernel image at all,
+# you can unset this variable manually.
+KERNELDEPLOYDEPEND ?= "virtual/kernel:do_deploy"
+do_build[depends] += "${KERNELDEPMODDEPEND}"
python () {
diff --git a/poky/meta/classes/image_types_wic.bbclass b/poky/meta/classes/image_types_wic.bbclass
index e3863c88a9..79f8d93b94 100644
--- a/poky/meta/classes/image_types_wic.bbclass
+++ b/poky/meta/classes/image_types_wic.bbclass
@@ -83,7 +83,7 @@ do_image_wic[recrdeptask] += "do_deploy"
do_image_wic[deptask] += "do_image_complete"
WKS_FILE_DEPENDS_DEFAULT = '${@bb.utils.contains_any("BUILD_ARCH", [ 'x86_64', 'i686' ], "syslinux-native", "",d)}'
-WKS_FILE_DEPENDS_DEFAULT += "bmap-tools-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native"
+WKS_FILE_DEPENDS_DEFAULT += "bmap-tools-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native erofs-utils-native"
WKS_FILE_DEPENDS_BOOTLOADERS = ""
WKS_FILE_DEPENDS_BOOTLOADERS:x86 = "syslinux grub-efi systemd-boot os-release"
WKS_FILE_DEPENDS_BOOTLOADERS:x86-64 = "syslinux grub-efi systemd-boot os-release"
diff --git a/poky/meta/classes/kernel-yocto.bbclass b/poky/meta/classes/kernel-yocto.bbclass
index 1d5a8cdf29..fb30c7cc05 100644
--- a/poky/meta/classes/kernel-yocto.bbclass
+++ b/poky/meta/classes/kernel-yocto.bbclass
@@ -320,7 +320,11 @@ do_patch() {
meta_dir=$(kgit --meta)
(cd ${meta_dir}; ln -sf patch.queue series)
if [ -f "${meta_dir}/series" ]; then
- kgit-s2q --gen -v --patches .kernel-meta/
+ kgit_extra_args=""
+ if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then
+ kgit_extra_args="--commit-sha author"
+ fi
+ kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/
if [ $? -ne 0 ]; then
bberror "Could not apply patches for ${KMACHINE}."
bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
@@ -521,15 +525,15 @@ python do_config_analysis() {
python do_kernel_configcheck() {
import re, string, sys, subprocess
- # if KMETA isn't set globally by a recipe using this routine, we need to
- # set the default to 'meta'. Otherwise, kconf_check is not passed a valid
- # meta-series for processing
- kmeta = d.getVar("KMETA") or "meta"
- if not os.path.exists(kmeta):
- kmeta = subprocess.check_output(['kgit', '--meta'], cwd=d.getVar('S')).decode('utf-8').rstrip()
-
s = d.getVar('S')
+ # if KMETA isn't set globally by a recipe using this routine, use kgit to
+ # locate or create the meta directory. Otherwise, kconf_check is not
+ # passed a valid meta-series for processing
+ kmeta = d.getVar("KMETA")
+ if not kmeta or not os.path.exists('{}/{}'.format(s,kmeta)):
+ kmeta = subprocess.check_output(['kgit', '--meta'], cwd=d.getVar('S')).decode('utf-8').rstrip()
+
env = os.environ.copy()
env['PATH'] = "%s:%s%s" % (d.getVar('PATH'), s, "/scripts/util/")
env['LD'] = d.getVar('KERNEL_LD')
diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass
index bc52419e09..8299b394a7 100644
--- a/poky/meta/classes/kernel.bbclass
+++ b/poky/meta/classes/kernel.bbclass
@@ -221,8 +221,6 @@ export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE") or "ttyS0"}"
KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
-KERNEL_LOCALVERSION ?= ""
-
# kernels are generally machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass
index 7e1d0e08a9..3213ea758e 100644
--- a/poky/meta/classes/license_image.bbclass
+++ b/poky/meta/classes/license_image.bbclass
@@ -104,6 +104,8 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
"The license listed %s was not in the "\
"licenses collected for recipe %s"
% (lic, pkg_dic[pkg]["PN"]), d)
+ oe.qa.exit_if_errors(d)
+
# Two options here:
# - Just copy the manifest
# - Copy the manifest and the license directories
diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass
index e71daafe94..44fbc32df6 100644
--- a/poky/meta/classes/package.bbclass
+++ b/poky/meta/classes/package.bbclass
@@ -422,7 +422,6 @@ def splitstaticdebuginfo(file, dvar, dv, d):
# return a mapping of files:debugsources
import stat
- import shutil
src = file[len(dvar):]
dest = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(src) + dv["staticappend"]
@@ -807,15 +806,10 @@ python perform_packagecopy () {
dest = d.getVar('D')
dvar = d.getVar('PKGD')
- # Remove ${D}/sysroot-only if present
- sysroot_only = os.path.join(dest, 'sysroot-only')
- if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only):
- shutil.rmtree(sysroot_only)
-
# Start by package population by taking a copy of the installed
# files to operate on
# Preserve sparse files and hard links
- cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
+ cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
# replace RPATHs for the nativesdk binaries, to make them relocatable
diff --git a/poky/meta/classes/qemu.bbclass b/poky/meta/classes/qemu.bbclass
index 01a7b86ae1..7493ac34d4 100644
--- a/poky/meta/classes/qemu.bbclass
+++ b/poky/meta/classes/qemu.bbclass
@@ -64,4 +64,8 @@ QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc"
QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc"
QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc"
QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
-QEMU_EXTRAOPTIONS:powerpc64le = " -cpu POWER8"
+QEMU_EXTRAOPTIONS_powerpc64le = " -cpu POWER9"
+# Some packages e.g. fwupd sets PACKAGE_ARCH = MACHINE_ARCH and uses meson which
+# needs right options to usermode qemu
+QEMU_EXTRAOPTIONS_qemuppc = " -cpu 7400"
+QEMU_EXTRAOPTIONS_qemuppc64 = " -cpu POWER9"
diff --git a/poky/meta/classes/sanity.bbclass b/poky/meta/classes/sanity.bbclass
index be956fbcd6..c72a7b3ed3 100644
--- a/poky/meta/classes/sanity.bbclass
+++ b/poky/meta/classes/sanity.bbclass
@@ -467,6 +467,12 @@ def check_make_version(sanity_data):
os.remove("makefile_test_b.c")
if os.path.exists("makefile_test.a"):
os.remove("makefile_test.a")
+
+ if bb.utils.vercmp_string_op(version, "4.2.1", "=="):
+ distro = oe.lsb.distro_identifier()
+ if "ubuntu" in distro or "debian" in distro:
+ return None
+ return "make version 4.2.1 is known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make-tarball or a newer version of make.\n"
return None
diff --git a/poky/meta/classes/sign_package_feed.bbclass b/poky/meta/classes/sign_package_feed.bbclass
index 16bcd147aa..f1504c2225 100644
--- a/poky/meta/classes/sign_package_feed.bbclass
+++ b/poky/meta/classes/sign_package_feed.bbclass
@@ -27,6 +27,7 @@ inherit sanity
PACKAGE_FEED_SIGN = '1'
PACKAGE_FEED_GPG_BACKEND ?= 'local'
PACKAGE_FEED_GPG_SIGNATURE_TYPE ?= 'ASC'
+PACKAGEINDEXDEPS += "gnupg-native:do_populate_sysroot"
# Make feed signing key to be present in rootfs
FEATURE_PACKAGES_package-management:append = " signing-keys-packagefeed"
diff --git a/poky/meta/classes/staging.bbclass b/poky/meta/classes/staging.bbclass
index ab827766be..9fc8f4f283 100644
--- a/poky/meta/classes/staging.bbclass
+++ b/poky/meta/classes/staging.bbclass
@@ -651,7 +651,7 @@ python target_add_sysroot_deps () {
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
deps = {}
for dep in taskdepdata.values():
- if dep[1] == "do_populate_sysroot" and not dep[0].endswith(("-native", "-initial")) and "-cross-" not in dep[0]:
+ if dep[1] == "do_populate_sysroot" and not dep[0].endswith(("-native", "-initial")) and "-cross-" not in dep[0] and dep[0] != pn:
deps[dep[0]] = dep[6]
d.setVar("HASHEQUIV_EXTRA_SIGDATA", "\n".join("%s: %s" % (k, deps[k]) for k in sorted(deps.keys())))