summaryrefslogtreecommitdiffstats
path: root/meta
AgeCommit message (Collapse)Author
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-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-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-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: 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-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-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: 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>
2021-01-28base/bitbake.conf: Enable pseudo path filteringRichard Purdie
This is a pretty big change to the way pseudo operates when used in OpenEmbedded. Normally, pseudo monitors and logs (adds to its database) any file created or modified whilst in a fakeroot environment. There are large numbers of files we simply don't care about the permissions of whilst in that fakeroot context, for example ${S}, ${B}, ${T}, ${SSTATE_DIR}, the central sstate control directories, This change uses new functionality in pseudo to ignore these directory trees, resulting in a cleaner database with less chance of "stray" mismatches if files are modified outside pseudo context. It also should reduce some overhead from pseudo as the interprocess round trip to the server is avoided. There is a possible complication where some existing recipe may break, for example, we found a recipe which was writing to "${B}/install" for "make install" in do_install and since we listed ${B} as not to be tracked, there were errors trying to chown root for files in this location. This patch fixes a few corner cases in OE-Core when used with this new ignore list: * The archiver directory matched a "${WORKDIR}/deploy*" pattern so was renamed to something else since that directory does need its root permissions * The ${S} and ${B} ignoring is conditional on them being different to ${WORKDIR} * package_write_* task output (the debs/rpms/ipks) are now owned by the build user so we don't want the file ownership information in the hashequiv outhash calculation even if they are built under pseudo. * The fontcache postinstall intercept is run under qemu outside of pseudo context so delete files it may delete up front where pseudo can see this. * SSTATE_DIR is in PSEUDO_PATHS_IGNORE, which is in FAKEROOTENV which is cached by bitbake. We therefore need to trigger reparsing if this changes, which means SSTATE_DIR can be in BB_HASHBASE_WHITELIST but not BB_HASHCONFIG_WHITELIST. Rework the variables to handle this. This otherwise breaks some of our sstate tests in oe-selftest. * Ignore the temp directory wic uses for rebuilding rootfs. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ad8f5532ffaead9a5ad13e1034fe9e5e1b7979f4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Add pathfix patchRichard Purdie
Add a path to fix up handling of dirfd being passed as a full file and with path="". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3006bbe7768e4efe33d3d2d3f5786a561ecbe96f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Add may unlink patchRichard Purdie
Mark files which are unlinked (nlink == 0) but open with fd's as "may-unlink" to avoid problematic database entries. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e1e481f3608c05ab14c61bf45cd0837d7287b6a5) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Fix xattr segfaultRichard Purdie
Fix a NULL pointer dereference exposed by the path ignore code in xattr handling. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 929a27bf6cbca94d1141d2094ae0c915d93bd3f4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28psuedo: Add tracking of linked files for fdsRichard Purdie
Where files are link()'d and one is unlink()'d, pseudo's fd mappings can become confused. Add a patch to try and improve this for the common usecases we see. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9ce621fa2099608ca0ccbb8420b31d71cdd7b00e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Abort on mismatch patchRichard Purdie
Rather than doing what turns out to be a rather dangerous "fixup" if we see a file with a different path but the same inode as another file we've previously seen, throw and abort. Direct the user to a wiki page where we can maintain information about what this error means. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2db491d97da08d44ebd257f98489550a82a7935c) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Add support for ignoring paths from the pseudo DBRichard Purdie
Add PSEUDO_IGNORE_PATHS, a comma separated list of path prefixes, where any files underneath are not handled by pseudo. This allows files to be left out of the pseudo datanase where we know we don't need the fake root emulation. This is particularly useful if we know these files can be deleted outside of pseudo context. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8defb687a2c0ffac232c4d0d63a590871c453a2e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Ignore mismatched inodes from the dbRichard Purdie
Currently, where pseudo finds a database entry for an inode but the path doesn't match, it reuses that database entry metadata. This is causing real world "corruption" of file attributes. See [YOCTO #14057] for an example of this. This can happen when files are deleted outside of pseudo context and the inode is reused by a new file which pseduo then "sees". Its possible the opposite could happen, it needs to reuse attributes but this change would prevent it. As far as I can tell, we don't want pseuo to reuse these attributes though so this code should be safer and avoid bugs like the above. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1c13149b81e03a1ac48b27a208a139d5493c3ce7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: fix renaming to selfJoe Slater
Pseudo tests for an item being renamed to itself only after information about it has been deleted. Move the test to before we change the database. Note that pseudo does not support renameat2(), but neither does glibc. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6b3d109f42385ad1cf1f297a6c06ea7eb6509f26) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: Update to add OFC fcntl lock updatesRichard Purdie
This adds in support for the OFC fcntl ioctl lock flags, removing warnings on some more recent linux kernels. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 234168f803bee2e5b0955aabaddb1d967349fb82) Signed-off-by: Steve Sakoman <steve@sakoman.com>
2021-01-28pseudo: merge in fixes for setfacl issueRichard Purdie
[YOCTO #13959] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 18fbd28c9aa0276d110839c4282a9ab75fc9f28e) Signed-off-by: Steve Sakoman <steve@sakoman.com>