summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* archiver.bbclass: Fix COPYLEFT_LICENSE_{IN, EX}CLUDEAdrian Bunk2019-01-081-3/+0
| | | | | | | | | | | | | | Setting them to empty before inheriting copyleft_filter made them not getting their documented values there. (From OE-Core rev: ee1f86ca7affc65265f219f0718f89406c9181a5) (From OE-Core rev: b5586a83155e07b0c7a7e82568c18f5e29eaaed2) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Drop unwanted directoriesFabien Lahoudere2018-11-071-1/+9
| | | | | | | | | | | | | In sources directory we can find patches/ and temp/. The first one is filled with symbolic link unusable on another machines. The second contains yocto logs to create this archives and are typically copied when 'S = "${WORKDIR}"' (From OE-Core rev: 3904f98851c6a63dd9377e38f1432be6b1c0a94d) Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: remove left-over debuggingRoss Burton2018-10-101-1/+0
| | | | | | | (From OE-Core rev: 6fe833611f985198e3ca038e5095f0d03249ce82) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: generalise task running when in configured modeRoss Burton2018-10-011-13/+19
| | | | | | | | | | | | | | | When in configured mode the archive will re-run configure itself, but that doesn't work if there are other tasks that need to run such as cmake's generate_toolchain_file. Instead of hard-coding a list of classes and tasks, obtain the list of tasks preceeding do_configure, filter out ones we don't want to re-run such as do_patch and do_prepare_recipe_sysroot, and run those too. (From OE-Core rev: fe26382f94d8cb7d2453d9937aee451b757252b8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: check tasks exist before adding dependenciesRoss Burton2018-10-011-2/+5
| | | | | | | | | | | | Some recipes don't have do_configure, or have them but are marked as noexec. Check for their existance before hooking up dependencies. [ YOCTO #12868 ] (From OE-Core rev: 5c8aa1f41f04519a8ba3997c0d8e3a71fe270fae) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix archive for linked kernel sourceTom Hochstein2018-04-051-0/+5
| | | | | | | | | | | | When archiving a kernel, if S is ${WORKDIR}/git, then ${WORKDIR}/git is in fact a soft link into work-shared, and the archive contains just the soft link. Fix by archiving the real directory. (From OE-Core rev: 564204dd6b73697ef4b6c17243067892876cc323) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix build errors for kernels that don't use kernel-yocto.bbclassTom Hochstein2018-04-051-2/+6
| | | | | | | | | | | Special handling for kernel source in work-shared was incorrectly limited to kernel-yocto.bbclass instead of kernel.bbclass. (From OE-Core rev: b8c5680a67888d43540366a40bd0c501e926ac31) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: remove deploy_all_archives task as --runall replaces itRoss Burton2018-02-161-8/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: don't require that images are built using RPM to build SRPMsRoss Burton2018-01-291-4/+5
| | | | | | | | | | | | | | The requirement for images being built using RPM is too strict to have access to the RPM functions, simply checking that package_rpm is in PACKAGE_CLASSES is sufficient. Also fail if SRPMs are requested but package_rpm isn't enabled, instead of silently not doing what we were asked. (From OE-Core rev: cdae5c41e4f67a8757efc5ce1ef11d730edc3af1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: preserve sysroot paths in configured mode for multilibHongxu Jia2017-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following commit, the archiver expanded RECIPE_SYSROOT to preserve sysroot paths in configured mode: ... commit aa2240657b015d46e9ba4bcb6264709a82313d83 Author: Ross Burton <ross.burton@intel.com> Date: Tue Jun 6 15:23:18 2017 +0100 archiver: preserve sysroot paths in configured mode ... In meta/conf/multilib.conf, it overrides the variables of STAGING_DIR_HOST, STAGING_DIR_TARGET and RECIPE_SYSROOT with "${WORKDIR}/${MLPREFIX}recipe-sysroot". So the archiver should also expand STAGING_DIR_HOST and STAGING_DIR_TARGET to preserve sysroot paths in configured mode for multilib. [YOCTO #11584] (From OE-Core rev: b129af957a9fd8f603d1aebb9fca3adcb4e6b341) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: preserve sysroot paths in configured modeRoss Burton2017-06-061-0/+4
| | | | | | | | | | | | | do_ar_configured alters WORKDIR but also expects to be able to run do_configure, so forcibly expand the paths to the sysroots as otherwise they'll point to a non-existant directory in the temporary WORKDIR. [ YOCTO #11584 ] (From OE-Core rev: aa2240657b015d46e9ba4bcb6264709a82313d83) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: fix do_ar_original error for matchbox-desktopDengke Du2017-06-061-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR: matchbox-desktop-2.1-r0 do_ar_original: Can not determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: git://git.yoctoproject.org/matchbox-desktop-2 file://vfolders/%2A ERROR: matchbox-desktop-2.1-r0 do_ar_original: Function failed: do_ar_original ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function do_ar_original, when recipes have more than one source, it added the "name" URL parameter as suffix to identify the created tarball. But the URL type "file://" that we always used to represent a series of patches, it didn't have "name" parameter, so it failed. So set "name" to the folder name to identify the created tarball, for example: In matchbox-desktop bb file, the SRC_URI contains: file://vfloders/* We set "name" to "vfolders" to identify the created tarball. In connman-gnome bb file, the SRC_URI contains: file://images/* We set "name" to "images" to identify the created tarball. (From OE-Core rev: 0af636c635391b30c987dedeffe597ef4f8a1ed8) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: adapt do_unpack_and_patch to RSSMikko Ylinen2017-06-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | do_unpack_and_patch was not correctly run until recently ("archiver.bbclass: various fixes for original+diff mode") but with the fix applied, the errors we get indicate the function is not adapted to work with recipe specific sysroots. do_unpack_and_patch sets WORKDIR to ARCHIVER_WORKDIR which affects all path settings relative to WORKDIR, inluding the paths to recipes' sysroots. IOW, when do_unpack and do_patch are run, they cannot find the necessary native tools and files located in the sysroot (e.g., quiltrc) because the paths point to ARCHIVER_WORKDIR. Adapt do_unpack_and_patch to RSS by restoring the original STAGING_DIR_NATIVE after WORKDIR is changed to ARCHIVER_WORKDIR. (From OE-Core rev: db7d2cc5a4df3c2077ba874c7ae395c73fd9ed13) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Escape recipe name in regexJoshua Watt2017-06-031-2/+2
| | | | | | | | | | | The recipe name needs to be escaped when using it in a regular expression so that and special characters are treated literally (From OE-Core rev: 53c8cceb744adda1bf899d62071d11b20a5dea98) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: avoid archiving source for glibc-localeZhenbo Gao2017-05-181-0/+6
| | | | | | | | | | | Avoid archiving source for glibc-locale as its tasks do_fetch do_unpack and do_patch have already been deleted. (From OE-Core rev: 50ed224ebc8d88a900febdc78013fa0c791d71cf) Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: do not cause kernel rebuildsPatrick Ohly2017-05-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding or removing archiver.bbclass from a build configuration causes rebuilds of linux-yocto-based kernels because of the do_kernel_configme->do_unpack_and_patch task dependency. This particular dependency can be ignored for the do_kernel_configme sstate signature calculcation. Idea for the fix from Richard Purdie. Note that building the kernel and adding archiver.bbclass later to archive sources leads to do_unpack_and_patch running after do_kernel_configme (because that already ran in the first build), which might be problematic. This is independent of the change here. The use case in YOCTO #11441 is to removed archiver.bbclass between a production build with archiving enabled and builds via oe-selftests without archiving. That direction is fine. Fixes: YOCTO #11441 (From OE-Core rev: fed0ed82928e6a7846fbad233ac657bd17bcefc7) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: various fixes for original+diff modePatrick Ohly2017-05-181-5/+15
| | | | | | | | | | | | | | | | | | | | | | The diff.gz gets created in do_unpack_and_patch, but do_deploy_archives did not depend on it, so there was a race condition. For example, "bitbake linux-intel:do_deploy_archives" without a prior "bitbake linux-intel:do_kernel_configme" did not deploy the diff.gz. When do_unpack_and_patch ran first, it failed because the output directory didn't exist yet and the error was not detected because the result of the diff command wasn't checked. Changing the current working directory in create_diff_gz() without returning to the original directory caused warnings like this: WARNING: linux-intel-... do_unpack_and_patch: Task do_unpack_and_patch changed cwd to .../tmp-glibc/work-shared/intel-corei7-64 (From OE-Core rev: 18aac553ca35049c80b6cc82ff0e69ce8a7a03a9) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: enhance do_ar_recipe task signaturePatrick Ohly2017-05-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, do_ar_recipe ran again unnecessarily when adding or removing classes like buildhistory.bbclass, because that changes the BBINCLUDED variable which do_ar_recipe uses to find .bbappend files. This is both extra work and also sometimes triggered "basehash changed" errors (seen under oe-selftest, which adds machine.inc and bblayers.inc) because BBINCLUDED is special and does not cause the basehash to be recalculated. The file *content* already was not considered in the task signature, instead relying indirectly on PF (which includes the revision assigned by a PR server) to ensure that a new versioned source archive gets created each time there is a rebuild. Therefore it makes sense to use the same mechanism and also ignore the file *list*, i.e. exclude BBINCLUDED from the task signature. (From OE-Core rev: 9666f0e0b02efc14226c77497fd38f79fc372f98) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace uses of bb.data.expand(VARNAME, d) with d.expand(VARNAME)Joshua Lock2017-03-221-1/+1
| | | | | | | | | | | bb.data.expand(x, d) is deprecated API. [YOCTO #10678] (From OE-Core rev: a361babe443da635aed83be46679067457fd6a58) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVarFlag callsJoshua Lock2016-12-161-14/+14
| | | | | | | | | | | | | | | 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-37/+37
| | | | | | | | | | | | | 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>
* archiver: don't change directory when generating tarballRoss Burton2016-12-131-6/+2
| | | | | | | | | | There's no need to chdir() as tarfile.add() can be told what name to use in the archive. (From OE-Core rev: d0b282bce34db44dde4dd7f53a64dfaafe6789de) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: fix gcc-source handlingSaul Wold2016-10-111-2/+3
| | | | | | | | | | | | | The source archiver was not handling the gcc-source target correctly, since it uses the work-shared directory, we don't want to unpack and patch it twice, just as the comments say, but the code was not there to check for the gcc-source target. [YOCTO #10265] (From OE-Core rev: bbac0699ceadb7a25a60643fb23dffce8b4d23d0) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archive.bbclass: fix do_ar_original archiving of multiple source reposPatrick Ohly2016-09-281-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a recipe uses more than one source which isn't a plain file (for example, multiple git repos), then do_ar_original created the source archives using the same filename and thus only archived one source. The "name" parameter is used as file suffix to create unique names for each source, leading to archives following this pattern: deploy/${TARGET_SYS}/${PF}/${PF}[-<name>].tar.gz. The ${PF} part is a bit redundant, which may or may not be desirable. The patch is more localized this way (no need to modify create_tarball()). For example, meta-oic's iotivity_1.1.1.bb uses: url_iotivity = "git://github.com/iotivity/iotivity.git" branch_iotivity = "1.1-rel" SRC_URI = "${url_iotivity};destsuffix=${S};branch=${branch_iotivity};protocol=http;" url_tinycbor = "git://github.com/01org/tinycbor.git" SRC_URI += "${url_tinycbor};name=tinycbor;destsuffix=${S}/extlibs/tinycbor/tinycbor;protocol=http" url_hippomocks = "git://github.com/dascandy/hippomocks.git" SRC_URI += "${url_hippomocks};name=hippomocks;destsuffix=${S}/extlibs/hippomocks-master;protocol=http" SRC_URI += "file://hippomocks_mips_patch" url_gtest = "http://pkgs.fedoraproject.org/repo/pkgs/gtest/gtest-1.7.0.zip/2d6ec8ccdf5c46b05ba54a9fd1d130d7/gtest-1.7.0.zip" SRC_URI += "${url_gtest};name=gtest;subdir=${BP}/extlibs/gtest" url_sqlite = "http://www.sqlite.org/2015/sqlite-amalgamation-3081101.zip" SRC_URI += "${url_sqlite};name=sqlite3;subdir=${BP}/extlibs/sqlite3;unpack=false" These now get archived in deploy/sources/*/iotivity-1.1.1-r2/ as: gtest-1.7.0.zip iotivity-1.1.1-r2-recipe.tar.gz sqlite-amalgamation-3081101.zip hippomocks_mips_patch iotivity-1.1.1-r2.tar.gz iotivity-1.1.1-r2-hippomocks.tar.gz iotivity-1.1.1-r2-tinycbor.tar.gz (From OE-Core rev: 5c63ffc706c0fff8cfb797a238f4f0e73ee2813d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: ignore unpack sub-directories in do_ar_originalPatrick Ohly2016-09-281-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Support for absolute paths in the "subdir" parameter was recently added (bitbake rev: c3873346c6fa). The git fetcher has supported absolute paths in "destsuffix" already before. When the path is absolute as in destsuffix=${S}/foobar, the tmpdir used by do_ar_original gets ignored, which breaks: - source code archiving (tmpdir is empty) - compilation due to race conditions (for example, ${S} getting modified by do_ar_original while do_compile runs) To solve this, these parameters get removed from URLs before instantiating the fetcher for them. This is done unconditionally also for relative paths, because these paths are not useful when archiving the original source (upstream source does not have them, they only get used by the recipe during compilation). (From OE-Core rev: c27c464e267db3f4b08cbd966412d19b0e756d28) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Improve debug outputRichard Purdie2016-04-131-1/+1
| | | | | | | | | Make the output from the task more informative about which directories are being referenced. (From OE-Core rev: 0e306a53c460302ec20192fc35930983781b7a2e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Ensure sstate-inputdir directory is createdRichard Purdie2016-04-121-0/+1
| | | | | | | | | | | | | | | Without this, do_archive_sources will fail for the gcc tasks where there is common source and the other tasks are not added as dependencies. The failure happens when trying to restore these tasks from sstate. To fix this ensure the sources directory is created as expected by the sstate code. [YOCTO #9433] (From OE-Core rev: b3afe7d9bd25a943e947de3ec064ea245173c5a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: Fix ASSUME_PROVIDED issuesRichard Purdie2016-04-111-0/+6
| | | | | | | | | | | | Currently the dependencies injected by this class for recipes in ASSUME_PROVIDED e.g. tar-native or chrpath-native are ignored. We need to use their "replacement" names, e.g. tar-replacement-native. This avoids broken archives and sstate failures with these recipes. (From OE-Core rev: 2279c6d20c2a33283ce9a8d1ef91a8acdad0a20e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: addtask do_deploy_archives_setsceneRobert Yang2016-03-301-0/+1
| | | | | | | | | There was a do_deploy_archives_setscene, but no addtask. (From OE-Core rev: 81db27c208468dc460e9d8f0063ad24b2b37dc97) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Just archive gcc-source for all gcc recipesMariano Lopez2016-03-281-0/+6
| | | | | | | | | | | | | | It is pointless to archive several times the gcc source. This change will archive gcc source once, for the gcc-source-{PV} recipe. [YOCTO #9327] (From OE-Core rev: 2f53fb2ae561e2eb599682ba95ce83ad1b4b7ada) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fix tar name for git repositoriesMariano Lopez2016-03-251-15/+6
| | | | | | | | | | | | | | When archiving the original source, the git repositories have the name as they are in the $DL_DIR plus the source revision; i.e. "git.yoctoproject.org.linux-yocto-4.4.git.89419d8b90_dadb436904.tar.gz". This change set the tar name to $PF.tar.gz instead, to have consistency with the others archives created by the class. (From OE-Core rev: 3f903cb767150e316337929d72559cad6931039a) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fix gcc-source corner caseMariano Lopez2016-03-251-2/+16
| | | | | | | | | | | | | | | | Bitbake couldn't add the task ar_configured when trying to archive the configured source for gcc-source-${PV} recipes. This is because the task depended in the do_configure and this task doesn't exist for gcc-source. This fix allows to archive configured gcc-source recipe. (From OE-Core rev: 5be5eae2e1630a151a9f5866d60325d439150ced) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fix use of ARCHIVER_WORKDIR and ARCHIVER_OUTDIRMariano Lopez2016-03-251-11/+11
| | | | | | | | | | | | | Currently do_unpack_and_patch() and do_ar_configured() are using the ARCHIVER_OUTDIR as the ARCHIVER_WORKDIR, this lead to have duplicated files inside the tars when using the archiver class for patched and configured source. (From OE-Core rev: 09dfc99a813090043262529beb6d900900e983dc) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Don't expand python functions in dumpdataMariano Lopez2016-03-251-8/+7
| | | | | | | | | | | | | Currently the dumpdata task expands python data in the datastore, in some functions this causes a silent error and the task will fail. The change also rewrite the function to make a bit clearer. (From OE-Core rev: e3239ade430ff48e00dce47066abe8fcb990af61) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bbclass: fix spelling mistakesMaxin B. John2015-11-241-1/+1
| | | | | | | | | | Fix some spelling mistakes in bbclass files (From OE-Core rev: ed484c06f436eea62c5d0b1a2964f219f3e5cb61) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: add bbappend when do_ar_recipe kernel and gcc packagesJian Liu2015-11-241-0/+10
| | | | | | | | | | | bbappend files are not included in the archiver during do_ar_recipe. Find and put them into the tarball. (From OE-Core rev: 5c84057de5b31c5d6d9abfcca3078bf766a21d88) Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: fix previous issue regarding work-shared for linux-yoctoAlejandro Hernandez2015-11-241-11/+9
| | | | | | | | | | | | | | | | | A previous patch intended to fix and improve the archiver class, and while it did for gcc packages, with it some issues ended up being hidden, the kernel tasks taken from kernel.bbclass and kernel-yocto.bbclass specifically expect the kernel to use work-shared, which either ended up causing issues or wasting time doing unnecessary work, this patch fixes these issues by performing the right tasks within the archiver in the right order [YOCTO #8378] (From OE-Core rev: d643e43622eb3e43fbb2e21fa33580e2fcdf42be) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Fixes and improves archiver class for kernel and gcc packagesAlejandro Hernandez2015-10-211-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc packages use a shared source directory, this causes an issue since the archiver will try to patch the same source several times (one for each gcc package), producing an error, the archiver class used stamp-base to check this, nonetheless our gcc packages no longer use stamp-base, they use gcc-shared instead, which is what broke this functionality. This patch adds a check to see whether or not the source should be patched, avoiding patching the source when it shouldn't. Also, we dont need to create multiple identical tarballs for all gcc packages, this patch fixes this and creates a single source tarball for gcc. When requesting patched sources, a race condition is created for linux-yocto tasks, unpack_and_patch is executed along with kernel_configme, which most of the time causes errors during configure, since kernel_configme task is specific to the kernel, simply modifying the tasks order by creating a dependency to kernel_configme was impossible, causing errors on all other packages that didnt use kernel_configme, this is fixed by creating a special case for the kernel, adding tasks with correct dependencies, avoiding the race condition and behaving the way it should for all other packages as well. [YOCTO #8378] (From OE-Core rev: aecaa0e8739db1c228a6db78225a717d9f348a5b) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: stamp-base is dead, remove itRichard Purdie2015-09-241-32/+3
| | | | | | | | | | | | | | | | stamp-base was only ever used by the shared workdir code in gcc. This turned out to be problematic and has been replaced by other approaches which don't need specialist bitbake knowledge. stamp-base will likely get removed from bitbake but for now, remove it from archiver to simplfy the code since gcc no longer uses it. This stops people getting confused by the obsolete code paths which I'm getting a lot of questions about. (From OE-Core rev: 4b9f70f03cbefe9db758500e3ad89f7a8ff8226e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: Run deploy_archives in $WORKDIRClemens Lang2015-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | In recipes that are exempt from source code archiving due to COPYLEFT_LICENSE_EXCLUDE, do_deploy_archives does not have a transitive dependency on do_unpack. Given enough parallelism, this means do_deploy_archives can run at the same time or before do_unpack. Because do_deploy_archives did not specify a working directory, its working directory was ${B}, which defaults to ${S}, which may be set by a recipe to a directory that is created by do_unpack. In this case, do_deploy_archives can fail because do_unpack deletes and re-creates the directory and do_deploy_archives cannot change into the non-existent directory. Avoid this problem by explicitly specifying a working directory for do_deploy_archives (and for do_deploy_all_archives as well for good measure). (From OE-Core rev: e22685ff11af6d54c939aa8f327a0aaa1557fbbc) Signed-off-by: Clemens Lang <clemens.lang@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: add do_deploy_all_archivesPatrick Ohly2015-07-121-0/+7
| | | | | | | | | | | | | When working specifically on source archiving, it is useful to trigger that for all recipes required by something like an image recipe, without actually having to build that. "bitbake -c deploy_all_archives <target>" does that now. (From OE-Core rev: 30b109729a81097cc6cfa65148e0e9ae1a564d2c) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* copyleft_filter.bbclass: Allow to filter on nameMariano Lopez2015-06-231-8/+6
| | | | | | | | | | | | | | | The archiver uses a license based filter to provide the source code. This patch allows to search on name based on two new variables (COPYLEFT_PN_INCLUDE, COPYLEFT_PN_EXCLUDE). Both variables are empty by default. The filter by name has higher priority than the license filter. [YOCTO # 6929] (From OE-Core rev: 04066239e9cd6a8461fb2c18e826289469ac1240) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: fix truncation of src_revJoe Slater2014-10-241-2/+2
| | | | | | | | | | | | | In trying to eliminate AUTOINC+ from revision strings, we accidently truncated the strings to almost guarantee information from SRCREV_FORMAT, when supplied, would be lost. So, we now only delete any AUTOINC+'s from the string. (From OE-Core rev: 83c6930cdfac5a7759c4786172a5c70226e6adc4) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: add revision to git tarfile nameJoe Slater2014-08-271-1/+6
| | | | | | | | | | | | When archiving original source, insert the first 10 characters of srcrev, after stripping off any AUTOINC+, into the filename for tarfiles created from directories. (From OE-Core rev: 36726049a6a452f85d7cc849d57ad6af05d6d3ea) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: delete the tail slash in directory nameJian Liu2014-08-231-1/+1
| | | | | | | | | | | | If directory names in SRC_URI ended with "/", function do_ar_original() in layers/oe-core/meta/classes/archiver.bbclass will generate a tar file whose name is ".tar.gz". So delete the "/" at the tail of the directory names before use the names. (From OE-Core rev: a539e823d002fefe129e3045f893d1237fadb87f) Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: create dir 'B' explicitly while WORKDIR changedHongxu Jia2014-06-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the do_unpack_and_patch task of archiver, the changed 'WORKDIR' also casued 'B' changed, create dir 'B' for the possibly requiring of the tasks which executed in do_unpack_and_patch task. Such as cut-ecgl's do_patch required 'B' existed: ... | cp: target 'tmp/work/x86_64-wrs-linux/cut-ecgl/1.0-r0/archiver-work /cut-ecgl-1.0' is not a directory ... | ERROR: Function failed: do_patch (log file is located at tmp/work/ x86_64-wrs-linux/cut-ecgl/1.0-r0/temp/do_unpack_and_patch/ log.do_unpack_and_patch.11886) ... The 'B' dir is implicitly created at the task executing time while the task tag 'dirs' is not assigned. In the above cut-ecgl example, the 'B' was created at the wrl_buildlink executing time which is the prefuncs of task do_unpack. So the following do_patch could use 'B' correctly. But wrl_buildlink is unnecessary and not invoked in the do_unpack_and_patch task. (From OE-Core rev: 8baefb49d0bf9d3dd757d9b2359e0a9f4f33dd60) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: emit patch series files for original srcRobert Yang2014-03-251-0/+13
| | | | | | | | | | | | | Emit patch series files for original src so that the user knows how to apply the patch orderly. [YOCTO #5113] (From OE-Core rev: 053631bc3cf7c7c2d090decaa3b5e5690963e64a) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: make it can filter the licenseRobert Yang2014-03-251-2/+25
| | | | | | | | | | | | | | | | | | | * Filter the license (default: no), the recipe whose license in COPYLEFT_LICENSE_INCLUDE will be included, and in COPYLEFT_LICENSE_EXCLUDE will be excluded. * The user can set the recipe type that would be archived (native, target, and so on), deafult to all. The copyleft_filter.bbclass is come from copyleft_compliance.bbclass, which is used by both copyleft_compliance.bbclass and archiver.bbclass. [YOCTO #5740] (From OE-Core rev: 0e798d5cbcf585535e19633828dc540a282261fc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: move a few code to copyleft_compliance.bbclassRobert Yang2014-03-211-19/+0
| | | | | | | | | | | | | | | | | | Move the code which is only used by copyleft_compliance.bbclass from archiver.bbclassc, and remove the "inherit archiver" from copyleft_compliance.bbclass. The archiver.bbclass is used for archiving various types of sources, but the copyleft_compliance.bbclass is used for analysing the license, they don't have much relationships. [YOCTO #4986] [YOCTO #5113] (From OE-Core rev: 578830fe2ff279ea620916ea711b80dc1b29a275) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: refactor itRobert Yang2014-03-211-554/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The archiver didn't work, and there were a few problems, for example: 1) There was no src_dir.org (or orig), but the diff command still use it 2) There were a few duplicated code 3) It didn't archive the source for the native or gcc 4) The work flow is not very well 5) The "subprocess.call('fakeroot cp xxxx'" should be removed 6) And others ... So that we have to refactor it, the benefits are: 1) Fix the problems and make it work well. 2) Reduce more than 300 lines 3) Make it easy to use. Hre are the explanation about the bbclass: This bbclass is used for creating archive for: 1) original (or unpacked) source: ARCHIVER_MODE[src] = "original" 2) patched source: ARCHIVER_MODE[src] = "patched" (default) 3) configured source: ARCHIVER_MODE[src] = "configured" 4) The patches between do_unpack and do_patch: ARCHIVER_MODE[diff] = "1" And you can set the one that you'd like to exclude from the diff: ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches" 5) The environment data, similar to 'bitbake -e recipe': ARCHIVER_MODE[dumpdata] = "1" 6) The recipe (.bb and .inc): ARCHIVER_MODE[recipe] = "1" All of the above can be packed into a .src.rpm package: (when PACKAGES != "") ARCHIVER_MODE[srpm] = "1" [YOCTO #4986] [YOCTO #5113] (From OE-Core rev: e5b20199ddddfa2146dc112c0a81f3fd292258e5) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>