Bug 6659 - Add new SDK publishing tool
Summary: Add new SDK publishing tool
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium+ enhancement
Target Milestone: 2.0
Assignee: Chen Qi
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on: 6559
Blocks: 6660
  Show dependency tree
 
Reported: 2014-08-24 18:51 UTC by Paul Eggleton
Modified: 2016-06-20 13:32 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2014-08-24 18:51:54 UTC
Add a tool to help with publishing the new SDK, including the SDK installer, manifest and corresponding sstate artifacts, where "publishing" just means copying the files from their output locations in DEPLOY_DIR / SSTATEDIR to a separate directory. The tool should compare the current SDK with the last published one, display the differences and then confirm before publishing the SDK.
Comment 1 Chen Qi 2015-05-26 08:39:07 UTC
devtool sdk-publish <sdk_to_publish> <destination_of_the_published_sdk>

Hi, Paul, is it something like the above?

Below are some details I'm think about. Please let me know your opinions. Thanks.

For the destination, it should support both a local destination and a remote ssh destination.

For the published SDK, as long as it's an extensible SDK, it should be valid.

For now, the SDK installer doesn't contain any manifest file. The manifest files are generated while preparing the build system at SDK installation time. My question is, should we copy necessary manifest files into the SDK at construction time?

//Chen Qi
Comment 2 Paul Eggleton 2015-05-26 09:03:24 UTC
I don't think it would be a part of devtool - it's something that would be a separate script. Otherwise the syntax would be pretty much as you describe yes.

Local and remote support sounds like a good idea yes.

Regarding the manifest, we will need to extend what's written into the SDK at construction time yes - what we do there will really be to support the update mechanism under bug 6560.
Comment 3 Chen Qi 2015-09-15 02:30:25 UTC
Module: openembedded-core.git
Branch: master
Commit: c201ab826046b30281341107b3e6a35204f5c9d8
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c201ab826046b30281341107b3e6a35204f5c9d8

Author: Qi.Chen@windriver.com <Qi.Chen@windriver.com>
Date:   Mon Sep  7 13:42:26 2015 +0100

oe-publish-sdk: add script

Add a script to publish an extensible SDK that has previously been built
to a specified destination. This published SDK is intended to be
accessed by the devtool sdk-update command from an installed copy of the
extensible SDK.

e.g.
oe-publish-sdk <ext-sdk> <destination>

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 4 Costin 2015-10-22 13:56:27 UTC
Hello,

Tested this feature on latest master 505a82673ac2487df5ea343a6422c2fc47018831 on an Ubuntu machine.

Steps performed:
1) ensure a clean env. (i cloned a fresh poky)
2) set machine to one desired BSP in local.conf (I chose genericx86)
3) populate sdk:
bitbake core-image-minimal -c populate_sdk
4) oe-publish-sdk tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-32-toolchain-2.0.sh /tmp/pk/sdk
5) view results:
:/tmp/pk/sdk$ ls
environment-setup-core2-32-poky-linux  poky-glibc-x86_64-core-image-minimal-core2-32-toolchain-2.0.sh  sysroots
layers                                 site-config-core2-32-poky-linux                                 version-core2-32-poky-linux


I encountered a small issue here:
/bin/sh: 1: cd: can't cd to /tmp/pk/sdk/layers
ERROR: Failed to set up layer git repo
Managed to solve it by firstly creating the respective dir:

diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 1737c9f..c4c35bd 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -101,9 +101,9 @@ def publish(args):
 
     # Setting up the git repo
     if not is_remote:
-        cmd = 'set -e; cd %s/layers; if [ ! -e .git ]; ...
+        cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; ...
     else:
-        cmd = "ssh %s 'set -e; cd %s/layers; if [ ! -e .git ]; ...
+        cmd = "ssh %s 'set -e; mkdir-p %s/layers; cd %s/layers; if [ ! -e .git ]; ...

Will submit a patch.
Comment 5 Costin 2015-10-22 13:57:17 UTC
awaiting for patch validation
Comment 6 Costin 2015-10-22 14:13:14 UTC
Also would like to add the "Documentation change:" is marked, but couldn't find anything related in mega manual
Comment 7 Paul Eggleton 2015-10-27 10:01:37 UTC
Costin's fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=369c53600e3faafa0111a8563af36ee46443d750

Yes, we did not have time unfortunately to provide documentation for this feature. We'll have to get to it early in the next release cycle.
Comment 8 Costin 2016-02-09 06:48:28 UTC
Hi Paul, 

Please let me know if you have an estimate when the documentation will be updated for this feature in order to mark it as verified.
Comment 9 Paul Eggleton 2016-02-09 07:20:34 UTC
It's a few weeks away yet - Scott and I are still only properly documenting basic devtool functionality at the moment.