aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-11-09devtool: implement conditional patch handlingpaule/devtool31-oePaul Eggleton
If you have a recipe that uses overrides to conditionally extend SRC_URI to add additional patches, then you will often need to update those patches if you're making other changes to the source tree (for example if you're upgrading the underlying source). Make this possible with devtool by creating devtool-override-* branches for each override that conditionally appends/prepends SRC_URI, and have devtool update-recipe / finish check each branch out in turn and update the corresponding patches. A current example of a recipe that does this is the quota recipe - it applies an additional patch if musl is the selected C library (i.e. libc-musl is in OVERRIDES). Note that use of this functionality does require some care - in particular, updates to patches that appear on the main branch (named "devtool" by default) should be made there and not only on one of the specific devtool-override-* branches that are created for each override. The recommended procedure is to make the changes you want to make to the main branch first, then check out and rebase each devtool-override-* branch, testing each one by activating the corresponding configuration, and then finally run devtool finish. Fixes [YOCTO #11516]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: finish: add dry-run optionPaul Eggleton
If you're not sure what changes devtool finish is going to make, or you're not sure you're finished with your modifications, it is useful to be able to see what devtool finish is going to do beforehand, so add a -N/--dry-run option to make that possible. (It's also very useful for debugging devtool finish itself.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: finish: improve reporting for removed filesPaul Eggleton
If a file is going to be effectively removed from the destination by devtool finish, we should report that rather than just reporting that we're removing files from the workspace. This is a little tricky because the way we actually operate when finishing is to: (1) remove all original files (as recorded by devtool upgrade, if that was used) (2) as part of updating the recipe file, remove the files from next to the new recipe (i.e. in the workspace for an upgrade, real recipe otherwise) corresponding to commits not in the git tree (3) copy over remaining files from the workspace to the destination To report the files removed with respect to what was originally there, we need to swap steps 1 and 2 so we can see what no longer exists after the deletion, and suppress the reporting currently done in step 2 - however, we still want to report removal in step 2 for the non-upgrade case, so the latter is conditional. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: show a better error message if meta-files aren't foundPaul Eggleton
If the files that the devtool-source class is supposed to create in the source tree aren't found in the temporary directory then we know that the class hasn't worked properly - say that explicitly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: reformat --no-patch warning messagePaul Eggleton
* Only log one warning message instead of one per line * Be a bit more verbose * "if list" is more pythonic than "if len(list)" Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: automatically handle changes to source subdirectoryPaul Eggleton
If the directory where the source code extracts to changes (for example, when upgrading iucode-tool from 1.5 to 2.1.1, the subdirectory in the tarball changed from "iucode_tool-${PV}" to "iucode-tool-${PV}") then handle this automatically. Also handle when it changes to match the default S value (i.e. "${WORKDIR}/${BP}") in which case we just drop setting S in the recipe. Fixes [YOCTO #10939]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: show messages before source extraction stepsPaul Eggleton
Give the user a little more insight into what's being done. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09recipetool: create: show a warning for github archive URLsPaul Eggleton
github archive URLs are not guaranteed to be stable [1] and thus we should show a warning if a user specifies one to recipetool create (or devtool add). [1] http://lists.openembedded.org/pipermail/openembedded-core/2017-September/142519.html Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: stop always moving workspace to end of BBLAYERSPaul Eggleton
I noticed that using bitbake-layers add-layer followed by a devtool command resulted in bitbake re-parsing all of the recipes, which is annoying. Upon closer inspection I could see that devtool was moving the workspace layer path to the end of BBLAYERS if it happened to be somewhere in the middle - there's no need for it to be doing this. This occurred because we were passing the current workspace path to remove and the "new" path to add even if the path is not being changed, and I think earlier versions of bb.utils.edit_bblayers_conf() didn't move the existing entry under these circumstances as it clearly does now. Fix it so we only pass the path to be removed if we're actually changing the path. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09recipetool: create: drop debug printPaul Eggleton
This looks like some debug printing that was left in by accident. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: handle recipes that use named SRC_URI checksumsPaul Eggleton
devtool upgrade did not properly handle setting SRC_URI checksums for recipes that use named SRC_URI entries and also use those names in the SRC_URI checksums. A further complication was where the name contained an expression that changed with the version e.g. ${PV} (probably quite rare, but the dnsmasq recipe in meta-networking is currently one such recipe.) All of these are now handled properly. Additionally, drop the _get_checksums() function that wasn't being called from anywhere in the code. Note that this now turns nowrap_vars in recipeutils.py to be a list of regexes, hence things such as [ and ] need to be appropriately escaped. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: finish: fix "layer not in bblayers.conf" warning when path specifiedPaul Eggleton
devtool finish will check if the destination layer is part of bblayers.conf so that we avoid the user getting confused about the recipe vanishing from their configuration if it isn't. devtool finish also accepts a path underneath a layer so that you have a bit more control over where it ends up. However if you used a path underneath a layer then it wasn't converting this to the base of the layer before checking it against BBLAYERS, thus the warning was being shown erroneously in that case. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: finish: ensure repository is clean before proceedingPaul Eggleton
If the git repository for a recipe in the workspace has uncommitted changes in it then it's possible that the user has forgotten to commit something, so check and exit if there are any. Provide a -f/--force option to continue in the case where the uncommitted changes aren't needed. Separately, if the repository is in the middle of a rebase or git am / apply then error out (without the opportunity to force) since the user really needs to sort this out before finishing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: reset: print source tree base pathPaul Eggleton
If S points to a subdirectory of the source rather than the "base" of the source tree then print that rather than the subdirectory path when telling the user they need to remove the source tree, since that is the directory that they will need to remove. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: make find-recipe and edit-recipe always work with any recipePaul Eggleton
After some reconsideration I think it's a bit annoying for users to be forced to use an option to work with recipes where the file isn't in the workspace, so let's just have these commands check the workspace first for the recipe, and if it isn't there then load the cache and get it that way. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: show some warnings for upgrade versionsPaul Eggleton
* Show a warning in devtool upgrade if the version is less than the current version suggesting that the user may need to bump PE in the recipe * Show a warning in devtool add and devtool upgrade if the version looks like a pre-release version suggesting using a version number that won't mess up the progression when you come to upgrade to the final release version. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: fix handling of oe-local-files when source is in a subdirectoryPaul Eggleton
If S points to a subdirectory of the source rather than the "base" of the source tree then we weren't handling the oe-local-files directory properly - it got extracted to the base of the tree but devtool update-recipe and devtool finish assumed it would be under S which would be the subdirectory, thus it would be missing and devtool would assume the files had been deleted and remove them from the recipe. Record the base of the source tree in the bbappend and read it into the in-memory workspace so we can use that to find out where oe-local-files should be found. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: improve performance and show progress when adding filesPaul Eggleton
When devtool upgrade is upgrading to a new version where the source is fetched as an archive (e.g. a tarball), we create a single commit in the git repository that is the upgrade from the old version to the new. We do this by extracting the old source, committing it, deleting all files, copying in the new files, running git add on each new/changed/deleted file, and then committing the result. When a lot of files have changed in an upgrade (such as QEMU 2.8.1.1 -> 2.10.0) the penultimate step of running git add it can take quite a long time; in order to reduce this and show some feedback to the user, run git add with batches of 100 files at once and also show a progress bar. In a local test with the aforementioned QEMU upgrade it took the time down from over 7 minutes down to about 13 seconds. Fixes [YOCTO #11948]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: fix not committing deleted files with older git versionsPaul Eggleton
With versions of git older than 2.0, "git add" on a deleted file (i.e. in this case a file that was removed between versions) will not add the delete to be committed by default, with the result that the rebase of patches on top of the new branch will fail. We need to use the -A option in order to force that for older git versions. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09devtool: upgrade: fix accidentally swapped parametersPaul Eggleton
It appears that when fixing the signature unlocking in OE-Core commit 4e9a0be32fc30fb87d65da7cd1a4015c99533aff I swapped the parameters here and did not test it within the eSDK (it does nothing outside of the eSDK) resulting in a TypeError when devtool upgrade was used in the eSDK. Swap the parameters around to the correct ordering. Fixes [YOCTO #12285]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09lib/oe/recipeutils: fix line splitting in patch_recipe_*Paul Eggleton
If a value was split over multiple lines (e.g. as SRC_URI usually is) then we were inserting the value as one item in the lines list with newlines between each line. There's nothing wrong with this if you're writing the list out to a file, but if you want to generate a patch (as patch_recipe_file() will do if the patch parameter is set to True) then the diff output looks a bit odd. Split the value before adding it to the lines list to resolve this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09lib/oe/recipeutils: fix find_layerdir() to return absolute pathsPaul Eggleton
find_layerdir() should really return absolute paths, so make it do so. This fixes devtool finish not deleting files it should do after devtool upgrade if the specified path is relative, since the devtool finish code was assuming that find_layerdir() was returning an absolute path. Fixes [YOCTO #12318]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09recipetool: ignore incidental kernel module sourcePaul Eggleton
If the source tree happens to contain a kernel module as an example, a test or under a "contrib" directory then we shouldn't be picking it up and making the determination that the entire thing is a kernel module. An example that triggered this is zstd, which ships a kernel module under contrib/linux-kernel: https://github.com/facebook/zstd Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-09recipetool: pass absolute source tree path to pluginsPaul Eggleton
We shouldn't be passing a relative path to the plugins if that's what's been specified on the recipetool command line. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-08gcc: fix miscompilation on mips64Chen Qi
We've observed strange behaviour of `systemctl status <xxx> on qemumips64. The output of the command is like `systemctl show <xxx>', which is incorrect. This patch is from gcc bugzilla's attachment. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803 The patch hasn't been merged into gcc. But it does solve the above problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08systemd: Fix build on muslKhem Raj
Add needed patches for portability across glibc/musl enable systemd on musl too Disable utmp,ldconfig,nss,resolved,localed for musl which is not supported on musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08e2fsprogs-ptest: improve reproducibilityJuro Bystricky
Remove several Makefiles containing build host references. While at it, also remove some additional files not needed for testing. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08oe-build-perf-report-email.py: add images as MIME objectsMarkus Lehtonen
Add images as separate MIME objects instead of directly embedding images in the html (as base64 encoded pngs). This makes the emails better suited for certain email servers/clients. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08gobject-introspection: improve reproducibilityJuro Bystricky
Remove cross-compiler wrappers from the package, these contain numerous build host references. The wrappers are only needed for cross-compiling. [YOCTO #11705] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08wayland-protocols: upgrade to 1.11Denys Dmytriyenko
usesysrootprefixforpkgdatadirvariable.patch was a backport from 1.11, no longer needed. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08qemu: upgrade to 2.10.1Leonardo Sandoval
All CVE patches removed because these are already integrated in 2.10.1. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08wic: Update canned-wks for systemd to use UUID everywhereTom Rini
With systemd, the mounting of the swap partition is handled via systemd and will mount it, regardless of if PARTUUID is parsed or not. systemd has a runtime dependency on util-linux-mount so PARTUUID for regular mount points will be handled correctly. Make all partitions that we add to the image make use of UUIDs for maximum portability. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08wic: When using --use-uuid make sure that we update the fstab with PARTUUIDTom Rini
When we have been told to use the UUID we should also update the fstab to make use of PARTUUID instead of hard-coding the device in question. This will make the resulting image much more portable. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08systemctl-native: add target.wants to target regexMartin Kelly
The regex for acceptable systemd WantedBy/RequiredBy targets does not include target.wants, so a line like this: WantedBy=multi-user.target.wants gets silently ignored, even though it works fine on a real system. Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08dpkg: use snapshot.debian.orgRoss Burton
2017-11-08expat: upgrade to 2.2.5Dengke Du
Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08wget: Upgrade 1.19.1 -> 1.19.2Zhixiong Chi
Among other things, fix CVE-2017-13089 CVE-2017-13090 CVE-2017-6508 External References: https://nvd.nist.gov/vuln/detail/CVE-2017-13089 https://nvd.nist.gov/vuln/detail/CVE-2017-13090 https://nvd.nist.gov/vuln/detail/CVE-2017-6508 Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08scripts/contrib/bbvars.py: Rewrite to use tinfoilAmanda Brindle
Use tinfoil to collect all variable names globally and in each recipe. No longer show the count of variables if they are undocumented. Fixes [YOCTO #2086] Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08curl_7.54.1.bb: improve reproducibilityJuro Bystricky
Improve reproducible build of curl-dev and curl-dbg packages. curl-dev: Correctly remove build host references from curl-config curl-dbg: Do not generate time stamps in files generated by mkhelp.pl Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08systemd: remove useless options for mips4Chen Qi
Looking back the history, we had problem with systemd on qemumips64 which is also related to compilation flags. We solved that by using tweaking FULL_OPTIMIZATION for mips64 to have "-fno-tree-switch-conversion -fno-tree-tail-merge". Now systemd has been upgraded to 234, and we don't have the above problem any more, thus removing these flags. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08musl: Update to latestKhem Raj
* fix use of memset without declaration in sched.h cpu set macros * powerpc{64}: fix MAP_NORESERVE and MAP_LOCKED in mman.h Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08rpm: remove --sysroot from macros on targetJoe Slater
We do not want to specify --sysroot when defining __cc used on a target. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08libsolv: fix a kernel-devsrc installation issueMing Liu
We encountered a problem when installing kernel-devsrc package on a intel-x86 target, as follows: $ dnf install kernel-devsrc | Installing : kernel-devsrc-1.0-r0.0.intel_corei7_64 1/1 | failed loading RPMDB | The downloaded packages were saved in cache until the next successful transaction. | You can remove cached packages by executing 'dnf clean packages'. It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE in libsolv per test. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08expect: Fix segfaults when Expect clib is used directly from C programLi Zhou
Fix segfaults if Tcl is built with stubs and Expect clib function is used directly from C program. Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08bind: move libraries to own packageandreas.kling@peiker-cee.de
Signed-off-by: Andy Kling <andreas.kling@peiker-cee.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08grub_2.02.bb: improve reproducibilityJuro Bystricky
Remove several build host references from modinfo.sh files. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08ffmpeg: upgrade to 3.3.4Chen Qi
Upgrade ffmpeg to version 3.3.4. Version 3.3.4 is a bug fix version, and there's no new feature added. Compared to version 3.3.3, there are 57 new commits. These 57 commits are either bug fix or small tweaks. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08python: add PACKAGECONFIG for Berkeley DB moduleRoss Burton
The bsddb module is deprecated and requires an old version of Berkeley DB that some may be unhappy with even shipping, so expose a way to disable the module. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08db: change types to avoid headers changing between architecturesRoss Burton
Triggered by looking at why Python doesn't find db.h (because it greps db.h for a regex, and db.h is actually a oe_multilib_header wrapper) I realised that the only reason we have to oe_multilib_header db.h is because one typedef is different between 32-bit and 64-bit architectures. However, the typedef is for a 64-bit integer so instead of using long (64-bit) or long long (32-bit), just use int64_t. Some of the overly complicated configure tests need to be deleted after this change but that is safe as we're building in a controlled environment and can assume int64_t exists. With this done the header doesn't change between architectures, and it doesn't need to be wrapped by oe_multilib_header. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08libxml2: 2.9.5 -> 2.9.7Andrej Valek
Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Ross Burton <ross.burton@intel.com>