Lines Matching +full:check +full:- +full:system +full:- +full:ubuntu

4 # SPDX-License-Identifier: MIT
8 # Sanity check the users setup for common misconfigurations
43 SANITY_DIFF_TOOL ?= "diff -u"
47 # Check we are using a valid local.conf
67 # If we have a site.conf, check it's valid
115 if start != -1 and (len(bbpath_line) != (start + 1)):
147 # Handle rename of meta-yocto -> meta-poky
148 # This marks the start of separate version numbers but code is needed in OE-Core
152 if 'meta-yocto' in layers:
155 index, meta_yocto_line = sanity_conf_find_line(r'.*meta-yocto[\'"\s\n]', lines)
157 lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
188 bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
194 # Check a single tune for validity.
202 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + multilib
204 bb.debug(2, "Sanity-checking tuning '%s' (%s) features:" % (tune, multilib))
205 features = (localdata.getVar("TUNE_FEATURES:tune-%s" % tune) or "").split()
248 tune = data.getVar("DEFAULTTUNE:virtclass-multilib-%s" % lib)
294 …return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, …
304 …return "Non-ASCII character(s) in %s path (\"%s\") detected. This would cause build failures as we…
310 return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8').strip()
315 # Check that the path isn't located on nfs.
322 # Check that the path is on a case-sensitive file system
327 return "The %s (%s) can't be on a case-insensitive file system.\n" % (name, path)
330 # Check that path isn't a broken symlink
336 # URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
338 # the check is skipped
346 # Only check connectivity if network enabled and the
394 …bb.warn('Host distribution "%s" has not been validated with this version of the build system; you …
400 # Check TUNE_ARCH is set
404 # Check TARGET_OS is set
408 …# Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_AR…
432 # Patch before 2.7 can't handle all the features in git-style diffs. Some
438 … result = subprocess.check_output(["patch", "--version"], stderr=subprocess.STDOUT).decode('utf-8')
439 version = re.search(r"[0-9.]+", result.splitlines()[0]).group()
445 return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
452 … result = subprocess.check_output(['make', '--version'], stderr=subprocess.STDOUT).decode('utf-8')
454 return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output)
461 if "ubuntu" in distro or "debian" in distro or "linuxmint" in distro:
463 …known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make
467 # Check if we're running on WSL (Windows Subsystem for Linux).
472 # https://docs.microsoft.com/en-us/windows/wsl/wsl2-install
485 Check that user namespaces are functional, as they're used for network isolation.
505 …"See https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#unprivileged
510 # This can be fixed on CentOS-7 with devtoolset-6+
511 # https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/
513 # A less invasive fix is with scripts/install-buildtools (or with user
514 # built buildtools-extended-tarball)
522 …r version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-b…
527 # Version 1.28 is needed so opkg-build works correctly when reproducible builds are enabled
532 … result = subprocess.check_output(["tar", "--version"], stderr=subprocess.STDOUT).decode('utf-8')
534 return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output)
536 …tall gtar (you could use the project's buildtools-tarball from our last release or use scripts/ins…
539 …on of tar (you could use the project's buildtools-tarball from our last release or use scripts/ins…
542 … result = subprocess.check_output(["tar", "--help"], stderr=subprocess.STDOUT).decode('utf-8')
543 if "--xattrs" not in result:
544 return "Your tar doesn't support --xattrs, please use GNU tar.\n"
546 return "Unable to execute tar --help, exit code %d\n%s\n" % (e.returncode, e.output)
556 … result = subprocess.check_output(["git", "--version"], stderr=subprocess.DEVNULL).decode('utf-8')
558 return "Unable to execute git --version, exit code %d\n%s\n" % (e.returncode, e.output)
564 # Check the required perl modules which may not be installed by default
572 subprocess.check_output(["perl", "-e", "use %s" % m])
594 indexes = glob.glob(d.expand("${SSTATE_MANIFESTS}/index-${BUILD_ARCH}_*"))
625 cmd = shlex.split(d.getVar("BUILD_CXX")) + ["-x", "c++","-", "-o", "/dev/null", flag]
627 subprocess.run(cmd, input=cpp_code, capture_output=True, text=True, check=True)
630 … return error_message or f"An unexpected issue occurred during the C++ toolchain check: {str(e)}"
634 # Check the 'ABI' of TMPDIR
664 # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS)
682 # Check the python install is complete. Examples that are often removed in
683 # minimal installations: glib-2.0-natives requires xml.parsers.expat
720 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
721 if "diffstat-native" not in assume_provided:
724 # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
735 # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS
742 # Check if PSEUDO_IGNORE_PATHS and paths under pseudo control overlap
752 # Some third-party software apparently relies on chmod etc. being suid root (!!)
762 # Check that we can fetch from various network transports
774 …f os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
775 …status.addresult("You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc…
782 "Please check your layer.conf files and other BBPATH " \
789 …of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n')
794 …# Check that TOPDIR does not contain non ascii chars (perl_5.40.0, Perl-native and shadow-native b…
797 # Check that TMPDIR isn't located on nfs
800 # Check for case-insensitive file systems (such as Linux in Docker on
801 # macOS with default HFS+ file system)
804 # Check if linking with lstdc++ is failing
805 status.addresult(check_cpp_toolchain_flag(d, "-lstdc++"))
807 # Check if the C++ toochain support the "--std=gnu++20" flag
808 status.addresult(check_cpp_toolchain_flag(d, "--std=gnu++20",
809 "An error occurred during checking the C++ toolchain for '--std=gnu++20' support. "
814 Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
818 locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
820 raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)
830 # Check the Python version, we now have a minimum of Python 3.9
833 …status.addresult('The system requires at least Python 3.9 to run. Please update your Python interp…
835 # Check the bitbake version meets minimum requirements
846 #Check if bitbake is present in PATH environment variable
851 # Check whether 'inherit' directive is found (used for a class to inherit)
857 # Check that the DISTRO is valid, if set
864 # Check that these variables don't use tilde-expansion as we don't do that
869 …# Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check
873 …status.addresult("DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, …
878 # Check that the MACHINE is valid, if it is set
892 # Check that the SDKMACHINE is valid, if it is set
894 if not check_conf_exists("conf/machine-sdk/${SDKMACHINE}.conf", d):
897 …status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE ma…
899 # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
901 if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
902 …status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash; found '%s'\n" % s…
916 # This path is no longer user-readable in modern (very recent) Linux
930 if val.find('..') != -1:
932 if val.find('+') != -1:
934 if val.find('@') != -1:
936 if val.find(' ') != -1:
938 if val.find('%') != -1:
941 # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS
982 mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
985 # Check sstate mirrors aren't being used with a local hash server and no remote
990 # Check that TMPDIR hasn't changed location since the last time we were run
1010 # If /bin/sh is a symlink, check that it points to dash or bash
1013 # Due to update-alternatives, the shell name may take various
1035 # Check saved sanity info