<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/oe/patch.py, branch uninative-2.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2018-03-20T09:59:32+00:00</updated>
<entry>
<title>patch.py: Use git format-patch with --no-signature --no-numbered params</title>
<updated>2018-03-20T09:59:32+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2018-03-15T22:50:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=00b23ae2aa1f157280ae77a14c2ca90f9b6f6d18'/>
<id>urn:sha1:00b23ae2aa1f157280ae77a14c2ca90f9b6f6d18</id>
<content type='text'>
* --no-signature saves unnecessary .patch modifications when executed on
  host with different git version
* --no-numbered saves unnecessary .patch modifications when number of the
  applied patches is changed (the number is still in the filename so the
  order how they should be applied is still preserved)
* both options exist for very long time, I've tested them with git 1.9.1
  from Ubuntu 14.04 and I'm quite sure they were available even in much
  older releases, so there shouldn't be any issue on relatively new sanity
  tested distros

(From OE-Core rev: ad76fa92c3a5be38962aff09df070ffd9756f777)

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/oe/patch.py: add a warning if patch context was ignored</title>
<updated>2018-03-15T13:27:18+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alexander.kanavin@linux.intel.com</email>
</author>
<published>2018-03-12T16:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57'/>
<id>urn:sha1:cc97bc08125b63821ce3f616771830f77c456f57</id>
<content type='text'>
Ignoring patch context increases the chances of patches being
applied incorrectly. Depending on what code is being patched, this can go
completely unnoticed and create subtle bugs, sometimes with security implications.

Please see here for a specific example:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450

On the other hand, we cannot simply force all patch context to match exactly:
doing this would break a lot of recipes suddenly, across all layers.

So let's try a softer approach: issue a warning, and gently update
patches over a longer span of time. When most of the warnings are eliminated,
we can start enforcing a strict patch application policy.

I do understand that this patch creates a lot of warnings all of a sudden, however
I believe the problem does need to be addressed. All of oe-core recipes have their
context already fixed.

Sample warning:

WARNING: vulkan-1.0.61.1-r0 do_patch:
Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
The context lines in the patches can be updated with devtool:

    devtool modify &lt;recipe&gt;
    devtool finish --force-patch-refresh &lt;recipe&gt; &lt;layer_path&gt;

Then the updated patches and the source tree (in devtool's workspace)
should be reviewed to make sure the patches apply in the correct place
and don't introduce duplicate lines (which can, and does happen
when some of the context is ignored).
Details:
Applying patch demos-Don-t-build-tri-or-cube.patch
patching file demos/CMakeLists.txt
Hunk #1 succeeded at 63 (offset 2 lines).
Hunk #2 succeeded at 76 with fuzz 1 (offset 2 lines).

[YOCTO #10450]

(From OE-Core rev: 5133fd46bccf14e21680f8d94e952914edccb113)

Signed-off-by: Alexander Kanavin &lt;alexander.kanavin@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta/lib/oe/patch.py: do not leave .orig files if a patch isn't perfectly matching</title>
<updated>2018-03-11T13:26:59+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alexander.kanavin@linux.intel.com</email>
</author>
<published>2018-03-09T12:27:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7dce685fe41c1474ec0ef5f1bd69926c29d30464'/>
<id>urn:sha1:7dce685fe41c1474ec0ef5f1bd69926c29d30464</id>
<content type='text'>
Particularly, this was causing 'devtool modify' to erroneously add those
.orig files into commits. This was getting in the way, if the goal
was to amend/update those existing patches.

(From OE-Core rev: f4f3406c3bd9599d7a19275475d52bda4c42f2ab)

Signed-off-by: Alexander Kanavin &lt;alexander.kanavin@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/oe/patch: add missing import</title>
<updated>2018-01-02T17:24:39+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2017-12-22T08:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=52ec7ff5df419beb524f2cf364422781ac472da8'/>
<id>urn:sha1:52ec7ff5df419beb524f2cf364422781ac472da8</id>
<content type='text'>
This module refers to oe.types, so it needs to actually import oe.types.
Fixes errors when parsing certain OE-Core recipes within the layer
index update script.

(From OE-Core rev: 26ff9d2835a24a84c7f2bf9c829a13ed568c9ea0)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta: replace uses of bb.data.expand(VARNAME, d) with d.expand(VARNAME)</title>
<updated>2017-03-22T11:35:19+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2017-03-17T15:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cc2744267f6c6daa594b8c4381d56ac27fe70b81'/>
<id>urn:sha1:cc2744267f6c6daa594b8c4381d56ac27fe70b81</id>
<content type='text'>
bb.data.expand(x, d) is deprecated API.

[YOCTO #10678]

(From OE-Core rev: a361babe443da635aed83be46679067457fd6a58)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/oe/patch: Support xz-compressed patches</title>
<updated>2017-02-23T20:49:48+00:00</updated>
<author>
<name>Dominic Sacré</name>
<email>dominic.sacre@gmx.de</email>
</author>
<published>2017-02-15T10:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=73e811190b6c7fab03ee1cc242036efaca912478'/>
<id>urn:sha1:73e811190b6c7fab03ee1cc242036efaca912478</id>
<content type='text'>
Add .xz to the list of extensions recognized by patch_path(), so that
compressed patches ending in .patch.xz or .diff.xz are automatically
applied.

(From OE-Core rev: f1a2c45765d14d3ca09657ad1f6b526554af2bb6)

(From OE-Core rev: f50fd7f247d5bb05bc7d1109c574a682067688da)

Signed-off-by: Dominic Sacré &lt;dominic.sacre@gmx.de&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta: remove True option to getVar calls</title>
<updated>2016-12-16T10:23:23+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-12-14T21:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c4e2c59088765d1f1de7ec57cde91980f887c2ff'/>
<id>urn:sha1:c4e2c59088765d1f1de7ec57cde91980f887c2ff</id>
<content type='text'>
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 &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/patch: move several functions to oe.patch</title>
<updated>2016-12-14T12:30:50+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-12-13T07:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=275b3fe5f47c5dabb5bd16e916bf6ad9118bee79'/>
<id>urn:sha1:275b3fe5f47c5dabb5bd16e916bf6ad9118bee79</id>
<content type='text'>
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 &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/oe/patch: fix handling of patches with no header</title>
<updated>2016-11-23T11:10:12+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-11-10T01:45:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d316363b7ba57cbf5300c6cd3b4cc68fb3258d6f'/>
<id>urn:sha1:d316363b7ba57cbf5300c6cd3b4cc68fb3258d6f</id>
<content type='text'>
If a patch applied by a recipe has no header and we turn the recipe's
source into a git tree (when PATCHTOOL = "git" or when using devtool
extract / modify / upgrade), the commit message ends up consisting only
of the original filename marker ("%% original patch: filename.patch").
When we come to do turn the commits back into a set of patches in
extractPatches(), this first line ends up in the "Subject: " part of
the file, but we were ignoring it because the line didn't start with the
marker text. The end result was we weren't able to get the original
patch name. Strip off any "Subject [PATCH x/y]" part before looking for
the marker text to fix.

This caused "devtool modify openssl" followed by "devtool update-recipe
openssl" (without any changes in-between) to remove version-script.patch
because that patch has no header and we weren't able to determine the
original filename.

(From OE-Core rev: d9971f5dc8eb7de551fd6f5e058fd24770ef5d78)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/oe/patch: improve accuracy of patch header extraction</title>
<updated>2016-09-24T06:30:09+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-09-23T09:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7caf628e83c32723c8c1598b88e71df45b651221'/>
<id>urn:sha1:7caf628e83c32723c8c1598b88e71df45b651221</id>
<content type='text'>
When PATCHTOOL = "git", if we need to manually apply a patch and then
commit it (i.e. when git am doesn't work) we try to extract the author /
date / shortlog from the patch header. Make the following improvements
to that extraction process:

* If there's no explicit Subject: but the first line is followed by a
  blank line, isn't an Upstream-Status: or Index: marker and isn't too
  long, then assume it's good enough to be the shortlog. This avoids
  having too many patches with "Upgrade to version x.y" as the shortlog
  (since that is often when patches get added).
* Add --follow to the command we use to find the commit that added the
  patch, so we mostly get the commit that added the patch rather than
  getting stuck on upgrade commits that last moved/renamed the patch
* Populate the date from the commit that added the patch if we were able
  to get the author but not the date from the patch (otherwise you get
  today's date which is less useful).

(From OE-Core rev: 896cfb10ec166a677cbb3b4f8643719cabeb7663)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
