diff options
Diffstat (limited to 'meta/classes')
34 files changed, 220 insertions, 75 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 598298ef6f..858507b343 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -590,6 +590,7 @@ addtask do_dumpdata | |||
590 | addtask do_ar_recipe | 590 | addtask do_ar_recipe |
591 | addtask do_deploy_archives | 591 | addtask do_deploy_archives |
592 | do_build[recrdeptask] += "do_deploy_archives" | 592 | do_build[recrdeptask] += "do_deploy_archives" |
593 | do_rootfs[recrdeptask] += "do_deploy_archives" | ||
593 | do_populate_sdk[recrdeptask] += "do_deploy_archives" | 594 | do_populate_sdk[recrdeptask] += "do_deploy_archives" |
594 | 595 | ||
595 | python () { | 596 | python () { |
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 5a0b0c6b3e..78ae28bb0f 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -231,6 +231,7 @@ python base_eventhandler() { | |||
231 | if isinstance(e, bb.event.ConfigParsed): | 231 | if isinstance(e, bb.event.ConfigParsed): |
232 | if not d.getVar("NATIVELSBSTRING", False): | 232 | if not d.getVar("NATIVELSBSTRING", False): |
233 | d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d)) | 233 | d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d)) |
234 | d.setVar("ORIGNATIVELSBSTRING", d.getVar("NATIVELSBSTRING", False)) | ||
234 | d.setVar('BB_VERSION', bb.__version__) | 235 | d.setVar('BB_VERSION', bb.__version__) |
235 | 236 | ||
236 | # There might be no bb.event.ConfigParsed event if bitbake server is | 237 | # There might be no bb.event.ConfigParsed event if bitbake server is |
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 7d5e3eb8fd..726f17a946 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -674,13 +674,16 @@ IMAGE_POSTPROCESS_COMMAND[vardepsexclude] += "buildhistory_get_imageinfo" | |||
674 | POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_target;" | 674 | POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_target;" |
675 | POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_get_sdk_installed_target;" | 675 | POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_get_sdk_installed_target;" |
676 | POPULATE_SDK_POST_TARGET_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_target;| buildhistory_get_sdk_installed_target;" | 676 | POPULATE_SDK_POST_TARGET_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_target;| buildhistory_get_sdk_installed_target;" |
677 | POPULATE_SDK_POST_TARGET_COMMAND[vardepsexclude] += "buildhistory_list_installed_sdk_target buildhistory_get_sdk_installed_target" | ||
677 | 678 | ||
678 | POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host;" | 679 | POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host;" |
679 | POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_get_sdk_installed_host;" | 680 | POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_get_sdk_installed_host;" |
680 | POPULATE_SDK_POST_HOST_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_host;| buildhistory_get_sdk_installed_host;" | 681 | POPULATE_SDK_POST_HOST_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_host;| buildhistory_get_sdk_installed_host;" |
682 | POPULATE_SDK_POST_HOST_COMMAND[vardepsexclude] += "buildhistory_list_installed_sdk_host buildhistory_get_sdk_installed_host" | ||
681 | 683 | ||
682 | SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; " | 684 | SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; " |
683 | SDK_POSTPROCESS_COMMAND[vardepvalueexclude] .= "| buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; " | 685 | SDK_POSTPROCESS_COMMAND[vardepvalueexclude] .= "| buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; " |
686 | SDK_POSTPROCESS_COMMAND[vardepsexclude] += "buildhistory_get_sdkinfo buildhistory_get_extra_sdkinfo" | ||
684 | 687 | ||
685 | python buildhistory_write_sigs() { | 688 | python buildhistory_write_sigs() { |
686 | if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): | 689 | if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): |
@@ -855,7 +858,7 @@ END | |||
855 | } | 858 | } |
856 | 859 | ||
857 | python buildhistory_eventhandler() { | 860 | python buildhistory_eventhandler() { |
858 | if e.data.getVar('BUILDHISTORY_FEATURES').strip(): | 861 | if (e.data.getVar('BUILDHISTORY_FEATURES') or "").strip(): |
859 | reset = e.data.getVar("BUILDHISTORY_RESET") | 862 | reset = e.data.getVar("BUILDHISTORY_RESET") |
860 | olddir = e.data.getVar("BUILDHISTORY_OLD_DIR") | 863 | olddir = e.data.getVar("BUILDHISTORY_OLD_DIR") |
861 | if isinstance(e, bb.event.BuildStarted): | 864 | if isinstance(e, bb.event.BuildStarted): |
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 25cefda92e..112ee3379d 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
@@ -53,6 +53,16 @@ CVE_CHECK_PN_WHITELIST ?= "" | |||
53 | # | 53 | # |
54 | CVE_CHECK_WHITELIST ?= "" | 54 | CVE_CHECK_WHITELIST ?= "" |
55 | 55 | ||
56 | # Layers to be excluded | ||
57 | CVE_CHECK_LAYER_EXCLUDELIST ??= "" | ||
58 | |||
59 | # Layers to be included | ||
60 | CVE_CHECK_LAYER_INCLUDELIST ??= "" | ||
61 | |||
62 | |||
63 | # set to "alphabetical" for version using single alphabetical character as increament release | ||
64 | CVE_VERSION_SUFFIX ??= "" | ||
65 | |||
56 | python cve_save_summary_handler () { | 66 | python cve_save_summary_handler () { |
57 | import shutil | 67 | import shutil |
58 | import datetime | 68 | import datetime |
@@ -206,7 +216,11 @@ def check_cves(d, patched_cves): | |||
206 | """ | 216 | """ |
207 | Connect to the NVD database and find unpatched cves. | 217 | Connect to the NVD database and find unpatched cves. |
208 | """ | 218 | """ |
209 | from distutils.version import LooseVersion | 219 | from oe.cve_check import Version |
220 | |||
221 | pn = d.getVar("PN") | ||
222 | real_pv = d.getVar("PV") | ||
223 | suffix = d.getVar("CVE_VERSION_SUFFIX") | ||
210 | 224 | ||
211 | cves_unpatched = [] | 225 | cves_unpatched = [] |
212 | # CVE_PRODUCT can contain more than one product (eg. curl/libcurl) | 226 | # CVE_PRODUCT can contain more than one product (eg. curl/libcurl) |
@@ -217,7 +231,7 @@ def check_cves(d, patched_cves): | |||
217 | pv = d.getVar("CVE_VERSION").split("+git")[0] | 231 | pv = d.getVar("CVE_VERSION").split("+git")[0] |
218 | 232 | ||
219 | # If the recipe has been whitlisted we return empty lists | 233 | # If the recipe has been whitlisted we return empty lists |
220 | if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split(): | 234 | if pn in d.getVar("CVE_CHECK_PN_WHITELIST").split(): |
221 | bb.note("Recipe has been whitelisted, skipping check") | 235 | bb.note("Recipe has been whitelisted, skipping check") |
222 | return ([], [], []) | 236 | return ([], [], []) |
223 | 237 | ||
@@ -260,8 +274,8 @@ def check_cves(d, patched_cves): | |||
260 | else: | 274 | else: |
261 | if operator_start: | 275 | if operator_start: |
262 | try: | 276 | try: |
263 | vulnerable_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start)) | 277 | vulnerable_start = (operator_start == '>=' and Version(pv,suffix) >= Version(version_start,suffix)) |
264 | vulnerable_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start)) | 278 | vulnerable_start |= (operator_start == '>' and Version(pv,suffix) > Version(version_start,suffix)) |
265 | except: | 279 | except: |
266 | bb.warn("%s: Failed to compare %s %s %s for %s" % | 280 | bb.warn("%s: Failed to compare %s %s %s for %s" % |
267 | (product, pv, operator_start, version_start, cve)) | 281 | (product, pv, operator_start, version_start, cve)) |
@@ -271,8 +285,8 @@ def check_cves(d, patched_cves): | |||
271 | 285 | ||
272 | if operator_end: | 286 | if operator_end: |
273 | try: | 287 | try: |
274 | vulnerable_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end)) | 288 | vulnerable_end = (operator_end == '<=' and Version(pv,suffix) <= Version(version_end,suffix) ) |
275 | vulnerable_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end)) | 289 | vulnerable_end |= (operator_end == '<' and Version(pv,suffix) < Version(version_end,suffix) ) |
276 | except: | 290 | except: |
277 | bb.warn("%s: Failed to compare %s %s %s for %s" % | 291 | bb.warn("%s: Failed to compare %s %s %s for %s" % |
278 | (product, pv, operator_end, version_end, cve)) | 292 | (product, pv, operator_end, version_end, cve)) |
@@ -286,12 +300,12 @@ def check_cves(d, patched_cves): | |||
286 | vulnerable = vulnerable_start or vulnerable_end | 300 | vulnerable = vulnerable_start or vulnerable_end |
287 | 301 | ||
288 | if vulnerable: | 302 | if vulnerable: |
289 | bb.note("%s-%s is vulnerable to %s" % (product, pv, cve)) | 303 | bb.note("%s-%s is vulnerable to %s" % (pn, real_pv, cve)) |
290 | cves_unpatched.append(cve) | 304 | cves_unpatched.append(cve) |
291 | break | 305 | break |
292 | 306 | ||
293 | if not vulnerable: | 307 | if not vulnerable: |
294 | bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve)) | 308 | bb.note("%s-%s is not vulnerable to %s" % (pn, real_pv, cve)) |
295 | # TODO: not patched but not vulnerable | 309 | # TODO: not patched but not vulnerable |
296 | patched_cves.add(cve) | 310 | patched_cves.add(cve) |
297 | 311 | ||
@@ -327,7 +341,20 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): | |||
327 | CVE manifest if enabled. | 341 | CVE manifest if enabled. |
328 | """ | 342 | """ |
329 | 343 | ||
344 | |||
330 | cve_file = d.getVar("CVE_CHECK_LOG") | 345 | cve_file = d.getVar("CVE_CHECK_LOG") |
346 | fdir_name = d.getVar("FILE_DIRNAME") | ||
347 | layer = fdir_name.split("/")[-3] | ||
348 | |||
349 | include_layers = d.getVar("CVE_CHECK_LAYER_INCLUDELIST").split() | ||
350 | exclude_layers = d.getVar("CVE_CHECK_LAYER_EXCLUDELIST").split() | ||
351 | |||
352 | if exclude_layers and layer in exclude_layers: | ||
353 | return | ||
354 | |||
355 | if include_layers and layer not in include_layers: | ||
356 | return | ||
357 | |||
331 | nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId=" | 358 | nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId=" |
332 | write_string = "" | 359 | write_string = "" |
333 | unpatched_cves = [] | 360 | unpatched_cves = [] |
@@ -337,6 +364,7 @@ def cve_write_data(d, patched, unpatched, whitelisted, cve_data): | |||
337 | is_patched = cve in patched | 364 | is_patched = cve in patched |
338 | if is_patched and (d.getVar("CVE_CHECK_REPORT_PATCHED") != "1"): | 365 | if is_patched and (d.getVar("CVE_CHECK_REPORT_PATCHED") != "1"): |
339 | continue | 366 | continue |
367 | write_string += "LAYER: %s\n" % layer | ||
340 | write_string += "PACKAGE NAME: %s\n" % d.getVar("PN") | 368 | write_string += "PACKAGE NAME: %s\n" % d.getVar("PN") |
341 | write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) | 369 | write_string += "PACKAGE VERSION: %s%s\n" % (d.getVar("EXTENDPE"), d.getVar("PV")) |
342 | write_string += "CVE: %s\n" % cve | 370 | write_string += "CVE: %s\n" % cve |
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass index fdf7dc100f..76dd0b42ee 100644 --- a/meta/classes/devshell.bbclass +++ b/meta/classes/devshell.bbclass | |||
@@ -128,6 +128,7 @@ def devpyshell(d): | |||
128 | more = i.runsource(source, "<pyshell>") | 128 | more = i.runsource(source, "<pyshell>") |
129 | if not more: | 129 | if not more: |
130 | buf = [] | 130 | buf = [] |
131 | sys.stderr.flush() | ||
131 | prompt(more) | 132 | prompt(more) |
132 | except KeyboardInterrupt: | 133 | except KeyboardInterrupt: |
133 | i.write("\nKeyboardInterrupt\n") | 134 | i.write("\nKeyboardInterrupt\n") |
diff --git a/meta/classes/distutils-common-base.bbclass b/meta/classes/distutils-common-base.bbclass index 94b5fd426d..43a38e5a3a 100644 --- a/meta/classes/distutils-common-base.bbclass +++ b/meta/classes/distutils-common-base.bbclass | |||
@@ -11,7 +11,7 @@ export LDCXXSHARED = "${CXX} -shared" | |||
11 | export CCSHARED = "-fPIC -DPIC" | 11 | export CCSHARED = "-fPIC -DPIC" |
12 | # LINKFORSHARED are the flags passed to the $(CC) command that links | 12 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
13 | # the python executable | 13 | # the python executable |
14 | export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic" | 14 | export LINKFORSHARED = "${SECURITY_CFLAGS} -Xlinker -export-dynamic" |
15 | 15 | ||
16 | FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" | 16 | FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" |
17 | 17 | ||
diff --git a/meta/classes/distutils3-base.bbclass b/meta/classes/distutils3-base.bbclass index 7dbf07ac4b..a277d1c7bc 100644 --- a/meta/classes/distutils3-base.bbclass +++ b/meta/classes/distutils3-base.bbclass | |||
@@ -1,5 +1,5 @@ | |||
1 | DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES') == '')]}" | 1 | DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES') == '')]}" |
2 | RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" | 2 | RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}" |
3 | 3 | ||
4 | inherit distutils-common-base python3native | 4 | inherit distutils-common-base python3native python3targetconfig |
5 | 5 | ||
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index dd09395788..3d6b80bee2 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass | |||
@@ -68,6 +68,7 @@ python () { | |||
68 | url_data = fetch.ud[url] | 68 | url_data = fetch.ud[url] |
69 | parm = url_data.parm | 69 | parm = url_data.parm |
70 | if (url_data.type == 'file' or | 70 | if (url_data.type == 'file' or |
71 | url_data.type == 'npmsw' or | ||
71 | 'type' in parm and parm['type'] == 'kmeta'): | 72 | 'type' in parm and parm['type'] == 'kmeta'): |
72 | local_srcuri.append(url) | 73 | local_srcuri.append(url) |
73 | 74 | ||
@@ -190,6 +191,7 @@ def srctree_hash_files(d, srcdir=None): | |||
190 | import shutil | 191 | import shutil |
191 | import subprocess | 192 | import subprocess |
192 | import tempfile | 193 | import tempfile |
194 | import hashlib | ||
193 | 195 | ||
194 | s_dir = srcdir or d.getVar('EXTERNALSRC') | 196 | s_dir = srcdir or d.getVar('EXTERNALSRC') |
195 | git_dir = None | 197 | git_dir = None |
@@ -197,6 +199,10 @@ def srctree_hash_files(d, srcdir=None): | |||
197 | try: | 199 | try: |
198 | git_dir = os.path.join(s_dir, | 200 | git_dir = os.path.join(s_dir, |
199 | subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip()) | 201 | subprocess.check_output(['git', '-C', s_dir, 'rev-parse', '--git-dir'], stderr=subprocess.DEVNULL).decode("utf-8").rstrip()) |
202 | top_git_dir = os.path.join(s_dir, subprocess.check_output(['git', '-C', d.getVar("TOPDIR"), 'rev-parse', '--git-dir'], | ||
203 | stderr=subprocess.DEVNULL).decode("utf-8").rstrip()) | ||
204 | if git_dir == top_git_dir: | ||
205 | git_dir = None | ||
200 | except subprocess.CalledProcessError: | 206 | except subprocess.CalledProcessError: |
201 | pass | 207 | pass |
202 | 208 | ||
@@ -210,7 +216,17 @@ def srctree_hash_files(d, srcdir=None): | |||
210 | env = os.environ.copy() | 216 | env = os.environ.copy() |
211 | env['GIT_INDEX_FILE'] = tmp_index.name | 217 | env['GIT_INDEX_FILE'] = tmp_index.name |
212 | subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env) | 218 | subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env) |
213 | sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8") | 219 | git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8") |
220 | submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8") | ||
221 | for line in submodule_helper.splitlines(): | ||
222 | module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1]) | ||
223 | if os.path.isdir(module_dir): | ||
224 | proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) | ||
225 | proc.communicate() | ||
226 | proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) | ||
227 | stdout, _ = proc.communicate() | ||
228 | git_sha1 += stdout.decode("utf-8") | ||
229 | sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest() | ||
214 | with open(oe_hash_file, 'w') as fobj: | 230 | with open(oe_hash_file, 'w') as fobj: |
215 | fobj.write(sha1) | 231 | fobj.write(sha1) |
216 | ret = oe_hash_file + ':True' | 232 | ret = oe_hash_file + ':True' |
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index a9e31b50ea..5b26378a4e 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -40,6 +40,7 @@ GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pk | |||
40 | GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" | 40 | GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" |
41 | GO_LINKMODE ?= "" | 41 | GO_LINKMODE ?= "" |
42 | GO_LINKMODE_class-nativesdk = "--linkmode=external" | 42 | GO_LINKMODE_class-nativesdk = "--linkmode=external" |
43 | GO_LINKMODE_class-native = "--linkmode=external" | ||
43 | GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' | 44 | GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' |
44 | export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" | 45 | export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" |
45 | export GOPATH_OMIT_IN_ACTIONID ?= "1" | 46 | export GOPATH_OMIT_IN_ACTIONID ?= "1" |
diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass index 9ea5ddc312..47c44b4aad 100644 --- a/meta/classes/image-live.bbclass +++ b/meta/classes/image-live.bbclass | |||
@@ -30,7 +30,7 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \ | |||
30 | virtual/kernel:do_deploy \ | 30 | virtual/kernel:do_deploy \ |
31 | ${MLPREFIX}syslinux:do_populate_sysroot \ | 31 | ${MLPREFIX}syslinux:do_populate_sysroot \ |
32 | syslinux-native:do_populate_sysroot \ | 32 | syslinux-native:do_populate_sysroot \ |
33 | ${PN}:do_image_${@d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')} \ | 33 | ${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_')) if d.getVar('ROOTFS') else ''} \ |
34 | " | 34 | " |
35 | 35 | ||
36 | 36 | ||
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 045f4494c8..2f1d5cfb46 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -112,7 +112,7 @@ def rootfs_command_variables(d): | |||
112 | 'IMAGE_PREPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS','DEB_PREPROCESS_COMMANDS','DEB_POSTPROCESS_COMMANDS'] | 112 | 'IMAGE_PREPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS','DEB_PREPROCESS_COMMANDS','DEB_POSTPROCESS_COMMANDS'] |
113 | 113 | ||
114 | python () { | 114 | python () { |
115 | variables = rootfs_command_variables(d) + sdk_command_variables(d) | 115 | variables = rootfs_command_variables(d) |
116 | for var in variables: | 116 | for var in variables: |
117 | if d.getVar(var, False): | 117 | if d.getVar(var, False): |
118 | d.setVarFlag(var, 'func', '1') | 118 | d.setVarFlag(var, 'func', '1') |
@@ -180,6 +180,8 @@ IMAGE_LOCALES_ARCHIVE ?= '1' | |||
180 | # aren't yet available. | 180 | # aren't yet available. |
181 | PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}" | 181 | PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}" |
182 | 182 | ||
183 | PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/intercept_scripts,${WORKDIR}/oe-rootfs-repo,${WORKDIR}/sstate-build-image_complete" | ||
184 | |||
183 | PACKAGE_EXCLUDE ??= "" | 185 | PACKAGE_EXCLUDE ??= "" |
184 | PACKAGE_EXCLUDE[type] = "list" | 186 | PACKAGE_EXCLUDE[type] = "list" |
185 | 187 | ||
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 66884af8e0..30951ae366 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -108,19 +108,9 @@ IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME | |||
108 | IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo" | 108 | IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo" |
109 | IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4" | 109 | IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4" |
110 | 110 | ||
111 | # By default, tar from the host is used, which can be quite old. If | ||
112 | # you need special parameters (like --xattrs) which are only supported | ||
113 | # by GNU tar upstream >= 1.27, then override that default: | ||
114 | # IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" | ||
115 | # do_image_tar[depends] += "tar-replacement-native:do_populate_sysroot" | ||
116 | # EXTRANATIVEPATH += "tar-native" | ||
117 | # | ||
118 | # The GNU documentation does not specify whether --xattrs-include is necessary. | ||
119 | # In practice, it turned out to be not needed when creating archives and | ||
120 | # required when extracting, but it seems prudent to use it in both cases. | ||
121 | IMAGE_CMD_TAR ?= "tar" | 111 | IMAGE_CMD_TAR ?= "tar" |
122 | # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs | 112 | # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs |
123 | IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]" | 113 | IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --format=posix --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]" |
124 | 114 | ||
125 | do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append" | 115 | do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append" |
126 | IMAGE_CMD_cpio () { | 116 | IMAGE_CMD_cpio () { |
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass index 286e0f5d54..49be1da77a 100644 --- a/meta/classes/image_types_wic.bbclass +++ b/meta/classes/image_types_wic.bbclass | |||
@@ -3,7 +3,7 @@ | |||
3 | WICVARS ?= "\ | 3 | WICVARS ?= "\ |
4 | BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_EFI_BOOT_FILES IMAGE_BOOT_FILES \ | 4 | BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_EFI_BOOT_FILES IMAGE_BOOT_FILES \ |
5 | IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \ | 5 | IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \ |
6 | ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \ | 6 | ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS HOSTTOOLS_DIR \ |
7 | KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \ | 7 | KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \ |
8 | ASSUME_PROVIDED PSEUDO_IGNORE_PATHS" | 8 | ASSUME_PROVIDED PSEUDO_IGNORE_PATHS" |
9 | 9 | ||
@@ -29,11 +29,17 @@ WIC_CREATE_EXTRA_ARGS ?= "" | |||
29 | IMAGE_CMD_wic () { | 29 | IMAGE_CMD_wic () { |
30 | out="${IMGDEPLOYDIR}/${IMAGE_NAME}" | 30 | out="${IMGDEPLOYDIR}/${IMAGE_NAME}" |
31 | build_wic="${WORKDIR}/build-wic" | 31 | build_wic="${WORKDIR}/build-wic" |
32 | tmp_wic="${WORKDIR}/tmp-wic" | ||
32 | wks="${WKS_FULL_PATH}" | 33 | wks="${WKS_FULL_PATH}" |
34 | if [ -e "$tmp_wic" ]; then | ||
35 | # Ensure we don't have any junk leftover from a previously interrupted | ||
36 | # do_image_wic execution | ||
37 | rm -rf "$tmp_wic" | ||
38 | fi | ||
33 | if [ -z "$wks" ]; then | 39 | if [ -z "$wks" ]; then |
34 | bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." | 40 | bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately." |
35 | fi | 41 | fi |
36 | BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" ${WIC_CREATE_EXTRA_ARGS} | 42 | BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" -w "$tmp_wic" ${WIC_CREATE_EXTRA_ARGS} |
37 | mv "$build_wic/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic" | 43 | mv "$build_wic/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic" |
38 | } | 44 | } |
39 | IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR" | 45 | IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR" |
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index c6dff9659c..44dbed875b 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -175,7 +175,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages): | |||
175 | if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): | 175 | if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir): |
176 | # The dynamic linker searches both these places anyway. There is no point in | 176 | # The dynamic linker searches both these places anyway. There is no point in |
177 | # looking there again. | 177 | # looking there again. |
178 | package_qa_add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)) | 178 | package_qa_add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d, name), rpath)) |
179 | 179 | ||
180 | QAPATHTEST[dev-so] = "package_qa_check_dev" | 180 | QAPATHTEST[dev-so] = "package_qa_check_dev" |
181 | def package_qa_check_dev(path, name, d, elf, messages): | 181 | def package_qa_check_dev(path, name, d, elf, messages): |
@@ -184,8 +184,8 @@ def package_qa_check_dev(path, name, d, elf, messages): | |||
184 | """ | 184 | """ |
185 | 185 | ||
186 | if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path): | 186 | if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path): |
187 | package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package contains symlink .so: %s path '%s'" % \ | 187 | package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package %s contains symlink .so '%s'" % \ |
188 | (name, package_qa_clean_path(path,d))) | 188 | (name, package_qa_clean_path(path, d, name))) |
189 | 189 | ||
190 | QAPATHTEST[dev-elf] = "package_qa_check_dev_elf" | 190 | QAPATHTEST[dev-elf] = "package_qa_check_dev_elf" |
191 | def package_qa_check_dev_elf(path, name, d, elf, messages): | 191 | def package_qa_check_dev_elf(path, name, d, elf, messages): |
@@ -195,8 +195,8 @@ def package_qa_check_dev_elf(path, name, d, elf, messages): | |||
195 | install link-time .so files that are linker scripts. | 195 | install link-time .so files that are linker scripts. |
196 | """ | 196 | """ |
197 | if name.endswith("-dev") and path.endswith(".so") and not os.path.islink(path) and elf: | 197 | if name.endswith("-dev") and path.endswith(".so") and not os.path.islink(path) and elf: |
198 | package_qa_add_message(messages, "dev-elf", "-dev package contains non-symlink .so: %s path '%s'" % \ | 198 | package_qa_add_message(messages, "dev-elf", "-dev package %s contains non-symlink .so '%s'" % \ |
199 | (name, package_qa_clean_path(path,d))) | 199 | (name, package_qa_clean_path(path, d, name))) |
200 | 200 | ||
201 | QAPATHTEST[staticdev] = "package_qa_check_staticdev" | 201 | QAPATHTEST[staticdev] = "package_qa_check_staticdev" |
202 | def package_qa_check_staticdev(path, name, d, elf, messages): | 202 | def package_qa_check_staticdev(path, name, d, elf, messages): |
@@ -209,7 +209,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages): | |||
209 | 209 | ||
210 | if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path: | 210 | if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path: |
211 | package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ | 211 | package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ |
212 | (name, package_qa_clean_path(path,d))) | 212 | (name, package_qa_clean_path(path,d, name))) |
213 | 213 | ||
214 | QAPATHTEST[mime] = "package_qa_check_mime" | 214 | QAPATHTEST[mime] = "package_qa_check_mime" |
215 | def package_qa_check_mime(path, name, d, elf, messages): | 215 | def package_qa_check_mime(path, name, d, elf, messages): |
diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass index 81dda8003f..3c5def1041 100644 --- a/meta/classes/kernel-devicetree.bbclass +++ b/meta/classes/kernel-devicetree.bbclass | |||
@@ -1,8 +1,11 @@ | |||
1 | # Support for device tree generation | 1 | # Support for device tree generation |
2 | PACKAGES_append = " \ | 2 | python () { |
3 | ${KERNEL_PACKAGE_NAME}-devicetree \ | 3 | if not bb.data.inherits_class('nopackages', d): |
4 | ${@[d.getVar('KERNEL_PACKAGE_NAME') + '-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \ | 4 | d.appendVar("PACKAGES", " ${KERNEL_PACKAGE_NAME}-devicetree") |
5 | " | 5 | if d.getVar('KERNEL_DEVICETREE_BUNDLE') == '1': |
6 | d.appendVar("PACKAGES", " ${KERNEL_PACKAGE_NAME}-image-zimage-bundle") | ||
7 | } | ||
8 | |||
6 | FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo" | 9 | FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo" |
7 | FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin" | 10 | FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin" |
8 | 11 | ||
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass index c8ede26996..baa32e0a90 100644 --- a/meta/classes/kernel-module-split.bbclass +++ b/meta/classes/kernel-module-split.bbclass | |||
@@ -120,7 +120,10 @@ python split_kernel_module_packages () { | |||
120 | files = d.getVar('FILES_%s' % pkg) | 120 | files = d.getVar('FILES_%s' % pkg) |
121 | files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) | 121 | files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename) |
122 | d.setVar('FILES_%s' % pkg, files) | 122 | d.setVar('FILES_%s' % pkg, files) |
123 | d.setVar('CONFFILES_%s' % pkg, files) | 123 | |
124 | conffiles = d.getVar('CONFFILES_%s' % pkg) | ||
125 | conffiles = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (conffiles, basename, basename) | ||
126 | d.setVar('CONFFILES_%s' % pkg, conffiles) | ||
124 | 127 | ||
125 | if "description" in vals: | 128 | if "description" in vals: |
126 | old_desc = d.getVar('DESCRIPTION_' + pkg) or "" | 129 | old_desc = d.getVar('DESCRIPTION_' + pkg) or "" |
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 1a444efabf..b03a286ed4 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -90,6 +90,8 @@ python __anonymous () { | |||
90 | imagedest = d.getVar('KERNEL_IMAGEDEST') | 90 | imagedest = d.getVar('KERNEL_IMAGEDEST') |
91 | 91 | ||
92 | for type in types.split(): | 92 | for type in types.split(): |
93 | if bb.data.inherits_class('nopackages', d): | ||
94 | continue | ||
93 | typelower = type.lower() | 95 | typelower = type.lower() |
94 | d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower)) | 96 | d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower)) |
95 | d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type) | 97 | d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type) |
@@ -743,7 +745,7 @@ kernel_do_deploy() { | |||
743 | fi | 745 | fi |
744 | 746 | ||
745 | if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then | 747 | if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then |
746 | for imageType in ${KERNEL_IMAGETYPES} ; do | 748 | for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do |
747 | if [ "$imageType" = "fitImage" ] ; then | 749 | if [ "$imageType" = "fitImage" ] ; then |
748 | continue | 750 | continue |
749 | fi | 751 | fi |
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index f90176d6c0..dc91118340 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -31,6 +31,7 @@ python do_populate_lic() { | |||
31 | f.write("%s: %s\n" % (key, info[key])) | 31 | f.write("%s: %s\n" % (key, info[key])) |
32 | } | 32 | } |
33 | 33 | ||
34 | PSEUDO_IGNORE_PATHS .= ",${@','.join(((d.getVar('COMMON_LICENSE_DIR') or '') + ' ' + (d.getVar('LICENSE_PATH') or '')).split())}" | ||
34 | # it would be better to copy them in do_install_append, but find_license_filesa is python | 35 | # it would be better to copy them in do_install_append, but find_license_filesa is python |
35 | python perform_packagecopy_prepend () { | 36 | python perform_packagecopy_prepend () { |
36 | enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d) | 37 | enabled = oe.data.typed_value('LICENSE_CREATE_PACKAGE', d) |
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass index 702e9f9c55..6f478ce22c 100644 --- a/meta/classes/license_image.bbclass +++ b/meta/classes/license_image.bbclass | |||
@@ -125,7 +125,6 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): | |||
125 | 125 | ||
126 | licenses = os.listdir(pkg_license_dir) | 126 | licenses = os.listdir(pkg_license_dir) |
127 | for lic in licenses: | 127 | for lic in licenses: |
128 | rootfs_license = os.path.join(rootfs_license_dir, lic) | ||
129 | pkg_license = os.path.join(pkg_license_dir, lic) | 128 | pkg_license = os.path.join(pkg_license_dir, lic) |
130 | pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic) | 129 | pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic) |
131 | 130 | ||
@@ -144,6 +143,8 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): | |||
144 | bad_licenses) == False: | 143 | bad_licenses) == False: |
145 | continue | 144 | continue |
146 | 145 | ||
146 | # Make sure we use only canonical name for the license file | ||
147 | rootfs_license = os.path.join(rootfs_license_dir, "generic_%s" % generic_lic) | ||
147 | if not os.path.exists(rootfs_license): | 148 | if not os.path.exists(rootfs_license): |
148 | oe.path.copyhardlink(pkg_license, rootfs_license) | 149 | oe.path.copyhardlink(pkg_license, rootfs_license) |
149 | 150 | ||
@@ -209,7 +210,8 @@ def license_deployed_manifest(d): | |||
209 | os.unlink(lic_manifest_symlink_dir) | 210 | os.unlink(lic_manifest_symlink_dir) |
210 | 211 | ||
211 | # create the image dir symlink | 212 | # create the image dir symlink |
212 | os.symlink(lic_manifest_dir, lic_manifest_symlink_dir) | 213 | if lic_manifest_dir != lic_manifest_symlink_dir: |
214 | os.symlink(lic_manifest_dir, lic_manifest_symlink_dir) | ||
213 | 215 | ||
214 | def get_deployed_dependencies(d): | 216 | def get_deployed_dependencies(d): |
215 | """ | 217 | """ |
diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass index 720e5dfad4..b161c51a50 100644 --- a/meta/classes/linuxloader.bbclass +++ b/meta/classes/linuxloader.bbclass | |||
@@ -1,6 +1,6 @@ | |||
1 | def get_musl_loader_arch(d): | 1 | def get_musl_loader_arch(d): |
2 | import re | 2 | import re |
3 | ldso_arch = None | 3 | ldso_arch = "NotSupported" |
4 | 4 | ||
5 | targetarch = d.getVar("TARGET_ARCH") | 5 | targetarch = d.getVar("TARGET_ARCH") |
6 | if targetarch.startswith("microblaze"): | 6 | if targetarch.startswith("microblaze"): |
@@ -32,7 +32,7 @@ def get_musl_loader(d): | |||
32 | def get_glibc_loader(d): | 32 | def get_glibc_loader(d): |
33 | import re | 33 | import re |
34 | 34 | ||
35 | dynamic_loader = None | 35 | dynamic_loader = "NotSupported" |
36 | targetarch = d.getVar("TARGET_ARCH") | 36 | targetarch = d.getVar("TARGET_ARCH") |
37 | if targetarch in ["powerpc", "microblaze"]: | 37 | if targetarch in ["powerpc", "microblaze"]: |
38 | dynamic_loader = "${base_libdir}/ld.so.1" | 38 | dynamic_loader = "${base_libdir}/ld.so.1" |
@@ -58,7 +58,7 @@ def get_linuxloader(d): | |||
58 | overrides = d.getVar("OVERRIDES").split(":") | 58 | overrides = d.getVar("OVERRIDES").split(":") |
59 | 59 | ||
60 | if "libc-baremetal" in overrides: | 60 | if "libc-baremetal" in overrides: |
61 | return None | 61 | return "NotSupported" |
62 | 62 | ||
63 | if "libc-musl" in overrides: | 63 | if "libc-musl" in overrides: |
64 | dynamic_loader = get_musl_loader(d) | 64 | dynamic_loader = get_musl_loader(d) |
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index 068032a1e5..55a6985fb0 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass | |||
@@ -17,8 +17,10 @@ | |||
17 | # NPM_INSTALL_DEV: | 17 | # NPM_INSTALL_DEV: |
18 | # Set to 1 to also install devDependencies. | 18 | # Set to 1 to also install devDependencies. |
19 | 19 | ||
20 | inherit python3native | ||
21 | |||
20 | DEPENDS_prepend = "nodejs-native " | 22 | DEPENDS_prepend = "nodejs-native " |
21 | RDEPENDS_${PN}_prepend = "nodejs " | 23 | RDEPENDS_${PN}_append_class-target = " nodejs" |
22 | 24 | ||
23 | NPM_INSTALL_DEV ?= "0" | 25 | NPM_INSTALL_DEV ?= "0" |
24 | 26 | ||
@@ -130,11 +132,17 @@ python npm_do_configure() { | |||
130 | cached_manifest.pop("dependencies", None) | 132 | cached_manifest.pop("dependencies", None) |
131 | cached_manifest.pop("devDependencies", None) | 133 | cached_manifest.pop("devDependencies", None) |
132 | 134 | ||
133 | with open(orig_shrinkwrap_file, "r") as f: | 135 | has_shrinkwrap_file = True |
134 | orig_shrinkwrap = json.load(f) | 136 | |
137 | try: | ||
138 | with open(orig_shrinkwrap_file, "r") as f: | ||
139 | orig_shrinkwrap = json.load(f) | ||
140 | except IOError: | ||
141 | has_shrinkwrap_file = False | ||
135 | 142 | ||
136 | cached_shrinkwrap = copy.deepcopy(orig_shrinkwrap) | 143 | if has_shrinkwrap_file: |
137 | cached_shrinkwrap.pop("dependencies", None) | 144 | cached_shrinkwrap = copy.deepcopy(orig_shrinkwrap) |
145 | cached_shrinkwrap.pop("dependencies", None) | ||
138 | 146 | ||
139 | # Manage the dependencies | 147 | # Manage the dependencies |
140 | progress = OutOfProgressHandler(d, r"^(\d+)/(\d+)$") | 148 | progress = OutOfProgressHandler(d, r"^(\d+)/(\d+)$") |
@@ -165,8 +173,10 @@ python npm_do_configure() { | |||
165 | progress.write("%d/%d" % (progress_done, progress_total)) | 173 | progress.write("%d/%d" % (progress_done, progress_total)) |
166 | 174 | ||
167 | dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False) | 175 | dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False) |
168 | foreach_dependencies(orig_shrinkwrap, _count_dependency, dev) | 176 | |
169 | foreach_dependencies(orig_shrinkwrap, _cache_dependency, dev) | 177 | if has_shrinkwrap_file: |
178 | foreach_dependencies(orig_shrinkwrap, _count_dependency, dev) | ||
179 | foreach_dependencies(orig_shrinkwrap, _cache_dependency, dev) | ||
170 | 180 | ||
171 | # Configure the main package | 181 | # Configure the main package |
172 | with tempfile.TemporaryDirectory() as tmpdir: | 182 | with tempfile.TemporaryDirectory() as tmpdir: |
@@ -181,16 +191,19 @@ python npm_do_configure() { | |||
181 | cached_manifest[depkey] = {} | 191 | cached_manifest[depkey] = {} |
182 | cached_manifest[depkey][name] = version | 192 | cached_manifest[depkey][name] = version |
183 | 193 | ||
184 | _update_manifest("dependencies") | 194 | if has_shrinkwrap_file: |
195 | _update_manifest("dependencies") | ||
185 | 196 | ||
186 | if dev: | 197 | if dev: |
187 | _update_manifest("devDependencies") | 198 | if has_shrinkwrap_file: |
199 | _update_manifest("devDependencies") | ||
188 | 200 | ||
189 | with open(cached_manifest_file, "w") as f: | 201 | with open(cached_manifest_file, "w") as f: |
190 | json.dump(cached_manifest, f, indent=2) | 202 | json.dump(cached_manifest, f, indent=2) |
191 | 203 | ||
192 | with open(cached_shrinkwrap_file, "w") as f: | 204 | if has_shrinkwrap_file: |
193 | json.dump(cached_shrinkwrap, f, indent=2) | 205 | with open(cached_shrinkwrap_file, "w") as f: |
206 | json.dump(cached_shrinkwrap, f, indent=2) | ||
194 | } | 207 | } |
195 | 208 | ||
196 | python npm_do_compile() { | 209 | python npm_do_compile() { |
@@ -237,9 +250,7 @@ python npm_do_compile() { | |||
237 | sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") | 250 | sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") |
238 | nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) | 251 | nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) |
239 | configs.append(("nodedir", nodedir)) | 252 | configs.append(("nodedir", nodedir)) |
240 | bindir = os.path.join(sysroot, d.getVar("bindir_native").strip("/")) | 253 | configs.append(("python", d.getVar("PYTHON"))) |
241 | pythondir = os.path.join(bindir, "python-native", "python") | ||
242 | configs.append(("python", pythondir)) | ||
243 | 254 | ||
244 | # Add node-pre-gyp configuration | 255 | # Add node-pre-gyp configuration |
245 | args.append(("target_arch", d.getVar("NPM_ARCH"))) | 256 | args.append(("target_arch", d.getVar("NPM_ARCH"))) |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index e6236c0bb2..5a32e5c2e3 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -2340,7 +2340,7 @@ python do_package () { | |||
2340 | # cache. This is useful if an item this class depends on changes in a | 2340 | # cache. This is useful if an item this class depends on changes in a |
2341 | # way that the output of this class changes. rpmdeps is a good example | 2341 | # way that the output of this class changes. rpmdeps is a good example |
2342 | # as any change to rpmdeps requires this to be rerun. | 2342 | # as any change to rpmdeps requires this to be rerun. |
2343 | # PACKAGE_BBCLASS_VERSION = "2" | 2343 | # PACKAGE_BBCLASS_VERSION = "4" |
2344 | 2344 | ||
2345 | # Init cachedpath | 2345 | # Init cachedpath |
2346 | global cpath | 2346 | global cpath |
@@ -2446,6 +2446,7 @@ python do_packagedata () { | |||
2446 | 2446 | ||
2447 | bb.build.exec_func("packagedata_translate_pr_autoinc", d) | 2447 | bb.build.exec_func("packagedata_translate_pr_autoinc", d) |
2448 | } | 2448 | } |
2449 | do_packagedata[cleandirs] += "${WORKDIR}/pkgdata-pdata-input" | ||
2449 | 2450 | ||
2450 | # Translate the EXTENDPRAUTO and AUTOINC to the final values | 2451 | # Translate the EXTENDPRAUTO and AUTOINC to the final values |
2451 | packagedata_translate_pr_autoinc() { | 2452 | packagedata_translate_pr_autoinc() { |
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 53b4700cdd..89b4c6bbfc 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -687,6 +687,7 @@ python do_package_rpm () { | |||
687 | cmd = cmd + " --define '_binary_payload w6T.xzdio'" | 687 | cmd = cmd + " --define '_binary_payload w6T.xzdio'" |
688 | cmd = cmd + " --define '_source_payload w6T.xzdio'" | 688 | cmd = cmd + " --define '_source_payload w6T.xzdio'" |
689 | cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" | 689 | cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'" |
690 | cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'" | ||
690 | cmd = cmd + " --define '_buildhost reproducible'" | 691 | cmd = cmd + " --define '_buildhost reproducible'" |
691 | if perfiledeps: | 692 | if perfiledeps: |
692 | cmd = cmd + " --define '__find_requires " + outdepends + "'" | 693 | cmd = cmd + " --define '__find_requires " + outdepends + "'" |
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 49b1833265..635b3a6b80 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -178,7 +178,7 @@ do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}" | |||
178 | do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}" | 178 | do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}" |
179 | do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}" | 179 | do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}" |
180 | 180 | ||
181 | PSEUDO_IGNORE_PATHS .= ",${SDKDEPLOYDIR}" | 181 | PSEUDO_IGNORE_PATHS .= ",${SDKDEPLOYDIR},${WORKDIR}/oe-sdk-repo,${WORKDIR}/sstate-build-populate_sdk" |
182 | 182 | ||
183 | fakeroot create_sdk_files() { | 183 | fakeroot create_sdk_files() { |
184 | cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/ | 184 | cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/ |
@@ -329,6 +329,13 @@ def sdk_variables(d): | |||
329 | 329 | ||
330 | do_populate_sdk[vardeps] += "${@sdk_variables(d)}" | 330 | do_populate_sdk[vardeps] += "${@sdk_variables(d)}" |
331 | 331 | ||
332 | python () { | ||
333 | variables = sdk_command_variables(d) | ||
334 | for var in variables: | ||
335 | if d.getVar(var, False): | ||
336 | d.setVarFlag(var, 'func', '1') | ||
337 | } | ||
338 | |||
332 | do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \ | 339 | do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \ |
333 | ${TOOLCHAIN_SHAR_EXT_TMPL}:True" | 340 | ${TOOLCHAIN_SHAR_EXT_TMPL}:True" |
334 | 341 | ||
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 6f35b612c2..14689ec6ac 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -24,6 +24,7 @@ SDK_INCLUDE_NATIVESDK ?= "0" | |||
24 | SDK_INCLUDE_BUILDTOOLS ?= '1' | 24 | SDK_INCLUDE_BUILDTOOLS ?= '1' |
25 | 25 | ||
26 | SDK_RECRDEP_TASKS ?= "" | 26 | SDK_RECRDEP_TASKS ?= "" |
27 | SDK_CUSTOM_TEMPLATECONF ?= "0" | ||
27 | 28 | ||
28 | SDK_LOCAL_CONF_WHITELIST ?= "" | 29 | SDK_LOCAL_CONF_WHITELIST ?= "" |
29 | SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \ | 30 | SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \ |
@@ -199,6 +200,9 @@ python copy_buildsystem () { | |||
199 | buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d) | 200 | buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d) |
200 | baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH') | 201 | baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH') |
201 | 202 | ||
203 | #check if custome templateconf path is set | ||
204 | use_custom_templateconf = d.getVar('SDK_CUSTOM_TEMPLATECONF') | ||
205 | |||
202 | # Determine if we're building a derivative extensible SDK (from devtool build-sdk) | 206 | # Determine if we're building a derivative extensible SDK (from devtool build-sdk) |
203 | derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1' | 207 | derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1' |
204 | if derivative: | 208 | if derivative: |
@@ -247,7 +251,9 @@ python copy_buildsystem () { | |||
247 | 251 | ||
248 | # Create a layer for new recipes / appends | 252 | # Create a layer for new recipes / appends |
249 | bbpath = d.getVar('BBPATH') | 253 | bbpath = d.getVar('BBPATH') |
250 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) | 254 | env = os.environ.copy() |
255 | env['PYTHONDONTWRITEBYTECODE'] = '1' | ||
256 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')], env=env) | ||
251 | 257 | ||
252 | # Create bblayers.conf | 258 | # Create bblayers.conf |
253 | bb.utils.mkdirhier(baseoutpath + '/conf') | 259 | bb.utils.mkdirhier(baseoutpath + '/conf') |
@@ -360,6 +366,9 @@ python copy_buildsystem () { | |||
360 | # Hide the config information from bitbake output (since it's fixed within the SDK) | 366 | # Hide the config information from bitbake output (since it's fixed within the SDK) |
361 | f.write('BUILDCFG_HEADER = ""\n\n') | 367 | f.write('BUILDCFG_HEADER = ""\n\n') |
362 | 368 | ||
369 | # Write METADATA_REVISION | ||
370 | f.write('METADATA_REVISION = "%s"\n\n' % d.getVar('METADATA_REVISION')) | ||
371 | |||
363 | f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n') | 372 | f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n') |
364 | f.write('WITHIN_EXT_SDK = "1"\n\n') | 373 | f.write('WITHIN_EXT_SDK = "1"\n\n') |
365 | 374 | ||
@@ -390,7 +399,7 @@ python copy_buildsystem () { | |||
390 | shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') | 399 | shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') |
391 | 400 | ||
392 | # Use templateconf.cfg file from builddir if exists | 401 | # Use templateconf.cfg file from builddir if exists |
393 | if os.path.exists(builddir + '/conf/templateconf.cfg'): | 402 | if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1': |
394 | shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg') | 403 | shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg') |
395 | else: | 404 | else: |
396 | # Write a templateconf.cfg | 405 | # Write a templateconf.cfg |
diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass index d98fb4c758..2e3a88c126 100644 --- a/meta/classes/python3native.bbclass +++ b/meta/classes/python3native.bbclass | |||
@@ -17,8 +17,6 @@ export STAGING_LIBDIR | |||
17 | export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so" | 17 | export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so" |
18 | export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}" | 18 | export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}" |
19 | 19 | ||
20 | export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" | ||
21 | |||
22 | # suppress host user's site-packages dirs. | 20 | # suppress host user's site-packages dirs. |
23 | export PYTHONNOUSERSITE = "1" | 21 | export PYTHONNOUSERSITE = "1" |
24 | 22 | ||
diff --git a/meta/classes/python3targetconfig.bbclass b/meta/classes/python3targetconfig.bbclass new file mode 100644 index 0000000000..fc1025c207 --- /dev/null +++ b/meta/classes/python3targetconfig.bbclass | |||
@@ -0,0 +1,17 @@ | |||
1 | inherit python3native | ||
2 | |||
3 | EXTRA_PYTHON_DEPENDS ?= "" | ||
4 | EXTRA_PYTHON_DEPENDS_class-target = "python3" | ||
5 | DEPENDS_append = " ${EXTRA_PYTHON_DEPENDS}" | ||
6 | |||
7 | do_configure_prepend_class-target() { | ||
8 | export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" | ||
9 | } | ||
10 | |||
11 | do_compile_prepend_class-target() { | ||
12 | export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" | ||
13 | } | ||
14 | |||
15 | do_install_prepend_class-target() { | ||
16 | export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" | ||
17 | } | ||
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass index 1a12db1206..9cb6b0bd31 100644 --- a/meta/classes/report-error.bbclass +++ b/meta/classes/report-error.bbclass | |||
@@ -6,6 +6,8 @@ | |||
6 | # | 6 | # |
7 | # Licensed under the MIT license, see COPYING.MIT for details | 7 | # Licensed under the MIT license, see COPYING.MIT for details |
8 | 8 | ||
9 | inherit base | ||
10 | |||
9 | ERR_REPORT_DIR ?= "${LOG_DIR}/error-report" | 11 | ERR_REPORT_DIR ?= "${LOG_DIR}/error-report" |
10 | 12 | ||
11 | def errorreport_getdata(e): | 13 | def errorreport_getdata(e): |
@@ -64,6 +66,8 @@ python errorreport_handler () { | |||
64 | data['failures'] = [] | 66 | data['failures'] = [] |
65 | data['component'] = " ".join(e.getPkgs()) | 67 | data['component'] = " ".join(e.getPkgs()) |
66 | data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) | 68 | data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data)) |
69 | data['bitbake_version'] = e.data.getVar("BB_VERSION") | ||
70 | data['layer_version'] = get_layers_branch_rev(e.data) | ||
67 | data['local_conf'] = get_conf_data(e, 'local.conf') | 71 | data['local_conf'] = get_conf_data(e, 'local.conf') |
68 | data['auto_conf'] = get_conf_data(e, 'auto.conf') | 72 | data['auto_conf'] = get_conf_data(e, 'auto.conf') |
69 | lock = bb.utils.lockfile(datafile + '.lock') | 73 | lock = bb.utils.lockfile(datafile + '.lock') |
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index ef616da229..0469ba7059 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass | |||
@@ -32,4 +32,8 @@ python () { | |||
32 | d.setVar('DEB_SDK_ARCH', 'amd64') | 32 | d.setVar('DEB_SDK_ARCH', 'amd64') |
33 | elif darch == "arm": | 33 | elif darch == "arm": |
34 | d.setVar('DEB_SDK_ARCH', 'armel') | 34 | d.setVar('DEB_SDK_ARCH', 'armel') |
35 | elif darch == "aarch64": | ||
36 | d.setVar('DEB_SDK_ARCH', 'arm64') | ||
37 | else: | ||
38 | bb.fatal("Unhandled SDK_ARCH %s" % darch) | ||
35 | } | 39 | } |
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 3262d08fbf..03a9792f68 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -703,6 +703,23 @@ def check_sanity_version_change(status, d): | |||
703 | if (tmpdirmode & stat.S_ISUID): | 703 | if (tmpdirmode & stat.S_ISUID): |
704 | status.addresult("TMPDIR is setuid, please don't build in a setuid directory") | 704 | status.addresult("TMPDIR is setuid, please don't build in a setuid directory") |
705 | 705 | ||
706 | # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS | ||
707 | pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") | ||
708 | workdir = d.getVar('WORKDIR', expand=True) | ||
709 | for i in pseudoignorepaths: | ||
710 | if i and workdir.startswith(i): | ||
711 | status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n") | ||
712 | |||
713 | # Check if PSEUDO_IGNORE_PATHS and and paths under pseudo control overlap | ||
714 | pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",") | ||
715 | pseudo_control_dir = "${D},${PKGD},${PKGDEST},${IMAGEROOTFS},${SDK_OUTPUT}" | ||
716 | pseudocontroldir = d.expand(pseudo_control_dir).split(",") | ||
717 | for i in pseudoignorepaths: | ||
718 | for j in pseudocontroldir: | ||
719 | if i and j: | ||
720 | if j.startswith(i): | ||
721 | status.addresult("A path included in PSEUDO_IGNORE_PATHS " + str(i) + " and the path " + str(j) + " overlap and this will break pseudo permission and ownership tracking. Please set the path " + str(j) + " to a different directory which does not overlap with pseudo controlled directories. \n") | ||
722 | |||
706 | # Some third-party software apparently relies on chmod etc. being suid root (!!) | 723 | # Some third-party software apparently relies on chmod etc. being suid root (!!) |
707 | import stat | 724 | import stat |
708 | suid_check_bins = "chown chmod mknod".split() | 725 | suid_check_bins = "chown chmod mknod".split() |
@@ -787,6 +804,11 @@ def check_sanity_everybuild(status, d): | |||
787 | if "." in paths or "./" in paths or "" in paths: | 804 | if "." in paths or "./" in paths or "" in paths: |
788 | status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n") | 805 | status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n") |
789 | 806 | ||
807 | #Check if bitbake is present in PATH environment variable | ||
808 | bb_check = bb.utils.which(d.getVar('PATH'), 'bitbake') | ||
809 | if not bb_check: | ||
810 | bb.warn("bitbake binary is not found in PATH, did you source the script?") | ||
811 | |||
790 | # Check whether 'inherit' directive is found (used for a class to inherit) | 812 | # Check whether 'inherit' directive is found (used for a class to inherit) |
791 | # in conf file it's supposed to be uppercase INHERIT | 813 | # in conf file it's supposed to be uppercase INHERIT |
792 | inherit = d.getVar('inherit') | 814 | inherit = d.getVar('inherit') |
@@ -860,13 +882,18 @@ def check_sanity_everybuild(status, d): | |||
860 | except: | 882 | except: |
861 | pass | 883 | pass |
862 | 884 | ||
863 | oeroot = d.getVar('COREBASE') | 885 | for checkdir in ['COREBASE', 'TMPDIR']: |
864 | if oeroot.find('+') != -1: | 886 | val = d.getVar(checkdir) |
865 | status.addresult("Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include any + characters.") | 887 | if val.find('..') != -1: |
866 | if oeroot.find('@') != -1: | 888 | status.addresult("Error, you have '..' in your %s directory path. Please ensure the variable contains an absolute path as this can break some recipe builds in obtuse ways." % checkdir) |
867 | status.addresult("Error, you have an invalid character (@) in your COREBASE directory path. Please move the installation to a directory which doesn't include any @ characters.") | 889 | if val.find('+') != -1: |
868 | if oeroot.find(' ') != -1: | 890 | status.addresult("Error, you have an invalid character (+) in your %s directory path. Please move the installation to a directory which doesn't include any + characters." % checkdir) |
869 | status.addresult("Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this.") | 891 | if val.find('@') != -1: |
892 | status.addresult("Error, you have an invalid character (@) in your %s directory path. Please move the installation to a directory which doesn't include any @ characters." % checkdir) | ||
893 | if val.find(' ') != -1: | ||
894 | status.addresult("Error, you have a space in your %s directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this." % checkdir) | ||
895 | if val.find('%') != -1: | ||
896 | status.addresult("Error, you have an invalid character (%) in your %s directory path which causes problems with python string formatting. Please move the installation to a directory which doesn't include any % characters." % checkdir) | ||
870 | 897 | ||
871 | # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS | 898 | # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS |
872 | import re | 899 | import re |
diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass index 6b171ca8df..4f3ae502ef 100644 --- a/meta/classes/scons.bbclass +++ b/meta/classes/scons.bbclass | |||
@@ -5,7 +5,6 @@ DEPENDS += "python3-scons-native" | |||
5 | EXTRA_OESCONS ?= "" | 5 | EXTRA_OESCONS ?= "" |
6 | 6 | ||
7 | do_configure() { | 7 | do_configure() { |
8 | unset _PYTHON_SYSCONFIGDATA_NAME | ||
9 | if [ -n "${CONFIGURESTAMPFILE}" ]; then | 8 | if [ -n "${CONFIGURESTAMPFILE}" ]; then |
10 | if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then | 9 | if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then |
11 | ${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} | 10 | ${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} |
@@ -17,13 +16,11 @@ do_configure() { | |||
17 | } | 16 | } |
18 | 17 | ||
19 | scons_do_compile() { | 18 | scons_do_compile() { |
20 | unset _PYTHON_SYSCONFIGDATA_NAME | ||
21 | ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \ | 19 | ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \ |
22 | die "scons build execution failed." | 20 | die "scons build execution failed." |
23 | } | 21 | } |
24 | 22 | ||
25 | scons_do_install() { | 23 | scons_do_install() { |
26 | unset _PYTHON_SYSCONFIGDATA_NAME | ||
27 | ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \ | 24 | ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \ |
28 | die "scons install execution failed." | 25 | die "scons install execution failed." |
29 | } | 26 | } |
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index a8ae75101d..d08d950e76 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -72,6 +72,7 @@ BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}" | |||
72 | 72 | ||
73 | SSTATE_ARCHS = " \ | 73 | SSTATE_ARCHS = " \ |
74 | ${BUILD_ARCH} \ | 74 | ${BUILD_ARCH} \ |
75 | ${BUILD_ARCH}_${ORIGNATIVELSBSTRING} \ | ||
75 | ${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \ | 76 | ${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \ |
76 | ${BUILD_ARCH}_${TARGET_ARCH} \ | 77 | ${BUILD_ARCH}_${TARGET_ARCH} \ |
77 | ${SDK_ARCH}_${SDK_OS} \ | 78 | ${SDK_ARCH}_${SDK_OS} \ |
@@ -80,6 +81,7 @@ SSTATE_ARCHS = " \ | |||
80 | ${PACKAGE_ARCH} \ | 81 | ${PACKAGE_ARCH} \ |
81 | ${PACKAGE_EXTRA_ARCHS} \ | 82 | ${PACKAGE_EXTRA_ARCHS} \ |
82 | ${MACHINE_ARCH}" | 83 | ${MACHINE_ARCH}" |
84 | SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING" | ||
83 | 85 | ||
84 | SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" | 86 | SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" |
85 | 87 | ||
@@ -121,6 +123,8 @@ SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \ | |||
121 | python () { | 123 | python () { |
122 | if bb.data.inherits_class('native', d): | 124 | if bb.data.inherits_class('native', d): |
123 | d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False)) | 125 | d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False)) |
126 | if d.getVar("PN") == "pseudo-native": | ||
127 | d.appendVar('SSTATE_PKGARCH', '_${ORIGNATIVELSBSTRING}') | ||
124 | elif bb.data.inherits_class('crosssdk', d): | 128 | elif bb.data.inherits_class('crosssdk', d): |
125 | d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}")) | 129 | d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}")) |
126 | elif bb.data.inherits_class('cross', d): | 130 | elif bb.data.inherits_class('cross', d): |
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index f0a619b35b..8165ab268e 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
@@ -27,11 +27,15 @@ SYSROOT_DIRS_BLACKLIST = " \ | |||
27 | ${mandir} \ | 27 | ${mandir} \ |
28 | ${docdir} \ | 28 | ${docdir} \ |
29 | ${infodir} \ | 29 | ${infodir} \ |
30 | ${datadir}/X11/locale \ | ||
30 | ${datadir}/applications \ | 31 | ${datadir}/applications \ |
32 | ${datadir}/bash-completion \ | ||
31 | ${datadir}/fonts \ | 33 | ${datadir}/fonts \ |
32 | ${datadir}/gtk-doc/html \ | 34 | ${datadir}/gtk-doc/html \ |
35 | ${datadir}/installed-tests \ | ||
33 | ${datadir}/locale \ | 36 | ${datadir}/locale \ |
34 | ${datadir}/pixmaps \ | 37 | ${datadir}/pixmaps \ |
38 | ${datadir}/terminfo \ | ||
35 | ${libdir}/${BPN}/ptest \ | 39 | ${libdir}/${BPN}/ptest \ |
36 | " | 40 | " |
37 | 41 | ||
diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass index 9e8a82c9f1..a4bff732b9 100644 --- a/meta/classes/systemd.bbclass +++ b/meta/classes/systemd.bbclass | |||
@@ -174,7 +174,8 @@ python systemd_populate_packages() { | |||
174 | if path_found != '': | 174 | if path_found != '': |
175 | systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) | 175 | systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) |
176 | else: | 176 | else: |
177 | bb.fatal("SYSTEMD_SERVICE_%s value %s does not exist" % (pkg_systemd, service)) | 177 | bb.fatal("Didn't find service unit '{0}', specified in SYSTEMD_SERVICE_{1}. {2}".format( |
178 | service, pkg_systemd, "Also looked for service unit '{0}'.".format(base) if base is not None else "")) | ||
178 | 179 | ||
179 | def systemd_create_presets(pkg, action): | 180 | def systemd_create_presets(pkg, action): |
180 | presetf = oe.path.join(d.getVar("PKGD"), d.getVar("systemd_unitdir"), "system-preset/98-%s.preset" % pkg) | 181 | presetf = oe.path.join(d.getVar("PKGD"), d.getVar("systemd_unitdir"), "system-preset/98-%s.preset" % pkg) |