| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a bug in patch 2.7.3 and earlier where index lines
in patches can change file modes when they shouldn't:
http://git.savannah.gnu.org/cgit/patch.git/patch/?id=82b800c9552a088a241457948219d25ce0a407a4
This leaks into debug sources in particular (e.g. tcp-wrappers where
source files are read-only). Add the dependency to target recipes
to avoid this problem until we can rely on 2.7.4 or later.
We could try and remove all index lines from patch files but it will be a
losing battle. We could try and identify all the recipes which change
modes on files in patches but again, its a losing battle.
Instead, compromise and have patch-native as a dependency
for target recipes. We use patch-replacement-native since patch-native
is in ASSUME_PROVIDED.
Also add nativesdk-patch to buildtools-tarball.
[YOCTO #13777]
(From OE-Core rev: 5ed0840c93804488cd1c1aba6cb382b2434714a5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some patch files create entirely new files, so their permissions are subject to
the host umask. If such a file is later installed into a package with no change
in permissions, it breaks the reproducibility of the package.
This was observed on libpam, for instance: The patch file
pam-security-abstract-securetty-handling.patch creates a new file
(tty_secure.c). This file is later copied into the -dbg package with no change
in permissions.
(From OE-Core rev: 2a2bbd755b330cd63f7f6e2f2b374a3ae065b37a)
Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With PATCHTOOL=git patches the changes in the patch_task_postfunc
of the classes/patch. This works OK when the S dir is a Git repo
but doesn't if the source is a tarball.
The while condition in the patch_task_patch_prefunc must be
jailed into the WORKDIR. In the opposite, when you are executing
the recipe out of a Git subtree the function simply fails but when
your recipes are into a Git repo the patch_task_postfunc execute a
commit over your BSP local Git repo adding the changes in an
arbitrary Git repo found in the path from the SOURCE directory to
the '/'. This situation is highly probable in cases like ~home
directories under the control of a .git repo or Yocto BSP which
manage the meta layers as git submodules.
This patch fix the changes introduced in
classes/patch: when PATCHTOOL = "git" double-check the repository
commit: 86ab56b55164393924b5e688b20e8f3f3f8fc578
Author: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Tue Dec 5 14:36:58 2017 +1300
classes/patch: when PATCHTOOL = "git" double-check the repository
If a bug is present or the user has set PATCHTOOL = "git" on a source
tree that isn't git, if we try to perform git operations (such as
committing or changing branches) when extracting source, then we might
in fact be running those operations on the metadata repository if the
build directory is underneath, say, poky or OE-Core, and that could
make a mess. Check if the source tree is a git repository and refuse
to continue if it isn't.
(From OE-Core rev: db6ce9d8838b1f9064604654ab579da3e237f361)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a bug is present or the user has set PATCHTOOL = "git" on a source
tree that isn't git, if we try to perform git operations (such as
committing or changing branches) when extracting source, then we might
in fact be running those operations on the metadata repository if the
build directory is underneath, say, poky or OE-Core, and that could
make a mess. Check if the source tree is a git repository and refuse
to continue if it isn't.
(From OE-Core rev: 59ae5b7cbfeedb216a57c3f77fe52527b6c918cc)
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>
|
|
|
|
|
|
|
|
| |
(From OE-Core rev: 5bc987fb1818ffb9748645bd6e0d80cf5914bad0)
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>
|
|
|
|
|
|
|
|
|
|
|
| |
A generic version of the code to work out the tasks between two
tasks (based on the code here) has been added to bb.build, so use that
instead.
(From OE-Core rev: 1226e2eb2678407c315befd5700e653602e616a0)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move patch_path(), src_patches() and should_apply() to oe.patch, making
them easier to call from elsewhere (particularly across the
UI/server boundary).
(From OE-Core rev: 2724511e18810cc8082c1b028e3b7c8a8b5def56)
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If PATCHTOOL is "git", and PATCH_COMMIT_FUNCTIONS is set to "1", for
additional tasks between do_unpack and do_patch, make a git commit. This
logic was previously implemented in devtool itself, but it makes more
sense for it to be implemented in the patch class since that's where the
rest of the logic is for this (or in lib/oe/patch.py). It also makes
it possible for this to work with tinfoil2.
(From OE-Core rev: f24f59ea1d8bc335ea8576f6a346d0935f4a3548)
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible to use gzip or bzip2 to compress patches and still refer
to them in compressed form in the SRC_URI value within a recipe. If you
run "devtool modify" on such a recipe, make changes to the commit for
the patch and then run devtool update-recipe, we need to correctly
associate the commit back to the compressed patch file and re-compress
the patch, neither of which we were doing previously.
Additionally, add an oe-selftest test to ensure this doesn't regress in
future.
Fixes [YOCTO #8278].
(From OE-Core rev: e47d21624dfec6f71742b837e91da553f18a28c5)
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using PATCHTOOL = "git", the user of the system is not really the
committer - it's the build system itself. Thus, specify "dummy" values
for username and email instead of using the user's configured values.
Various parts of the devtool code that need to make commits have also
been updated to use the same logic.
This allows PATCHTOOL = "git" and devtool to be used on systems where
git user.name / user.email has not been set (on versions of git where
it doesn't default a value under this circumstance).
If you want to return to the old behaviour where the externally
configured user name / email are used, set the following in your
local.conf:
PATCH_GIT_USER_NAME = ""
PATCH_GIT_USER_EMAIL = ""
Fixes [YOCTO #8703].
(From OE-Core rev: 765a9017eaf77ea3204fb10afb8181629680bd82)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A path variable is assigned the value of PATH from the
environment, before the PATH is set on the environemnt
from the value of PATH in the bb datastore. This seems
to be an unnecessary leftover.
[YOCTO #8543]
(From OE-Core rev: a3c7c5148017c652661f2c5f79d90aa80dcb479b)
Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU Patch < 2.6.1 has a race condition so we create a per-instance TMPDIR to
avoid this. This was implemented by setting os.environ[TMPDIR] but at the end
of do_patch the temporary directory is deleted but TMPDIR is not unset.
In general this doesn't cause a problem but if do_patch is embedded in a larger
function then TMPDIR is set to a directory that doesn't exist. Avoid this by
removing TMPDIR from os.environ when the directory is deleted.
(From OE-Core rev: 51ea4378864f1468df2ca282a84f78a17d6861aa)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.
(From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use mkdtemp for generating temp dir names
- Use bb.utils.remove for removing temp dirs
- Add comment for explaining the "patch" workaround
[YOCTO #3070]
(From OE-Core rev: fbe9fc4d5ece1e66b03b4c4bce9b7ffad3b5b138)
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We must use one TMPDIR per process (/tmp/${PID}) so that the patching
processes don't generate the same temp file name (the "patch" program
uses the TMPDIR environment variable for deciding where to create the
temp files).
[YOCTO #3070]
(From OE-Core rev: 16dbf505c4fdd9fe1820d950ab05c8ea99ad7505)
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
| |
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
patch.bbclass orignally pointed at /usr/bin/quiltrc for an empty
version to ensure that no user setting were picked up, change this
to /etc/quiltrc in the Native sysroot since we now have a native
sysconfdir.
Make sure that the quiltrc is actually installed in the Native
sysconfdir, not the target, so fix this after the recipe split.
(From OE-Core rev: 1af73900cea82e63fb0f94e6f057144f723146ec)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit:
patch.bbclass: abstract out logic that determines patches to apply
gives the ability for other clases to emit series files for use outside
of a build system, or even within the build system. There are sometimes
elements on the SRC_URI that while not directly applicable to patching,
can be related to patching the package. For example, the yocto kernel
class would like to know about these other source items on the SRC_URI
to locate out of tree kernel features.
This change keeps the default behaviour of returning patches, but adds the
ability to request that non-patch results be returned. Additional filtering
within the non-patch category, is left up to the caller of the routine.
(From OE-Core rev: 41e92923a0b2fe047ecaa9f9ffb564d6069f784f)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to see a Python stack backtrace when a patch does not
apply, just the error output from patch, so trap these kinds of errors
and ensure that we display the message and fail the task and nothing
else.
Fixes [YOCTO #1143]
(From OE-Core rev: ce6c80a1e68c2af0b4b5fa27582ad9c9f119e5c1)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
correct function
People have noticed that sstate is now getting invalidated very readily. The
issue is that the code using these variables was factored into a new function
but the variable exclusion was not. This patch moves the variable exclusion
to the correct place allowing the sstate checksums to work correctly.
(From OE-Core rev: bd047935305c872b565f30b46c94b7077e5fb3a2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed by the copyleft_compliance class, so it can emit series files
for the patches, which greatly increases their usefulness to a user trying to
reconstruct the sources outside of OE.
(From OE-Core rev: 290c7239c21e477bb78b88d92a5b8a7de9142310)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
The method of resolving the patch should not effect the sstate-cache
signature.
(From OE-Core rev: b64cbe0b511de8d8943ce34cbb4901239d9f0cb0)
Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately we can't access oe_terminal directly from patch.py
so we have to pass in the correct terminal function pointer.
[YOCTO #1587]
(From OE-Core rev: 9e0a21dda24f285a1c4878488e887485a749f3f2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is taken from openembedded.master:
commit 9d0d70da60ca8ef278916f442125d41161846f38
Author: Chris Larson <chris_larson@mentor.com>
Date: Mon Aug 23 13:03:55 2010 -0400
patch: allow importing patches into other dirs
Use the 'patchdir' flag. If relative, it's assumed to be relative to ${S}.
It creates a patchset class per patch directory, so for quilt this results i
multiple .pc/patches directories to manage each of the patchsets.
(From OE-Core rev: 01e4609ee8441c8212725fd062782313caae0708)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
| |
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
| |
the variable
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Chris made some interesting changes to the patch handling in OE. Firstly the
patch and pnum parameters have been renamed, to better reflect their function,
to apply and striplevel. The apply parameter now takes either yes or no as its
value.
Therefore a patch line would be changed from:
file://some.patch;patch=1;pnum=2
to:
file://some.patch;apply=yes;striplevel=2
Secondly the apply parameter is inferred if not defined. Entries in SRC_URI
with diff or patch filename extensions will be automatically applied as patches
if the apply parameter is not set to no (or an unknown value).
Note: We have disabled the warnings when using the old style parameters for now
Signed-off-by: Joshua Lock <josh@linux.intel.com>
|
|
|
|
|
|
|
| |
Adapt modifications from upstream to make Poky classes use lib/oe for the
common Python functionality.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
populate_staging task to populate_sysroot
This change makes the purpose of the staging directory more obvious and
the taskname more true to what it now actually does.
The layout version number is increased due to the change in layout
but code to convert existing directories and insert a symlink for
backwards compatibility is included.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
| |
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
|
|
| |
exceptions rather than print horrid backtraces
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
| |
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
| |
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
|
|
| |
srcrev
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4489 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2350 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1711 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
|
|
| |
correct operation
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1509 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1427 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1122 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
|
|
| |
modify the patches at all, add note about pressing ctrl+d to exit the resolver shell.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@822 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@713 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
| |
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@691 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
|
|
| |
does no actual patch resolution, simply passing the failure on up. Set PATCHRESOLVE='noop' to make use of it. Also pulls in the workaround for quilt's upward searching for a 'patches' dir from upstream oe.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@680 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
|
|
| |
apply patches to quilt-native itself.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@670 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
|
|
| |
broke when localpath() included variable references.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@662 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
|
|
|
|
| |
changing the semantics of the PatchError exception.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@627 311d38ba-8fff-0310-9ca6-ca027cbcb966
|