aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
AgeCommit message (Collapse)Author
2015-11-24classes: Ensure pass setVar/setVarFlag strings, not integersRichard Purdie
This doesn't cause any issues right now but it make sense to standardise on consistently using strings in the data store. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-01package_rpm: support signing of rpm packagesMarkus Lehtonen
This patch adds a new bbclass for generating rpm packages that are signed with a user defined key. The packages are signed as part of the "package_write_rpm" task. In order to enable the feature you need to 1. 'INHERIT += " sign_rpm"' in bitbake config (e.g. local or distro) 2. Create a file that contains the passphrase to your gpg secret key 3. 'RPM_GPG_PASSPHRASE_FILE = "<path_to_file>" in bitbake config, pointing to the passphrase file created in 2. 4. Define GPG key name to use by either defining 'RPM_GPG_NAME = "<key_id>" in bitbake config OR by defining %_gpg_name <key_id> in your ~/.oerpmmacros file 5. 'RPM_GPG_PUBKEY = "<path_to_pubkey>" in bitbake config pointing to the public key (in "armor" format) The user may optionally define "GPG_BIN" variable in the bitbake configuration in order to specify a specific gpg binary/wrapper to use. The sign_rpm.bbclass implements a simple scenario of locally signing the packages. It could be replaced by a more advanced class that would utilize a separate signing server for signing the packages, for example. [YOCTO #8134] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30package_*.bbclass: Ensure OVERRIDES doesn't change sstate signatureRichard Purdie
Changes to OVERRIDES (e.g. from changing MACHINE) should not change the sstate signatures of do_package_write_*. Exclude the variable explicitly in the package classes to avoid this. (From OE-Core rev: 5826a9260138c437f87ba1a9f84d5c08442b997d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24package_rpm.bbclass : escape "%" in files and directories nameSébastien Mennetrier
The rpm process replace all the "%name" in the spec file by the name of the package. So, if the package is composed of some files or directories named "%name...", the rpm package process failed. Replace all "%" present in files or directories names by "%%%%%%%%" to correctly escape "%" due to the number of times that % is treated as an escape character. Jeff Johnson says this is the Right Thing To Do. [ YOCTO #5397 ] Signed-off-by: Sébastien Mennetrier <smennetrier@voxtok.com> Signed-off-by: Michaël Burtin <mburtin@voxtok.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11package_ipk/deb/rpm: Improve OVERRIDES handlingRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-27package_rpm.bbclass: support packaging of symlinks to directoriesPatrick Ohly
os.walk() returns symlinks to directories in the "dirs" lists, but then never enters them by default. As a result, the old code applied neither the directory handling (because that is active once a directory gets entered) nor the file handling, and thus never packaged such symlinks. The fix is simple: find such special directory entries and move them to the "files" list. However, one has to be careful about the undefined behavior of modifying a list while iterating over it. This fix was required for packaging a modified base-files that created symlinks into /usr for /sbin /lib and /sbin. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-19packaging: allow globs in CONFFILESChen Qi
Allow globs in CONFFILES. This patch changes the way of CONFFILES handling. After this change, the CONFFILES can take the same form as FILES. That means, we don't have to list a bunch of files for CONFFILES. It will just be expanded like the FILES variable. We don't assume default value for CONFFILES in OE. But distro vendors could provide a default value for CONFFILES in their distro configuration file like below. CONFFILES = "${sysconfdir}" In this way, files under /etc are treated as configuration files by default. Of course, setting CONFFILES in recipes take precedence over the CONFFILES. For example, if the recipe author decides that package A should only treat files under ${sysconfdir}/default/ as config files, he/she can write like this. CONFFILES_A = "${sysconfdir}/default" [YOCTO #5200] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03package_rpm: Add optional improved directory handlingRonan Le Martret
During spec generation, ideally directories should not be auto packaged under the %file section of rpm packages but take ownership of specific directories. * packages only empty directories or explict directory. See: - http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html - "The %dir Directive" * This will prevent the overlapping of security permission. For example, in Tizen the directory /etc have smack label 'System::Shared' So Only one package should own and set the label of /etc to prevent the overwriting of the smack label. Existing behaviour is maintained if DIRFILES is not set. If it is set, the modified behaviour is used. If can be set to an empty value by core recipes to trigger the modified behaviour. [RP: Modified to allow optional usage of DIRFILES] Signed-off-by: Ronan Le Martret <ronan@fridu.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-02package_rpm: Add builddir macro to define source directoryRichard Purdie
This allows its usage in other RPM macros so files in ${S} can be found. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-02package_rpm: Add custom extension support for spec generation.Richard Purdie
Add hooks to allow customisation of the rpm spec files. Since python functions aren't visible in the data store, one variable is used to trigger the call to a separately named function. A dummy function is not provided since this then triggers various class ordering complexities which are best avoided. Ultimately this will be replaced by a refactor of the code to generate the spec file using a python class. This allows the tizen layer to add hooks for the security manifests for example. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-08package_rpm.bbclass: Should be using HOST_* not TARGET_*Mark Hatle
When building target packages, HOST_OS and TARGET_OS are the same, as is the VENDOR field. However, when building an SDK this is not true. The patch corrects the oversight and switches to using the 'HOST' version and resolves the issue of meta-mingw not working w/ the rpm packaging. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25classes/package_rpm.bbclass: Fix SDK Suffix referenceMark Hatle
The meta-mingw layer attempts to change the SDK Suffix, but the rpm packaging had a hard coded reference to _nativesdk. I did a quick scan for other hard coded entries and did not fine any more. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28package_*.bbclass: Simplify addtaskRichard Purdie
The package_write task was previously removed. Remove a remaining superfluous reference to it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21package_rpm.bbclass: archive the source to srpm packageRobert Yang
The archiver.bbclass will put the sources to ARCHIVER_OUTDIR according to configuration, then the rpmbuild -bs will create the srpm. [YOCTO #4986] [YOCTO #5113] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2014-02-24package: Drop do_package_write taskRichard Purdie
The reasons this task was introduced are lost in the mists of time. It allowed for the a single "package_write" task instead of spelling out the explicit package backends, however in all but one case we do that anyway. As such as might as well give in and delete the task, converting that single reference into explicit dependencies. This gives bitbake a bit less work to to when processing the runqueue since there are less tasks (but more dependencies in some cases). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14package_*.bbclass: remove references to the old bash indexing routinesLaurentiu Palcu
Package indexing is done in python and package-index.bb uses the new routines. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11conf/bitbake.conf: default HOMEPAGE to blank instead of unknownPaul Eggleton
The default value for HOMEPAGE of "unknown" has been in place since the early OE-Classic days, but it doesn't really make sense - "unknown" is not a valid URL and it just means we have to explicitly check for this hardcoded string if we're displaying the value in some form of UI, such as Toaster. This has required some changes to the packaging classes as they previously did not expect the value to be blank. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11Cleanup rootfs_rpm,package_rpm bbclass filesHongxu Jia
This commit cleans up the functions that were ported to python. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-02package_rpm.bbclass: Trigger the regexp on exact keyword matchKhem Raj
This causes issues when postinstalls have ERROR keywords its interpreted as error and image build is cancelled Signed-off-by: Khem Raj <raj.khem@gmail.com>
2014-01-28package_{ipk, deb, rpm}.bbclass: support additional user-defined metadataLeonid Borisenko
Additional metadata from user-defined variable is written into control/spec file of binary package. Three variables are searched for adiitional package metadata: * PACKAGE_ADD_METADATA_<PKGTYPE>_<PN> * PACKAGE_ADD_METADATA_<PKGTYPE> * PACKAGE_ADD_METADATA First found variable with defined value wins. <PN> is a package name. <PKGTYPE> is a distinct name of specific package type: * IPK for .ipk packages * DEB for .deb packages * RPM for .rpm packages Variable can contain multiple [one-line] metadata fields separated by literal sequence '\n'. Separator can be redefined through variable flag 'separator'. In package control/spec file separator is replaced by newline character. Signed-off-by: Leonid Borisenko <ive.found@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-01-16package_rpm: Fix a race with package_deb/package_ipkRichard Purdie
We have the odd situation where the CONTROL/DEBIAN directory can be removed in the middle of the walk, the isdir() test would then fail and the walk code would assume its a file hence we check for the names in files too. This resolves the autobuilder failure: error: File not found: /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-fsl-arm/build/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xinit/1_1.3.3-r0/package/DEBIAN RPM build errors: File not found: /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-fsl-arm/build/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xinit/1_1.3.3-r0/package/DEBIAN Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18sstate: Get rid of crazy name mappingRichard Purdie
When originally developed, it was thought a task may have more than one associated sstate archive. The way the code has grown that idea is now not possible or needed. We can therefore assume one sstate archive per task and drop the crazy name mapping code. Simpler is better in this case. The downside is that various sstate archives will change name so this forces a cache rebuild. Given the other sstate changes going in at this time, this isn't really a bad thing as things would rebuild anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22package_rpm.bbclass: Replace -linux-gnun32 with -linux.* in RPM platform fileLei Liu
On a multilib system when one of the multibs has a different OS then other multilibs a failure can occur during the install process because RPM assumes all systems have the same OS. When an n32 platform is selected as an alternative multilib, it shows up as mips64_n32-.*-linux-gnun32 in /etc/rpm/platform. This causes problems when the smart tool tries to add a channel for the multilib. RPM archScore call always returns zero for arch "mips64_n32" - after appending default vendor and os, it finds "mips64_n32-wrs-linux" doesn't match any predefined platforms. Fix this by removing the restriction of -gnun32 suffix in platform file. Signed-off-by: Lei Liu <lei.liu2@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06package_rpm: Remove need for lockingRichard Purdie
Currently if multiple package tasks are running against a recipe, package_rpm is restricted to the slowest speed of them due to the locking. This patch explicitly ignores the opkg/debian artefacts and hence allows a speedup. It also removes an issue were a Ctrl+C interrupting a deb.ipk packaging task would end up with CONTROL/DEBIAN files in the spec file resulting in a build failure. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-06run-postinst: Ensure that the postinsts are orderedMark Hatle
The postinst files were being generated using purely the name of the package, this unfortunately meant the run order would be based on the name of the package and not the order in which it was installed on the filesystem. If package A requires package Z to be fully installed, this causes a problem. Note: rpm - as the rpm based install proceeds the order is defined and captured. so the problem is resolved there. ipk - this unfortunately does not appear to solve the problem for ipk, as the status file is not ordered in any appreciable way. This does not cause any regressions however and sets the stage for a proper fix. deb - this -may- fix the deb install. Early testing indicates at least some ordering to the status file. But it's unclear if it completely resolves the issue. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-06package_rpm.bbclass: Workaround failure in attemptonly installsMark Hatle
[YOCTO #5313] When performing an attemptonly install, we should skip an errors and continue to install everything else. However, there is a case where two packages can conflict, and cause a hard failure. This workaround, ignores this and allows the image to be constructed. Note: Some items in the failed transaction may not get installed. To fix this properly we need to find the issue in smart, and make it ignore or at least attempt to resolve these kinds of conflicts. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26classes/package_rpm: fix bitbake package-index for RPMPaul Eggleton
The function that "bitbake package-index" relies upon when using the RPM package backend (package_update_index_rpm()) uses MULTILIB_PREFIX_LIST to get the list of package architectures to be indexed, but that variable is only set when populate_sdk_rpm or rootfs_rpm are inherited, which is not the case for the package-index recipe. Until we're able to refactor this properly, for minimal impact just use the value of ALL_MULTILIB_PACKAGE_ARCHS if MULTILIB_PREFIX_LIST does not give us any architectures (the equivalent function in the ipk backend uses the former variable). Having "bitbake package-index" working is important because it's the only practical way of indexing RPM packages for use as a feed; host versions of createrepo won't work properly because they won't support indexing recommends relationships. Stopgap fix for [YOCTO #5278]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-13bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific ↵Richard Purdie
directory Currently we have a hierarchy of pkgdata directories and the code has to put together a search path and look through each in turn until it finds the data it needs. This has lead to a number of hardcoded paths and file globing which is unpredictable and undesirable. Worse, certain tricks that should be easy like a GL specific package architecture become problematic with the curretn search paths. With the modern sstate code, we can do better and construct a single pkgdata directory for each machine in just the same way as we do for the sysroot. This is already tried and well tested. With such a single directory, all the code that iterated through multiple pkgdata directories and simply be removed and give a significant simplification of the code. Even existing build directories adapt to the change well since the package contents doesn't change, just the location they're installed to and the stamp for them. The only complication is the we need a different shlibs directory for each multilib. These are only used by package.bbclass and the simple fix is to add MLPREFIX to the shlib directory name. This means the multilib packages will repackage and the sstate checksum will change but an existing build directory will adapt to the changes safely. It is close to release however I believe the benefits this patch give us are worth consideration for inclusion and give us more options for dealing with problems like the GL one. It also sets the ground work well for shlibs improvements in 1.6. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11classes/package_rpm: remove unsed outdir variableStefan Stanacar
Not only outdir had the wrong value, it wasn't used actually used in that function. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11python-smartpm: Add an attempt install modeMark Hatle
[ YOCTO #3723 ] Add a mode to smart that will allow an installation to continue, instead of failure in the case that one or more items is uninstallable. Uninstallable packages are simply ignored, and no error is generated. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06package_rpm.bbclass: Fix no_recommendations and package_excludeMark Hatle
When the code was refactored to address review comments, the wrong version was sent to the community. Replace the $1 with ${target_rootfs} Fix identified by: Yue Tao <yue.tao@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01meta: Don't use deprecated bitbake APIRichard Purdie
These have been deprecated for a long time, convert the remaining references to the correct modules and prepare for removal of the compatibility support from bitbake. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22package_rpm.bbclass: NO_RECOMMENDATIONS supportMark Hatle
Add NO_RECOMMENDATIONS support. A way to disable all recommended packages from being installed. This will help shrink the size of the resulting filesystem. Add documentation on NO_RECOMMENDATIONS and BAD_RECOMMENDATIONS. Note, using NO_RECOMMENDATIONS has side effects such that kernel-modules may not have been installed. A user will need to manually add to their image any kernel-modules required to be on the image for functionality. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-22package_rpm.bbclass: Add support for PACKAGE_EXCLUDE to RPM installsMark Hatle
Using the new smart exclude mechanism an error will be generated in the excluded package is required for the image to be generated. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-16classes/buildhistory: record size of installed package not compressed archiveMartin Jansa
* usually it's more important to know how much space will each package take on target device then size of compressed package * example for libewebkit0 with 4 different architectures, interesting that om_gta02 .ipk is bigger but it's smaller when installed before: MACHINE DEFAULTTUNE SIZE (.ipk file) om_gta04 cortexa8t-neon 15996 KiB libewebkit0 qemux86_64 x86-64 16992 KiB libewebkit0 spitz xscale 16148 KiB libewebkit0 om_gta02 arm920t 16260 KiB libewebkit0 after: MACHINE DEFAULTTUNE SIZE (installed) om_gta04 cortexa8t-neon 60544 KiB libewebkit0 qemux86_64 x86-64 63720 KiB libewebkit0 spitz xscale 60588 KiB libewebkit0 om_gta02 arm920t 56268 KiB libewebkit0 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-27classes/rootfs_rpm: implement BAD_RECOMMENDATIONS for RPMPaul Eggleton
Add support for the BAD_RECOMMENDATIONS variable that can be used to prevent specific packages from being installed via an RRECOMMENDS relationship when using the RPM backend. (Previously this functionality was only available when using ipk packaging.) In the process this moves the defaulting of BAD_RECOMMENDATIONS (as empty) to bitbake.conf since it is no longer specific to the ipk backend, as well as unifying some of the code that creates the configuration for smart for use on the host and target. Fixes [YOCTO #3916]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-12package_rpm.bbclass: remove xx.spec before doing rpmbuild xx.src.rpmBian Naimeng
If the spec file already exist, and has not been stored into pseudo's files.db, it maybe cause rpmbuild src.rpm fail, so remove it before doing rpmbuild src.rpm. Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
2013-07-09package_rpm.bbclass: make DESCRIPTION support newlineRobert Yang
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it support newline ("\n") to let the user can wrap it manually, e.g.: DESCRIPTION = "Foo1\nFoo2" In the past, it would be: Foo1\nFoo2 Now: Foo1 Foo2 [YOCTO #4348] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10package_rpm.bbclass: handle pre/post remove scriptletsLaurentiu Palcu
Currently the scriptlet_wrapper is designed to handle only pre/post install scriptlets. This patch will slightly change the wrapper script to handle also pre/post remove scriptlets when we want to remove packages from the final image. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07package_*.bbclass: Drop fakeroot from setscene callsRichard Purdie
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b however the package_write tasks sstate only consists of package files and no fakeroot privileges are needed to write these out, only originally create them. We can therefore drop these for some small performance gains and a less convoluted depenency chain. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16bbclass: bb.fatal() clean upRobert Yang
The bb.fatal() is defined as: def fatal(*args): logger.critical(''.join(args)) sys.exit(1) So anything after bb.fatal() in the same code block doesn't have any effect, e.g.: bb.fatal("%s_%s: %s" % (var, pkg, e)) raise e The "raise e" should be removed. I searched all the files which use bb.fatal(), only the following 3 classes have this issues: insane.bbclass package.bbclass package_rpm.bbclass [YOCTO #4461] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-09class/lib: Fix up various file access methodsRichard Purdie
There are various bits of cruft that have built up around our file accesses. This patch cleans some of them up, specifically: * Remove pointless "from __builtin__ import file" * Use open(), not file() * Wrap file usage in a with container to ensure files are closed * Add missing .close() calls in some cases Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11package_rpm.bbclass: fix build multilib image failed when PR Server enabledHongxu Jia
1, In bitbake.conf PKGR ?= "${PR}${EXTENDPRAUTO}" EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})" 2, When PR Server is enabled, EXTENDPRAUTO is not none which means PKGR and PR don't have the same value. 3, When multilib is enabled, RDEPENDS_${PN}-dev is not expanded correctly which uses PR rather than PKGR in the versioned dependency string. 4, Make sure PKGR rather than PR in version string when do_package_rpm. [YOCTO #4050] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23package/populate_sdk: Move functions from package_* to populate_sdk_*Richard Purdie
This fixes build failures introduced with "classes/buildhistory: implement history collection for SDK" by moving the functions to files where only the specific image type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES were enabled. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23classes/buildhistory: implement history collection for SDKsPaul Eggleton
SDKs are constructed in a similar manner to images, and the contents can be influenced by a number of different factors, thus tracking the contents of produced SDKs when buildhistory is enabled can help detect the same kinds of issues as with images. This required adding POPULATE_SDK_POST_HOST_COMMAND and SDK_POSTPROCESS_COMMAND variables so that data collection functions can be injected at the appropriate points in the SDK construction process, as well as moving the list_installed_packages and rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to the package_{rpm,ipk,deb} classes so they can also be called during do_populate_sdk as well as do_rootfs. Implements [YOCTO #3964]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22package_{ipk, deb, rpm}: drop the TARGET_OS conditionalChristopher Larson
The tclibc file for uclibc already empties IMAGE_LINGUAS, so there's no point to this conditional as far as I can tell, and it can cause issues for certain values of TARGET_OS. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-16package_rpm: Ensure PV manipulations are correctRichard Purdie
The previous change to this function fixed one manipuation at the expense of the other, depending on ow expanded the versioned dependency string was when the AUTOINC substitution was made. This update ensures we cover both cases and ensures the classextended version works as as well as the normal case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-14package_rpm: Ensure package dependencies have correct version numbersRichard Purdie
If a recipe has versioned dependencies on another package within the same recipe, there are potentially races where the version remapping may not happen correctly. This issue triggered with neard in multilib builds since it uses a "-" character in its PV which is illegal in an rpm version field. The remapping to "+" was not occuring. It only triggers in the multilib case since in this case, expansion of the datastore happens at slightly different points. The correct fix is to search for PV, not PKGV but substitute the PV value. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-04package_rpm.bbclass: Optimise per file dependency handlingRichard Purdie
Currently the process for injecting the per file rpm dependencies into rpmbuild is painfully slow. Its done through the repeated execution of a script which has to return the correct value in each case. This continual execution means the CPU usage of rpmbuild is low. This patch allows the option of collapsing the per file dependencies to a per package basis and injecting them through the .spec file. This removes the execution overhead and allows rpmbuild to run at 100% of cpu. Ultimately it would be nice to inject the per file dependencies through the .spec file however that is not currently possible. Since few people use the per file dependency information, this patch goes for the faster approach. It can be enabled if anyone needs it although I'd mention that its being used to us as this code may well go away in the future if nobody complains. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>