summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
AgeCommit message (Collapse)Author
2011-09-21Fix RPM dependenciesMark Hatle
When packaging for RPM, dependencies were not being properly added to the packages. Only the "providing" dependencies were added due to a typo. (From OE-Core rev: c5d4e17f29d7f032d566d3b222a0ee231da03f78) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21multilib: install MULTILIB_IMAGE_INSTALLDongxiao Xu
If user set MULTILIB_IMAGE_INSTALL, we need to install those multitlib packages into the final image. Also fix the logic in handling multilib prefix. For certain case like a normal image contains several multilib libraries, the image recipe isn't extended with MLPREFIX, therefore we need to enumerate the possible multilib prefixes and compare them with package prefixes. (From OE-Core rev: a94cc552dc764d3cc83ea638cb08b9a2a8829d2f) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-17package_rpm: Fix package rename issue in multilib caseDongxiao Xu
do_package task will write information into pkgdata and do_package_write_rpm will read them out. Take lib32-dates as an example, one of its RDEPENDS is li32-gtk+, and PKG_lib32-gtk+ = "libgtk-2.0", these info is stored at: tmp/pkgdata/x86_64-pokymllib32-linux/runtime/lib32-dates. Function "mapping_rename_hook" in do_package_write_rpm is to handle those renamed packages. However before it executes, translate_vers has stripped the multilib prefix out, making it failed to find PKG_gtk+ value in pkgdata. This commit moves the strip_multilib out of translate_vers and call it after "mapping_rename_hook". [YOCTO #1368] CC: Mark Hatle <mark.hatle@windriver.com> (From OE-Core rev: 216a1cfe7973e99e3e79585040e91f7a6e298884) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-17package_rpm: enhance strip_multilib functionDongxiao Xu
The previous logic could only strip MLPREFIX from the first element in an array, take an example, strip_multilib the [lib32-a lib32-b lib32-c] will result in [a lib32-b lib32-c]. We need to strip prefix one by one. This commit change the logic to strip all elements' multilib prefix. [YOCTO #1368] CC: Mark Hatle <mark.hatle@windriver.com> (From OE-Core rev: ca729de4b261e4feba74fdf0b2578890bc80ea90) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-12package_rpm: Fix attemptonly and suggest packagesMark Hatle
[YOCTO #1325] [YOCTO #1366] Packages that were in the PACKAGE_ATTEMPTONLY and SUGGESTS were not being properly found, which was causing image creation failures. In PACKAGE_ATTEMPTONLY, when an item was not found, it caused an error. This should have been a note, followed by skipping the package. The SUGGESTS processing was simply broken. It was using a non-existant function, due to an apparently typo. In addition to the above, the MLPREFIX processing was not being done properly, preventing multilib packages from working in this with PACKAGE_ATTEMPTONLY. (SUGGESTS doesn't need this as the names are munged when creating the packages.) (From OE-Core rev: 4fb6723ab1ee14cf539f0ef2df63a3ee1b978de6) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-12package_rpm.bbclass: Update the platform config and --targetMark Hatle
When constructing the /etc/rpm/platform file, we need to ensure that the any, all, and noarch platforms will allow any "linux" variant to be installable, not just matching variants.. i.e. arm-oe-linux-gnueabi should be able to install noarch-oe-linux Also ensure that we pass the full canonical arch via the --target= parameter. This allows us to define the proper platform settings for all packages. (From OE-Core rev: c6bb9445de90cfb46db9c40842dbe1bfbb5b8ce8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-11Magic file path should be given for rpmbuildjani.uusi-rantala@nokia.com
Magic file path should be given for rpmbuild in _rpmfc_magic_path define so that build system default file is not used by accident. Not doing this caused many packages to fail building in several systems. Fixes [YOCTO #1358] Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com>
2011-08-03package_rpm: Ensure alternatives links are reflected in rpm package dependenciesRichard Purdie
Currently, if a file is provided as an alternative link within the package, rpm doesn't see the dependency. This works out badly for dependencies such as /bin/sh which scripts might require. Since rpm detects and adds these dependencies we do need to ensure the dependency information in the packages is correct. This patch does so for the rpm backend ensuring internal consistency whilst the approach for addressing this problem in the other package backends is considered. (From OE-Core rev: 102fc29b9c9eae8435b29edb41b5090ace2373c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02bitbake.conf: Add SDK_PACKAGE_ARCHSMark Hatle
Add SDK_PACKAGE_ARCHS to avoid the sed operations we were previously doing inside of the variouns populate_sdk functions and related items. Also add documentation to populate_sdk to explain when the various functions are expected to be doing. Finally fix a bug in populate_sdk_rpm where the wrong value was being set, noticed while working on this change. (From OE-Core rev: 587c1d5bac71fa6faa65ee3a271391cbf931e8f7) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02rootfs_rpm: Cleanup and minor bug fixesMark Hatle
in packages_rpm.bbclass: Cleanup the way package_update_index_rpm works. Break this out into two functions, one for common functionality and one for controlling target vs sdk package processing. Similar change to package_generate_rpm_conf. Usage of IMAGE_ROOTFS should actually be "target_rootfs", this fixes a problem with the SDK case. in rootfs_rpm.bbclass: Minor re-order of the values, and avoid multiple uses of IMAGE_ROOTFS in order to make the merge with the SDK behavior easier. (From OE-Core rev: 46559f36d8a39655060b45d3d235de44a2c4c09b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-01package_rpm.bbclass: fix one typoYu Ke
fix the MLPREFIX referrence typo which cause multilib rpm do_rootfs failure CC: Mark Hatle <mark.hatle@windriver.com> (From OE-Core rev: 9653089620ad5aef7876b582708561c3a315a064) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-01package_{deb, rpm, ipk}.bbclass: fix 'lingusa' typoKoen Kooi
(From OE-Core rev: 5e22d7d1fea7dfb14380de5692e4b2940781b518) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27package_rpm.bbclass: Fix mistake reported by Mark HatleRichard Purdie
(From OE-Core rev: 78a1a915d660d6039ac532239e25ead8507bc2df) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27package/rootfs_rpm: Implement RPM multilib package handlingMark Hatle
This is a first pass at adding multilib support to the RPM package and image handling code. (From OE-Core rev: 1939a4395997098862912e013a2b13ed2f385f9f) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-23classes/package_rpm.bbclass: Change the way the PV is transformedMark Hatle
There were some odd instances where the PKGV could not be loaded in the old way. Change to verify that PKGV exists before attempting to retrieve the value from the key. (From OE-Core rev: c2ce3573fb2816cd2023a56b364fae4c0f4455ae) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-23classes/package_rpm.bbclass: Enhance diagnostic messagesMark Hatle
We clearly state now if we are: * Skipping an empty package * Creating a (full) package * Creating an empty package (From OE-Core rev: 3db9d865ef7d65e3712eb7f9a659bb31cb3cb75e) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-06package_rpm.bbclass: make RPM use on-disk permissionsScott Garman
Instruct RPM to use the on-disk permissions, owners, groups, and directory permissions, instead of defaulting to root:root Code changes suggested by Mark Hatle. (From OE-Core rev: a6464f9484f56f596e3215184ad56ac6769ebb0c) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27classes/package_xxx.class: Use PKGE/PKGV/PKGR.Lianhao Lu
Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx. (From OE-Core rev: c2872315905fcdf6e4bf11fe96e5ca62af3475f8) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20Move packagedata code into oe.packagedata (sync from OE)Chris Larson
(From OE-Core rev: e6858627ab087f2f25ebbd6c4422eeae35f3b0ac) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20package-index.bb: add support for deb and rpm.Dexuan Cui
[YOCTO #1024] Currently package-index.bb only supports ipk. This commit adds the support for rpm and deb, too. ------------------------------ How to generate and use repos: 1) run "bitbake package-index" after building some target, e.g., core-image-sato-sdk; 2) export ${DEPLOY_DIR_RPM}, ${DEPLOY_DIR_IPK} and ${DEPLOY_DIR_DEB} by a webserver on the host, assuming the host IP is 192.168.7.1, at http://192.168.7.1/rpm http://192.168.7.1/ipk http://192.168.7.1/deb 3) inside the target, according to the packaging system (rpm, ipk or deb) used when we generate the target image, we can use different ways to manage packages: 3.1) RPM run "zypper addrepo http://192.168.7.1/rpm main; zypper refresh" to retrieve info about the repo; next, we can use "zypper install/remove" to manage packages. 3.2) IPK add the repo info into opkg config file, i.e., in /etc/opkg/arch.conf, we can add something like "src i586 http://192.168.7.1/ipk/i586", and next, we run "opkg update" to make opkg update the list of available packages. And later, we can use "opkg install/remove" to manage packages. 3.3) DEB Currently in target, some important config files, like /var/lib/dpkg/status and /etc/apt/sources.list, for deb/apt are missing. So we can't install/remove package in target at present. (From OE-Core rev: 01e34bdb43e0cc27c1cfffd6730c384f40c404c1) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10package_rpm: use target vendor informationAdrian Alonso
* Instead of hardcoding target vendor string "-poky" use TARGET_VENDOR information in case of using external toolchains (From OE-Core rev: 0638c470410b7ac3057d8f64ae0d389b5c3da838) Signed-off-by: Adrian Alonso <aalonso@secretlab.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29package_rpm: Ensure we take the sstate shared lockfile in the place we write ↵Richard Purdie
files The point we need to take the lock is when the rpm files are written into the deploy rpm directory. Since sstate makes the actual installation of the files, that is the point we need to take the lock. This also stops the deploy/rpm directory being accessed for a lock before it exists. [YOCTO #797] [YOCTO #925] (From OE-Core rev: 833a1e970f087dfcb32967cee3e24540f041cde0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-10package_rpm: Fix rootfs generationMark Hatle
[YOCTO #797] During rootfs generation, if other RPM packages are being wrtten this could cause a failure during the solvedb generation. We add a shared lock around the RPM package building. This will allow multiple RPM packages to continue to be written at the same time, but prevent rootfs generation and RPM package generation at the same time. (From OE-Core rev: 1d5ca654a482f582c75faf546140dfd6064da73b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-25rootfs_rpm: Fix rootfs generation using RPM packagesMark Hatle
[BUG #756] Fix bug #756. The rootfs contains a control file /etc/rpm/platform that specifies the default system platform, as well as patterns for compatible architectures. This file was not being setup properly due to a misunderstanding of the format in a previous patch. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-16package_rpm: Fix solverdb generationMark Hatle
The RPM solverdb was potentially being generated multiple times. Fix this by ensuring we only process each directory once. Also correct an issue where the solution did not necessarily follow the preferred architecture ordering, reverse the default Poky ordering so that preferred is listed first. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-16rpm: Add the ability to use the platform file during installMark Hatle
Add a new rpm macro, rpmrc_platform_path to specify an alternative platform file. This is required to allow the dep resolver to identify compatible packages. Also workaround a minor problem with the --showrc command in RPM. A bug has been reported upstream on this. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-01rootfs_rpm/package_rpm.bbclass: Move func from rootfs_rpm to package_rpmLianhao Lu
package_deb.bbclass: 1. Modified package_update_index_rpm() and package_generate_rpm_conf() to generate sperate depsolver db and rpm configuration, for target packages and host packages respectively. 2. Added new function package_install_internal_rpm() to install a list deb packages to a specified root directory, with the specified package architecutre information. 3. Added new function resolve_package_rpm() to resolve package names to filepaths. rootfs_deb.bbclass: Used the above new functions to install the rootfs. [sgw: merged changes for createrepo] Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-31image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().Lianhao Lu
Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant package_xx.bbclass. (Where xx is rpm/ipk/deb). Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-30package_rpm: Fix package-split summaryMark Hatle
The package-split summaries were being pulled in from the main package, not the split package metadata. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-01-28rpm: Uprev to RPM 5.4.0Mark Hatle
Update RPM to the latest release, RPM 5.4.0. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-10-22classes: Only enable fakeroot on setscene tasks with packagingRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22pseudo/fakeroot: Move the pseudo directory creation into bitbakeRichard Purdie
If sstate was used to accelerate a build, the pseudo directory might not have been created leading to subsequent task failures. Also, sstate packages were not being installed under pseudo context meaning file permissions could have been lost. Fix these problems by creating a FAKEROOTDIRS variable which bitbake ensures exists before running tasks and running the appropriate setscene tasks under fakeroot context. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22package_rpm: Don't check for the existence of dvar as its never usedRichard Purdie
If a sstate package exists for the package task but not for the rpm packaging task, the output from the package task will be used. The directory pointed to by dvar will not exist under this scenario. Since the directory is never used by the packaging process remove the check, substituting the pkgd variable which is always present and used. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-11Add Summary/Description support to packagingMark Hatle
[BUGID #281] Add the ability for the deb, ipk and rpm classes to use the new summary and description fields. The Description is wrapped around 75 characters to ensure a reasonably nice, presentable description. (Summary defaults to the description if Summary is not defined.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-10-11package_rpm: Disable nativesdk/canadian package indexes for now as these are ↵Richard Purdie
being incorrectly used for target rootfs generation, breaking the images Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-05Revert "classes: Disable setscene tasks for initial testing"Richard Purdie
This reverts commit 084ec86402bba92418898a4c47667a0574a3b3ee.
2010-09-03rpm: Fix autoconf/libtool usageMark Hatle
In order to resolve a host-contamination problem, we re-work the way that autoconf and friends are invoked during the compilation of RPM. This has a side effect of fixing another bug where RPM was being renamed HOST_ARCH-HOST_OS-rpm. So we remove the "fixes" for that behavior as well. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-03roots_rpm: Enable installation of recommended packagesMark Hatle
Within RPM there is a field called "Suggests". This filed behaves like "Recommends" does in ipk. So we write out the packages using the Suggests field with the Poky 'Recommends' values... and then use the arbitrary tags to capture the Poky 'Suggests' within a new "Recommends" tag. Slightly confusing, but the end result is a functioning install. Also some performance enhancements were add at the same time. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-03package_rpm: Start packaging directoriesMark Hatle
Match ipkg behavior and unconditionally include directories in the packages Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-02package_rpm: Enable debian style tagsMark Hatle
Enable debian style tags including suggests, enhances, recommends Note, these are not yet used by the dependency resolver. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-02rootfs_rpm: Optimize rpm database processingMark Hatle
Optimize the creation of the solverdb by disabling fsyncs and database caches that are not used when generating a solution. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-02package_rpm: Enable per file dependenciesMark Hatle
Switch the per file dependency handing to passing the information to rpm via the standard 'external' dependency scripting. This ensures that the dependencies found by RPM exactly match the ones presented by package.bbclass. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-08-31meta/classes: Fix whitespace mismatch and broken functionsRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-23package_rpm: Temporary workaround for perfile dependenciesMark Hatle
Until the pseudo code is fully integrated, we need to roll up the per file dependencies into package dependencies for rpm. Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-23rootfs_rpm: Enable multi dep solverdbsMark Hatle
Update package_rpm.bbclass to generate dep solver databases for each package arch. Following the example of the deb and ipk integration Revise the rootfs_rpm to solve the installation based on the multiple dep solvers. Note, recommends, locale and attemptonly pckages are still to be implemented. Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-23package_rpm: Rewrite the way the spec files are generatedMark Hatle
Use a single spec file to generate all of the split packages. This allows us to ensure the RPM package source package meta data is correct, and also speeds up the package generation process. Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-19classes: Disable setscene tasks for initial testingRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19package_*.bbclass: Always run these tasks under fakerootRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19package_(deb|rpm): Update to use packaged-staging2Joshua Lock
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-24rpm: switch to using RPM 5Joshua Lock
Switch to RPM5 as our rpm provider of choice and update the recipe to the latest stable release. Signed-off-by: Joshua Lock <josh@linux.intel.com> Modify the package_rpm.bbclass to understand the macro and command line changes present in rpm5. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>