summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
Commit message (Collapse)AuthorAgeFilesLines
* lib/oe/recipeutils: fix patch_recipe*() with empty inputPaul Eggleton2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | If you supplied an empty file to patch_recipe() (or an empty list to patch_recipe_lines()) then the result was IndexError because the code checking to see if it needed to add an extra line of padding didn't check to see if there were in fact any lines before trying to access the last line. Fixes [YOCTO #9972]. (From OE-Core rev: 92a73e870478ddb2a2d137e3fff28828809bec2e) (From OE-Core rev: 5ce14441f02894e68881807138e8f45074900ba2) 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>
* lib/oe/rootfs: Fix DEBUGFS generation, without opensslAnders Darander2016-06-291-0/+2
| | | | | | | | | | | | | | | | | | | In commit 20ea6d274bb0a9a5addb111f32793de49b907865, debugfs generation for images using opkg, which included openssl was fixed. However, that broke the generation of the opkg-based images, that lacks openssl. The error is a python stack trace, showing that shutil.copytree tries to copy a non-existing directory. This relates to [YOCTO #9040]. (From OE-Core rev: 6289046a86a64cb2f9d314d1fd99d9ef5ee4f991) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f6b0b260ce18a30d04edfb0afb7942b9f9a5480b) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix picking up false npm package directoriesPaul Eggleton2016-06-291-1/+1
| | | | | | | | | | | | | | | | It is possible for a Node.js module to have node_modules subdirectories that contain no package.json file (e.g. iotivity-node has such a directory). It appears these should simply be ignored, or else with the way the current code works we will get errors later. (From OE-Core rev: 8c522f1f536270e195c8c73f5c72801495e7b33b) (From OE-Core rev: 8da9185a1c68c8274269841d0867d7d4abf426f0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs: Fix DEBUGFS generation for opkg & openssl-cnfAnders Darander2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | When enabling extra DEBUGFS image generation with opkg, the following error is seen when openssl-cnf is included in the image. Collected errors: * file_md5sum_alloc: Failed to open file /mnt/cs-builds/anders/oe-build/build-ccu/tmp/work/ccu-oe-linux-gnueabi/ccu-image/1.0-r0/rootfs/usr/lib/ssl/openssl.cnf: No such file or directory. Lots of similar issues was fixed by an earlier commit in oe-core, 5084ed9401250ed269a49d27b303806ab173c5d5, but openssl-cnf is outside of that fix. Followup to [YOCTO #9490] (From OE-Core rev: 20ea6d274bb0a9a5addb111f32793de49b907865) (From OE-Core rev: cd4ad2b8a5bd11e91e854cea6a36c7b92fb7cea8) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/classextend: Fix determinism issueRichard Purdie2016-05-171-1/+3
| | | | | | | | | | | | | The ordering of dependency variables needs to be deterministic to avoid task checksums changing. Use an OrderedDict to achieve this. (From OE-Core rev: 855a2d21503856af392ab2d54ccfa270505ba142) (From OE-Core rev: a89e4e27ba3f4bc3d1c649b3b8ad8ddc4d227d0d) 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>
* sdk.py: preserve packaging data when SDKIMAGE_FEATURES has "package-management"Denys Dmytriyenko2016-04-291-4/+14
| | | | | | | | | | | | | | | | | | | | | | | This is not enabled by default, as there are still limitations and possible issues with opkg (and rpm?) packaging data containing broken symlinks for local indexes: http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4ce1c103966906a85f68c15400dd There are other use cases for the packaging data to be available in SDK, since it provides comprehensive info about SDK's contents and in the case of opkg and dpkg is all text-based and can be easily parsed by simple scripts. Introduce new "package-management" flag for SDKIMAGE_FEATURES list (similar to the one already used for IMAGE_FEATURES) that controls presence of the packaging data in resulting SDK, while unifying this behavior across the board for supported pkg managers - rpm, opkg, dpkg. (From OE-Core rev: 9ab934e4aecb759c922049245888dcd2a8c55477) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs: Fix DEBUGFS generation when using opkgRichard Purdie2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | When enabling extra DEBUGFS image generation with opkg, errors are seen like: ERROR: core-image-minimal-1.0-r0 do_rootfs: Cannot get the installed packages list. Command '/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/opkg -f /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/opkg.conf -o /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version status' returned 0 and stderr: Collected errors: * file_md5sum_alloc: Failed to open file /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/syslog-startup.conf.busybox: No such file or directory. * file_md5sum_alloc: Failed to open file /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/fstab: No such file or directory. basically for all CONFFILES in the image. This is due to the file rearranging the rootfs generation code does. If we preserve the /etc directory, the avoids the problem. We need to tell copyfile to preserve symlinks since some are present in /etc. [YOCTO #9490] (From OE-Core rev: 5084ed9401250ed269a49d27b303806ab173c5d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: handle where SRC_URI is appended to with +=Paul Eggleton2016-04-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | If a recipe sets SRC_URI and then appends more items to it with += (such as the current rpm recipe in OE-Core), the code in patch_recipe_file() was failing with a traceback. Work around the problem for now by dropping the existing lines if we understand the operation, else just set the value outright at the end. This leaves something to be desired as it either doesn't respect the existing structure or leaves a mess but it's better than the current breakage. We'll need to come up with a better solution later. Part of the problem is the existing code structure doesn't allow for patch_recipe_file() to know what's being added or removed - it only knows the final value that the caller wants set. Fixes [YOCTO #9458]. (From OE-Core rev: da5cd84794e1ab5c4efcd6250d3b93a46f610744) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: don't copy .git when building the eSDKStephano Cetola2016-04-141-1/+1
| | | | | | | | | | | When creating an eSDK ensure that any .git directories are not included. [ YOCTO #9426 ] (From OE-Core rev: 6a5e2b2196e5654fc54ba5b2e51a390c966fd1b7) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: Stop packagenames containing underscores from being generatedBrendan Le Foll2016-04-141-1/+1
| | | | | | | | | | | Package names cannot contain underscores yet some npm modules use them as part of the name, replace them with hyphens in the package name. (From OE-Core rev: fea932c79c8201e3e7649f4443874ea540e33461) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: apply ROOTFS_POSTINSTALL_COMMAND to all package formatsBill Randle2016-04-141-2/+3
| | | | | | | | | | | | | | Previously, ROOTFS_POSTINSTALL_COMMAND was run only after the opkg rootfs install post processing phase. This patch makes it generic so it is run fter any package manager specific rootfs post processing, but before _run_intercepts(). [YOCTO #9248] (From OE-Core rev: 8f2571881cd01ace88d282a63ad802cab4ab6940) Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/lsb: sanitise the distro identifierRoss Burton2016-04-131-0/+5
| | | | | | | | | | | | | | | | The distribution identifier is often used to create filenames, so it needs to be safe to use as a filename. Whilst most distributions have e.g. Fedora or Debian as their name, it is possible that the name contains special characters. To ensure this doesn't cause a problem strip out any non-alphanumerics from the distribution name before returning it. [ YOCTO #9443 ] (From OE-Core rev: 8a96a7207561e00eb92e4fb69e7340f20bfa2053) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig.py: Add a method to "unlock" recipesRandy Witt2016-04-091-1/+23
| | | | | | | | | | | | | | | | | | | | | | In order to support workflows using devtool where a user might want to modify tasks that exist in locked-sigs.inc, there must be a way to unlock recipes. This patch adds that support by allowing the user to add recipes to SIGGEN_UNLOCKED_RECIPES. Recipes that exist in that variable will have all their tasks unlocked, as well as any tasks that depend on that recipe. For example if foo->bar->baz, if you unlock baz, it will also unlock bar so that foo can be rebuilt without explicitly specifying bar as being unlocked. [YOCTO #9195] (From OE-Core rev: 8a8fc54d824767a6a94d12a4ace98b0bdbb1aa25) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig.py: Improve the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK messageRandy Witt2016-04-091-5/+7
| | | | | | | | | | | | | | | | | | | | The previous message when signatures didn't match between the metadata and the locked signatures file, the message output was a bit confusing. Now the message should be of the form: The zlib-native:do_install sig is computed to be 53531910a2a7848432da89def942a91a, but the sig is locked to d25ba9035f7ccb308e51bbe1066e8d27 in SIGGEN_LOCKEDSIGS_t-x86-64 which will hopefully be more useful in understanding the problem. [YOCTO #9195] (From OE-Core rev: 49eeabfff8bbea69401db41f7219e29acf47af73) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig.py: Split single locked sigs check into multiple checksRandy Witt2016-04-091-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK variables to replace SIGGEN_LOCKEDSIGS_CHECK_LEVEL. SIGGEN_LOCKEDSIGS_TASKSIG_CHECK will no control whether there is a warning or error if a task's hash in the locked signature file doesn't match the computed hash from the current metadata. SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK will control whther there is a warning or error if a task that supports sstate is in the locked signature file, but no sstate exists for the task. Previously you could only have warning/errors for both controlled by SIGGEN_LOCKEDSIGS_CHECK_LEVEL. This was an issue in the extensible sdk, because we know sstate won't exist for certain items in the reverse dependencies list for tasks. However, we still want to error if task signatures don't match. [YOCTO #9195] (From OE-Core rev: 0fe2a5e5ffd01e926d0f3d4c78ad9910296e2d1a) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: better error handling in opkg's package listingPatrick Ohly2016-04-051-6/+9
| | | | | | | | | | | | | | | opkg does not return a non-zero exit code even if it found errors. When that happens, parsing the output leads to strange follow-up errors. To avoid this we need to check explicitly for non-empty stderr. Reporting only that on a failure also leads to shorter error messages (stdout may be very large). (From OE-Core rev: 7d9e915224a9bc451fddfbbfad533d9b06e9987d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/patch: print cleaner error message when patch fails to applyMarkus Lehtonen2016-04-031-5/+9
| | | | | | | | | [YOCTO #9344] (From OE-Core rev: 574405a97f956278d31d52cfc934be2840cf2fa6) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/patch: more detailed error reportingMarkus Lehtonen2016-04-031-3/+5
| | | | | | | | | | | | Show the actual command that failed when raising a CmdError. Makes figuring out what actually failed much easier. [YOCTO #9344] (From OE-Core rev: 8e9c03df1810daab7171733f1713ef94d3a18ab2) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/packagedata: Add import osRichard Purdie2016-04-011-0/+1
| | | | | | | | | So that the packagedata module can be used externally to the core OE environment, add a missing import. (From OE-Core rev: da4df2313c8df92cf321a7631a9a389f895d4615) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Make unneeded packages for a read-only rootfs configurablePeter Kjellerstedt2016-03-311-18/+5
| | | | | | | | | | | | | | | | Previously the list of packages that are considered unneeded for a read-only rootfs was hardcoded. This made it impossible to, e.g., have shadow installed on a system with a read-only rootfs, but where /etc is mounted writable. This also lists ${VIRTUAL-RUNTIME_update-alternatives} rather than update-alternatives (as was previously the case) since this should actually remove the intended package. (From OE-Core rev: e3b881d4168e5b02ff00f5c470ba472ab8bbc747) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Ensure we keep native depends for allarch recipesRichard Purdie2016-03-291-1/+1
| | | | | | | | | | | Without this, do_package_write_rpm doesn't depend on rpm-native which it really should since that is needed to build rpms. [YOCTO #8047] (From OE-Core rev: 3fab4f9920d004fe13fb01434d4c7f3b8bbd7895) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa: add method to check if static or dynamic linkedRoss Burton2016-03-261-5/+39
| | | | | | | | | | It's useful to know if a binary is statically or dynamically linked, so add a method to determine this. (From OE-Core rev: 96813445e6618fd8442600d81e53c448310b6e8b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg_sign.py: get rid of pexpectRobert Yang2016-03-251-18/+6
| | | | | | | | | | | | | The python-expect is not installed on the distro such as Ubuntu by default, and we can get rid of it. Use RPM_GPG_PASSPHRASE to replace of RPM_GPG_PASSPHRASE_FILE which is more straightforward. (From OE-Core rev: 4a8a74c62836a20610daf029d4cec0b3087758b2) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/package_manager: remove RPM4 support codeJoshua Lock2016-03-201-56/+38
| | | | | | | | | | | Simplify the RPM code by removing support for RPM 4 now that we've dropped the RPM 4 recipe. (From OE-Core rev: 7db6f0a402948ce489bafadf2e389802f764f122) 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>
* package_manager.py: Fix race condition in OpkgIndexer.write_index()Mariano Lopez2016-03-121-4/+4
| | | | | | | | | | | | | | | | When writing the index using ipk packages there could be a race condition when populate the index. This happens because the architectures are repeated (specially all) and the commands generated to write the index run in parallel. This change avoid the duplication of commands using a set instead of a list. [YOCTO #8924] (From OE-Core rev: 74adb14b0002e20099cc2c34e01862e8ddb8e013) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_package_feed: add feed signature typeIoan-Adrian Ratiu2016-03-111-2/+8
| | | | | | | | | | Signing package feeds will default to ascii armored signatures (ASC) the other option being binary (BIN). This is for both rpm and ipk backends. (From OE-Core rev: 862a3892feb2628282e1d6f2e4498a7a3bd60cbf) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: sign IPK package feedsIoan-Adrian Ratiu2016-03-111-2/+12
| | | | | | | | | Create gpg signed ipk package feeds using the gpg backend if configured (From OE-Core rev: a2ee831cfb688bc64c071f75a1dff8a963abe287) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg_sign: export_pubkey: add signature type supportIoan-Adrian Ratiu2016-03-111-2/+4
| | | | | | | | | | | Add support for multiple types of signatures (binary or ascii) in export_pubkey(). There is no change in behaviour for the function, the previous implicit default is the new parameter "armor" default. (From OE-Core rev: 95ba4a982b887444908207e3180fe4bc46281d3b) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg_sign: detach_sign: fix gpg > 2.1 STDIN file descriptorIoan-Adrian Ratiu2016-03-111-0/+16
| | | | | | | | | | | | | | | | | | Starting from v2.1 passing passwords directly to gpg does not work anymore [1], instead a loopback interface must be used otherwise gpg >2.1 will error out with: "gpg: signing failed: Inappropriate ioctl for device" gpg <2.1 does not work with the new --pinentry-mode arg and gives an invalid option error, so we detect what is the running version of gpg and pass it accordingly. [1] https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase (From OE-Core rev: 0413bd8e294ca8ac972ac68662b43a981952f5ae) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg_sign: add local ipk package signing functionalityIoan-Adrian Ratiu2016-03-111-12/+26
| | | | | | | | | | | | | | | | | | | | Implement ipk signing inside the sign_ipk bbclass using the gpg_sign module and configure signing similar to how rpm does it. sign_ipk uses gpg_sign's detach_sign because its functionality is identical to package feed signing. IPK signing process is a bit different from rpm: - Signatures are stored outside ipk files; opkg connects to a feed server and downloads them to verify a package. - Signatures are of two types (both supported by opkg): binary or ascii armoured. By default we sign using ascii armoured. - Public keys are stored on targets to verify ipks using the opkg-keyrings recipe. (From OE-Core rev: a40f27aa7802e8a0bd87a5417e35adbface62d05) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: split npm module dependencies into packagesPaul Eggleton2016-03-091-0/+32
| | | | | | | | | | | | | | | | | | | | Rather than rolling all of an npm module's dependencies into the same package, split them into one module per package, setting the SUMMARY and PKGV values from the package.json file for each package. Additionally, mark each package with the appropriate license using the license scanning we already do, falling back to the license stated in the package.json file for the module if unknown. All of this is mostly in aid of ensuring all modules and their licenses now show up in the manifests for the image. Additionally we set the main LICENSE value more concretely once we've calculated the per-package licenses, since we have more information at that point. (From OE-Core rev: 8226805f83d21e7c1d2ba21969f3e8ee4b137496) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/sstatesig: skip shared_workdir when checking locked sigsJoshua Lock2016-03-091-0/+2
| | | | | | | | | | do_shared_workdir is not a proper sstate task, it always reruns if needed, so special-case it in warnings when checking locked sigs. (From OE-Core rev: 4b08f982a2b15bff9092f60f7957301bb2d2108b) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Uprev to rpm-5.4.16 (pre) and rpm-5.4+cvs to current CVS headMark Hatle2016-03-091-5/+9
| | | | | | | | | | | | | | | | | | | | | | meta/lib/oe/package_manager.py was also updated. This ensures that any diagnostic messages are ignored from the output of rpmresolve. The patches have been split into bug fixes (things that belong upstream) and local changes that are OE specific. The following patches are obsolete and have been removed: rpm-remove-sykcparse-decl.patch fstack-protector-configure-check.patch rpm-disable-Wno-override-init.patch rpm-lua-fix-print.patch rpm-rpmpgp-fix.patch verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch (From OE-Core rev: ee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane/prelink: Handle nonstandard library pathsRichard Purdie2016-03-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | Prelink contains some hardcoded assumptions about the path layout of the target system. Unfortunately if the system doesn't match, prelink doesn't work. This breaks: a) prelink of those images b) the unsafe-references-in-binaries QA test (which uses prelink-rtld) One way to work around this is to construct an ld.so.conf file which lists the library paths in question. We do this in sanity QA check and in the rootfs prelink code, being careful not to trample any existing target ld.so.conf. There is an additional problem that $LIB references in RPATHs won't be handled correctly, I've not see any system use these in reality though so this change at least improves things. (From OE-Core rev: 7fd1d7e639c2ed7e0699937a5cb245c187b7c811) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add build-sdk subcommandPaul Eggleton2016-03-071-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a build-sdk command which is only available within the extensible SDK that builds a derivative extensible SDK. The idea is recipes in the workspace become a part of the new SDK - for example, this allows taking a vendor provided SDK, adding a few libs and then producing a new SDK with those included. When normally building the extensible SDK, the workspace is excluded; here we need to copy into the new SDK (renaming it in the process); the recipes' task signatures become locked and thus the sources are no longer needed, so they are removed along with the workspace bbappends which would interfere with the locked signatures. Additionally we need to just copy the configuration files (i.e. local.conf and auto.conf) rather than filtering and appending to them since that work has already been done when constructing the original SDK. The extra sstate artifacts from workspace recipes are also determined and copied into the new SDK in minimal mode (on the assumption that you won't set up a new sstate mirror). This reuses some code from build-image, so that needed to be generalised to allow that. Implements [YOCTO #8892]. (From OE-Core rev: 59e207ff6dd4b50a8905e14bc9292cf2794f4e7a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa: add explicit exception for 'file isn't an ELF'Ross Burton2016-02-281-6/+9
| | | | | | | (From OE-Core rev: 4c1fe0cbcb98b0a69ad5b3a04432055d773ee4ba) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* signing-keys: Make signing keys the only publisher of keysRandy Witt2016-02-261-10/+0
| | | | | | | | | | | | | Previously the keys were put into the os-release package. The package indexing code was also deploying the keys rather than only using the keys. This change makes signing-keys.bb the only publisher of the keys and also uses standard tasks that already have sstate. (From OE-Core rev: 1e38068ac38dfd067655dfd41464e28439179306) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/gpg_sign: add 'passphrase' argument to detach_sign methodMarkus Lehtonen2016-02-191-10/+20
| | | | | | | | | | | | | This allows directly giving the passphrase, instead of reading from a file. [YOCTO #9006] (From OE-Core rev: fd55c6e86b38b33f62006324e73678a13a534220) 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>
* sign_rpm.bbclass: do not store key details in signer instanceMarkus Lehtonen2016-02-192-18/+15
| | | | | | | | | | | | | Refactor the LocalSigner class. Do not store keyid or passphrase file in the signer object as they are only needed for some of the methods. For example, the newly added verify() method does not need any key parameters and export_pubkey only uses keyid. (From OE-Core rev: e2412294b6b1d3a80ee97a0706613349edc51d33) 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>
* oe/gpg_sign: add 'armor' argument to detach_sign()Markus Lehtonen2016-02-191-2/+4
| | | | | | | | | | [YOCTO #9006] (From OE-Core rev: ce653694a87fd77d79ec3d28ed3365a2c8e57ad6) 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>
* oe/gpg_sign: add verify() methodMarkus Lehtonen2016-02-191-0/+10
| | | | | | | | | | | | A new method for verifying detached signatures. [YOCTO #9006] (From OE-Core rev: 4445c645c71151bd56ff7e133343a6f1e30cc3b3) 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>
* lib/qa.py: raise ValueError if file isn't an ELFRoss Burton2016-02-161-7/+7
| | | | | | | | | | | | | Instead of raising a generic Exception that can't be handled specifically, raise a ValueError. Also update the callers so any unexpected exceptions are not ignored. Also, rename isBigEngian() to isBigEndian(). (From OE-Core rev: c136652f9c0b35aafa393e63567daf029ae03929) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa: ELFFile: check that a path is a file before opening itRoss Burton2016-02-161-0/+3
| | | | | | | | | | | | | When opening an ELF file check that a filename points to a normal file before attempting to open it, as if the file turns out to be something more exotic like a FIFO it could hang forever. (From OE-Core rev: 4b3576bc30d8f8cdcde25189def8b059fc92b27c) (From OE-Core rev: d3af2058e2753516b9aaf7f6d71162363eea11d4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/terminal: set workdir for konsole terminalPascal Bach2016-02-141-1/+1
| | | | | | | | | | | | It seems that if the --workdir option is not set konsole does open in the users home directory. By setting --workdir . konsole opens in the recipes work directory. This is the same behavior as observed for other consoles. (Tested with Konsole 2.14.2 on Debian Jessie). (From OE-Core rev: bd06944249c3de3f629c013e14f446464441c4da) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: commit for extra tasks that modify source when extractingPaul Eggleton2016-02-111-0/+3
| | | | | | | | | | | | | | | | When extracting source for a recipe, if there are additional custom tasks run that make changes to the source, create a commit in the generated git branch so they are contained. This is particularly useful for tasks that come before do_patch since otherwise the changes might get incorporated in the first applied patch, but otherwise it helps avoid the tree being dirty at any point. Fixes [YOCTO #7626]. (From OE-Core rev: 997a77d9b20af1778b804778e5d8c8a7424f7582) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/gpg_sign: fix incorrect variable nameMarkus Lehtonen2016-02-111-1/+1
| | | | | | | | | | Prevents crash in signing if GPG_PATH is defined. (From OE-Core rev: 0ecd748258abfe5ed9e9e2505aeb42b232389968) 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>
* package_manager.py: fix python indentation bug (opkg)Ioan-Adrian Ratiu2016-02-061-8/+8
| | | | | | | | | | | | This if branch is causing the following error during do_rootfs: "Exception: UnboundLocalError: local variable 'cfg_file' referenced before assignment". This happends because the cfg_file variable is defined at a deeper nesting level (just above the if branch). (From OE-Core rev: 555981c10e6b7f5c2be7f2c3fefb89b1add72cab) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cacheRandy Witt2016-02-061-1/+8
| | | | | | | | | | | | | | If the nativelsb argument is not used, then create_locked_sstate_cache() can get collisions when moving the files from the input_sstate_cache to the output_sstate_cache. The specific case where this was encountered was when a "universal" nativelsb directory already existed in the input_sstate_cache. (From OE-Core rev: 760f7178e0267f930c8af9cb59039e317149f944) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* copy_buildsystem: add ability to exclude layersChen Qi2016-02-041-0/+6
| | | | | | | | | | | | | | | | | | In some cases, we may have some kind of download layers in BBLAYERS, so that we can set BB_NO_NETWORK to "1". This results in extremely large extensible SDK. And we actually don't need these download layers in the SDK. Add a new variable, SDK_LAYERS_EXCLUDE, to enable users to explicitly exclude some layers when generating the extensible SDK. [YOCTO #8878] (From OE-Core rev: acf1148bf3f4e489e9e2b0b8745753e1311ee812) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Add expand parameter to getVarFlagRichard Purdie2016-02-042-3/+3
| | | | | | | | | | | | | | | | This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g' -i `grep -ril getVar *` In this case, the default was False, but True was used since in most cases here expansion would be expected. (From OE-Core rev: 42a10788e89b07b14a150ced07113566cf99fcdd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>