summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-01-28strace: increase ptest timeout duration 120->240sYi Fan Yu
solve qual_fault-syscall.test and qual_fault.test failing due to timeout. Bug 14165 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5af9f32d9b12654793289f44366251f978f6378a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28timezone: upgrade to 2021aOvidiu Panait
Release 2021a - 2021-01-24 10:54:57 -0800 Changes to future timestamps South Sudan changes from +03 to +02 on 2021-02-01 at 00:00. (Thanks to Steffen Thorsen.) Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ed9114df2086c4ad0544cf99c9c1ff8fb7b830b9) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28selftest/devtool: Add modify_localfiles_only test checking symlink pathTomasz Dziendzielski
If recipe uses only file:// fetcher devtool unpacks sources under oe-local-files/ and adds symlink in source root directory. We need to verify if the symlink in subdirectory has correct path. See [YOCTO #13738] for details. Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 044c90d152bfd1b2a23272df39327ba4cd862dff) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28ovmf-shell-image: image is only buildable on x86-64Ross Burton
This image is only buildable for x86-64, so add a COMPATIBLE assignment to ensure it isn't attempted on others. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bdd8208675c8a0c0232c678804a8b62cd74f1d48) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28core-image-sato-sdk-ptest: these images need ptestRoss Burton
As this image isn't buildable without ptest (the packages won't exist), depend on the ptest DISTRO_FEATURE to ensure we don't try and build it. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0fe856d726c6d9c35533e32e70fbe05ef2b88b17) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28dtc: improve reproducibilityOleksiy Obitotskyy
Makefile override CFLAGS, so -fmacro/debug-prefix-map optiions was omitted and binaries contains absolute patch to sources. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b58e808a087bbc0a5abd78fd34bb6f1c0c93ba25) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28devtool: Fix file:// fetcher symlink directory structureTomasz Dziendzielski
Add relative path if file is under directory. [YOCTO #13738] Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 19ddacc1b38f9ebb86a9359963ccc3c707f7125e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_eventYi Fan Yu
The test would timeout on autobuilders. This patch increases the timeout to 60s The test will now also exit as soon as we receive the 2 expected events Expected runtime is around 1s if successful Bug 14158 Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit be02aa9283f805de718badd5ea12c4968da8774f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28externalsrc: Fix parsing error with devtool non-git sourcesTomasz Dziendzielski
If srcdir is under poky directory (e.g. devtool poky/build/workspace/sources) and is not a git repository then ${@srctree_hash_files(d)} will run "git rev-parse --git-dir" and detect poky directory as git-dir and run "'git', 'add', '-A', '.'], cwd=s_dir" trying to add srcdir but build dir is in .gitignore and latest git will fail with "The following paths are ignored by one of your .gitignore files: build" which will end with "ExpansionError during parsing". In this commit I added a check if git_dir is the same as git-dir from TOPDIR (which will detect poky directory) and if yes, then treat srcdir as non-git sources. Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 95fbac8dcad6c93f4c9737e9fe13e92ab6befa09) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28devtool: Fix source extraction for gcc shared sourceTomasz Dziendzielski
If do_patch task is disabled then prepare do_configure dependencies to fetch external sources and create symlink to ${S} in devtool workspace. [YOCTO #13036] Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9e47319bfe62d289b90f7545a64dbdc1cbde7f1d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28toolchain-shar-relocate.sh: Fix handling files with colonsOleksiy Obitotskyy yIEf0zt.mo
Files could contain colons in name and we should not use colons (':') as field separator. E.g. perl/python man pages packages. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 50d2ed0689f1aed6f33b4992d37e2e991c99eb07) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28flex: Fix --noline option behaviorOleksiy Obitotskyy
Option --noline or -L does not handled properly. So generated code contains #line directives with file absolute path and prevents to create reproducible builds. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0bf2cb7dc2123f220accf1542c2ae4c4b4b8275a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28flex: Refresh patchzangrc
The patch changes the same file twice which causes issues with some patch tools (not used in YP by default). Refresh the patch to clean this up anyway. RP: Tweak commit message Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cb6e65f8196fd6587c75c3ab2cf060c00a074ec6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28flex: fix build with autoconf 2.70Ross Burton
autoconf 2.70 is coming soon which has some small behavioural fixes, so backport a patch from upstream to fix the build with that release. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 946610f2cc8cd42265ee3fab6c73ad4831aaeb4e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28oeqa/ptest: print a warning if ptests failedAlexander Kanavin
This allows spotting ptest regressions without having hard ptest failures (for that full ptest stability should be achieved). Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 79b54d902df2788b0822b6c9cc14705ab00e6a5b) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 5232c0b480eba4537c8db71c95189950011fb64d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28sanity.bbclass: sanity check for if bitbake is present in PATHDorinda
If a user executes the environment script instead of sourcing it, there's an error about an empty element in PATH. This is because bitbake isn't present in environment variable PATH. Hence, this patch adds a sanity check to verify if bitbake is present in PATH and if bitbake isn't present issue a warning message. [YOCTO #13822] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e08799913a7f207bc63e085eb98196fd61ed57bc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHSDorinda
If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS. [YOCTO #14179] Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7a681525e904914e938de25df5cc64209097d15d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Optimise fstab modification for ext2/3/4 and msdos partitionsPaul Barker
The fix for [Yocto #13994] required the rootfs directory to be copied (using hardlinks if possible) when modifying the fstab file under wic. We can optimise this copy away for filesystems where we have the tools to modify the contents of the partition image after it is created. For ext2/3/4 filesystems we have the debugfs tool and for msdos/vfat filesystems we have the mcopy tool. So for any of these filesystems we skip the modification of the fstab file in the rootfs directory (and skip the associated copy unless it is otherwise necessary) and update the contents of fstab directly in the partition image. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5fb8ae0e9159597d7eaa9307a3a8543800bf9405) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Copy rootfs dir if fstab needs updatingPaul Barker
By default, wic updates the /etc/fstab in the rootfs to include details of additional partitions described in the selected wks file. If this modification is performed in place, other tasks which create an image file from the rootfs directory (e.g. do_image_tar and do_image_ext4) will pick up the modified fstab file which would not be appropriate for those images as they do not include the additional partitions described in the wks file. wic does undo modifications to the fstab file once it has finished creating the filesystem image, however this leaves open a race condition if one of the other tasks reads the contents of the fstab file from the rootfs directory between the point where wic modifies the fstab file and the point where wic restores the files original content. This could be solved by adding a lockfile for tasks which use the rootfs directory to ensure that no other such task is reading the rootfs directory while do_image_wic is running. This would serialize several do_image_* tasks and result in slower builds, especially for large images. Another drawback of this solution is that it is hard to selectively optimise - adding lockfiles to do_image_* tasks would result in these tasks always being serialized even if no fstab modification will take place. An alternative solution is to copy the rootfs directory when fstab needs to be modified. The code to do this in wic already exists as it is needed when including or excluding content in the rootfs. This still results in an impact on build times but the copy uses hardlinks if possible (so little data is actually copied) and we can make selective optimisations to improve things. The rootfs copy will only take place if fstab modification is required (or if it was already needed to include or exclude rootfs content). We can also follow up with further optimisations after this commit. So this second solution is chosen. Fixes [Yocto #13994] Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ce682a73b7447652f898ce1d1d0416a456df5416) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Add --change-directory argumentRicardo Ribalda Delgado
This option allows to specify which part of a rootfs is going to be included, the same way the -C argument on tar. Thanks to this option we can make sure the permissions and usernames on the target partition are respected, and also simplify the creation of splitted partitons, not neeting to invoke external vars or using .wks.in files. Eg: part / --source rootfs --ondisk sda --fstype=ext4 --exclude-path=etc/    part /etc --source rootfs --fstype=ext4 --change-directory=etc Cc: Paul Barker <pbarker@konsulko.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2265d089a58e1f78f26d623ee667c420cb1c3bd4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Update pseudo db when excluding content from rootfsPaul Barker
To exclude content from the rootfs, wic makes a copy (using hardlinks if possible) of the rootfs directory and associated pseudo db, then removes files & directories as needed. However if these files and directories are removed using the python functions os.remove and shutil.rmtree, the copied pseudo db will not be updated correctly. For files copied from the original rootfs, if hardlinks were used successfully when copying the rootfs this should mean that the relevant inodes can't be reused and so the risk of pseudo aborts should be avoided. However, this logic doesn't apply for directories (as they can't be hardlinked) or for files added via the '--include-path' argument (as they weren't present in the original rootfs) and so there remains some risk of inodes being reused and the pseudo db becoming corrupted. To fix this, use the 'rm' command under pseudo when removing files & directories from the copied rootfs to ensure that the copied pseudo db is updated. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d5db7e268947f0392c2126137571a44acd29ccd6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28image_types_wic: Move wic working directoryPaul Barker
By default the wic working directory is placed under the output directory. When invoking wic under bitbake, the wic output directory is added to PSEUDO_PATHS_IGNORE to avoid issues with files being removed from outside a pseudo environment (see oe-core commit ad8f5532ff). However, wic will copy the rootfs directory into its working directory if it needs to add or remove content before creating a filesystem image. This copy of the rootfs directory must be tracked by pseudo in order to keep the permissions correct in the resulting image. So we can't have the wic working directory under a path in PSEUDO_PATHS_IGNORE unless we like broken permissions. To fix this the new '-w' argument to wic is used to move the working directory away from the output directory. Note that wic deletes the temporary working directory automatically when it finishes creating an image so users won't normally see the 'tmp-wic' directory under WORKDIR. Fixes [Yocto #14129] Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4d07169499c47fa9dc759e6f81843416a6dc25c5) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Ensure internal workdir is not reusedPaul Barker
If a path is specified for the internal wic working directory using the -w/--workdir argument then it must not already exist. Re-using a previous workdir could easily result in rootfs and intermediate files from a previous build being added to the current image. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2e40c8d4109024ff704c5ce40d98050ca7f34dd5) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 5dcdb76f89c2e5bbc383e2921589482cd1c51491) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Allow exec_native_cmd to run HOSTTOOLSPaul Barker
This allows programs from HOSTTOOLS (e.g. 'install', 'rm', 'mv', etc) to be more easily executed by wic. Without this change only programs from an actual *-native recipe built by bitbake can be executed by wic. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8eb186acdecfbb3151c9a0ab148358e3fe5cce39) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Add workdir argumentPaul Barker
This allows the path for the temporary workdir used by wic to be set when running wic from bitbake or directly from the command line. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2e7314ac3a3cab89de93c932e8efc75de0feb0a7) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit a2308800b7eb5215982db7269d74d6292075f19f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Update for arm host and memleak fixes/cleanupRichard Purdie
Pulls in: makewrappers: support architecture-overrides in wrapper modifiers makewrappers: fix Python 2 hangover Fix some memory leaks Disable deprecated function warnings Silence switch block warnings pseudo_util: don't overrun strings when looking for keys Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 11a3a9203ad595e7fa92acf442a7f3216d6e3830) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Add lchmod wrapperRichard Purdie
New versions of glibc have an lchmod function so we need to wrap it. Identified through a reproducibility issue in initramfs-base where /dev/console created by mknod from coreutils changed permissions depending on the host distro (mknod used the gnulib wrapper on most hosts but newer ones used the libc call). [YOCTO #14162] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 20a645664977530e602e1ac97e8dc0962e730e6c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28bitbake.conf: Add /run/ to PSEUDO_IGNORE_PATHSRichard Purdie
Builds were failing on WSL2 which turns out to be due to accesses to /run/ on those systems. Add this to PSEUDO_IGNORE_PATHS to fix builds on WSL2. [YOCTO #14175] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1d1bf51217e8b4d54af28739d3271484ee5a7974) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to ↵Martin Jansa
PSEUDO_IGNORE_PATHS * now without ${COREBASE}/meta in PSEUDO_IGNORE_PATHS after: 73d538f207 bitbake.conf: Prevent pyc file generation in pseudo context the do_package tasks are failing when LICENSE_CREATE_PACKAGE is enabled pseudo.log shows that it's because of license texts copied from ${COREBASE}/meta: path mismatch [46 links]: ino 96733640 db '/OE/build/tmp-glibc/work/all-oe-linux/foo/1.0/image/usr/share/licenses/foo/generic_Apache-2.0' req '/OE/build/openembedded-core/meta/files/common-licenses/Apache-2.0'. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 39423a33595e7ade82fc88f55823660f8532cb84) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28bitbake.conf: Prevent pyc file generation in pseudo contextPaul Barker
This also effectively reverts commit b6d30c21b0: bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/meta The contents of ${COREBASE}/meta were ignored as pyc files could be generated for the contents of the lib subdirectory if python modules were imported within a pseudo context. However this doesn't protect us from pyc files being generated in the lib directories for other layers. It's far better to tell python not to produce pyc files when running under pseudo (by setting the PYTHONDONTWRITEBYTECODE variable) as this will cover any location where pyc files could possibly be created. This variable is set in FAKEROOTBASEENV so that it applies to the bitbake-worker instance for fakeroot tasks, preventing pyc files from being generated for imports in python tasks themselves. Also add a test case to ensure that pyc files are not created in tasks which are executed under pseudo. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 73d538f20743017a44cea4c20dbe09a0327cfc71) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHSPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 55618cbd58d6784a82e773f323723be6f722232f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28bitbake.conf: Canonicalize paths in PSEUDO_IGNORE_PATHSPeter Kjellerstedt
Use oe.path.canonicalize() to canonicalize the paths in PSEUDO_IGNORE_PATHS before passing them to pseudo. This is needed since pseudo will compare them to paths that are canonicalized. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1f2a497daa09cf3459e27ad6e0e8513938b52c79) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28lib/oe/path: Add canonicalize()Peter Kjellerstedt
oe.path.canonicalize() is used to canonicalize paths (i.e., remove symbolic links and "..", and make them absolute). It takes a string with paths separated by commas, and returns the canonicalized path in the same format. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 282b19c0e27488ec119f00fb2542ffdc1af54e2a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Drop patches merged into upstream branchRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7386a116222979e6de60c39d2c094d5f216fb101) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28distutils3: allow setup.py to be run from a different directory to ${S}Jack Mitchell
Sometimes setup.py can be buried deep in a source tree. This has traditionally been solved with setting S to the subdirectory in the source. However with the new pseudo changes, some python modules make changes to files beneath ${S}, for example: S = "${WORKDIR}/git/python/pythonmodule" then in setup.py it works with source code in a relative fashion, such as: ../../src This causes pseudo to abort as it isn't tracking the paths. Therefore implement the variable DISTUTILS_SETUP_PATH so that recipes can use: S = "${WORKDIR}/git" DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule" inherit distutils3 This allows the full source tree to be monitored, while distutils can run setup.py from a location other than ${S}. Signed-off-by: Jack Mitchell <ml@embed.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ddcc349cede0c4fe1909df1ded7b0a7c509cd758) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Update to print PSEUDO_LOGFILE in abort message on path mismatchesTomasz Dziendzielski
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9259d684415e3e7923de74359a4ed3487e0e9da7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Simplify pseudo_client_ignore_path_chroot()Peter Kjellerstedt
This also plugs a memory leak in pseudo_client_ignore_path_chroot(). Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d8dddd5054a1c4e20a3e32fa9ab31f5859d6fbb6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28uninative: Don't use single sstate for pseudo-nativeRichard Purdie
pseudo-native is a bit special. It conditionally compiles in support for xattr, statx and statvfs amongst other options. If a pseudo-native binary is used on a system where these functions are present but it wasn't compiled in we see hard to debug permissions problems. An example is the devtool.DevtoolExtractTests.test_devtool_deploy_target oe-selftest which shows a cryptic error: File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 1388, in test_devtool_deploy_target self.assertEqual(filelist1, filelist2) File "/usr/lib64/python3.9/unittest/case.py", line 831, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib64/python3.9/unittest/case.py", line 1037, in assertListEqual self.assertSequenceEqual(list1, list2, msg, seq_type=list) File "/usr/lib64/python3.9/unittest/case.py", line 1019, in assertSequenceEqual self.fail(msg) File "/usr/lib64/python3.9/unittest/case.py", line 670, in fail raise self.failureException(msg) AssertionError: Lists differ: ['-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] != ['-rwxr-xr-x root root /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] First differing element 0: '-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor' '-rwxr-xr-x root root /etc/init.d/mdmonitor' This is due to a version of pseudo without statx being used on a system where ls uses statx, hence the files are displayed as 6000.6000 instead of root.root. Avoid this by always building pseudo-native for the specific distro in question rather than using a universal sstate feed. This hopefully fixes one of the mysterious AB-INT issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6e3785a3f1f3cf68f5fe101cd6bebe91db165973) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28bitbake.conf: Exclude ${CCACHE_DIR} from pseudo databaseMingli Yu
When ccache enabled as below: INHERIT += "ccache" CCACHE_DIR = "/path/build/ccache" There comes do_install failure for some recipes randomly, take linux-libc-headerswhen as example. $ cat /path/build/tmp/work/corei7-64-wrs-linux/linux-libc-headers/5.8-r0/pseudo/pseudo.log [snip] path mismatch [1 link]: ino 243004209 db '/path/build/ccache/6/stats' req '/path/build/ccache/7/stats.lock'. [snip] Exclude ${CCACHE_DIR} from pseudo database to fix the potential do_install failure. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b65e5280bf9e7f1f9c8e6acabab79bcf209e5342) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28tcl: adapt to potential pseudo changesMingli Yu
It failed as below when rerun do_install for tcl: $ bitbake tcl $ bitbake tcl -f -cinstall [snip] | NOTE: make -j 72 DESTDIR=/build/tmp/work/core2-64-wrs-linux/tcl/8.6.10-r0/image install | abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this. | /build/tmp/work/core2-64-wrs-linux/tcl/8.6.10-r0/temp/run.do_install.3490694: line 184: 3499214 Aborted (core dumped) make -j 72 "$@" By default the S is ${WORKDIR}/${BPN}-${PV}, but after unpack, the tcl source [1] unpacked to ${WORKDIR}/${BPN}${PV} and all the files under ${WORKDIR}/${BPN}${PV} are acutally the source files. But the the main Makefile.in is under ${WORKDIR}/${BPN}${PV}/unix for tcl, so there is below logic in tcl recipe: S = "${WORKDIR}/${BPN}${PV}/unix" To adapt the potential pseudo changes, there is a general logic to exclude ${S} from pseudo database in base.bbclass in [2]. That's to say, just the dir ${WORKDIR}/${BPN}${PV}/unix is excluded from the pseudo database. But it's not enough for tcl, we need to exclude the actual source dir ${WORKDIR}/${BPN}${PV} from pseudo database specifically to fix the above do_install failure. [1] https://downloads.sourceforge.net/tcl/tcl8.6.0-src.tar.gz [2] https://git.openembedded.org/openembedded-core/tree/meta/classes/base.bbclass#n396 Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0d835f8069a336fd6bab1058d4e605a81c844212) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28oeqa/selftest/runtime_test: Exclude gpg directory from pseudo databaseRichard Purdie
Avoid pseudo abort()s like: path mismatch [1 link]: ino 6295376 db '/tmp/oeqa-feed-sign-2mw7z81v/S.gpg-agent.yocto-native' req '/tmp/jwkivmu6'. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 189630ca6cdf7ceb6cf9b8f9d86c58997f505efc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28base.bbclass: use os.path.normpath instead of just comparing WORKDIR and S ↵Martin Jansa
as strings * cannot use os.path.samefile, because S/B might not exist at this time yet * there is issue with PSEUDO_IGNORE_PATHS when some recipe sets e.g. S = "${WORKDIR}/" whole WORKDIR gets added to PSEUDO_IGNORE_PATHS and then the build can fail with various strange errors, in my case do_package was failing when do_package calls: fix_perms(.../1.0-r0/package/etc, 755, 0, 0, /etc) and fails with "[Errno 1] Operation not permitted:" Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 50b11a61ab29acb8ec990668353e0b7305114628) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Upgrade to include mkostemp64 wrapperRichard Purdie
Newer systems are using this currently unwrapped glibc function, add it. [YOCTO #14080] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cba4f51f0166e2c20e854ee0344be0c58769eaca) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Update to account for patches merged on branchRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ea22fb3aa1c5dd3edcd1d8b415a0843a9ee4677c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28abi_version,sanity: Tell users TMPDIR must be clean after pseudo changesRichard Purdie
After the recent path ignore changes, there are invalid entries in exiting pseudo databases which will trip up users with the new abort() (proving how common the pseudo potential corrpution is!). Inform them a clean TMPDIR is needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 016ee90e210c9b15b80e8370d83f41a14867a413) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/metaRichard Purdie
Unfortunately, .pyc files can be generated in meta/lib/oe which corrupt the pseudo database so we need to extend the ignore list to cover this as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e0cb6dd689a362d8433caa14cc5a9fdd5eb44923) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Fix statx function usageRichard Purdie
There is magic in the posts where specific variable names have specific magic. For that magic to work, "path" needs to be used not "pathname" as is currently there. Fix this, which fixes path issues on systems using statx (Ubuntu 20.04 in particular). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f9ae80aee98a7bb59c83ac9ebf9d317302507cec) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Handle new PSEUDO_IGNORE_PATHS variableRichard Purdie
Adjust wic to correctly handle the new PSEUDO_IGNORE_PATH variable and avoid inode corruption issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 13500f5234361385c365c7c35e83f99435500481) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Avoid creating invalid pseudo directoryRicardo Ribalda Delgado
If the source of the rootfs is not a bitbake cooked image, or it is not pointing to the root of one, we call pseudo again, which will produce a new pseudo folder at rootfs/../pseudo Eg: part /etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 Cc: Paul Barker <pbarker@konsulko.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 799a24ae78655f7a3eda7456b1a0ffaf3e43ec16) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28wic: Fix multi images .wks with bitbakeRicardo Ribalda Delgado
In order to support .wks files with multiple images inside bitbake we need to explicitly set the pseudo database in use. Eg: If we try this .mks: part / --source rootfs --ondisk sda --fstype=ext4 part /export --source rootfs --rootfs=core-image-minimal-mtdutils --fstype=ext4 The username for all the files under /export will be set to the runner of bitbake (usually UID 1000). Before we run wic, we need to make sure that the pseudo database will be flushed, and contains all the data needed. Cc: Paul Barker <pbarker@konsulko.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dde90a5dd2b22a539095d1bac82acc15c6380ac8) Signed-off-by: Steve Sakoman <steve@sakoman.com>