summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* cpan-base.bbclass: Move PERLVERSION and get_perl_version to a new fileTom Rini2017-12-112-23/+25
| | | | | | | | | | | | | | | | | It is possible for non-CPAN recipes to contain perl modules. These perl modules must reside in the versioned perl library directory in order to work in normal circumstances.. Export this logic to a separate class so that it can be reused without the rest of the cpan logic. Without this, dpkg will not export its perl code to the correct location and will not be found by utilities that expect to use it. (From OE-Core rev: 6907280335dd47f2fd3a3f4cf809357c3caff65d) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Use prebuilt uninative tarballRichard Purdie2017-12-111-6/+7
| | | | | | | | | | | | | | | | | | | For uninative to work, it relies on it being updated to new versions as newer glibcs are built. This means the uninative generated by the current build may not be as recent as the uninative that is being downloaded by uninative.bbclass. If this occurs, we can get symbol mismatch errors. Ultimately, the sstate and the uninative versions need to match so we should use the same tarball as uninative.bbclass is using, not the one we built. [YOCTO #12405] (From OE-Core rev: 1bde969058f7e832db0e7eb9c6f7ef00f027628c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Make u-boot signed images more versatileTom Rini2017-11-053-40/+4
| | | | | | | | | | | | | | | | | | | | With the introduction of chaining compression/conversion support we can convert the old image_types_uboot.bbclass code that did a hand-chaining of a set of ${filesystem}.${compression} into generic and arbitrary support to sign whatever the user wants to sign for their image. This, for the record, does remove setting a valid compression type in the record in favour of just saying none. This is not a generally useful feature in U-Boot and I believe being versatile in terms of being able to pass in arbitrary compressions is more important. (From OE-Core rev: 979ff606d8c4c6f66c6dc533a92212f18708089e) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids: don't create username-group if gid is specifiedAndré Draszik2017-11-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding distcc to an image, and having staticids enabled, doesn't work as it causes a a superfluous 'distcc' group being added using a conflicting GID, thus failing the build: | ERROR: distcc-3.2-r0 do_prepare_recipe_sysroot: distcc: groupadd command did not succeed. Compared to other recipes, the distcc recipe only specifies --gid for the primary group, and doesn't specify --no-user-group, but when --gid is given, it doesn't make sense to create a matching username-group in addition, even if --no-user-group was not specified, and 'useradd' actually complains if --gid and --user-group are given both. If only --gid is given, the current code in here effectively behaves as if --user-group was specified, taking the group-id of the username-group from the --gid parameter. This causes the error above, as we try to add a new group (distcc) with an existing group-id (nogroup). This is contrary to the comment in this file just above, contrary to what useradd can do, contrary to behaviour without the useradd-staticids bbclass, and non-intuitive. Change the code such that a username-group is only created - if a primary group using --gid was not specified, or - if --no-user-group was not specified To be in line with useradd, if gid is not given, and --no-user-group is given, we add the user to the group 'users', which mimics useradd's behaviour. (From OE-Core rev: b1843e60ebe534243b49f3685540fa5ea49d5f35) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fc3a86ae68919cec72c1a8ae0f9ba1f98ae13f0d) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: support MIPS (compressed)André Draszik2017-11-051-1/+3
| | | | | | | | | | | | | | On MIPS, the compressed kernel image target is vmlinuz.bin (From OE-Core rev: ed459bc971697fdd46e5204f625cde7afcdef6eb) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 74d97569aa4e0f82e094a539dec302076103affa) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uboot: support compressed kernel on MIPSAndré Draszik2017-11-051-1/+7
| | | | | | | | | | | | | | | | | | MIPS generates vmlinuz.bin when compression in the kernel build is enabled, including any necessary objcopy so we can leverage that and skip our manual invocation of objcopy here. We just have to put the file into the right place for the rest of the build to find it. (From OE-Core rev: 3db4004b2982a297a02ebeb6b0cb90cebdb44a0a) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 00bc7682473c2558d72ba42c182f8e3bd445f8af) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uimage: optimise UBOOT_ENTRYSYMBOL supportAndré Draszik2017-11-051-1/+1
| | | | | | | | | | | | | | | | | | | This is the remaining local change to a fix similar to commit e0b4f018d1c2 ("kernel-uimage.bbclass: Fix up generation of uImage from vmlinux"): Make awk exit on match to save a few CPU cycles so as to make this similar to kernel-fitimage.bbclass (From OE-Core rev: d60b3d02949ba318e30627131fd38f74c74cf590) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 614e8be7a89a2f2113fa40b11e7a05b9e8155f6a) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL supportAndré Draszik2017-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | - vmlinux is located in ${B}, not ${S}. - parsing of nm output got broken completely in commit b406a89935f148779569fa3770776e009dd51f13 ("kernel-fitimage: add initramfs support"), commit ec755d2524fcbd9dfded23a576f25c990d405a6c in yocto While at it, make awk exit on match to save a few CPU cycles. (From OE-Core rev: 1353892f3a130bcfa4e9c5b36b3ed7eb4a2c872d) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 9d2ec9c046c4a9c6a842d28133d40639f5a65297) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: sanitize dtb section name (unbreak MIPS)André Draszik2017-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't build fitImages for MIPS any more: | Error: fit-image.its:21.27-28 syntax error | FATAL ERROR: Unable to parse input tree | uboot-mkimage: Can't read arch/mips/boot/fitImage.tmp: Invalid argument Since commit cd2ed7f80b555add07795cc0cbaee866e6c193a3 ("kernel-fitimage: dtb sections named by their filenames and one config section for each dtb"), commit 1ec405ef5df82884c8997878bbe6c66d924b5127 in yocto, dtb sections are named by the DTB filename, but the filename can legally be in a subdirectory below arch/$arch/boot/dts/, and on MIPS all DTBs are actually in a subdirectory. If so, mkimage fails with the above error message. Unbreak this by replacing the offending character (directory separator /) (From OE-Core rev: feb78cb536a5e5cc9f1c36014b1a1ae1c147f45c) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 335fc50cf54e47db4e3d5c35a9846484faf0270f) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-uimage.bbclass: Fix up generation of uImage from vmlinuxNathan Rossi2017-11-051-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix up the generation of uImage from vmlinux when KEEPUIMAGE != 'yes'. This fixes up the working directory that do_uboot_mkimage is run from, such that it is run from the ${B} directory to access built artefacts. Simplify the logic in the task so that the parse step either adds the task or not if the conditions are met. This reduces the need for the task to run in cases when it is not used. The task is also changed to depend on the kernel_link_images task as arch/<arch>/boot/* is not available until after kernel_link_images in certain cases (e.g. vmlinux/uImage only KERNEL_IMAGETYPES). Fix up the use of ${S}/vmlinux when pulling the entry symbols address so that it accesses the vmlinux in ${B}. (From OE-Core rev: 60f0e4b18c7d77d7be2b22573b7d0c7ad3d0832f) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit e0b4f018d1c2a65e66c81e5be1da8894e9a6c132) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* copyleft_filter.bbclass: restore possiblity to filter on typeAndré Draszik2017-11-051-16/+16
| | | | | | | | | | | | | | | | | | | | | Since the changes introduced in ae9102bda398 ("copyleft_filter.bbclass: Allow to filter on name"), it is impossible to filter on the recipe type, all recipes are treated as though they should be included if the license matches, irrespective of the COPYLEFT_RECIPE_TYPES variable. Fix this. (From OE-Core rev: 23b520c42e93e47e3a19037877281af673144b31) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit e612dfa520c7d7ecf58006e82189be601204f38d) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* openssh: allow to override OpenSSL HostKeys when read-only-rootfsAndré Draszik2017-11-051-2/+2
| | | | | | | | | | | | | | | | | | With these changes it is possible to have a .bbappend that - sets SYSCONFDIR to some persistent storage - modifies SYSCONFDIR/sshd_config to use ssh host keys from the (writable) sysconfdir (From OE-Core rev: 79c7c8342859306750f0af17210a183fdc543caf) Signed-off-by: André Draszik <adraszik@tycoint.com> Reviewed-by: Stephane Ayotte <sayotte@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 106b59d9f96f70d133fa1421091ad280d27a5b6a) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: don't override pseudo environmentRoss Burton2017-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | Back in the dark days before recipe-specific-sysroots the paths being passed in this manual construction of the pseudo environment made sense, but now they're incorrect and result in pseudo writing to two different databases during a single build. The result is that pseudo doesn't follow changes to /etc/passwd in the sysroot, and warns in the logs. Remove the PSEUDO_LOCALSTATEDIR assignment and inherit the correct assignment in FAKEROOTENV. (From OE-Core rev: 02457ef7f600ce954874e2d11e74b1c6daaa3bfc) (From OE-Core rev: e8112536055e75dff43369395a6cf6ba44ba8db7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch.bbclass: Replace logic for setting GOARMWill Newton2017-10-241-2/+5
| | | | | | | | | | | | | The previous logic applied a regex to TUNE_FEATURES which could set the GOARM value to 7 incorrectly, for example when dealing with an arm1176 core. Simplify to check for the presence of "armv7" instead. At the same time add a check for "armv6" and set GOARM to 6 in that case. (From OE-Core rev: 93dd2f9f3edf0584f9e806c629611d645dd72dbf) Signed-off-by: Will Newton <willn@resin.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Sorted ctypes to avoid basehash errorGerson Fernando Budke2017-09-221-1/+1
| | | | | | | | | | | | | | | | | | When selected multiple subimages a similar error could happend: Variable do_image_cpio[subimages] value changed \ from 'cpio.gz.u-boot cpio.gz' to 'cpio.gz cpio.gz.u-boot' To avoid this, 'ctypes' should be sorted at 'gen_conversion_cmds'. This garantee that 'CONVERSION_CMD_xxx' are always written in tha same order and consequently 'do_image_cpio' have the same hash. (From OE-Core rev: 271f1a5f65b8685a1e3645026876251122ef3974) (From OE-Core rev: 404a04a862a71a5a0fb1c20b6bc9fc9c8b2bb98c) Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (PRE)MIRRORS: fix pattern for npm:// without slashOlaf Mandel2017-09-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For URIs with the npm:// transport but with no other slash in it, the common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match. Make the last slash in the pattern optional in the mirros.bbclass and own-mirrors.bbclass classes. Many URIs with the npm:// transport have no slash after the host part: npm://registry.npmjs.org;name=foo;version=0.1.2 This means that MIRRORS and PREMIRRORS containing entries like the first one will not match these URIs: npm://.*/.* # fails to match npm://.*/?.* # matches this and URIs with path components For normal regular expressions, a pattern like 'npm://.*(/.*)?' would probably be preferred, but that won't work here: the pattern gets split into the substrings 'npm', '.*(' and '/.*)?', which are not valid regular expressions individually. (From OE-Core rev: 0d1e2b4507af28fc451b8fa94130a39ac342637d) (From OE-Core rev: 1f5675a43e1781635fee15cc3674143c195da169) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: add test for unsatisfied RRECOMMENDSJose Alarcon2017-09-211-0/+12
| | | | | | | | | | | | | | | | | | | | | The do_rootfs log contains a number of unsatisfied package recommendations. At the moment those are only visible when reviewing the rootfs log. This patch adds an extra check to surface any unsatisfied recommendation as WARNINGS to the build output. Enable this check with: ROOTFS_POSTPROCESS_COMMAND += "rootfs_log_check_recommends;" (From OE-Core rev: 9d049bf7941f30e35c51775684559e95185fba96) (From OE-Core rev: 514cadd28d05f5060b2538ef9b2920370c22bf73) Signed-off-by: Jose Alarcon <jose.alarcon@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: remove empty lineJose Alarcon2017-09-211-1/+0
| | | | | | | | | | | (From OE-Core rev: 76a801da7fe5651d9e8310a2b32c275e1700daf3) (From OE-Core rev: 189ea6f0232f1910736121fb15f80eea97932af8) Signed-off-by: Jose Alarcon <jose.alarcon@ge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: Filter out dangling symlinks in ↵Khem Raj2017-09-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ssh_allow_empty_password() In images built with pam in DISTRO_FEATURES, we end up with dangling symlinks if su is not packaged into image $ ls /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/su-l -l lrwxrwxrwx 1 kraj users 2 Aug 9 07:56 /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/su-l -> su This causes image do_rootfs to fail | sed: can't read /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/s u-l: No such file or directory | WARNING: /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.ssh_allow_empty_ password.19238:1 exit 2 from 'sed -i 's/nullok_secure/nullok/' /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi /core-image-minimal/1.0-r0/rootfs/etc/pam.d/*' Therefore we need to filter out dangling symlinks before sed'ing things out (From OE-Core rev: b92105e5a085c8cd3c650579644922ed97163e73) (From OE-Core rev: ed1aaf24bfd4a09132c7e0247c460102ec85254d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: disable generation of .build-id linksAlexander Kanavin2017-09-211-0/+1
| | | | | | | | | | | | | | | | | As we're not using them and they're getting in the way of reproducibility. [YOCTO #11718] (From OE-Core rev: 1bd3ed18379c330c1c733dc9f043dbbe8aa0d254) (From OE-Core rev: 5c8f831c71932e2abebd72f8be1ec95e1b6c3ab7) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: use multithreaded xz compressionAlexander Kanavin2017-09-211-0/+2
| | | | | | | | | | | | | | | | RPM's default is single-threaded gz; the change greatly helps with both buildtimes (when there is a small number of large-sized packages) and disk space taken by resulting rpms. (From OE-Core rev: f108c4d09926bd28e7a57b665fc8cb5373827780) (From OE-Core rev: fd329fdc6374ebde3f5ab171dbe76bf5cec6771d) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: allow arch-dependent binaries in noarch packagesNg Wei Tee2017-09-211-0/+1
| | | | | | | | | | | | | | | | | | | This is needed for packages like linux-firmware which have a legitimate reason for it. Oe-core has a separate package_qa test for this situation, so any accidental inclusions of such binaries will still be caught. [YOCTO #11329] (From OE-Core rev: 6aaff392d703183d19192e2d171e10a92f259c65) (From OE-Core rev: 35059f271964da1f8112a45f19875b59fb9cd02f) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Fix a logic error which caused dependency removalRichard Purdie2017-09-111-5/+6
| | | | | | | | | | | | | | | | | | There was a logic error in the dependency cleanup code which meant it would remove dependencies which other tasks still depended upon. Fix the path names so the comparisions work as intended. This fixes dependencies accidentally disappearing from sysroots under certain reconfiguration situations. (From OE-Core rev: 1634fe5148b3501f2c1b75cf7fb704a2ef60424e) (From OE-Core rev: 3969c068bc9557b405a5ad61c10c402ec93bd932) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a6631eed6fc70b305e769998d6f22f345e37decc) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Ensure dependencies are removed before being addedRichard Purdie2017-09-111-38/+39
| | | | | | | | | | | | | | | | | | | | Currently items are added to the sysroot, the obsolete items are removed. If a change such as pkgconfig -> pkgconf is made, this leads to conflicts of overlapping files in the sysroot. In order to better support this, handle removing items before adding them. This requires some minor refactoring to construct the installed list before the main function loop, otherwise there are no changes in this patch other than reordering the operations. (From OE-Core rev: add4f107c151d32d9ea914bb0b93c3d3c17c776c) (From OE-Core rev: 970d4df7336e5102ac61e66689e977fb2e41a1aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5b45fe40db81292dd6bb57b210d1e4ba32e65e9e) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* staging: Avoid sysroot removal racesRichard Purdie2017-09-111-5/+20
| | | | | | | | | | | | | | | | | | Currently a task could remove a dependency needed by another task leading to build failures, often due to missing dependencies (e.g. dynamic libraries not being found). This was often seen for all-arch recipes in package_write_rpm. When removing a dependency, first check that no other task active for the recipe has that same dependency. (From OE-Core rev: ff3617cc2cd5618f48a25aa4e3b2014430fcbe23) (From OE-Core rev: 67438ac91a40429affc952ad1d7e92c763f52bab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3de078642925e720c2fca5b89cd3abb8b29d2439) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/license: drop erroneous sha256 parameter in LIC_FILES_CHKSUMPaul Eggleton2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | In OE-Core commit a48fea275b08ff3d3dfc9a928aeb04768db35873, a check on the value of a "sha256" parameter was added, however there was no mention of this in the commit message and no corresponding code to actually verify the checksum as sha256 was added along with it either, so there's no point in getting the value. Additionally it was assuming that a sha256 value would be present without checking first, with the result that if you leave out the md5 value in a recipe intentionally in order to get it to tell you the correct value on the next build, you got a traceback instead of the appropriate error containing the information. Drop this entirely - if we want to implement this we need to do it properly. (From OE-Core rev: e9eaa7d15fe7ab643ab19556dab84051f8f1974e) (From OE-Core rev: fcedfce43adad8659a1376bb28b1ed41e621dd53) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-08-311-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the transition to dnf and rpm4, the functionality to automatically make RPM determine dependencies was lost. Before the transition, an OE specific tool called rpmdeps-oecore had been added to the rpm suit. It was based on the rpmdeps tool that is part of rpm. For each file specified on its command line, it would output the provides and requires that RPM could determine. During the transition to rpm4, rpmdeps-oecore was replaced with the standard rpmdeps. However, what no one noticed was that unless rpmdeps is given options, e.g., -P or -R, to tell it what it should output, it will not output anything. Thus, it would do all the work to determine the requirements, but would keep silent about it. And since no output from rpmdeps is expected unless there are requirements, there were no warnings indicating that everything was not working as expected. Porting the old rpmdeps-oecore to work with rpm4 is not really possible since it relied on being able to access internals of RPM that are no longer available. However, it turned out that rpmdeps had a debug option, --rpmfcdebug, that would output exactly the information that we need, albeit in a different format and to stderr. To make this usable, rpmdeps has now received a new option, --alldeps, which sends the information we need to stdout. Since enabling this may cause packages to break, it is required that ENABLE_RPM_FILEDEPS_FOR_PYRO is set to "1" to activate it for Pyro. The name of this variable has been chosen as to indicate that it only affects Pyro (since releases before and after Pyro has it enabled by default). (From OE-Core rev: 1009498f23ad319825c00ba60a4693d15aada553) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Filter out unwanted file deps for nativesdk packagesPeter Kjellerstedt2017-08-311-2/+23
| | | | | | | | | | | | | Filter out any file dependencies on absolute paths and any dependencies on Perl modules for nativesdk packages. It is assumed that they will be provided by the native host if needed, and they mess up the dependency handling if they are present. (From OE-Core rev: 37f2d4df507c760ea4c12b67526db8277e5684eb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Ignore perl as dependency for nativesdk packagesPeter Kjellerstedt2017-08-311-1/+1
| | | | | | | | (From OE-Core rev: 33d79cb5d35274e2925d8acb0f30530013e37545) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()Peter Kjellerstedt2017-08-311-0/+8
| | | | | | | | | | | | When using RPM, depends.dot may contain dependencies such as "/bin/sh", which will confuse _toaster_load_pkgdatafile(). Ignore them. While at it, also ignore dependencies that contain parentheses, e.g., "libc.so.6(GLIBC_2.7)". (From OE-Core rev: 80c117f46442ef442e34b7681ed3688789f505ac) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Simplify parsing of depends.dotPeter Kjellerstedt2017-08-311-15/+13
| | | | | | | | | | | By using a single regular expression, the parsing of the depends.dot file can be simplified a lot. This should also make it less susceptible to formatting changes in that file. (From OE-Core rev: 20684149bb659b34d3bcac8f202cb95d607567c1) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: Improve the generated depends.dot filePeter Kjellerstedt2017-08-311-4/+11
| | | | | | | | | | | | | | | | | | * Convert incorrectly formatted dependencies such as: "bar -> "foo" ">=" "1.2.3" into dependencies with edge labels: "bar -> "foo" [label=">= 1.2.3"] * Remove rpmlib() and config() dependencies such as: "foo" -> "rpmlib(CompressedFileNames)" [label="<= 3.0.4-1"] and: "base-files" -> "config(base-files)" [label="= 3.0.14-r89.49"] * Remove the trailing semicolon that was added to each line. It fills no purpose. (From OE-Core rev: 99ef2f26cf498e1693a947bb44e40c31c20ec525) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Improve the handling of runtime file dependenciesPeter Kjellerstedt2017-08-311-6/+10
| | | | | | | | | | | | | | | This makes the file-rdeps test support: * versioned dependencies, e.g., "perl (>= 5.000)", and * package dependencies among the file dependencies, e.g., "perl". It also ignores all "perl(...)" dependencies since it is expected that these are generated and handled by rpm itself and there is no reason to second guess what it is doing. (From OE-Core rev: 6d64b110ed0c22f2bcd10cde437a13e03c15b23e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Report all file-rdeps errors, not just the firstPeter Kjellerstedt2017-08-311-1/+1
| | | | | | | (From OE-Core rev: ee6f208a780062365e53fb9546eef55749e1c654) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: Prevent linking testdata to itselfMike Looijmans2017-08-291-3/+4
| | | | | | | | | | | | | testdata and testdata_link may point to the same file, in particular when IMAGE_LINK_NAME and IMAGE_NAME are equal. Check if this is the case before creating a symlink that points to itself and makes the next build fail. (From OE-Core rev: f8ceec50af68650d6548738e5b5582e2b25424d7) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mirrors.bbclass: provide git repo fallbacks using the https protocolAndre McCurdy2017-08-291-0/+11
| | | | | | | | | | | | | | | | | | | Use MIRRORS to provide git repo fallbacks using the https protocol, for cases where git native protocol fetches may fail due to local firewall rules, etc. These rules should cover all git native repos used by recipes within oe-core, with the exception of mtd-utils, for which there's currently no upstream alternative to the git native protocol for anonymous access ( see http://git.infradead.org/mtd-utils.git ). (From OE-Core rev: fe71cf3ded7109e0fa1812475479941c89873e4e) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit abb8895d5b42a5dc171360a261a2652acd14ee7e) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDsTom Rini2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | When we have more than one CONVERSION_CMD being used, for example ext4.gz.sha256sum we will see errors about "metadata is not deterministic". This is because we do not have a stable order of intermediate files that will be removed in the generated shell command. We fix this by calling sorted() on the set of rm_tmp_images so that we will have a stable hash again. Cc: Patrick Ohly <patrick.ohly@intel.com> (From OE-Core rev: 26feb0580642ef8934206ea73cdce9e1f73d14ef) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 98a2afeb3a53bec7a72a4a9846e1dba636cc6f3d) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Correct chaining compression supportTom Rini2017-08-292-9/+6
| | | | | | | | | | | | | | | | | | | | | | | When chaining of compression/conversion types was added, we had a new way to handle doing things like "ext4.bz2.sha256sum" or "ext2.gz.u-boot". However, because the U-Boot image class isn't included normally, it wasn't properly converted at the time. After the support was added the "clean" argument that the .u-boot code uses no longer functions. The fix for this inadvertently broke chaining compression/conversion. First, correct the u-boot conversion code. Fixes: 46bc438374de ("image.bbclass: do exact match for rootfs type") Cc: Zhenhua Luo <zhenhua.luo@nxp.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Patrick Ohly <patrick.ohly@intel.com> (From OE-Core rev: ad22f73519292f53d2ea6eaae99f8a919c4f2c26) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0a7ce0b971a208956cb895ba5a869ec8c5d94703) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: fix override handling in RDEPENDS QAGan Yau Wai2017-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | The package_qa_check_rdepends() in insane.bbclass has incorrectly replace its localdata OVERRIDES value with the package name. Fixing it by appending the package name to the existing OVERRIDES value. This resolves RDEPENDS QA error when setting PACKAGECONFIG using a pn- override at local.conf. Cherry picked from master 60d28dd72daee235150ab6605cbf953f1ea691df [YOCTO #11374] (From OE-Core rev: ca84390b7894adb32a89ccfbd83fbb3fb7e808fc) Signed-off-by: Gan Yau Wai <yau.wai.gan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CCMartin Jansa2017-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | * without this we cause nativesdk-linux-libc-headers to depend on target specific KERNEL_CC (through icecc_get_tool -> icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH -> TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by bitbake-diffsigs: OE qemux86@ ~/build/oe-core $ ls /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata* /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2 OE qemux86@ ~/build/oe-core $ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata* basehash changed from 39774238b66763c598153132e87a2c1a to aa2d66e770bf533e312536eb0a401c4c Variable TARGET_CC_KERNEL_ARCH value changed from '${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork-marm', '', d)} TUNE_FEATURES{thumb} = Set' to '' (From OE-Core rev: b07bcfa3e4400f7763e2276f9be3dc702bb58c2e) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix KERNEL_IMAGETYPE(S) for Image.gzNicolas Dechesne2017-08-291-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | KERNEL_IMAGETYPES lists all the kernel images that we want to build. in cb17b6c2a7 (kernel.bbclass: support kernel image type of vmlinux.gz), some logic was added to support vmlinux.gz which is not a target built by kernel makefiles (only vmlinux). It is clear that the goal of this logic is only to support vmlinux.gz and not others compressed format (such as Image.gz) which are valid target for kernel makefiles. For Image.gz we should rely on the kernel makefiles and not do the compression in kernel class. This patch updates the logic used to filter out non supported kernel target from KERNEL_IMAGETYPES, and make vmlinux.gz a 'special case', instead of *.gz. If more special cases are needed in the future, we could add them in a similar way. This patch should be a no-op for anyone using vmlinux or vmlinux.gz, and on top of that it is fixing the build for Image.gz which was not working until now. (From OE-Core rev: d3a89450ae918f467a99ac1c33502fc9a5eb4162) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cfc0c897656fe67e81a6a5dcd936dff785529f41) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: set CVE_PRODUCT to linux_kernel if not set by recipeMikko Rapeli2017-08-291-0/+2
| | | | | | | | | | | | | | | | | It is used by NVD database CVE's like: https://nvd.nist.gov/vuln/detail/CVE-2017-7273 Setting this in kernel.bbclass fixes CVE reporting for all users of the class. (From OE-Core rev: 9b27be77980fdd51423576712dfd6f4a031c3372) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 2e3d325440a50265c73f7d2e782530a02458bc33) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check.bbclass: use weak assignment for default CVE_PRODUCTMikko Rapeli2017-08-291-1/+1
| | | | | | | | | | | | | | This way also bbclasses can override it. For example kernel.bbclass could set CVE_PRODUCT to linux_kernel for all users of the class which compile Linux kernels. (From OE-Core rev: 478b90369c48351193e2bc5e2eb2b5308d55bb2e) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 74672a7de5ada45ab8e25b89cbdea3ec33b63b7f) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/staging: change fixme debug message from note to debugPaul Eggleton2017-07-271-1/+1
| | | | | | | | | | | | | | | | | These messages were added for debugging during the recipe specific sysroot work. They may still be useful but they don't need to be notes - if they are they show up in recipetool / devtool output when fetching source. (From OE-Core rev: a0e93d5c5dcf59d1898a3db727a5ab2d75e3d20e) (From OE-Core rev: 81246ed59215b8f62800cfb20d8b71d8e528c0ec) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bc1a4af950a2600028d89b7dcb4ff8f409b52739) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: propagate configuration errors to bbclassBruce Ashfield2017-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | As pointed out by klapperichpaul@johndeere.com, missing configuration fragments were being picked up twice, once by the tools and once by the bbclass. Unfortunately, the tools error message was being detected as configs, and hence no error was reported at all. Rather than catching the output of the tools, we can instead check the return code and propagate the error message from the tools directly to the user. [YOCTO #11649] (From OE-Core rev: 3470a3839577b99322c10f830cdaa61128ef6b16) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 960652416e2390337df6d9734375d6829ceb6420) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix failures collecting output signaturesPaul Eggleton2017-07-271-1/+13
| | | | | | | | | | | | | | | | | | | | It's possible for tasks to stage symlinks that point to non-existent files; an example is ncurses-native.do_populate_sysroot. There wasn't any error checking here so this broke the build when "task" was included in BUILDHISTORY_FEATURES. In any case we shouldn't be following symlinks and getting the sha256sum of the link target - we need concern ourselves only with the target path, so check if the file is a link and sha256 the target path instead if it is. If it's neither a regular file nor a symlink (perhaps a pipe or a device), just skip it. (From OE-Core rev: f60520d97f53dafe783f61eb58fe249798a1e1be) (From OE-Core rev: 66a0d184d8f55a8da03de9fedb18d166b80b198b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd-boot.bbclass: Add configuration data to secondary EFI partitionCalifornia Sullivan2017-07-071-0/+1
| | | | | | | | | | | | | | | The secondary EFI partition is used when booting in EFI mode, and without the configuration data we don't get any boot targets. Partial fix to [YOCTO #11503]. (From OE-Core master rev: 84aa7a00810e135fdad3f77bdb1da7d1f5fb8627) (From OE-Core rev: 915b01258ef426392bb9052c345f952670db4450) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk: Clean up Source entry in ipk packagespyro-nfvaccessRichard Purdie2017-06-161-4/+3
| | | | | | | | | | | | | | | | There is the potential for sensitive information to leak through the urls there and removing it brings this into the behavior of the other package backends since filtering it is likely error prone. Since ipks don't appear to be generated at all if we don't set this, set the field to the recipe name used (basename only, no paths). This avoids information leaking. We may want to drop the field if opkg can allow that at a future point but the recipe name is a suitable identifier for now. Reported-by: Andrej Valek <andrej.valek@siemens.com> (From OE-Core rev: 0b5e0d072f93a958e4211a8aeb2fd8cc3c25cc21) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATUREJonathan Liu2017-06-121-1/+1
| | | | | | | | | | | | These commands are not whitelisted by the HOSTTOOLS variable which silently prevents the MBR disk signature from being written to the image. Reported-by: Michael Davis <michael.davis@essvote.com> (From OE-Core rev: 5527af688f6ccaacd7ec24d29425d0c007d5341c) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: predefine KBUILD_BUILD_USER and KBUILD_BUILD_HOSTJoshua Lock2017-06-111-0/+2
| | | | | | | | | | | | | | | | By exporting KBUILD_BUILD_USER with a pre-defined value we improve the reproducibility of the kernel and remove the requirement for whoami in the HOSTTOOLS. KBUILD_BUILD_HOST also helps improve the reproducibility of the kernel. For more kernel reproducibility options see: https://lwn.net/Articles/437864/ (From OE-Core rev: 357801a491efc067c6d4bd9a2bfa6fff460357aa) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>