summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
Commit message (Collapse)AuthorAgeFilesLines
* lib/oe/package_manager.py (rpm): Allow use of non-signed packagesOtavio Salvador2017-10-071-3/+5
| | | | | | | | | | | | | | | | | When we wish to use the package feed for local development, it does not uses GPG signed feeds by default but dnf uses package signature check. We need to configure the GPG signature check out so it works out of box. With this patch, installing non-signed packages works: $: dnf install <package> (From OE-Core rev: bceafe23cbe12a1ab0628b70865cb8867c7d7ee1) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license.py: Correct selection of licenses in is_included()Peter Kjellerstedt2017-10-071-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | When faced with multiple sets of licenses combined with | (OR), it was possible for oe.license.is_included() to choose a set of licenses with a blacklisted license and then report failure, even if choosing another set of licenses would have resulted in a successful result. This happened when the chosen set still contained more whitelisted licenses than the other set. This change makes sure a set with any blacklisted license is always considered with a lower weight than a set with only whitelisted licenses. Example: Faced with the license string "GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary" and with "GPL-3.0" being blacklisted, the old code would report a failure since "GPL-3.0 & GPL-2.0 & LGPL-2.1" still contains more whitelisted licenses than "Proprietary" does. This change also adds a unit test for oe.license.is_included(). (From OE-Core rev: 312b4d6175e189852c0787ca2fe99b99ce92d1bd) 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>
* package_manager: rpm: improve loggingMikko Ylinen2017-10-071-1/+3
| | | | | | | | | | | | To be able to better debug remove() behaviour, add more logging to rpm calls via bb.note(). The change also makes remove() logging more consistent with other package managers' remove() (e.g., opkg). (From OE-Core rev: 1a90c97616698050529e169a83e6f07a255687df) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: remove update-alternatives correctlyMikko Ylinen2017-10-071-5/+12
| | | | | | | | | | | | | | | | | | | | | | | With "read-only-rootfs" in IMAGE_FEATURES, packages in ROOTFS_RO_UNNEEDED are removed when building the rootfs. The list of packages to remove is passed to the package manager and the list is sorted so that update-alternatives provider is the last entry. This is with the assumption that the last entry on the list/command line is removed last. However, it turns out rpm does not care about "last on the command line" and update-alternatives provider is removed before other the packages get to run their %preun scripts for update-alternatives. This leaves broken alternative symlinks in rootfs. The fix is to first remove all but update-alternatives provider and after that update-alternatives provider in its own remove() call. (From OE-Core rev: 0a8639593c11ef0cfb3a3a514b17e36318b8e8f2) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: drop True option to getVar callsMing Liu2017-09-261-1/+1
| | | | | | | | | Search made with the following regex: getVar ?\((.*), True\). (From OE-Core rev: dbc0eaf478feb3f752ae22fd184984494fc85d0a) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/rootfs.py: clean up dnf cache after creating an imageAlexander Kanavin2017-09-221-1/+2
| | | | | | | | | | | | It contains cached metadata for a transient repository that is used only when creating images on the host, and so is of no use on target images. Dnf will recreate the cache on target when needed. (From OE-Core rev: 89ddf2516b713e6622df95ab391423b033d4271a) 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>
* rootfs: improve postinst intercept loggingRoss Burton2017-09-111-3/+4
| | | | | | | | | | Ensure we capture stderr, always write the output to the log, and don't be so emotional in the warning message. (From OE-Core rev: 87110e971c548d9d3eb7296ea6772d18e0226e53) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Clean up horrible 'None' return valuesRichard Purdie2017-09-021-15/+4
| | | | | | | | | If this fails the exception will now be raised. Lets use that and drop all this 'None' return value ugliness. (From OE-Core rev: b3c63b3b816179b96f1ed9b5baaf6e1f1c3c7b80) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/utils: Handle exceptions in multiprocess_execRichard Purdie2017-09-021-8/+13
| | | | | | | | | | | | Currently exceptions that happen in pool commands are ignored. Any errors would be printed on the console but everything else is silent. Switch to use pool.map_async which allows for an error_callback which we can use to detect exceptions and make sure these errors are handled. (From OE-Core rev: 7f2f9b3ff011b340b5d23bb7c47b12c357dc9f02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: Improve filedeprunner subprocess handlingRichard Purdie2017-09-021-8/+3
| | | | | | | | | | | | | | | Currently the exit code of the spawned program isn't checked so it can fail and the do_package task will continue merrily upon its way. Use subprocess.check_output() to ensure we check the exit code and redirect stderr to stdout so if it fails, we see the error output. We can then drop the existing exception handling as the subprocess exception gives a much better error. (From OE-Core rev: ce11cb449222bc47fea4f6d66ff1cc7cdc529ab9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: workaround for recipes which apply patches conditional ↵Paul Eggleton2017-08-311-7/+28
| | | | | | | | | | | | | | | | | | | | upon class If we're upgrading a recipe that appends additional patches for, say, class-native, and we're just upgrading the target variant, then when we copied the recipe into the workspace we skipped copying the additional patches for the native variant. This caused warnings because the workspace recipe is preferred. Look at SRC_URI for all variants when copying files to work around this. More work is needed to make it easier to work with recipes that use BBCLASSEXTEND where you need to build more than one variant at once, but this at least fixes the immediate ugliness. (From OE-Core rev: 56bf5e93358187e31160d7893f57906bb3dc7ad7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: fix handling of non-absolute pathsPaul Eggleton2017-08-311-3/+5
| | | | | | | | | | | | | | | | If your BBLAYERS has non-absolute paths in it (e.g. "${COREBASE}/../something") then none of the paths matched in copy_recipe_files() with the result that no files got copied and you ended up with an error later on because the recipe file couldn't be found at the destination. Fix this as well as adding an explicit check to see if no files got copied - error out earlier if so. Fixes [YOCTO #10981]. (From OE-Core rev: 3861486ad06f90c8644ebab119bbc5ddb9e693ca) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: improve reproducibilityJuro Bystricky2017-08-311-1/+1
| | | | | | | | | | When creating Packages.gz, do not save the time stamp in the compressed file metadata. (From OE-Core rev: 693fc377aa0788825b921d1b7804f5b2eafec76f) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* signing-keys: do not use DISTRO_VERSION in key namesAlexander Kanavin2017-08-301-1/+1
| | | | | | | | | | | | | DISTRO_VERSION may contain the current date, and so is prone to mismatches particularly when keys are created on one date, and dnf is configured to use the keys on another date. [YOCTO #11983] (From OE-Core rev: b8f33f3f0a1e24f89151743d5c0b82efe45a9df1) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal.py: add support for mate-terminal in check_terminal_version()Andre McCurdy2017-08-271-0/+2
| | | | | | | | | Not currently used, but include for completeness. (From OE-Core rev: dcceb90516efc77e4d0cddc3caf4e203ab9321d6) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal.py: fix devshell with mate-terminalAndre McCurdy2017-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Without the --disable-factory option, mate-terminal fails to start with the error: | There was an error creating the child process for this terminal | Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory) The --disable-factory option was removed by: http://git.openembedded.org/openembedded-core/commit/?id=e8dca725ed8211a874472300a3ed50e494039ab9 apparently based on an assuption that mate-terminal continues to track gnome-terminal since forking from it. However, based on the mate-terminal man page in the upstream master branch, the option is still supported: https://github.com/mate-desktop/mate-terminal (From OE-Core rev: c7f769bd400756d180abf80dbfdf4ed2703fab60) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal.py: avoid 100% cpu while waiting for phonehome pid fileAndre McCurdy2017-08-271-1/+2
| | | | | | | | | | | Some of the less common terminal types haven't been tested with the recent phonehome pid file changes and there may be error cases where the pid file is never created. (From OE-Core rev: 6b0cf568e9fbe28fb6e7b17f4ad92348d33e2bf4) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: strip_execs: Support for .ko modulesTobias Hagelborn2017-08-271-9/+14
| | | | | | | | | | * Support stripping of .ko modules verifying file extension and check of content "vermagic=" (From OE-Core rev: 61a20502a8433729e2c25b8c718e6f93e3bb6614) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: Fix some lint errorsTobias Hagelborn2017-08-271-10/+9
| | | | | | | | | | - rename type to exec_type not to shadow type - rename isELF is_elf (From OE-Core rev: c72bd726d3e8495aae3e57f524c43b3be6367796) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg_sign: depress the owership warnings on homedirJia Zhang2017-08-241-6/+6
| | | | | | | | | | | | | A gpg command, e.g, called by get_gpg_version(), may trigger such a warning: gpg: WARNING: unsafe ownership on homedir '/home/user/.gnupg' This sort of warning is harmless so it can be depressed through specifying --no-permission-warning. (From OE-Core rev: 0a740aa6f02deada56e0b7deb2bc1f7401e58726) Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/path.py: copyhardlinktree: don't overwrite existing symlinksIoan-Adrian Ratiu2017-08-231-1/+1
| | | | | | | | | | | | | | | | | | | Before GNU tar 1.24, only the archive creation command had the '-h' argument to preserve and follow symlinks. After >= 1.24 via commit 14efeb9f956e38d7be (tar: --dereference consistency) the capability to preserve symlinks was also added to the archive extraction command. -h is default at archive creation but is not default at extraction, meaning that it will replace symlinks with directories even if the original filesystem directory tree and archive contains them. Add -h to the copyhardlinktree extraction step so the build can support symlinks in variables like ${DEPLOY_DIR_IPK/RPM/DEB}. (From OE-Core rev: c1b73fe26540c38086e259be6eb313e0826dceed) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/copy_buildsystem: adds meta-skeleton layer in the eSDK installation.Juan M Cruz Alcaraz2017-08-191-0/+12
| | | | | | | | | | | | | | | The eSDK installation requires the meta-skeleton layer. The build system might use the meta-skeleton recipes as layout to create custom recipes. An example is the recipetool script that uses the meta-skeleton kernel recipe when creating a custom kernel recipe. [YOCTO #11102] (From OE-Core rev: 5c9ef0734d23909b5694ed43cdbb205c2ba9ca95) Signed-off-by: Juan M Cruz Alcaraz <juan.m.cruz.alcaraz@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* copy_buildsystem: include layer tree during build structure creationAndrej Valek2017-08-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When buildsystem with layer structure is going to be copied, only the last meta-XXX layer is taken. For example, during ext_sdk bblayers creating: layers/oe/meta \ layers/oe/meta-oe \ layers/oe/meta-networking \ layers/oe/meta-webserver \ ... It restructured meta-oe, meta-networking,... contents into meta-oe. Recipes from meta-oe will be on the same level like meta-networking, meta-webserver, ... . It should take the whole meta path instead of the last one. layers/oe/meta \ layers/oe/meta-oe/meta-oe \ layers/oe/meta-oe/meta-networking \ layers/oe/meta-oe/meta-webserver \ ... Now the directory structure is the same like during build creation. (From OE-Core rev: 5a59a6997f41e606d088e3e86812de56f72f543b) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm: Allow pkg signing by chunks through RPM_GPG_SIGN_CHUNKLeonardo Sandoval2017-08-181-4/+4
| | | | | | | | | | | | | Commit d58b1d196 moved from chunk to serial signing, but neither of both approaches allowed the user to select the chunks size. This patch allows the user to select a chunk size through RPM_GPG_SIGN_CHUNK defaulting to BB_NUMBER_THREADS, considered a good default. Indirectly, this change reduces the number of processes spawn to number-of-packages/RPM_GPG_SIGN_CHUNK. (From OE-Core rev: f7f78e73f1cd15f4233a231364b14438af758628) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-08-181-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 958501b3d9201aaabb81ec644c6049e0c9b737e7) (From OE-Core rev: bf017930036f19b3d6df8e5b50d9979ee7045c5c) 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>
* gpg_sign: perform rpm signing seriallyLeonardo Sandoval2017-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | gpg signing in file batches (which was default to 100) is a memory expensive computation, causing trouble in some host machines (even on production AB as seen on the bugzilla ID). Also, in terms of performance, there is no real gain when rpm signing is done in batches. Considering the latter issues, perform the rpm signing serially. Log showing errors observed recently at AB workers: | gpg: signing failed: Cannot allocate memory | gpg: signing failed: Cannot allocate memory | error: gpg exec failed (2) | /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/core2-64-poky-linux/base-passwd/3.5.29-r0/deploy-rpms/core2_64/base-passwd-dev-3.5.29-r0.core2_64.rpm: [YOCTO #11914] (From OE-Core rev: d58b1d196f87128892b7b624bfb725afe01581f1) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: enable dnf's repo_gpgcheck if feed signing is enabledMarkus Lehtonen2017-08-161-2/+8
| | | | | | | | | | | | | | If package feed signing is enabled enable repo gpg signature check for rpm repositories added via PACKAGE_FEED_URIS. This has the implication that all repositories added via this mechanism must be signed with the same key. [YOCTO #11209] (From OE-Core rev: f7716f1de0791dfe778bb70f1769a7e1e83c7a54) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager: re-implement rpm feed signingMarkus Lehtonen2017-08-161-1/+13
| | | | | | | | | [YOCTO #11209] (From OE-Core rev: 7a33426561ddc72296e33c5e7b8ca38763a7ab07) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Fix support for NO_RECOMMENDATONSRichard Röjfors2017-08-091-1/+1
| | | | | | | | | | | | | | When support for dnf was introduced the check of the no NO_RECOMMENDATIONS variable got broken. This fixes the issue by compairing to the string "1" rather than the number 1. (From OE-Core rev: 1849ce3bd7c0af055f3e849a6508e746b6a0dca5) Signed-off-by: Richard Röjfors <richard@puffinpack.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal: wait for terminal task to finish before proceddingLeonardo Sandoval2017-08-091-28/+30
| | | | | | | | | | | | | | | | This commit generalizes the work done in [1] and [2], both fixing issues on several areas (the former with -c patch and gnome-terminal and the latter with -c menuconfig and several terminals, including gnome-terminal and tmux). The main idea is to get the PID from the new spawned terminal and loop there until finished. [1] 76e8ab47c9: terminal: Fix gnome-terminal to work with recent versions [2] 7d02ea283b: cml1.bbclass: wait until menuconfig terminal finishes (From OE-Core rev: 55707401d5bfb1f7686c273fc2d0db89df206395) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from envAníbal Limón2017-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | The BBPATH environment could be set and can make a failure when try to build an extensible sdk because it will look the bitbake.lock file in the original build folder. Example: $ export BBPATH=`pwd` $ bitbake core-image-minimal -c populate_sdk_ext ERROR: bitbake failed: ERROR: Only one copy of bitbake should be run against a build directory ERROR: core-image-minimal-1.0-r0 do_populate_sdk_ext: Function failed: copy_buildsystem (From OE-Core rev: 33634b4c38d84e1c5d06056766933f1fe4f47e8d) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm: support signing files in RPM payloadLans Zhang2017-07-171-1/+6
| | | | | | | | | | | | | | | | | | | | | Currently, RPM4 supports to sign the files in RPM payload with plugin mechanism. We introduce more definitions to make the file signing available for the users: - RPM_FILE_CHECKSUM_DIGEST Global switch to enable file signing. - RPM_FSK_PATH The file signing key. - RPM_FSK_PASSWORD The password of file signing key. - RPM_FILE_CHECKSUM_DIGEST The file checksum digest. (From OE-Core rev: 95b9ee33d5595078e90c633f6155ec9ba3d184f0) Signed-off-by: Lans Zhang <jia.zhang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gpg_sign.py: fix overwriting the RPM macro __gpg in a wrong wayLans Zhang2017-07-171-1/+1
| | | | | | | | | | The RPM macro used in --define option should not be prefixed by %%. (From OE-Core rev: 2fda41cef26b600d599dfb7f2e61c5829e2b309c) Signed-off-by: Lans Zhang <jia.zhang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: exclude ccache-native from signature hashesRoss Burton2017-07-171-1/+1
| | | | | | | | | | | | | | | | Enabling ccache should not cause a complete rebuild, so filter out ccache-native from the dependencies the same way we do for quilt-native (so the world doesn't repatch if quilt changes). This doesn't effect the actual dependencies, just the dependencies that impact the hash. [ YOCTO #11417 ] (From OE-Core rev: ffeca7dcc1abe82cad8374a31bf72b36a472fa1b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/sdk.py: support added for executing pre-target commandsAmarnath Valluri2017-07-061-0/+6
| | | | | | | | | | | | | Added a new POPULATE_SDK_PRE_TARGET_COMMAND variable, which can contain functions need to be executed at pre traget sysroot creation phase. classes/populate_sdk_base.bbclass: Added POPULATE_SDK_PRE_TARGET_COMMAND to sdk command variables list. (From OE-Core rev: b0c65c8a64cd0b77629c9f3c65fc827d4cdcf026) Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: Add function strip_execsTobias Hagelborn2017-06-281-0/+105
| | | | | | | | | | | | | Strip all executables in a directory. Utility function placed in oe-package together with run_strip. strip_execs is based on strip_sysroot from staging.bbclass Moving out datastore references in favor of function parameters. (From OE-Core rev: a350bfc41e8a19dfdc5b16e5fb8f2b198e7c55c1) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/distro_check: drop Mandriva from create_distro_packages_list()Joshua Lock2017-06-281-8/+0
| | | | | | | | | | | | Mandriva is no longer maintained, with its last release having been in 2011. It's no longer useful as a yard-stick distro, therefore drop it from distro_check.create_distro_packages_list() (From OE-Core rev: 4e1bef31e04044d26a948a9682a5122b46d15c0f) 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>
* lib/oe/distro_check: update openSUSE to use Leap url formatsJoshua Lock2017-06-281-4/+4
| | | | | | | | | | | | | Since openSUSE switched to their dual development model of Leap and Tumbleweed the urls we need to check for package lists has changed. Update get_latest_released_opensuse_source_package_list() to use the new Leap urls. (From OE-Core rev: 263da717ba689eb7efe99234566e2b474e8ce95a) 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: set dnf's releasever setting from DISTRO_CODENAMEAlexander Kanavin2017-06-231-3/+5
| | | | | | | | | | | | | | | | So that: 1) dnf does not complain anymore about releasever not being set and then fail for the same reason; 2) it's possible to refer to $releasever in dnf package feed configuration (repo paths in particular) without hardconding the release name (pyro, morty, etc.) (From OE-Core rev: 789e3fc225adbb61f10aaa3bbc3677856f5f0238) 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>
* buildhistory-diff: exclude paths from the outputEd Bartosh2017-06-231-17/+34
| | | | | | | | | | | | | Implemented -e/--exclude-path command line option to exclude paths from buildhistory-diff output. [YOCTO #11459] (From OE-Core rev: 86393230e0ce33bf7d6d69d3019113e704081d30) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: flush installed_pkgs file before oe-pkgdata-util uses itMartin Jansa2017-06-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * since this commit: commit f5a1013ffa9815f22e13989e2bcb83f966e7ce2c Author: Ross Burton <ross.burton@intel.com> Date: Tue Apr 18 16:19:12 2017 +0100 package_manager: don't race on a file when installing complementary packages the file isn't closed before oe-pkgdata-util uses it and this temporary file might look empty to oe-pkgdata-util, because it wasn't flushed yet. Which resulted in almost empty debugfs tarballs and no locale packages in regular rootfs. * without this change: 124K May 30 07:41 core-image-full-cmdline-raspberrypi3-64-20170530054003-dbg.rootfs.tar.gz * with this change: 173M May 30 07:29 core-image-full-cmdline-raspberrypi3-64-20170530052715-dbg.rootfs.tar.gz (From OE-Core rev: 877d38db08aa7060d16405443cf70539c559fe82) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "package.bbclass: Restore functionality to detect RPM dependencies"Richard Purdie2017-06-131-27/+20
| | | | | | | | | This reverts commit aea90e9ee6f34e7c1c08307080b1e29646668df6. RP hadn't meant to merge this yet and its causing problems so delay it until its ready. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-06-121-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: aea90e9ee6f34e7c1c08307080b1e29646668df6) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistoryFrancisco Pedraza2017-06-121-0/+19
| | | | | | | | | | | | | | This function is going to be used for generating the target and host manifest files packages for eSDK. Added some fixes for buildhistory.bblclass, and docstring for get_extra_sdkinfo at oe.sdk [YOCTO #9038] (From OE-Core rev: f696b3bbe01969ce7ecb8174d63d3e1e172b473e) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Generate correct RPM package names againPeter Kjellerstedt2017-06-121-3/+3
| | | | | | | | | | | | | | | | During the transition to RPM4, the package names returned by RpmPM.list_installed() changed from the expected names of the packages that were installed into the image to some fictitious source RPM names. This restores the original functionality so that the installed-packages.txt files produced by inheriting buildhistory yet again contains a list of the names of the installed packages. (From OE-Core rev: 25a36bcea4c02002d4895ba17f49ced09ae821c2) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils.py: helper function for optional include filesPatrick Ohly2017-06-121-0/+40
| | | | | | | | | | | | | | | | | | | | | | The main intention is to provide easy-to-use and read helper functions for including files only when certain distro features are set. Functionally they are the same as bb.utils.contains and bb.utils.contains_any. Distro features are part of the base configuration and thus safe to use for conditional inclusion in recipes and bbappends, in contrast to recipe variables which might still change during parsing. Therefore the check is limited to DISTRO_FEATURES. This is the reason for having this in OE-core instead of bitbake. Default values are set so that no redundant parameters have to be passed for conditional includes. As a secondary usage, the functions can also be used in boolean checks. (From OE-Core rev: 13024ce5aae453769b546d5fbe533443aec3d6fd) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: do not cause kernel rebuildsPatrick Ohly2017-05-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding or removing archiver.bbclass from a build configuration causes rebuilds of linux-yocto-based kernels because of the do_kernel_configme->do_unpack_and_patch task dependency. This particular dependency can be ignored for the do_kernel_configme sstate signature calculcation. Idea for the fix from Richard Purdie. Note that building the kernel and adding archiver.bbclass later to archive sources leads to do_unpack_and_patch running after do_kernel_configme (because that already ran in the first build), which might be problematic. This is independent of the change here. The use case in YOCTO #11441 is to removed archiver.bbclass between a production build with archiving enabled and builds via oe-selftests without archiving. That direction is fine. Fixes: YOCTO #11441 (From OE-Core rev: fed0ed82928e6a7846fbad233ac657bd17bcefc7) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe.lsb: add get_os_release()Markus Lehtonen2017-05-161-13/+20
| | | | | | | | | | | | Move get_os_release() from oeqa.utils.metadata to oe.lsb, merging the code with release_dict_osr() from oe.lsb. This removes some code duplication and makes get_os_release() more robust. (From OE-Core rev: 56b883f7765f6bd72e83dec26a5db8c7108c835d) 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>
* useradd: Create lib/oe/useradd function libraryRichard Purdie2017-05-161-0/+68
| | | | | | | | | | | The code in useradd-staticids is generally useful for user addition functionality but is not reusable in its current form. Refactor the code into a set of library functions. (From OE-Core rev: a638ef304b1f1acb4c88f4f90b1ef22526cb8d2f) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: add search, replace strings to export2jsonbrian avery2017-04-201-2/+4
| | | | | | | | | | | | | | | We want to be able to save relative paths so that we can relocate the deploy dir images and kernels, yet still have qemu and testimage work correctly. This extends export2json with 2 named arguments so a search/replace operation can be done to remove the leading path. [YOCTO #11375] (From OE-Core rev: 4829f1ebd89dc91860cf72fbbdc7b6bb0d5822bc) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>