summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* package_rpm.bbclass: Remove a misleading bb.note()Peter Kjellerstedt2019-09-191-3/+2
| | | | | | | | | | | | | It should have been removed in 3db9d865 (classes/package_rpm.bbclass: Enhance diagnostic messages) when it was split in two new notes. Also change the casing of two other notes to align them with the other notes. (From OE-Core rev: b40e245795cd19c7d36df096fa1f30c75490ce46) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: python2 -> python3Robert Yang2019-06-301-1/+1
| | | | | | | (From OE-Core rev: 8208fffc95b46e03bab967462c17d83e0a687d50) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver/package_rpm: Fix the worst src.rpm generation raceRichard Purdie2019-02-061-1/+1
| | | | | | | | | | | | | | | | The package_rpm code is writing outside the task's sstate directory into the sstate of do_deploy_archives. This is "out of spec" since if the task is installed from sstate, the files are not restored. This means the files may appear/disappear, things are not deterministic and there are races. Extend the do_package_write_rpm code to handle writing the src.rpm into place to avoid these issues. There are other problems but this avoids races around this file. (From OE-Core rev: c6e151ba7fe0f14044537cf0ab2cac436f1496e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm/archiver: Apply bandaid to src.rpm creationRichard Purdie2019-02-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | error: create archive failed on file /media/build1/poky/build/tmp/work/all-poky-linux/xcursor-transparent-theme/0.1.1+gitAUTOINC+23c8af5ba4-r0/deploy-sources/allarch-poky-linux/xcursor-transparent-theme-0.1.1+gitAUTOINC+23c8af5ba4-r0/xcursor-transparent-theme-0.1.1+git0+23c8af5ba4-r0.src.rpm: cpio: read failed - No such file or directory | Building target platforms: noarch-poky-linux | Building for target noarch-poky-linux This is caused by: $ cat log.task_order do_cleansstate (24289): log.do_cleansstate.24289 do_deploy_archives_setscene (24395): log.do_deploy_archives_setscene.24395 do_fetch (24407): log.do_fetch.24407 [..] do_package_write_rpm (25448): log.do_package_write_rpm.25448 do_package_qa (25451): log.do_package_qa.25451 So do_deploy_archives can run from sstate, created a .src.rpm in WORKDIR/deploy-sources, then it was removed when rpm was running. This leads to a broken Source line in the spec file as the original file was found by the os.listdir(). This fix is just a bandaid over much more fundamental problems sadly. (From OE-Core rev: a10020ace4c3cd863c782760f7cbecea557ec6e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: set _builddir to B not SRichard Purdie2018-03-301-1/+1
| | | | | | | | | | | | | Recipes which use a shared workdir (e.g. gcc-runtine and libgcc) can race over temporary files causing interesting build failures. Using B instead of S avoids this problem. [YOCTO #12605] (From OE-Core rev: d6c13a5ff441f7076eb327c0d0b747bd7603db0f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: run pre/post installation/removal scriptlets using sh -eAlexander Kanavin2018-03-151-4/+4
| | | | | | | | | | | | | | | | | | This allows catching errors in the scriptlets which would otherwise go unnoticed, e.g. this sequence: ==== bogus_command proper_command ==== would work just fine without any visible warnings or errors. This was previously done only for rpm packages; this patch replaces the rpm-specific tweak with one that works for all package types. (From OE-Core rev: a0aa12e1d0ea9064b8dd816d4e82238df765506b) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: run pre/post installation scriptlets using sh -eAlexander Kanavin2018-01-301-4/+4
| | | | | | | | | | | | | | | | | | | | This allows catching errors in the scriptlets which would otherwise go unnoticed, e.g. this sequence: ==== bogus_command proper_command ==== would work just fine. Note that this patch needs all of the preceding patches, as otherwise running failing scriptlets with -e would defer them to first boot, instead of properly reporting failure and aborting the package installation. (From OE-Core rev: 3cd8a55d5298ce9cc176e402fdb727abb26a1a4c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: improve reproducibility of RPM packagesJuro Bystricky2018-01-291-0/+1
| | | | | | | | | | | | The RPM packages contain BUILDHOST based on the current build host. This breaks reproducibility if the same package is build on two different hosts. To improve reproducible builds, we always set BUILDHOST as "reproducible". (From OE-Core rev: f3beb683380ec0d9efa0d6af83205350afd1b2de) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Fix matching of architecture independent packagesOtavio Salvador2018-01-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OE-Core changes the architecture independent RPM packages to use "noarch" instead of "all". This change has been included in the commit below: ,---- | commit 341810aff923ace6b1cc1e15e19383c4f8773b51 | Author: Alexander Kanavin <alexander.kanavin@linux.intel.com> | Date: Mon Jan 9 16:37:28 2017 +0200 | | package_rpm.bbclass: make architecture-independent .rpm packages | "noarch" instead of "all" | | Too many places in dnf/rpm4 stack make that assumption; let's not | fight against it. | | Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> `---- This is causing problems with machines that has "all" inside the machine name. Reported-by: Alexandru Palalau <ioan-alexandru.palalau@nxp.com> (From OE-Core rev: 3e4ddeab65d4d2e4aaf03d442c2a1a8c7a2ce8a2) 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>
* package_rpm: correctly handle LICENSE_${PN}Ross Burton2018-01-261-2/+7
| | | | | | | | | | | | | | | | | | RPM spec files don't distinguish between spec-level license and the primary package license, so always output the License for every package (defaulting to the recipe-wide license) and use LICENSE_${PN} if set for the primary package. As the primary use of package_rpm is to generate built packages, this fixes the license fields in the generated packages. [ YOCTO #12057 ] (From OE-Core rev: 8c333e592fa7a3a887c792ac14e5cde2141b5d35) (From OE-Core rev: 42e0de37d18f072dc5dcf5dc45cb441e4c2110d8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: clamp timestampsJuro Bystricky2018-01-051-0/+1
| | | | | | | | | | | | Improve binary reproducibility of RPM packages. Ensure timestamps in RPM packages are not later than the value of SOURCE_DATE_EPOCH. If SOURCE_DATE_EPOCH is not set, timestamps are not clamped. (From OE-Core rev: 225a7156d1fb2fbffadf38e4f4e491f053358082) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Filter out unwanted file deps for nativesdk packagesPeter Kjellerstedt2017-08-171-2/+23
| | | | | | | | | | | | | Filter out any file dependencies on absolute paths and any dependencies on Perl modules for nativesdk packages. It is assumed that they will be provided by the native host if needed, and they mess up the dependency handling if they are present. (From OE-Core rev: ce55e6c6d8b654b5fb21dec8180b471bfd33601a) 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>
* package_rpm.bbclass: disable generation of .build-id linksAlexander Kanavin2017-07-251-0/+1
| | | | | | | | | | | | | As we're not using them and they're getting in the way of reproducibility. [YOCTO #11718] (From OE-Core rev: 1bd3ed18379c330c1c733dc9f043dbbe8aa0d254) 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>
* package_rpm.bbclass: use multithreaded xz compressionAlexander Kanavin2017-06-121-0/+2
| | | | | | | | | | | | RPM's default is single-threaded gz; the change greatly helps with both buildtimes (when there is a small number of large-sized packages) and disk space taken by resulting rpms. (From OE-Core rev: f108c4d09926bd28e7a57b665fc8cb5373827780) 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>
* rpm: allow arch-dependent binaries in noarch packagesNg Wei Tee2017-05-161-0/+1
| | | | | | | | | | | | | | | This is needed for packages like linux-firmware which have a legitimate reason for it. Oe-core has a separate package_qa test for this situation, so any accidental inclusions of such binaries will still be caught. [YOCTO #11329] (From OE-Core rev: 6aaff392d703183d19192e2d171e10a92f259c65) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Dosen't filter Conflicts if found in ProvidesAníbal Limón2017-04-201-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This filter was add to make compilence with debian packaging but in package_deb.bbclass is allowed to have the same values in Conflicts and Provides. With this filtering errors in recipe meta-data are hidden and could end on install two packages that conflicts [2]. Reviewing the RPM spec from Fedora doesn't have anything that denies to use the both Conflicts and Provides with the same value [3], also in debian manual section 7.6.2 of [4] this behaviour is allowed to force the removal of the conflicted package and RPM is compilence with this behaviour after remove the filtering this is seen [5]. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4b611b66743a5ec220aef34d796af63029bb5fd9 [2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9349#c9 [3] https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-advanced-packaging.html [4] https://www.debian.org/doc/debian-policy/ch-relationships.html [5] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9349#c12 (From OE-Core rev: 2ba9dd490d69544553fc8a837fb5034a6746ab51) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: do not strip multilib prefixes from package names, do ↵Alexander Kanavin2017-03-141-44/+11
| | | | | | | | | | | | not add multilib prefix to package arch This is done for reasons I cannot establish, and greatly complicates the code that installs packages into rootfs. (From OE-Core rev: d9ea9003677d195f64eb4b3202e1c5d37d21b330) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: do not set the OS dynamically when building rpmsAlexander Kanavin2017-03-141-1/+1
| | | | | | | | | | | Packages need to contain just one value for the os field, otherwise rpm will refuse to install them if they don't match what is in /etc/rpm/platform. (From OE-Core rev: 580ba965f5f38f6718a83f690bbe23a63fbcd3dd) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packagesAlexander Kanavin2017-03-141-1/+1
| | | | | | | | | | | | nativesdk-* rpm packages all require /bin/sh because postinst scriptlets are run with it. We can either teach rpm4 and dnf to ignore that dependency (a lot of non-upstreamable work), or add auto-satisfy the dependency in each package. I've chosen to do the latter. (From OE-Core rev: b18c32ab6bc9c4f1953e9f79aa39bc92d1c4e30d) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: instruct rpm to not remove the buildroot directoryAlexander Kanavin2017-03-141-2/+5
| | | | | | | | | | | This is the ${W}/package directory which may be reused in subsequent builds. Also clean up various default directories rpm 4 creates. (From OE-Core rev: bdebe0d50a210438730ee7797968eafe169ded23) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: no need to specify the magic file locationAlexander Kanavin2017-03-141-2/+0
| | | | | | | | | It's handled by the rpm wrapper command, created in rpm recipe. (From OE-Core rev: 8f331db8136c8bf28ceea7f8ae410eb9d83225ad) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: replace createrepo reference with createrepo_cAlexander Kanavin2017-03-141-1/+1
| | | | | | | (From OE-Core rev: de6ed676712f79e54a32000a1b090eb918c939b9) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tagsAlexander Kanavin2017-03-141-8/+4
| | | | | | | | | | | | | | | | | | | Previously they were swapped, not sure why. Their meaning, as far as rpm world goes, is different: - Recommends is a soft dependency and will be installed by default; there is an option not to do that. - Suggests is a suggestion to be picked up and presented to end user by package management tools; it has no special meaning otherwise. OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag, so that the packages will be picked up as dependencies. (From OE-Core rev: 06270f20ba4312d20d0fd348595adf1b239bcac5) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: make architecture-independent .rpm packages "noarch" ↵Alexander Kanavin2017-03-141-1/+3
| | | | | | | | | | | instead of "all" Too many places in dnf/rpm4 stack make that assumption; let's not fight against it. (From OE-Core rev: 341810aff923ace6b1cc1e15e19383c4f8773b51) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-2/+0
| | | | | | | | | | Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Clean up pointless exception handlingRichard Purdie2017-01-221-12/+3
| | | | | | | | | | The exception handling in this function seemed mildly crazy. Python will given perfectly good or in several cases better information if we let its standard traceback/exception handling happen. Remove the pointless code. (From OE-Core rev: 5ecdab6c2589a83bbbc522074052ff4438782102) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package*: Add support for PACKAGE_WRITE_DEPSRichard Purdie2017-01-201-0/+1
| | | | | | | | | | | | | Add a new variable to allow markup of postinstall (and preinst) script dependnecies on native/cross tools. If your postinstall can execute at rootfs creation time rather than on target but depends on a native tool in order to execute, you need to list that tool in PACKAGE_WRITE_DEPENDS. (From OE-Core rev: aff8ca95b8303a4a2a5600c0d8ec0a50ad677258) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_rpm: handle square brackets in filenamesPaul Eggleton2017-01-091-0/+6
| | | | | | | | | | | | | | | | | | When constructing a spec file we list files and directory paths in the %files section. If ] or [ characters are in a file or directory name, rpm treats them as wildcards which will mean it won't properly match the filename. Instead, transform these into an ? wildcard so they don't cause a problem. (This fixes packaging the npm package "file-set" and anything that happens to depend upon it, since it includes tests with files that contain unusual characters including ] and [). (From OE-Core rev: f95adb749619e70920c6cc6cd01c6d02cd348fd8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVarFlag callsJoshua Lock2016-12-161-3/+3
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) 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>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-68/+68
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) 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_rpm.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson2016-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: f0561ba205723fd7f05c28d501c2c517034b326c) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Convert to use python3 octal syntaxRichard Purdie2016-06-021-3/+3
| | | | | | | | The syntax for octal values changed in python3, adapt to it. (From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Ensure pass setVar/setVarFlag strings, not integersRichard Purdie2015-11-241-1/+1
| | | | | | | | | | | This doesn't cause any issues right now but it make sense to standardise on consistently using strings in the data store. (From OE-Core rev: 99203fbe5ad470ef65cff93cec9d7f332883b5ee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: support signing of rpm packagesMarkus Lehtonen2015-09-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 75f5f11b19ba1bf8743caf9ee7c99a3c67f4b266) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_*.bbclass: Ensure OVERRIDES doesn't change sstate signatureRichard Purdie2015-08-301-0/+2
| | | | | | | | | | | | 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) (From OE-Core rev: 59ccabdfb59a3e0917585dafab7a1e7c71330996) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass : escape "%" in files and directories nameSébastien Mennetrier2015-08-241-0/+3
| | | | | | | | | | | | | | | | | | | 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 ] (From OE-Core rev: 5ed1c7f556df3fafd45d493010cc0bbe74d05ebd) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-2/+2
| | | | | | | | | | | | | | 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 *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk/deb/rpm: Improve OVERRIDES handlingRichard Purdie2015-06-161-1/+1
| | | | | | (From OE-Core rev: 59ca90114fb0b770d9d79e548b7e52aa0c089e48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: support packaging of symlinks to directoriesPatrick Ohly2015-02-271-0/+10
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 9c4ab427b6acbc3f708860adace65393562227a7) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packaging: allow globs in CONFFILESChen Qi2015-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 0d446ef0e5bbca7058eec7259e34f2a1637dfab1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Add optional improved directory handlingRonan Le Martret2014-09-031-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 0e33d232916125ba5305ced7200cc00f8b5f7b22) Signed-off-by: Ronan Le Martret <ronan@fridu.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Add builddir macro to define source directoryRichard Purdie2014-09-031-0/+1
| | | | | | | | This allows its usage in other RPM macros so files in ${S} can be found. (From OE-Core rev: 649ddd4b17e8a1f94ca9f4bc3a71560437c61909) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Add custom extension support for spec generation.Richard Purdie2014-09-031-0/+5
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 03ac91815013c0e85c4694b3ab849257e658aeba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Should be using HOST_* not TARGET_*Mark Hatle2014-07-081-2/+2
| | | | | | | | | | | | 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. (From OE-Core rev: 0fa1eb5c1296a38b332b63d539608da7ef56c3c0) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_rpm.bbclass: Fix SDK Suffix referenceMark Hatle2014-06-251-1/+2
| | | | | | | | | | | | | 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. (From OE-Core rev: 0d3f7a753f17fa8c455f64e3df3259ef1887fd8a) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_*.bbclass: Simplify addtaskRichard Purdie2014-03-301-1/+1
| | | | | | | | | The package_write task was previously removed. Remove a remaining superfluous reference to it. (From OE-Core rev: 76bbf9e8f07f3e6f20c890dd4c82c72641e2ca88) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: archive the source to srpm packageRobert Yang2014-03-211-21/+12
| | | | | | | | | | | | | 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] (From OE-Core rev: f9ba047afb8780c8bd7cb1ba45470d30abf92e92) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Drop do_package_write taskRichard Purdie2014-02-251-0/+2
| | | | | | | | | | | | | | | | | 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). (From OE-Core rev: cf70e15f063716f3227d467ab1f4bfc0018286f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_*.bbclass: remove references to the old bash indexing routinesLaurentiu Palcu2014-02-141-1/+0
| | | | | | | | | | Package indexing is done in python and package-index.bb uses the new routines. (From OE-Core rev: 2ab1a2bccfbb4ed90fe3b877d1be80817ba32099) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* conf/bitbake.conf: default HOMEPAGE to blank instead of unknownPaul Eggleton2014-02-111-1/+2
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 244e1d73ef58e92d73c098044c66bd784644b933) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>