summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* uninative: handle UNINATIVE_URL being file:///Ross Burton2016-01-261-4/+8
| | | | | | | | | | If the local fetcher is used then files are not actually fetched into DL_DIR, so check if this happened and if required add a symlink to the real file. (From OE-Core rev: a13b0a0b79cf4db9f247facf71c03344b60be890) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: fix path to patchelf-uninativeRoss Burton2016-01-261-1/+1
| | | | | | | | | | When uninative was changed to use it's own sysroot the path to patchelf lost ${bindir_native}, so add it back. (From OE-Core rev: d986f90937b7b4c60128003ef5d30d01ac1653e3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib: new module for handling GPG signingMarkus Lehtonen2016-01-262-36/+17
| | | | | | | | | | | | | | | | | Add a new Python module (oe.gpg_sign) for handling GPG signing operations, i.e. currently package and package feed signing. The purpose is to be able to more easily support various signing backends and to be able to centralise signing functionality into one place (e.g. package signing and sstate signing). Currently, only local signing with gpg is implemented. [YOCTO #8755] (From OE-Core rev: 9b3dc1bd4b8336423a3f8f7db0ab5fa6fa0e7257) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Don't create tasks with '.' in the nameRichard Purdie2016-01-261-2/+2
| | | | | | | | | | | | | Similarly to "-", "." doesn't work well in task names but is used in some real world image classes. Work around this with some replacements for now to unbreak layers. (Issues don't show themselves until runtime, e.g. with --dry-run) Tested-By: Otavio Salvador <otavio.salvador@ossystems.com.br> (From OE-Core rev: f94d9be17d727b37dc655e7be272db2f290436aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: fix allow-empty-password on read-only rootfsRoss Burton2016-01-261-2/+2
| | | | | | | | | | | | When a read-only rootfs is being used sshd uses a different sshd_config file, which also needs to be editted. [ YOCTO #8680 ] (From OE-Core rev: cff11495cc376f080e06028655e4eb6c7f8a8094) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Clean DEPLOYDIR before do_deploy runsRichard Purdie2016-01-261-0/+1
| | | | | | | | | | | | If we don't do this, the deploy sstate object contains an every increasing number of modules tarballs and kernel images, one per execution of "-c deploy -f". Cleaning the directory before we start makes things much tidier. (From OE-Core rev: 3ac195bbd4ced24e6a132cfbe5e175b95fc4664b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Fix conflicts with normal sysrootRichard Purdie2016-01-241-2/+5
| | | | | | | | | | | | | Currently this code installs into the standard sysroot, however this causes some conflicts when linking since the linker can look specifically for versioned .so files (e.g. like libpthreads.so.0). This breaks builds of util-linux-native for example. The easiest solution is to install uninative into its own separate sysroot. (From OE-Core rev: e2403bc637e2967a028718058f987cc8841a6edc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Drop do_stage testRichard Purdie2016-01-241-3/+0
| | | | | | | | do_stage was obsoleted years ago, drop the test now. (From OE-Core rev: 59360521880a6ffbf893235bdc556533fab0a152) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk: Use pixz instead of xzRichard Purdie2016-01-241-2/+2
| | | | | | | | | xz is slow at compressing the SDKs, we can speed it up by using the parallel compressor, pixz. (From OE-Core rev: f4ec14b986fee791da33b8900c28c956f17b28b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uninative: Add fetch capabilityRichard Purdie2016-01-241-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, the idea was that the init environment would handle fetching or providing the binary shim that uninative needs. This turns out to be ugly, especially when you consider proxy environments and so on getting involved. Instead, lets therefore support our fetcher which already handles all this. The distro is expected to setup configuration like: UNINATIVE_URL ?= "http://mydomain/mypath/" UNINATIVE_CHECKSUM[i586] = "md5sum1" UNINATIVE_CHECKSUM[x86_64] = "md5sum2" and then it should all work if the user inherits the uninative class. This patch also improves the error handling in the class to give more user readable error messages. If the shim binary is already provided, the system will just use that and ignore the url information. (From OE-Core rev: 89097d2d7bf058136b01ec982b9453b49052b1d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk*: add dependencies on script filesPaul Eggleton2016-01-242-0/+8
| | | | | | | | | | | If the script files we use to construct the SDK installer change then that really ought to trigger re-execution of the do_populate_sdk(_ext) task, so add file-checksums varflags to ensure that happens. (From OE-Core rev: 59fc4bdefb3853d6893b9e3792018d54bb6bf99f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: drop ext-sdk-prepare.py when installingPaul Eggleton2016-01-241-0/+1
| | | | | | | | | | | | At the end of the extensible SDK installation, if we've successfully prepared the build system then we don't need ext-sdk-prepare.py. I had thought earlier that this would be used when updating, but a different mechanism was needed there so this script isn't used for that. (From OE-Core rev: 037ea78b0c3de01f87bbe06a1b88a162b2b40496) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: improve SDK update process robustnessPaul Eggleton2016-01-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the following improvements to the SDK update process: * Use a manifest file with sha256sums to track files other than sstate and metadata that we need to update - e.g. conf files. This allows us to handle where files such as auto.conf may or may not be present, as well as the configuration changing without affecting task signatures - we still want the config files copied in that case rather than it saying nothing needs to be done. * Write the SSTATE_MIRRORS_append to site.conf rather than local.conf so that local.conf remains static (since we don't want to trigger an update every time). Also, If there is an SSTATE_MIRRORS value already set in the configuration we can skip this and assume it contains the needed packages. * Allow the update process to be run in any directory, don't assume we're already at the base of the SDK * Where practical, fetch remote files into a temporary location and then move them to the desired location at the end, to avoid a failed update leaving the SDK in a broken state. * Update all installed do_populate_sysroot / do_packagedata tasks instead of using the SDK targets. This ensures any item installed through dependencies after installation (e.g. when running "devtool build") won't go stale. (From OE-Core rev: 3d35631121f0e030bc8151f5c23d84008d06f44b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: add option to bring in pkgdata for worldPaul Eggleton2016-01-241-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a variable SDK_INCLUDE_PKGDATA which you can set to "1" to include pkgdata for all recipes in the world target. There are a couple of uses for this: 1) If you use "devtool add" to add a recipe that builds something which depends on anything in world, the dependency can then be correctly mapped to the recipe providing it and that recipe can be added to DEPENDS, since we have the pkg-config and shared library dependency data within pkgdata. 2) You'll be able to search for these recipes and any files they package for the target with "devtool search" since that also uses pkgdata This of course assumes you've tailored world through EXCLUDE_FROM_WORLD to only include recipes you'd want built in your distro, but I think that's a reasonable assumption; failing that there is a WORLD_PKGDATA_EXCLUDE variable that you can set to exclude any recipes you don't want. Note that this patch relies on functionality implemented in a recent BitBake patch and will not work without it. Implements [YOCTO #8600]. (From OE-Core rev: 67149ea097d6fab7496b43e85a40853f40bd527e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives: when warning about alt_link==alt_target, say what PNRoss Burton2016-01-241-1/+1
| | | | | | | | | A warning that doesn't say what the PN is doesn't really help. (From OE-Core rev: 27ad7f446ff7b6a6a4f8f0d392f03c6707340a21) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: fix package_qa_walk()Robert Yang2016-01-241-2/+2
| | | | | | | | | | | The parameter "path" would be redefined inside package_qa_walk() which is useless, so remove it. (From OE-Core rev: b07d06d02cb675f5ed00ebe603441254f5671088) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: print all the QA messagesRobert Yang2016-01-241-27/+33
| | | | | | | | | | | | | | | | | | Fixed: If more than one files have the same QA issue, it only prints the last one, others are overrided, for example: messages["host-user-contaminated"] = "foo1" messages["host-user-contaminated"] = "foo2" Only foo2 will be printed. Add package_qa_add_message() to hanlde messages, so that all of them will be printed. The package_qa_add_message() is from RP. (From OE-Core rev: 1dcb38ca9d632887dd99ea9fa32dd955561dc18d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass:buildpaths: ignore ipkg/dpkg's CONTROL dirRobert Yang2016-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Fixed race issue when: WARN_QA_append = " buildpaths" PACKAGE_CLASSES = "package_ipk" $ bitbake e2fsprogs [snip] *** 0595: with open(path) as f: 0596: file_content = f.read() 0597: if tmpdir in file_content: 0598: messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d) 0599: Exception: IOError: [Errno 2] No such file or directory: '/path/to/tmp/work/core2-64-poky-linux/e2fsprogs/1.42.9-r0/packages-split/e2fsprogs-ptest/CONTROL/control' The similar to package_deb. (From OE-Core rev: cd4313339853d2eddebf93a49d0f45a305985a31) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: display the sysroot name when cleaning for clarityRoss Burton2016-01-241-1/+1
| | | | | | | | | When cleaning old builds from the sysroots, also print the sysroot architecture. (From OE-Core rev: 98a98a4bf71f74b5c27291ee9a2ac14006377e49) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools: don't output the full config.log on configure failureRoss Burton2016-01-241-7/+4
| | | | | | | | | | | | | | | | | | | | The config.log written by autoconf includes many pages of useless output, followed by an obfuscated error message, and then more pages of every variable that's been set. It's only understandable if you're well versed in how autoconf behaves, and often in simple failure modes doesn't actually make it clear what the problem was. Instead of outputting the whole config.log to the console when do_configure() fails, use bbfatal_log so the human-readable configure output (not the config.log) is shown to the user, and tell the user where config.log can be found if they need it. [ YOCTO #8856 ] (From OE-Core rev: 55e263c559098cce99d8c3ef57ccc39f1d4a6848) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs: Use list_pkgs() instead of list()Mariano Lopez2016-01-204-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | This patch changes the use list_pkgs() instead of list() from class RpmPkgsList. The change is in two functions, image_list_installed_packages from rootfs.py and sdk_list_installed_packages from sdk.py. With this change the functions calling the functions listed above, must format the output as they required. The formatting can be done using format_pkg_list() from oe.utils. The classes calling the afected functions are changed too with this patch, to keep the same functionality using the new data structure. [YOCTO #7427] (From OE-Core rev: 983ea373362514e5888bd1d7d9c4f136c94b00f2) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: replace verbose manifest removal with a single countRoss Burton2016-01-191-1/+5
| | | | | | | | | | | | | | | | | If there are lots of changes between the previous build and the build about to start bitbake will potentially print pages of: DEBUG: Stamp $BUILD/stamps/corei7-64-poky-linux/libdrm/2.4.66-r0 is not reachable, removing related manifests Instead of spamming the console with this list, write the list of manifests only to the debug log and simply write a count to the console. This way the user doesn't get spammed but still knows what is happening if bitbake appears to stall with heavy I/O. (From OE-Core rev: e777b541c76dad293d1c214e46c00f8f78fe0539) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm.bbclass: fix task dependenciesMarkus Lehtonen2016-01-191-0/+1
| | | | | | | | | | | | | do_rootfs task needs to depend on signing-keys:do_export_public_keys. The rpm signing public key needs to be present in order to prevent a crash because it is imported into the rootfs rpmdb before rootfs creation starts. (From OE-Core rev: f854f4549f0b01421464032406a5275494acd818) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Add packagedata to list of tasks not to recurseRichard Purdie2016-01-191-0/+4
| | | | | | | | | | | | | If we "bitbake X -c packagedata" and the packagedata comes from sstate, we don't need any of the tasks dependencies. This is similar to the populate_lic case, we only care about the end result. Therefore short circuit the dependencies so packagedata doesn't pull in any other dependencies. (From OE-Core rev: 76aa4f49db7d32bbd35703c64470fdfc63f403a4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: fix task dependency regressionPaul Eggleton2016-01-191-3/+3
| | | | | | | | | | | | | | | | | Fix a regression caused by OE-Core revision eabeb26335b1a4eb1e68218160dbdbe8fdf36272 where we lost the task dependency on packages in TOOLCHAIN_HOST_TASK (such as meta-environment-extsdk-${MACHINE}) which led to errors about missing packages when building the extensible SDK. This happened because I only moved half of the dependencies coming from the standard SDK task to do_sdk_depends. While I'm at it, tidy up the do_populate_sdk_ext[depends] line. (From OE-Core rev: 80309a2ba25de219b5339f1af6d5052d6229b676) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Handle image types containing '-' correctlyRichard Purdie2016-01-191-4/+6
| | | | | | | | | | Shell function names can't contain '-' characters, which means our image task names also can't. Add some mapping to use '_' instead of the '-' so images like "rpi-sdimg" work again. (From OE-Core rev: e609a4dea2f6d9744e7d2a6650bebf2c02398907) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bootimg/image-vm/image-live: Improve image dependenciesRichard Purdie2016-01-194-5/+5
| | | | | | | | | | | | | | Now that image generation consists of separate tasks, we can improve the dependencies in these classes. We can also incorporate the tasks within do_image_complete instead of do_build so we have a specific task for when the deploy directory is populated with images. This fixes various expectations about do_image_completed and the way I'd tried to use it to fix some sanity test problems. (From OE-Core rev: 9543c4a9ce0ac7d9ced66fa14e48a1aa7401011e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Always run do_rootfs_wicenvRichard Purdie2016-01-191-1/+1
| | | | | | | | | | | The wic command can be used externally but for this to work, the wic environment file needs to be present. Therefore write this out universally, it runs in parallel with other image construction so any performance implications are negligible. (From OE-Core rev: b2576f2eab10e4c5dd86449312b417a269cc578e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bootimg/image: Enhance bootimg to respect RM_OLD_IMAGERichard Purdie2016-01-192-12/+8
| | | | | | | | | | Currently, iso and hddimg links don't respect RM_OLD_IMAGE. This updates them to use the common symlinks code so that they behave like the rest of the system. (From OE-Core rev: 6a05cb64dfafd531d50454ef7141ff0290d01ca9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: Ensure license manifests respect RM_OLD_IMAGERichard Purdie2016-01-191-0/+3
| | | | | | | | | | | When RM_OLD_IMAGE is set, old manifest files should be removed along with old image files and our QA tests expect this. This patch ensures this happens. (From OE-Core rev: fc951851a0e172641e2f24a4edce87ca2eb5cecd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Ensure we don't expand TMPDIR in image commandsRichard Purdie2016-01-191-0/+2
| | | | | | | | | | Similarly to DATETIME, don't expand TMPDIR in image commands. This ensures some of the stamp comparisons we make in the QA tests work correctly. (From OE-Core rev: a8c377beadb85b0ff503ec8ddd1a2cd05e363c19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix instability of do_image_* checksumsRichard Purdie2016-01-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | The do_image_* tasks contained the expanded version of DATETIME. Due to the expansion, we couldn't exclude the value from the task checksum which meant the task would rerun. We fix this by deleting the DATETIME value during expansion so we don't expand any references to at that time. This means the task's hash can be stable rather than having hardcoded date/time values. It will get expanded at execution time. This also fixes errors shown by -S: NOTE: Reparsing files to collect dependency data Writing locked sigs to /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/locked-sigs.inc ERROR: Bitbake's cached basehash does not match the one we just generated (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-sato/images/core-image-sato.bb.do_image_tar)! ERROR: The mismatched hashes were 77872792556367f1dde49a1425caf1a0 and 9bb0aca6286ab7dd22d3c69964beb665 (From OE-Core rev: ecbc1db7ed1f9848dee69507de8eb289b8ddeba0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Fix wic environment issuesRichard Purdie2016-01-192-4/+5
| | | | | | | | | | | | | | | | | | | | | The wic environment function needs to run after the rootfs size is setup. We move this code to a specific task, and depend on that task from the wic images and other places its needed. This fixes: ====================================================================== FAIL: test_image_env (oeqa.selftest.wic.Wic) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 106, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 218, in test_image_env self.assertTrue(var in content, "%s is not in .env file" % var) AssertionError: False is not true : ROOTFS_SIZE is not in .env file (From OE-Core rev: 606f9e2d7d8d389c8d4f5c3090139d3bb780e09c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Start to clean up do_configure_qa codeRichard Purdie2016-01-191-15/+21
| | | | | | | | | | | | | | | | This cleans up the do_configure_qa code so that the exit status from package_qa_handle_error is handled correctly. It also converts package_qa_check_license to use our standard QA check configuration interface through package_qa_handle_error rather than a mix of return values, bb.fatal and bb.build.FuncFailed. Due to the merging of multiple lines into one message, we need to tweak a QA test to account for this. (From OE-Core rev: fbdf977a8094bb1e0baca85ffb3ed7f326986639) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Clean up horrible return value processing codeRichard Purdie2016-01-191-39/+16
| | | | | | | | | | | Whilst in theory return values are nice, handling the complex aggregation of the return values is ugly. The code already uses QA_SANE as a marker to signal problems. Whilst that isn't as idealistic, it makes the code massively cleaner, so rely on this instead. (From OE-Core rev: ebee3caeaa18daf4974ea90e264d64467681f57a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.bbclass: fix license manifestJackie Huang2016-01-181-1/+1
| | | | | | | | | | | The license manifest is wrong when there is no spaces before and after separates |&() and we can get warning like: WARNING: The license listed Artistic-1.0GPLv1+ was not in the licenses collected for recipe (From OE-Core rev: 20d6a4ce4e395251604d92111ce5ecacde5ce172) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: move do_kernel_link_vmlinux() into kernel.bbclassAndre McCurdy2016-01-182-12/+12
| | | | | | | | | | | | | | | | Move do_kernel_link_vmlinux() from kernel-yocto.bbclass into kernel.bbclass so that it's available to any kernel recipe. Note that the task is not enabled by default in kernel-yocto.bbclass, so don't enable by default in kernel.bbclass either. To enable, see the example in linux-yocto.inc, ie: addtask kernel_link_vmlinux after do_compile before do_install (From OE-Core rev: a29371848deda618a42f9a30f9856a44c2342fe6) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto.bbclass: remove do_kernel_link_vmlinux from SRCTREECOVEREDTASKSAndre McCurdy2016-01-181-1/+1
| | | | | | | | | | | The do_kernel_link_vmlinux() task modifies the build directory (not the source tree) and should not be skipped when externalsrc is being used. (From OE-Core rev: 70b8a60d42831c701d10066eb57aaaad7a6fb7ae) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toaster.bbclass: Separate artifact dump from image file dumpElliot Smith2016-01-181-11/+27
| | | | | | | | | | | | | | | | | | | | | SDK artifacts were being dumped alongside the image file dump. However, the dump was not being triggered correctly, as it should be attached as a postfunc to do_populate_sdk, rather than do_rootfs, as do_rootfs doesn't always fire when populating the SDK directory. By adding a postfunc to do_populate_sdk, the postfunc is fired in the correct situations. Also fixes the directory which is scanned for SDK artifacts, as this is different from the image file directory. [YOCTO #7603] (From OE-Core rev: cd2eb45ce1f9be15e133d6fe940c1cff2199099b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Remove unnecessary spacesPeter Kjellerstedt2016-01-181-3/+3
| | | | | | | | | | | | | | This removes unnecessary spaces inserted before semicolons in the modified USERADD_PARAM_${PN} and GROUPADD_PARAM_${PN} variables. This should not affect the handling of the variables as the only one that actually sees the semicolons is the code in useradd.bbclass that uses cut to split the variables at them, and any whitespace preceeding or following the semicolons will be properly ignored. (From OE-Core rev: acc17ef91a6f506e3cacdc0d4ebfa268b3f3affd) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Read passwd/group files before parsingPeter Kjellerstedt2016-01-181-73/+91
| | | | | | | | | | | | | | | | | | | | | | Read and merge the passwd/group files before parsing the user and group definitions. This means they will only be read once per recipe. This solves a problem where if a user was definied in multiple files, it could generate group definitions for groups that should not be created. E.g., if the first passwd file read defines a user as: foobar::1234:::: and the second passwd file defines it as: foobar:::nogroup:The foobar user:/:/bin/sh then a foobar group would be created even if the user will use the nogroup as its primary group. (From OE-Core rev: 3149319ad997379a01d87f2b1b5d14f66541997f) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Simplify the logic for when to add groupsPeter Kjellerstedt2016-01-181-20/+16
| | | | | | | | | | | | | | | | | | | | | | The original code was near impossible to follow, and missed a couple of cases. For example, if one added the following line to the passwd file specified in USERADD_UID_TABLES: foobar:x:12345:nogroup::/:/bin/sh and then specified the user as: USERADD_PARAM_${PN} = "--system foobar" one would then assume that the foobar user would be created with the primary group set to nogroup. However, it was not (the primary group would be foobar), and the only way to get it correct was to explicitly add --gid nogroup to the USERADD_PARAM_${PN}. (From OE-Core rev: e98e98ce65cf9ffdef29462310a622ffddd1412b) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Simplify some logicPeter Kjellerstedt2016-01-181-8/+7
| | | | | | | | | | | | | | | | | | | | | | The [<on_true>, <on_false>][not <condition>] construct may solve the problem of implementing a conditional operator, but it is not very readable. At least I find this: uaargs.groupid = field[3] or uaargs.gid or uaargs.groupname a lot more readable than this: uaargs.groupid = [uaargs.gid, uaargs.groupname][not uaargs.gid] uaargs.groupid = [field[3], uaargs.groupid][not field[3]] Also, the official conditional operator since Python 2.5 (<on_true> if <condition> else <on_false>) does not evaluate both <on_false> and <on_true> as [<on_true>, <on_false>][not <condition>] does. (From OE-Core rev: 274d38a6e2183ec88335a08b963f26c34b328558) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Make --no-user-group have effectPeter Kjellerstedt2016-01-181-1/+1
| | | | | | | | | | | If --no-user-group is specified in USERADD_PARAM_${PN} for a user and no --gid is specified, then we should not assume that the group name for the user is the user name. (From OE-Core rev: 0e5402c433739a416a76df532378533cb25365c7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd-staticids.bbclass: Treat mutually exclusive options as suchPeter Kjellerstedt2016-01-181-13/+14
| | | | | | | | | | | The useradd options --create-home/--no-create-home and --user-group/--no-user-group are mutually exclusive and should be treated as such. (From OE-Core rev: 908eca7fb4af8a60026f53e2bb2cf1d5daf089ab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: use relative path to run configure scriptRobert Yang2016-01-181-1/+3
| | | | | | | | | | | | | | | The absolute path (/path/to/configure) caused VPATH in Makefile to be an absolute path, and then it will be in elf files, use relative path to run configure can fix the problem. This will reduce a lot of buildpaths QA issues in a world buld. [YOCTO #8894] (From OE-Core rev: 2c6ad43af0a0c4db5d7fd342be8585bec66debfb) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for ↵Jianxun Zhang2016-01-152-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | kernel ARCH For a bare-bone kernel recipe which specifies 32 bit x86 target, a 64 bit .config will be generated from do_configure task when building 32-bit qemux86, once all of these conditions are true: * arch of host is x86_64 * kernel source tree used in build has commit ffee0de41 which actually chooses i386 or x86_64 defconfig by asking host when ARCH is "x86" (arch/x86/Makefile) * bare-bone kernel recipe inherits directly from kernel without other special treatments. Build will fail because of the mismatched kernel architecture. The patch sets ARCH i386 or x86_64 explicitly to configure task to avoid this host contamination. Kernel artifact is also changed so that it can map i386 and x64 back to arch/x86 when needed. (From OE-Core rev: 8d310b24927d0f348fb431895f0583733db2aad0) Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/image-live: Add back IMAGE_TYPES_MASKED supportRichard Purdie2016-01-152-3/+8
| | | | | | | | | | | | | IMAGE_TYPES_MASKED support was accidentally removed. The original idea behind it was to remove some of the hardcoding in the core image code, so do that for image-live and ensure the dependency and masked variables correctly reflect the needs of the class. This means we can remove all the hardcoded special cases since image-vm already has the needed markup. (From OE-Core rev: 9a2d4a3b8d7bb1cf7f1fb7fe47d5c002d9941c89) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Handle image base type dependency properlyOtavio Salvador2016-01-151-0/+3
| | | | | | | | | | | | | | | | When a base image type has an implicit dependency (from IMAGE_TYPEDEP) this has to be taken into account. This is a regression introduced by OE-Core:c2dab18 (image: Create separate tasks for rootfs construction). The issue has been found when building meta-fsl-arm based images which does not include the rootfs image type explicitly in IMAGE_FSTYPES but instead is added, using IMAGE_TYPEDEP, for the 'sdcard.gz' image. Reported-by: Fabio Berton <fabio.berton@ossystems.com.br> (From OE-Core rev: 191c7be3a6cc52911f244323072433f6a1172bf1) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: avoid unnecessary sstate being brought inPaul Eggleton2016-01-151-7/+20
| | | | | | | | | | | | | | | | Create a separate task where we can just have the recursive dependencies for the tasks corresponding to constructing the SDK content (i.e. from the image contents). This avoids us recursing into dependencies from buildtools and getting a bunch of nativesdk stuff, for example. (This isn't an ideal way to have to implement it, but without overcomplicating things on the BitBake side just for this use-case I can't see a better way.) (From OE-Core rev: eabeb26335b1a4eb1e68218160dbdbe8fdf36272) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>