diff options
Diffstat (limited to 'poky/meta/classes')
-rw-r--r-- | poky/meta/classes/devicetree.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes/externalsrc.bbclass | 1 | ||||
-rw-r--r-- | poky/meta/classes/go.bbclass | 5 | ||||
-rw-r--r-- | poky/meta/classes/goarch.bbclass | 9 | ||||
-rw-r--r-- | poky/meta/classes/image.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes/kernel-fitimage.bbclass | 40 | ||||
-rw-r--r-- | poky/meta/classes/license.bbclass | 17 | ||||
-rw-r--r-- | poky/meta/classes/license_image.bbclass | 1 | ||||
-rw-r--r-- | poky/meta/classes/linuxloader.bbclass | 4 | ||||
-rw-r--r-- | poky/meta/classes/meson.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes/package.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes/package_rpm.bbclass | 1 | ||||
-rw-r--r-- | poky/meta/classes/populate_sdk_base.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes/report-error.bbclass | 4 | ||||
-rw-r--r-- | poky/meta/classes/reproducible_build.bbclass | 15 |
15 files changed, 59 insertions, 48 deletions
diff --git a/poky/meta/classes/devicetree.bbclass b/poky/meta/classes/devicetree.bbclass index c772ab2ab..ece883acc 100644 --- a/poky/meta/classes/devicetree.bbclass +++ b/poky/meta/classes/devicetree.bbclass @@ -18,7 +18,7 @@ SECTION ?= "bsp" # device trees built with them are at least GPLv2 (and in some cases dual # licensed). Default to GPLv2 if the recipe does not specify a license. LICENSE ?= "GPLv2" -LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" +LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" INHIBIT_DEFAULT_DEPS = "1" DEPENDS += "dtc-native" diff --git a/poky/meta/classes/externalsrc.bbclass b/poky/meta/classes/externalsrc.bbclass index 64e94e330..c7b2bf2f4 100644 --- a/poky/meta/classes/externalsrc.bbclass +++ b/poky/meta/classes/externalsrc.bbclass @@ -68,6 +68,7 @@ python () { url_data = fetch.ud[url] parm = url_data.parm if (url_data.type == 'file' or + url_data.type == 'npmsw' or 'type' in parm and parm['type'] == 'kmeta'): local_srcuri.append(url) diff --git a/poky/meta/classes/go.bbclass b/poky/meta/classes/go.bbclass index fa147892b..77ec98dd5 100644 --- a/poky/meta/classes/go.bbclass +++ b/poky/meta/classes/go.bbclass @@ -54,7 +54,6 @@ GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" export GOTOOLDIR export CGO_ENABLED ?= "1" -export CGO_ENABLED_riscv64 = "0" export CGO_CFLAGS ?= "${CFLAGS}" export CGO_CPPFLAGS ?= "${CPPFLAGS}" export CGO_CXXFLAGS ?= "${CXXFLAGS}" @@ -147,10 +146,10 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg" INSANE_SKIP_${PN} += "ldflags" # Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips -# doesn't support -buildmode=pie, so skip the QA checking for mips and its +# doesn't support -buildmode=pie, so skip the QA checking for mips/rv32 and its # variants. python() { - if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH'): + if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") else: d.appendVar('GOBUILDFLAGS', ' -buildmode=pie') diff --git a/poky/meta/classes/goarch.bbclass b/poky/meta/classes/goarch.bbclass index 1099b9576..e4e0ca37b 100644 --- a/poky/meta/classes/goarch.bbclass +++ b/poky/meta/classes/goarch.bbclass @@ -47,7 +47,6 @@ COMPATIBLE_HOST_linux-gnux32 = "null" COMPATIBLE_HOST_linux-muslx32 = "null" COMPATIBLE_HOST_powerpc = "null" COMPATIBLE_HOST_powerpc64 = "null" -COMPATIBLE_HOST_powerpc64le = "null" COMPATIBLE_HOST_mipsarchn32 = "null" ARM_INSTRUCTION_SET_armv4 = "arm" @@ -79,10 +78,10 @@ def go_map_arch(a, d): return 'mips' elif a == 'mipsel': return 'mipsle' + elif re.match('p(pc|owerpc)(64le)', a): + return 'ppc64le' elif re.match('p(pc|owerpc)(64)', a): return 'ppc64' - elif re.match('p(pc|owerpc)(64el)', a): - return 'ppc64le' elif a == 'riscv64': return 'riscv64' else: @@ -99,7 +98,7 @@ def go_map_386(a, f, d): if ('core2' in f) or ('corei7' in f): return 'sse2' else: - return '387' + return 'softfloat' return '' def go_map_mips(a, f, d): @@ -115,5 +114,3 @@ def go_map_os(o, d): if o.startswith('linux'): return 'linux' return o - - diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass index cda866cc8..41fc32917 100644 --- a/poky/meta/classes/image.bbclass +++ b/poky/meta/classes/image.bbclass @@ -180,6 +180,8 @@ IMAGE_LOCALES_ARCHIVE ?= '1' # aren't yet available. PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}" +PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/intercept_scripts,${WORKDIR}/oe-rootfs-repo,${WORKDIR}/sstate-build-image_complete" + PACKAGE_EXCLUDE ??= "" PACKAGE_EXCLUDE[type] = "list" diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass index 241487081..f5082c93d 100644 --- a/poky/meta/classes/kernel-fitimage.bbclass +++ b/poky/meta/classes/kernel-fitimage.bbclass @@ -161,7 +161,7 @@ fitimage_emit_section_kernel() { fi cat << EOF >> ${1} - kernel@${2} { + kernel-${2} { description = "Linux kernel"; data = /incbin/("${3}"); type = "kernel"; @@ -170,7 +170,7 @@ fitimage_emit_section_kernel() { compression = "${4}"; load = <${UBOOT_LOADADDRESS}>; entry = <${ENTRYPOINT}>; - hash@1 { + hash-1 { algo = "${kernel_csum}"; }; }; @@ -179,7 +179,7 @@ EOF if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${kernel_sign_keyname}" ] ; then sed -i '$ d' ${1} cat << EOF >> ${1} - signature@1 { + signature-1 { algo = "${kernel_csum},${kernel_sign_algo}"; key-name-hint = "${kernel_sign_keyname}"; }; @@ -210,14 +210,14 @@ fitimage_emit_section_dtb() { dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;" fi cat << EOF >> ${1} - fdt@${2} { + fdt-${2} { description = "Flattened Device Tree blob"; data = /incbin/("${3}"); type = "flat_dt"; arch = "${UBOOT_ARCH}"; compression = "none"; ${dtb_loadline} - hash@1 { + hash-1 { algo = "${dtb_csum}"; }; }; @@ -226,7 +226,7 @@ EOF if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${dtb_sign_keyname}" ] ; then sed -i '$ d' ${1} cat << EOF >> ${1} - signature@1 { + signature-1 { algo = "${dtb_csum},${dtb_sign_algo}"; key-name-hint = "${dtb_sign_keyname}"; }; @@ -283,7 +283,7 @@ fitimage_emit_section_setup() { setup_csum="${FIT_HASH_ALG}" cat << EOF >> ${1} - setup@${2} { + setup-${2} { description = "Linux setup.bin"; data = /incbin/("${3}"); type = "x86_setup"; @@ -292,7 +292,7 @@ fitimage_emit_section_setup() { compression = "none"; load = <0x00090000>; entry = <0x00090000>; - hash@1 { + hash-1 { algo = "${setup_csum}"; }; }; @@ -321,7 +321,7 @@ fitimage_emit_section_ramdisk() { fi cat << EOF >> ${1} - ramdisk@${2} { + ramdisk-${2} { description = "${INITRAMFS_IMAGE}"; data = /incbin/("${3}"); type = "ramdisk"; @@ -330,7 +330,7 @@ fitimage_emit_section_ramdisk() { compression = "none"; ${ramdisk_loadline} ${ramdisk_entryline} - hash@1 { + hash-1 { algo = "${ramdisk_csum}"; }; }; @@ -339,7 +339,7 @@ EOF if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "${ramdisk_sign_keyname}" ] ; then sed -i '$ d' ${1} cat << EOF >> ${1} - signature@1 { + signature-1 { algo = "${ramdisk_csum},${ramdisk_sign_algo}"; key-name-hint = "${ramdisk_sign_keyname}"; }; @@ -377,7 +377,7 @@ fitimage_emit_section_config() { # Test if we have any DTBs at all sep="" conf_desc="" - conf_node="conf@" + conf_node="conf-" kernel_line="" fdt_line="" ramdisk_line="" @@ -396,19 +396,19 @@ fitimage_emit_section_config() { if [ -n "${kernel_id}" ]; then conf_desc="Linux kernel" sep=", " - kernel_line="kernel = \"kernel@${kernel_id}\";" + kernel_line="kernel = \"kernel-${kernel_id}\";" fi if [ -n "${dtb_image}" ]; then conf_desc="${conf_desc}${sep}FDT blob" sep=", " - fdt_line="fdt = \"fdt@${dtb_image}\";" + fdt_line="fdt = \"fdt-${dtb_image}\";" fi if [ -n "${ramdisk_id}" ]; then conf_desc="${conf_desc}${sep}ramdisk" sep=", " - ramdisk_line="ramdisk = \"ramdisk@${ramdisk_id}\";" + ramdisk_line="ramdisk = \"ramdisk-${ramdisk_id}\";" fi if [ -n "${bootscr_id}" ]; then @@ -419,16 +419,16 @@ fitimage_emit_section_config() { if [ -n "${config_id}" ]; then conf_desc="${conf_desc}${sep}setup" - setup_line="setup = \"setup@${config_id}\";" + setup_line="setup = \"setup-${config_id}\";" fi if [ "${default_flag}" = "1" ]; then # default node is selected based on dtb ID if it is present, # otherwise its selected based on kernel ID if [ -n "${dtb_image}" ]; then - default_line="default = \"conf@${dtb_image}\";" + default_line="default = \"conf-${dtb_image}\";" else - default_line="default = \"conf@${kernel_id}\";" + default_line="default = \"conf-${kernel_id}\";" fi fi @@ -441,7 +441,7 @@ fitimage_emit_section_config() { ${ramdisk_line} ${bootscr_line} ${setup_line} - hash@1 { + hash-1 { algo = "${conf_csum}"; }; EOF @@ -478,7 +478,7 @@ EOF sign_line="${sign_line};" cat << EOF >> ${its_file} - signature@1 { + signature-1 { algo = "${conf_csum},${conf_sign_algo}"; key-name-hint = "${conf_sign_keyname}"; ${sign_line} diff --git a/poky/meta/classes/license.bbclass b/poky/meta/classes/license.bbclass index dc9111834..bcea0b3cb 100644 --- a/poky/meta/classes/license.bbclass +++ b/poky/meta/classes/license.bbclass @@ -252,16 +252,9 @@ def return_spdx(d, license): def canonical_license(d, license): """ Return the canonical (SPDX) form of the license if available (so GPLv3 - becomes GPL-3.0), for the license named 'X+', return canonical form of - 'X' if available and the tailing '+' (so GPLv3+ becomes GPL-3.0+), - or the passed license if there is no canonical form. + becomes GPL-3.0) or the passed license if there is no canonical form. """ - lic = d.getVarFlag('SPDXLICENSEMAP', license) or "" - if not lic and license.endswith('+'): - lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+')) - if lic: - lic += '+' - return lic or license + return d.getVarFlag('SPDXLICENSEMAP', license) or license def available_licenses(d): """ @@ -288,6 +281,12 @@ def expand_wildcard_licenses(d, wildcard_licenses): wildcards from SPDXLICENSEMAP flags and AVAILABLE_LICENSES. """ import fnmatch + + # Assume if we're passed "GPLv3" or "*GPLv3" it means -or-later as well + for lic in wildcard_licenses[:]: + if not lic.endswith(("-or-later", "-only", "*")): + wildcard_licenses.append(lic + "+") + licenses = wildcard_licenses[:] spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() for wld_lic in wildcard_licenses: diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass index 36ddd8480..c96b032eb 100644 --- a/poky/meta/classes/license_image.bbclass +++ b/poky/meta/classes/license_image.bbclass @@ -40,7 +40,6 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): import stat bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE") or "").split() - bad_licenses = [canonical_license(d, l) for l in bad_licenses] bad_licenses = expand_wildcard_licenses(d, bad_licenses) whitelist = [] diff --git a/poky/meta/classes/linuxloader.bbclass b/poky/meta/classes/linuxloader.bbclass index b161c51a5..30925ac87 100644 --- a/poky/meta/classes/linuxloader.bbclass +++ b/poky/meta/classes/linuxloader.bbclass @@ -9,8 +9,8 @@ def get_musl_loader_arch(d): ldso_arch = "mips${ABIEXTENSION}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}" elif targetarch == "powerpc": ldso_arch = "powerpc${@['', '-sf'][d.getVar('TARGET_FPU') == 'soft']}" - elif targetarch == "powerpc64": - ldso_arch = "powerpc64" + elif targetarch.startswith("powerpc64"): + ldso_arch = "powerpc64${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'le', d)}" elif targetarch == "x86_64": ldso_arch = "x86_64" elif re.search("i.86", targetarch): diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass index 83aa854b7..a7644e70c 100644 --- a/poky/meta/classes/meson.bbclass +++ b/poky/meta/classes/meson.bbclass @@ -99,6 +99,8 @@ readelf = ${@meson_array('READELF', d)} pkgconfig = 'pkg-config' llvm-config = 'llvm-config${LLVMVERSION}' cups-config = 'cups-config' +g-ir-scanner = '${STAGING_BINDIR}/g-ir-scanner-wrapper' +g-ir-compiler = '${STAGING_BINDIR}/g-ir-compiler-wrapper' [properties] needs_exe_wrapper = true diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass index 417e22529..e3f0a7060 100644 --- a/poky/meta/classes/package.bbclass +++ b/poky/meta/classes/package.bbclass @@ -1710,7 +1710,7 @@ if [ x"$D" = "x" ]; then fi } -RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --alldeps" +RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --alldeps --define '__font_provides %{nil}'" # Collect perfile run-time dependency metadata # Output: diff --git a/poky/meta/classes/package_rpm.bbclass b/poky/meta/classes/package_rpm.bbclass index c1824306e..84a9a6dd1 100644 --- a/poky/meta/classes/package_rpm.bbclass +++ b/poky/meta/classes/package_rpm.bbclass @@ -689,6 +689,7 @@ python do_package_rpm () { cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'" cmd = cmd + " --define '_buildhost reproducible'" + cmd = cmd + " --define '__font_provides %{nil}'" if perfiledeps: cmd = cmd + " --define '__find_requires " + outdepends + "'" cmd = cmd + " --define '__find_provides " + outprovides + "'" diff --git a/poky/meta/classes/populate_sdk_base.bbclass b/poky/meta/classes/populate_sdk_base.bbclass index 4db0511db..c8a7084d3 100644 --- a/poky/meta/classes/populate_sdk_base.bbclass +++ b/poky/meta/classes/populate_sdk_base.bbclass @@ -178,7 +178,7 @@ do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}" do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}" do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}" -PSEUDO_IGNORE_PATHS .= ",${SDKDEPLOYDIR}" +PSEUDO_IGNORE_PATHS .= ",${SDKDEPLOYDIR},${WORKDIR}/oe-sdk-repo,${WORKDIR}/sstate-build-populate_sdk" fakeroot create_sdk_files() { cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/ diff --git a/poky/meta/classes/report-error.bbclass b/poky/meta/classes/report-error.bbclass index 1a12db120..9cb6b0bd3 100644 --- a/poky/meta/classes/report-error.bbclass +++ b/poky/meta/classes/report-error.bbclass @@ -6,6 +6,8 @@ # # Licensed under the MIT license, see COPYING.MIT for details +inherit base + ERR_REPORT_DIR ?= "${LOG_DIR}/error-report" def errorreport_getdata(e): @@ -64,6 +66,8 @@ python errorreport_handler () { data['failures'] = [] data['component'] = " ".join(e.getPkgs()) data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) + data['bitbake_version'] = e.data.getVar("BB_VERSION") + data['layer_version'] = get_layers_branch_rev(e.data) data['local_conf'] = get_conf_data(e, 'local.conf') data['auto_conf'] = get_conf_data(e, 'auto.conf') lock = bb.utils.lockfile(datafile + '.lock') diff --git a/poky/meta/classes/reproducible_build.bbclass b/poky/meta/classes/reproducible_build.bbclass index 2f3bd90b0..f06e00d70 100644 --- a/poky/meta/classes/reproducible_build.bbclass +++ b/poky/meta/classes/reproducible_build.bbclass @@ -37,10 +37,13 @@ BUILD_REPRODUCIBLE_BINARIES ??= '1' inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 'reproducible_build_simple', '')} -SDE_DIR ="${WORKDIR}/source-date-epoch" +SDE_DIR = "${WORKDIR}/source-date-epoch" SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt" SDE_DEPLOYDIR = "${WORKDIR}/deploy-source-date-epoch" +# A SOURCE_DATE_EPOCH of '0' might be misinterpreted as no SDE +export SOURCE_DATE_EPOCH_FALLBACK ??= "1302044400" + SSTATETASKS += "do_deploy_source_date_epoch" do_deploy_source_date_epoch () { @@ -93,15 +96,19 @@ def get_source_date_epoch_value(d): return cached epochfile = d.getVar('SDE_FILE') - source_date_epoch = 0 + source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK')) if os.path.isfile(epochfile): with open(epochfile, 'r') as f: s = f.read() try: source_date_epoch = int(s) + # workaround for old sstate with SDE_FILE content being 0 - use SOURCE_DATE_EPOCH_FALLBACK + if source_date_epoch == 0 : + source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK')) + bb.warn("SOURCE_DATE_EPOCH value from sstate '%s' is deprecated/invalid. Reverting to SOURCE_DATE_EPOCH_FALLBACK '%s'" % (s, source_date_epoch)) except ValueError: - bb.warn("SOURCE_DATE_EPOCH value '%s' is invalid. Reverting to 0" % s) - source_date_epoch = 0 + bb.warn("SOURCE_DATE_EPOCH value '%s' is invalid. Reverting to SOURCE_DATE_EPOCH_FALLBACK" % s) + source_date_epoch = int(d.getVar('SOURCE_DATE_EPOCH_FALLBACK')) bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch) else: bb.debug(1, "Cannot find %s. SOURCE_DATE_EPOCH will default to %d" % (epochfile, source_date_epoch)) |