<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/externalsrc.bbclass, branch master-uninative</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=master-uninative</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=master-uninative'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-10-16T16:41:59+00:00</updated>
<entry>
<title>reproducible: Merge code into base.bbclass</title>
<updated>2021-10-16T16:41:59+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-10-14T11:34:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4b424bdfdbbe16b6e41f6cd1de75a51e3799cf94'/>
<id>urn:sha1:4b424bdfdbbe16b6e41f6cd1de75a51e3799cf94</id>
<content type='text'>
Reproducibility is here to stay and needs to be part of our default workflow.
Move the remaining code to base.bbclass so it is always a first class citizen
and it is clear people need to be mindful of it.

(From OE-Core rev: abb0671d2cebfd7e8df94796404bbe9c7f961058)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Fix a source date epoch race in reproducible builds</title>
<updated>2021-10-04T14:03:53+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-09-21T10:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0b4198eeac06d40861256496169a2e6bb275916c'/>
<id>urn:sha1:0b4198eeac06d40861256496169a2e6bb275916c</id>
<content type='text'>
When reproducible builds are enabled and externalsrc is in use, the
source date epoch function is added. The conditions on the conditional
code removing the unpack task need to match the deltask function, else
the source date epoch function can end up running twice and the functions
can race with each other causing build failures or corruption.

(From OE-Core rev: e82095c02881410035ca23dc12692f074d8ed39b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Work with reproducible_build</title>
<updated>2021-09-11T21:39:19+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@xilinx.com</email>
</author>
<published>2021-09-10T02:22:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=74d7d84dcb06aedd040ac77fcb577259419f2a2a'/>
<id>urn:sha1:74d7d84dcb06aedd040ac77fcb577259419f2a2a</id>
<content type='text'>
Externalsrc removes do_fetch, do_unpack, and do_patch.  The system normally
discovers the correct reproducible date as a postfuncs of do_unpack, so this
date is never found, so it falls back to the default epoch.

Instead we can move the discovery function to a prefuncs on the epoch
deploy task.  This task will run before do_configure, and since the source
is already available can run safely at anytime.

(From OE-Core rev: 0b7dd711a54e92ce54abe99f59fc67e683d52dfe)

Signed-off-by: Mark Hatle &lt;mark.hatle@xilinx.com&gt;
Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Convert to new override syntax</title>
<updated>2021-08-02T14:44:10+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-07-28T22:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bb6ddc3691ab04162ec5fd69a2d5e7876713fd15'/>
<id>urn:sha1:bb6ddc3691ab04162ec5fd69a2d5e7876713fd15</id>
<content type='text'>
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py &lt;oe-core directory&gt;

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Detect code changes in submodules</title>
<updated>2021-04-18T10:37:25+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2021-04-08T01:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a7c950d7b5afd53eea8eb7e9f1b2ce3723213712'/>
<id>urn:sha1:a7c950d7b5afd53eea8eb7e9f1b2ce3723213712</id>
<content type='text'>
Further to 50ff9afb39, only detect code changes in submodules that are
subdirectories of the EXTERNALSRC directory.

The (undocumented) git submodule--helper returns a path
for each submodule relative to the top of the repo.
Don't add submodules that are not within our source subtree.

[YOCTO #14333]

(From OE-Core rev: 1c18225d3ef94a41fc073ae87c163b68e6d46571)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "externalsrc: Detect code changes in submodules"</title>
<updated>2021-04-18T10:37:25+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2021-04-08T01:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=52c1cb2a9d02981db1dddce799c0b542fe9f44ac'/>
<id>urn:sha1:52c1cb2a9d02981db1dddce799c0b542fe9f44ac</id>
<content type='text'>
This reverts commit 4525310d49d115a37705f04ac5c03d639e5e8f8c.

Further to 50ff9afb39, only detect code changes in submodules that are
subdirectories of the EXTERNALSRC directory.

The (undocumented) git submodule--helper returns a path
for each submodule relative to the top of the repo.
Don't add submodules that are not within our EXTERNALSRC subtree.

If we unpack one git repo inside another, like this:

    SRC_URI = "git://${GIT_SERVER}/repo1;name=repo1;destsuffix=repo1 \
               git://${GIT_SERVER}/repo2;name=repo2;destsuffix=repo1/repo2 \
               "

Git status reports, for repo1:

    Untracked files:
      (use "git add &lt;file&gt;..." to include in what will be committed)
	repo2/

If we run `devtool modify` on this recipe, do_patch runs with:

    PATCHTOOL = "git"
    PATCH_COMMIT_FUNCTIONS = "1"

The `patch_task_postfunc` (patch.bbclass, line 82) runs a `git add .` on the
top-level repo1, leaving the checkout in an invalid state. The following git
warning does not appear in the log:

    $ git add .
    warning: adding embedded git repository: repo2
    hint: You've added another git repository inside your current repository.
    hint: Clones of the outer repository will not contain the contents of
    hint: the embedded repository and will not know how to obtain it.
    hint: If you meant to add a submodule, use:
    hint:
    hint: 	git submodule add &lt;url&gt; repo2
    hint:
    hint: If you added this path by mistake, you can remove it from the
    hint: index with:
    hint:
    hint: 	git rm --cached repo2
    hint:
    hint: See "git help submodule" for more information.

    $ git submodule status
    fatal: no submodule mapping found in .gitmodules for path 'repo2'

No further git submodule commands can be run on the checkout.

We could enhance the `patch_task_postfunc` to look for any embedded git
checkouts and add them as submodules, but this seems unnecessary complexity for
an obscure edge-case. Although the git repo is left in an invalid state with
respect to the submodules, it still serves the purpose required by devtool:
To take further commits, and generate patch files from them.

We are still able to run these commands to examine any submodules,
where git submodule--helper reports paths relative to the top of the checkout:

    $ git ls-files --stage | grep ^160000
    160000 5feee12d6e974dd8c0614cf5b593380b046439a5 0   repo2

    $ git submodule--helper list
    160000 5feee12d6e974dd8c0614cf5b593380b046439a5 0   repo2

When a recipe sets EXTERNALSRC to a subdirectory of the git checkout, we test
for the existence of the reported submodule paths within the EXTERNALSRC
directory.

The latest versions of git submodule--helper accept a path to a subdirectory and
correctly report no submodules within that subdirectory. Regrettably, we still
support git versions that don't accept a path to a subdirectory.

[YOCTO #14333]

(From OE-Core rev: 2055718fdd19f925e236d67823017323bbd92a4b)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Detect code changes in submodules</title>
<updated>2021-03-20T18:54:56+00:00</updated>
<author>
<name>Douglas Royds</name>
<email>douglas.royds@taitradio.com</email>
</author>
<published>2021-03-17T23:37:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=42c86799ce265101b821030525ec568d34670430'/>
<id>urn:sha1:42c86799ce265101b821030525ec568d34670430</id>
<content type='text'>
Further to 50ff9afb39, only detect code changes in submodules that are
subdirectories of the EXTERNALSRC directory.

git submodule status returns a path relative to the cwd for each submodule.
We don't add submodules that are not within our source subtree.

(From OE-Core rev: 4525310d49d115a37705f04ac5c03d639e5e8f8c)

Signed-off-by: Douglas Royds &lt;douglas.royds@taitradio.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Pass through npmsw URIs in SRC_URI</title>
<updated>2021-02-26T15:21:21+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2021-02-25T10:46:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0098ef07d9c7f6993bbc570b279b96afc8dafd82'/>
<id>urn:sha1:0098ef07d9c7f6993bbc570b279b96afc8dafd82</id>
<content type='text'>
NPM shrinkwrap files need to stay in SRC_URI even when using
externalsrc so that npm_do_fetch can run to fetch the required
dependencies.

(From OE-Core rev: e889cbecf9a1731b199e57d79a14e574398586bb)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Detect code changes in submodules</title>
<updated>2021-01-28T23:12:05+00:00</updated>
<author>
<name>Tomasz Dziendzielski</name>
<email>tomasz.dziendzielski@gmail.com</email>
</author>
<published>2021-01-27T08:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9385670add6e630cebef758a30af17d3e57fcdfb'/>
<id>urn:sha1:9385670add6e630cebef758a30af17d3e57fcdfb</id>
<content type='text'>
The srctree_hash was calculated only from main source directory ignoring
changes in submodules.

[YOCTO #13748]

Use submodule--helper to determine all submodules, and calculate hash
from all git tree objects names combined.

(From OE-Core rev: 50ff9afb3990bcf60b4fa1f937506cb84028c32d)

Signed-off-by: Tomasz Dziendzielski &lt;tomasz.dziendzielski@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>externalsrc: Fix parsing error with devtool non-git sources</title>
<updated>2021-01-23T17:08:53+00:00</updated>
<author>
<name>Tomasz Dziendzielski</name>
<email>tomasz.dziendzielski@gmail.com</email>
</author>
<published>2021-01-20T14:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=28bdfe0066cb3c41d6471af75dabcc573e319688'/>
<id>urn:sha1:28bdfe0066cb3c41d6471af75dabcc573e319688</id>
<content type='text'>
If srcdir is under poky directory (e.g. devtool poky/build/workspace/sources)
and is not a git repository then ${@srctree_hash_files(d)} will run "git
rev-parse --git-dir" and detect poky directory as git-dir and run "'git', 'add',
'-A', '.'], cwd=s_dir" trying to add srcdir but build dir is in .gitignore and
latest git will fail with "The following paths are ignored by one of your
.gitignore files: build" which will end with "ExpansionError during parsing".

In this commit I added a check if git_dir is the same as git-dir from
TOPDIR (which will detect poky directory) and if yes, then treat srcdir
as non-git sources.

(From OE-Core rev: 95fbac8dcad6c93f4c9737e9fe13e92ab6befa09)

Signed-off-by: Tomasz Dziendzielski &lt;tomasz.dziendzielski@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
