summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
AgeCommit message (Collapse)Author
2017-08-16gpg_sign: perform rpm signing seriallyLeonardo Sandoval
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] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16package_manager.py: enable dnf's repo_gpgcheck if feed signing is enabledMarkus Lehtonen
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] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-16lib/oe/package_manager: re-implement rpm feed signingMarkus Lehtonen
[YOCTO #11209] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-09package_manager: Fix support for NO_RECOMMENDATONSRichard Röjfors
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. Signed-off-by: Richard Röjfors <richard@puffinpack.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-08terminal: wait for terminal task to finish before proceddingLeonardo Sandoval
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 Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from envAníbal Limón
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 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-07-17sign_rpm: support signing files in RPM payloadLans Zhang
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. Signed-off-by: Lans Zhang <jia.zhang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17gpg_sign.py: fix overwriting the RPM macro __gpg in a wrong wayLans Zhang
The RPM macro used in --define option should not be prefixed by %%. Signed-off-by: Lans Zhang <jia.zhang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17lib/oe/sstatesig: exclude ccache-native from signature hashesRoss Burton
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 ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06meta/lib/oe/sdk.py: support added for executing pre-target commandsAmarnath Valluri
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. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28package.py: Add function strip_execsTobias Hagelborn
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. Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28lib/oe/distro_check: drop Mandriva from create_distro_packages_list()Joshua Lock
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() Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-28lib/oe/distro_check: update openSUSE to use Leap url formatsJoshua Lock
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23package_manager.py: set dnf's releasever setting from DISTRO_CODENAMEAlexander Kanavin
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.) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23buildhistory-diff: exclude paths from the outputEd Bartosh
Implemented -e/--exclude-path command line option to exclude paths from buildhistory-diff output. [YOCTO #11459] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-14package_manager: flush installed_pkgs file before oe-pkgdata-util uses itMartin Jansa
* 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 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>
2017-06-12Revert "package.bbclass: Restore functionality to detect RPM dependencies"Richard Purdie
This reverts commit aea90e9ee6f34e7c1c08307080b1e29646668df6. RP hadn't meant to merge this yet and its causing problems so delay it until its ready.
2017-06-12package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistoryFrancisco Pedraza
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] 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>
2017-06-12package_manager.py: Generate correct RPM package names againPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12utils.py: helper function for optional include filesPatrick Ohly
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. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-18archiver.bbclass: do not cause kernel rebuildsPatrick Ohly
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 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-16oe.lsb: add get_os_release()Markus Lehtonen
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. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-05-12useradd: Create lib/oe/useradd function libraryRichard Purdie
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20meta: add search, replace strings to export2jsonbrian avery
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] Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-20package_manager.py: Reverse rpm arch orderJussi Kukkonen
The architecture list used by dnf/libsolv was in the wrong order. As a result, the images were built with wrong and unpredictable packages. $ MACHINE=intel-corei7-64 bitbake core-image-sato $ MACHINE=qemux86-64 bitbake core-image-sato $ MACHINE=intel-corei7-64 bitbake -ccleansstate core-image-sato $ MACHINE=intel-corei7-64 bitbake core-image-sato The first image had 0 core2_64 packages in it, but the last one had 583 core2_64 packages (which were built for the qemu image in between). Reverse the arch order in etc/dnf/vars/arch. Fixes [YOCTO #11384]. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-19package_manager: don't race on a file when installing complementary packagesRoss Burton
PackageManager.install_complementary() uses WORKDIR/installed_pkgs.txt as a temporary file but if two tasks are executing for the same recipe which uses this file (e.g. bitbake my-image my-image:do_populate_sdk) then it's possible for the file to be overwritten or deleted. Instead of using a static filename, use tempfile to generate a unique name and ensure it is cleaned up when finished. Also move the glob generation/expansion earlier in the function as if there are no globs to install, we don't need to generate a package list. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-13package_manager.py: Generate separate repo entries per archIan.Arkver
dnf requires a serparate repo for each architecture. This patch writes one config file per PACKAGE_FEED_URIS entry with an entry for each architecture, if any. It also uses a space separated version of the repo id as the repo name instead of just the id again. Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11package_manager.py: Add a name for the generated dnf repo.Ian.Arkver
This adds repo_name as the name, which is the same as the repo ID and hence a bit pointless, but it stops dnf from complaining that the repo doesn't have a configured name. Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11buildhistory-diff: add option to compare actual signature differencesPaul Eggleton
Use the code underpinning bitbake-diffsigs to add an option to buildhistory-diff to determine and display the differences between the actual signature inputs, with a twist - we collapse identical changes across different tasks, showing only the most recent task to have that difference, meaning that there's less noise to wade through when you just want to know what changed in order to cause some rebuilding you're seeing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11buildhistory-diff: add option to compare task signature listPaul Eggleton
Having added writing out of the task signature list to buildhistory (when BUILDHISTORY_FEATURES includes "task"), we now need a way to compare the list. This just shows which tasks have been added / changed signature / removed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11classes/buildhistory: write out task signatures on every buildPaul Eggleton
If we want to determine what changed since the last build, one angle from which to look at it is to check the signatures. However, if we don't actually have the signatures from the last build we don't have anywhere to start. Save the signatures on each build in order to give us the starting point. NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11package_manager.py: Split feed_archs for RPM repo URIsIan.Arkver
By default the feed_archs variable is split into single characters resulting in very many broken short repo_uris. Add a split() to split the string into words first. Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11classutils.py: deterministic sortingJuro Bystricky
The method "prioritized" returns a list sorted by the value of the "priority" field, in descending order. However, if several list items have the same priority, the ordering of those items within the priority-sorted list becomes random. As a consequence, we may end up with a non-deterministic oe-terminal spawning, as several terminals have the same priority. So running commands such as $ bitbake xxx -cdevshell $ bitbake yyy -cmenuconfig may spawn a different terminal each time, for example sometimes Gnome and sometimes Konsole as hey have the same priority. Rather than modifying the priorities so they all differ, we sub-sort the list based on (terminal) names. This way we achieve a deterministic outcome. [YOCTO#10938] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08lib/oe/sstatesig: avoid reporting duplicate siginfo files from sstatePaul Eggleton
In find_siginfo(), which is used by bitbake-diffsigs among other things, avoid adding a siginfo file from the sstate-cache where we've already collected a sigdata file from the stamps directory with the same hash. This avoids the possibility that the top two files (as picked by default using the bitbake-diffsigs -t option) are for the same signature and thus the tool would report no differences. In order to do that, just use the hashfiles dict that we already have - we just need to change the code to populate that even if we're collecting matching files without looking for a fixed set of hashes (i.e. taskhashlist isn't set). This replaces previous code in bitbake-diffsigs that attempted to filter these out with limited success. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-08lib/oe/sstatesig: fix finding native siginfo files in sstate-cachePaul Eggleton
When comparing signatures with bitbake-diffsigs -t or bitbake -S printdiff, we use this find_siginfo() function implemented in this module to find the siginfo/sigdata files corresponding to the tasks we're looking for. However, native sstate files go into a NATIVELSBSTRING subdirectory and there was no handling for this when asking about native recipes. I'm not even sure why we were walking SSTATE_DIR in order to find this - we don't need to, we just need to run glob.glob() on the filespec we calculate, which should be a little bit more efficient. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23package_manager.py: respect OPKGLIBDIRMartin Jansa
* respect it for incremental rootfs generation * add lists_dir option to opkg.conf * also fix setting info_dir and status_file when they use default value, the problem is that self.opkg_dir is already prefixed with rootfs directory, comparing it with /var/lib/opkg always returned false and the options were appended to config file unnecessary * with opkg 0.3.4 we can use VARDIR prefix added in: commit d2a8e23dc669adc398f4bb8bcfcabfcf925708f7 Author: Florin Gherendi <floring2502@gmail.com> Date: Mon Dec 19 12:25:38 2016 +0200 libopkg: make the /var and /etc directories configurable at compile time. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23rootfs.py: Respect OPKGLIBDIR variableMartin Jansa
* when OPKGLIBDIR doesn't have the default /var/lib value it will silently fail to copy package database from normal rootfs to debugfs rootfs and then when trying to install *-dbg complimentary packages it won't install anything, because installed_pkgs.txt file generated from debugfs is empty Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22sign_rpm.bbclass: do not set/use RPM_GPG_PUBKEYAlexander Kanavin
This is entirely unnecessary (we can ask the signer backend to export the key to a file when needed), and was causing confusing selftest failures due to the variable being set from two different places. [YOCTO #11191] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-21meta: replace uses of bb.data.expand(VARNAME, d) with d.expand(VARNAME)Joshua Lock
bb.data.expand(x, d) is deprecated API. [YOCTO #10678] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17oe/path.py: fix for "Argument list too long"Robert Yang
Issue: LIN9-1648 Fixed when len(TMPDIR) = 410: $ bitbake core-image-sato-sdk [snip] Subprocess output: /bin/sh: /bin/cp: Argument list too long ERROR: core-image-sato-sdk-1.0-r0 do_rootfs: Function failed: do_rootfs [snip] This is because "copyhardlinktree(src, dst)" does "cp -afl src/* dst", while src/* is expanded to "src/file1 src/file2, src/file3..." which causes the "Argument list too long", use ./* as src and change cwd in subprocess.check_output() to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-17package_manager: fix "exlcude" vs. "exclude" typoPaul Gortmaker
Which results in: -------------------------------- 0557: package_exclude = self.d.getVar('PACKAGE_EXCLUDE') *** 0558: exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exlcude.split() if package_exclude else []) 0559: 0560: output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) + 0561: (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) + 0562: (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == 1 else []) + Exception: NameError: name 'package_exlcude' is not defined ERROR: cube-builder-initramfs-1.0-r0 do_rootfs: Function failed: do_rootfs --------------------------------- Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17dnf: add /usr/bin/dnf symlink that points to /usr/bin/dnf-2Alexander Kanavin
All documentation refers to dnf binary as 'dnf' yet make install does not create one - it's done by Fedora's spec file when building the rpm. Let's replicate this behavior. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17lib/oe/package_manager: import rpm signing key to rpmdbMarkus Lehtonen
Import the gpg key used in rpm signing into rpmdb. This makes it possible again to create images when rpm signing is enabled. Also, instruct dnf to enforce signature check if rpm signing is enabled. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17rpm: add support for remote package feeds via PACKAGE_FEED_URIS variableAlexander Kanavin
I've used a previous patch (which was never merged) by Humberto Ibarra <humberto.ibarra.lopez@intel.com> as a model for how to do runtime testing of this feature (e.g. we need to boot an image, run dnf on it, and check that it is indeed able to access the remote repo over http). Here's his original commit message: ===== Testing that feeds specified with PACKAGE_FEED_URIS var are set correctly has two parts. First a build with this var set is required, and then smart update needs to be issued in the running taget. The previous is not a common selftest practice because this is a simple test, but requires building and running a specific image, which takes a lot of time. testimage is not a good fit either, since the images tested there do not have the PACKAGE_FEED_URIS var set. For this test, the runtime-test module is being used, which is a selftest module but runs a testimage command. The var and test environment were set in runtime-perf.py and the actual test is done in a new testcase added to meta-selftest layer. ===== [YOCTO #10872] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14package: Fix various rpmdeps relocation issuesRichard Purdie
There are several issues with rpmdeps after the rpm v5 -> v4 transition: * _rpmfc_magic_path is an invalid option for rpm4 * --rpmpopt is an invalid option for rpm4 * we need to use the path to rpmrc since otherwise it poitns at the original build path * we need to set MAGIC in the environment so libmagic can find its files. This patch addresses those and ensures rpmdeps works in relocated builds from sstate (or with rm_work). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13run-postinsts: simplify the logic of whether to install it to imagesAlexander Kanavin
The logic is scattered all over the place, but amounts to "install, unless the rootfs is read only". Let's express that directly. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13gpg_sign.py: fix signing of rpm files using gpgAlexander Kanavin
This means a) calling rpmkeys and rpmsign instead of rpm b) instructing gpg to run non-interactively; otherwise on my machine it pops up windows requesting a key passphrase Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13rootfs_rpm.bbclass: migrate image creation to dnfAlexander Kanavin
To properly look at this patch, you probably need a side-by-side diff viewing tool. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13package_manager.py: improve the API for insert_feed_uris()Alexander Kanavin
No need to store the configuration as class members, just pass it directly into the method. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>