Date   

Re: Fetch private gitlab repo using ssh with Yocto recipe #bitbake

Khem Raj
 

On Fri, Jan 28, 2022 at 2:27 AM VIVAVIS AG <embedded@...> wrote:

Hi,

Von: yocto@... <yocto@...> Im Auftrag von Sourabh Hegde
Gesendet: Freitag, 28. Januar 2022 10:47

Can you please let me know how to "forward SSH_AGENT into it to be able
to fetch from internal projects without the need to mount the key into the container."? I never did that before.
I use the following options within the Docker run command:
-v $SSH_AUTH_SOCK:/ssh.socket \
-e SSH_AUTH_SOCK=/ssh.socket \

Furthermore, I had to mount the .ssh folder into the container to make it working (be aware of security risk).
Additionally, you should check that uid, gid of the user in the container is the same on the host.
yeah something like that works, we use it for yoe which always uses
container to build
see

https://github.com/YoeDistro/yoe-distro/blob/master/envsetup.sh#L528-L541

Regards,

Carsten



Re: Custom SDK generation from YoctoSDK #sdk

Randy MacLeod
 

On 2022-01-28 12:02, Randy MacLeod wrote:
On 2022-01-24 13:04, Praveen wrote:
I am looking for Custom SDK with filtered Header files/libraries based on some rules/approvals. It means not all files from YoctoSDK will be packaged in the CustomSDK.
 
What is the mechanism or approach where we can pull only those approved header files & libraries from YoctoSDK and package as Customized SDK tar?
 
Is there a way we can fetch those approved header files from YOCTO SDK and filter it?

I am thinking like creating subset versioned module recipe and specify those approved header files and package only those files. Is there any better mechanism on packaging or filtering the SDK based on some rules to filter some header files?

Like for example in YoctoSDK, we have 2 modules
moduleA (A1.h, A2.h,A3.h and libA.so),
moduleB (B1.h, B2.h, B3.h and libB.so)
Lets say A3.h & B3.h are not approved in my Custom SDK, then in final Customer SDK we will only package
moduleA (A1.h, A2.h and libA.so), moduleB (B1.h, B2.h, and libB.so)

I want to keep YoctoSDK without any filters, so that A3.h/B3.h can be used for internal purposes without any issue.

Hi Praveen,

I'm not aware of anyone else doing that.

For libraries/recipes, you could just omit certain packages from the eSDK but you don't seem to want to do that.

What is your goal in filtering headers and libraries rather than say generating two SDKs:
one that is unrestricted and the other with limited APIs ?

That is, can you not package each moduleA as moduleA and moduleA-private using Yocto's packaging

mechanism with the *3.h files being in the private packages?

I don't work with the SDK very much so I could be out in left field but
if I am, hopefully someone will reply and straighten us both out!

../Randy


../Randy



-- 
# Randy MacLeod
# Wind River Linux



-- 
# Randy MacLeod
# Wind River Linux


Re: Custom SDK generation from YoctoSDK #sdk

Randy MacLeod
 

On 2022-01-24 13:04, Praveen wrote:
I am looking for Custom SDK with filtered Header files/libraries based on some rules/approvals. It means not all files from YoctoSDK will be packaged in the CustomSDK.
 
What is the mechanism or approach where we can pull only those approved header files & libraries from YoctoSDK and package as Customized SDK tar?
 
Is there a way we can fetch those approved header files from YOCTO SDK and filter it?

I am thinking like creating subset versioned module recipe and specify those approved header files and package only those files. Is there any better mechanism on packaging or filtering the SDK based on some rules to filter some header files?

Like for example in YoctoSDK, we have 2 modules moduleA (A1.h, A2.h,A3.h and libA.so), moduleB (B1.h, B2.h, B3.h and libB.so)
Lets say A3.h & B3.h are not approved in my Custom SDK, then in final Customer SDK we will only package
moduleA (A1.h, A2.h and libA.so), moduleB (B1.h, B2.h, and libB.so)

I want to keep YoctoSDK without any filters, so that A3.h/B3.h can be used for internal purposes without any issue.

Hi Praveen,

I'm not aware of anyone else doing that.

For libraries/recipes, you could just omit certain packages from the eSDK but you don't seem to want to do that.

What is your goal in filtering headers and libraries rather than say generating two SDKs:
one that is unrestricted and the other with limited APIs ?

../Randy




-- 
# Randy MacLeod
# Wind River Linux


Re: Fetch private gitlab repo using ssh with Yocto recipe #bitbake

Erik Boto
 

On Fri, Jan 28, 2022 at 11:50 AM Nicolas Jeker <n.jeker@...> wrote:

On Fri, 2022-01-28 at 10:27 +0000, VIVAVIS AG wrote:
Hi,

Von: yocto@... <yocto@...> Im
Auftrag von Sourabh Hegde
Gesendet: Freitag, 28. Januar 2022 10:47

Can you please let me know how to "forward SSH_AGENT into it to be
able
to fetch from internal projects without the need to mount the key
into the container."? I never did that before.
I use the following options within the Docker run command:
-v $SSH_AUTH_SOCK:/ssh.socket \
-e SSH_AUTH_SOCK=/ssh.socket \
That's pretty much what I use.

Furthermore, I had to mount the .ssh folder into the container to
make it working (be aware of security risk).
Additionally, you should check that uid, gid of the user in the
container is the same on the host.
I do something similar, my "problem" was that ssh needs the
.ssh/known_hosts file with a matching entry in addition to your
key/agent, but mounting the .ssh folder was not possible for me because
of permissions. Currently, I just created a little script that wraps
"oe-init-build-env" and populates the known_hosts file accordingly.

mkdir -p ~/.ssh

cat <<EOF >> ~/.ssh/known_hosts
git.example.com ssh-ed25519 <base64key>
EOF
I use my own Dockerfile based on crops/poky where I do the following,
which might be helpful if you also use this. It sets up the config
changes in /etc/skel/ since it creates users "on the fly" with
matching uid.

# Remove strict host key checking for ssh
# This is needed since the build will pull source over git-ssh
RUN mkdir -p /etc/skel/.ssh/
COPY ci-scripts/docker-stuff/config /etc/skel/.ssh/
RUN echo 'export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no"' >> /etc/skel/.bashrc


The ci-scripts/docker-stuff/config file contains:
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null

Now it was ages ago I set this up, and right now I can't really
understand why I basically do the same thing twice. So you'd have to
check which of the two things that actually solves the issue :-)

Cheers,
Erik


Regards,

Carsten



Re: Fetch private gitlab repo using ssh with Yocto recipe #bitbake

Nicolas Jeker
 

On Fri, 2022-01-28 at 10:27 +0000, VIVAVIS AG wrote:
Hi,
 
Von: yocto@... <yocto@...> Im
Auftrag von Sourabh Hegde
Gesendet: Freitag, 28. Januar 2022 10:47

Can you please let me know how to "forward SSH_AGENT into it to be
able
to fetch from internal projects without the need to mount the key
into the container."? I never did that before.
I use the following options within the Docker run command:
  -v $SSH_AUTH_SOCK:/ssh.socket \
  -e SSH_AUTH_SOCK=/ssh.socket \
That's pretty much what I use.

Furthermore, I had to mount the .ssh folder into the container to
make it working (be aware of security risk).
Additionally, you should check that uid, gid of the user in the
container is the same on the host.
I do something similar, my "problem" was that ssh needs the
.ssh/known_hosts file with a matching entry in addition to your
key/agent, but mounting the .ssh folder was not possible for me because
of permissions. Currently, I just created a little script that wraps
"oe-init-build-env" and populates the known_hosts file accordingly.

mkdir -p ~/.ssh

cat <<EOF >> ~/.ssh/known_hosts
git.example.com ssh-ed25519 <base64key>
EOF

Regards,

Carsten


Re: Fetch private gitlab repo using ssh with Yocto recipe #bitbake

VIVAVIS AG
 

Hi,

Von: yocto@... <yocto@...> Im Auftrag von Sourabh Hegde
Gesendet: Freitag, 28. Januar 2022 10:47

Can you please let me know how to "forward SSH_AGENT into it to be able
to fetch from internal projects without the need to mount the key into the container."? I never did that before.
I use the following options within the Docker run command:
-v $SSH_AUTH_SOCK:/ssh.socket \
-e SSH_AUTH_SOCK=/ssh.socket \

Furthermore, I had to mount the .ssh folder into the container to make it working (be aware of security risk).
Additionally, you should check that uid, gid of the user in the container is the same on the host.

Regards,

Carsten


Re: Fetch private gitlab repo using ssh with Yocto recipe #bitbake

Sourabh Hegde
 

Hi Nicolas,

Thanks for your answer.

That's great. Even I am building inside a docker container. I tried with creating a "config" file in .ssh directory. But I still have same issue.

Can you please let me know how to "forward SSH_AGENT into it to be able
to fetch from internal projects without the need to mount the key into the container."? I never did that before.

Thanks in advance.

On Fri, Jan 28, 2022, 10:42 Nicolas Jeker <n.jeker@...> wrote:
On Tue, 2022-01-25 at 23:16 -0800, hrsourabh011@... wrote:
> I am trying to fetch a private gitlab repo within Yocto image recipe
> using SSH protocol. In my image recipe I have passed SRC_URI as:
>
> SRC_URI = " \
>         gitsm://git@...:2224/blah/blah/blah/blah;protocol
> =ssh;branch=master \
> "

I use almost the same, just without submodules.

SRC_URI =
"git://git@...:1234/group/project.git;protocol=ssh"

It should "just work" if ssh is able to find your key. I often build in
a docker container, so I have to forward SSH_AGENT into it to be able
to fetch from internal projects without the need to mount the key into
the container. I don't really have any insight for builds outside
docker, if git clone works, the bitbake fetcher should too.

> But this results in the error:
>
<snip>
>
> But I am able to clone the repo using git clone.
> SSH key is already added to the Gitlab. There is no config file in my
> ~/.ssh. Do I need to create a config file? What should be the content
> of the config file?

You should not need a ssh config file.

> Can anyone please let me know how to resolve this?
> Thanks in advance.


Re: Fetch private gitlab repo using ssh with Yocto recipe #bitbake

Nicolas Jeker
 

On Tue, 2022-01-25 at 23:16 -0800, hrsourabh011@... wrote:
I am trying to fetch a private gitlab repo within Yocto image recipe
using SSH protocol. In my image recipe I have passed SRC_URI as:

SRC_URI = " \
        gitsm://git@...:2224/blah/blah/blah/blah;protocol
=ssh;branch=master \
"
I use almost the same, just without submodules.

SRC_URI =
"git://git@...:1234/group/project.git;protocol=ssh"

It should "just work" if ssh is able to find your key. I often build in
a docker container, so I have to forward SSH_AGENT into it to be able
to fetch from internal projects without the need to mount the key into
the container. I don't really have any insight for builds outside
docker, if git clone works, the bitbake fetcher should too.

But this results in the error:
<snip>

But I am able to clone the repo using git clone.
SSH key is already added to the Gitlab. There is no config file in my
~/.ssh. Do I need to create a config file? What should be the content
of the config file?
You should not need a ssh config file.

Can anyone please let me know how to resolve this?
Thanks in advance.


Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Alexander Kanavin
 

On Thu, 27 Jan 2022 at 22:04, Khem Raj <raj.khem@...> wrote:


On Thu, Jan 27, 2022 at 12:06 PM Denys Dmytriyenko <denis@...> wrote:
On Thu, Jan 27, 2022 at 06:07:06PM +0100, Alexander Kanavin wrote:
> A question specifically to Denys, how can I actually get this into the
> mixin repo, and have commit rights to the branch? We've tested this quite
> well in private, and there are further enhancements coming up.

Michael,

Would it be possible to create 2 additional branches in the meta-lts-mixins
repository at https://git.yoctoproject.org/meta-lts-mixins/ called
"dunfell/go" and also "dunfell/docker" and give Alex push rights to them?

How would one use new version of  both  go and say kernel in a project 

Checkout the branches from the same repo into two different directories. Yes this is unusual, and slightly confusing. But that way the branches can be maintained and included into builds independently.

Alex

 



Please let us know, thanks a lot!

--
Denys


> On Thu, 27 Jan 2022 at 15:43, Alexander Kanavin via lists.yoctoproject.org
> <alex.kanavin=gmail.com@...> wrote:
>
> > Reviewed-by: Martin Kaistra <martin.kaistra@...>
> > Signed-off-by: Alexander Kanavin <alex@...>
> > ---
> >  COPYING.MIT     | 17 +++++++++++++++++
> >  README          | 23 +++++++++++++++++++++++
> >  conf/layer.conf | 19 +++++++++++++++++++
> >  3 files changed, 59 insertions(+)
> >  create mode 100644 COPYING.MIT
> >  create mode 100644 README
> >  create mode 100644 conf/layer.conf
> >
> > diff --git a/COPYING.MIT b/COPYING.MIT
> > new file mode 100644
> > index 0000000..fb950dc
> > --- /dev/null
> > +++ b/COPYING.MIT
> > @@ -0,0 +1,17 @@
> > +Permission is hereby granted, free of charge, to any person obtaining a
> > copy
> > +of this software and associated documentation files (the "Software"), to
> > deal
> > +in the Software without restriction, including without limitation the
> > rights
> > +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> > +copies of the Software, and to permit persons to whom the Software is
> > +furnished to do so, subject to the following conditions:
> > +
> > +The above copyright notice and this permission notice shall be included
> > in
> > +all copies or substantial portions of the Software.
> > +
> > +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > OR
> > +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> > THE
> > +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > FROM,
> > +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> > +THE SOFTWARE.
> > diff --git a/README b/README
> > new file mode 100644
> > index 0000000..5b22b72
> > --- /dev/null
> > +++ b/README
> > @@ -0,0 +1,23 @@
> > +"Mixin" layer for adding latest Go toolchain versions into the Yocto
> > Project LTS.
> > +
> > +At the time Dunfell was released in April 2020, Go 1.14 was the latest
> > version
> > +and officially Dunfell supports only that. This thin special-purpose mixin
> > +layer is meant to address this issue by backporting Go recipes from the
> > master
> > +branch of openembedded-core.
> > +
> > +You can see what Go versions are provided by listing recipes-devtools/
> > content.
> > +
> > +Including the layer automatically picks up the latest Go version;
> > different versions
> > +need to be set explicitly by adding the following line to your distro
> > config
> > +or local.conf:
> > +
> > +GOVERSION = "1.16%"
> > +
> > +Please note: enabling these newer Go versions makes docker from dunfell
> > branch
> > +of meta-virtualization unbuildable as it is too old. If you need a
> > working docker
> > +recipe, you can use the supplementary 'dunfell/docker' layer from this
> > meta-lts-mixin
> > +repository.
> > +
> > +
> > +Maintainers:
> > +Alexander Kanavin <alex@...>
> > diff --git a/conf/layer.conf b/conf/layer.conf
> > new file mode 100644
> > index 0000000..5f74224
> > --- /dev/null
> > +++ b/conf/layer.conf
> > @@ -0,0 +1,19 @@
> > +# We have a conf and classes directory, append to BBPATH
> > +BBPATH .= ":${LAYERDIR}"
> > +
> > +# We have a recipes directory, add to BBFILES
> > +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
> > +
> > +BBFILE_COLLECTIONS += "lts-go-mixin"
> > +BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
> > +BBFILE_PRIORITY_lts-go-mixin = "6"
> > +
> > +LAYERSERIES_COMPAT_lts-go-mixin = "dunfell"
> > +
> > +LAYERDEPENDS_lts-go-mixin = " \
> > +    core \
> > +"
> > +
> > +GOVERSION ?= "1.17%"
> > +PREFERRED_PROVIDER_go-native = "go-binary-native"
> > +
> > --
> > 2.20.1




Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Khem Raj
 



On Thu, Jan 27, 2022 at 12:06 PM Denys Dmytriyenko <denis@...> wrote:
On Thu, Jan 27, 2022 at 06:07:06PM +0100, Alexander Kanavin wrote:
> A question specifically to Denys, how can I actually get this into the
> mixin repo, and have commit rights to the branch? We've tested this quite
> well in private, and there are further enhancements coming up.

Michael,

Would it be possible to create 2 additional branches in the meta-lts-mixins
repository at https://git.yoctoproject.org/meta-lts-mixins/ called
"dunfell/go" and also "dunfell/docker" and give Alex push rights to them?

How would one use new version of  both  go and say kernel in a project 



Please let us know, thanks a lot!

--
Denys


> On Thu, 27 Jan 2022 at 15:43, Alexander Kanavin via lists.yoctoproject.org
> <alex.kanavin=gmail.com@...> wrote:
>
> > Reviewed-by: Martin Kaistra <martin.kaistra@...>
> > Signed-off-by: Alexander Kanavin <alex@...>
> > ---
> >  COPYING.MIT     | 17 +++++++++++++++++
> >  README          | 23 +++++++++++++++++++++++
> >  conf/layer.conf | 19 +++++++++++++++++++
> >  3 files changed, 59 insertions(+)
> >  create mode 100644 COPYING.MIT
> >  create mode 100644 README
> >  create mode 100644 conf/layer.conf
> >
> > diff --git a/COPYING.MIT b/COPYING.MIT
> > new file mode 100644
> > index 0000000..fb950dc
> > --- /dev/null
> > +++ b/COPYING.MIT
> > @@ -0,0 +1,17 @@
> > +Permission is hereby granted, free of charge, to any person obtaining a
> > copy
> > +of this software and associated documentation files (the "Software"), to
> > deal
> > +in the Software without restriction, including without limitation the
> > rights
> > +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> > +copies of the Software, and to permit persons to whom the Software is
> > +furnished to do so, subject to the following conditions:
> > +
> > +The above copyright notice and this permission notice shall be included
> > in
> > +all copies or substantial portions of the Software.
> > +
> > +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > OR
> > +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> > THE
> > +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > FROM,
> > +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> > +THE SOFTWARE.
> > diff --git a/README b/README
> > new file mode 100644
> > index 0000000..5b22b72
> > --- /dev/null
> > +++ b/README
> > @@ -0,0 +1,23 @@
> > +"Mixin" layer for adding latest Go toolchain versions into the Yocto
> > Project LTS.
> > +
> > +At the time Dunfell was released in April 2020, Go 1.14 was the latest
> > version
> > +and officially Dunfell supports only that. This thin special-purpose mixin
> > +layer is meant to address this issue by backporting Go recipes from the
> > master
> > +branch of openembedded-core.
> > +
> > +You can see what Go versions are provided by listing recipes-devtools/
> > content.
> > +
> > +Including the layer automatically picks up the latest Go version;
> > different versions
> > +need to be set explicitly by adding the following line to your distro
> > config
> > +or local.conf:
> > +
> > +GOVERSION = "1.16%"
> > +
> > +Please note: enabling these newer Go versions makes docker from dunfell
> > branch
> > +of meta-virtualization unbuildable as it is too old. If you need a
> > working docker
> > +recipe, you can use the supplementary 'dunfell/docker' layer from this
> > meta-lts-mixin
> > +repository.
> > +
> > +
> > +Maintainers:
> > +Alexander Kanavin <alex@...>
> > diff --git a/conf/layer.conf b/conf/layer.conf
> > new file mode 100644
> > index 0000000..5f74224
> > --- /dev/null
> > +++ b/conf/layer.conf
> > @@ -0,0 +1,19 @@
> > +# We have a conf and classes directory, append to BBPATH
> > +BBPATH .= ":${LAYERDIR}"
> > +
> > +# We have a recipes directory, add to BBFILES
> > +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
> > +
> > +BBFILE_COLLECTIONS += "lts-go-mixin"
> > +BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
> > +BBFILE_PRIORITY_lts-go-mixin = "6"
> > +
> > +LAYERSERIES_COMPAT_lts-go-mixin = "dunfell"
> > +
> > +LAYERDEPENDS_lts-go-mixin = " \
> > +    core \
> > +"
> > +
> > +GOVERSION ?= "1.17%"
> > +PREFERRED_PROVIDER_go-native = "go-binary-native"
> > +
> > --
> > 2.20.1




Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Denys Dmytriyenko
 

On Thu, Jan 27, 2022 at 06:07:06PM +0100, Alexander Kanavin wrote:
A question specifically to Denys, how can I actually get this into the
mixin repo, and have commit rights to the branch? We've tested this quite
well in private, and there are further enhancements coming up.
Michael,

Would it be possible to create 2 additional branches in the meta-lts-mixins
repository at https://git.yoctoproject.org/meta-lts-mixins/ called
"dunfell/go" and also "dunfell/docker" and give Alex push rights to them?

Please let us know, thanks a lot!

--
Denys


On Thu, 27 Jan 2022 at 15:43, Alexander Kanavin via lists.yoctoproject.org
<alex.kanavin=gmail.com@...> wrote:

Reviewed-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
COPYING.MIT | 17 +++++++++++++++++
README | 23 +++++++++++++++++++++++
conf/layer.conf | 19 +++++++++++++++++++
3 files changed, 59 insertions(+)
create mode 100644 COPYING.MIT
create mode 100644 README
create mode 100644 conf/layer.conf

diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a
copy
+of this software and associated documentation files (the "Software"), to
deal
+in the Software without restriction, including without limitation the
rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..5b22b72
--- /dev/null
+++ b/README
@@ -0,0 +1,23 @@
+"Mixin" layer for adding latest Go toolchain versions into the Yocto
Project LTS.
+
+At the time Dunfell was released in April 2020, Go 1.14 was the latest
version
+and officially Dunfell supports only that. This thin special-purpose mixin
+layer is meant to address this issue by backporting Go recipes from the
master
+branch of openembedded-core.
+
+You can see what Go versions are provided by listing recipes-devtools/
content.
+
+Including the layer automatically picks up the latest Go version;
different versions
+need to be set explicitly by adding the following line to your distro
config
+or local.conf:
+
+GOVERSION = "1.16%"
+
+Please note: enabling these newer Go versions makes docker from dunfell
branch
+of meta-virtualization unbuildable as it is too old. If you need a
working docker
+recipe, you can use the supplementary 'dunfell/docker' layer from this
meta-lts-mixin
+repository.
+
+
+Maintainers:
+Alexander Kanavin <alex@...>
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..5f74224
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,19 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "lts-go-mixin"
+BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
+BBFILE_PRIORITY_lts-go-mixin = "6"
+
+LAYERSERIES_COMPAT_lts-go-mixin = "dunfell"
+
+LAYERDEPENDS_lts-go-mixin = " \
+ core \
+"
+
+GOVERSION ?= "1.17%"
+PREFERRED_PROVIDER_go-native = "go-binary-native"
+
--
2.20.1


Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Khem Raj
 

On Thu, Jan 27, 2022 at 9:07 AM Alexander Kanavin
<alex.kanavin@...> wrote:

A question specifically to Denys, how can I actually get this into the mixin repo, and have commit rights to the branch? We've tested this quite well in private, and there are further enhancements coming up.
this could be an independent layer too.


Alex

On Thu, 27 Jan 2022 at 15:43, Alexander Kanavin via lists.yoctoproject.org <alex.kanavin=gmail.com@...> wrote:

Reviewed-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
COPYING.MIT | 17 +++++++++++++++++
README | 23 +++++++++++++++++++++++
conf/layer.conf | 19 +++++++++++++++++++
3 files changed, 59 insertions(+)
create mode 100644 COPYING.MIT
create mode 100644 README
create mode 100644 conf/layer.conf

diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..5b22b72
--- /dev/null
+++ b/README
@@ -0,0 +1,23 @@
+"Mixin" layer for adding latest Go toolchain versions into the Yocto Project LTS.
+
+At the time Dunfell was released in April 2020, Go 1.14 was the latest version
+and officially Dunfell supports only that. This thin special-purpose mixin
+layer is meant to address this issue by backporting Go recipes from the master
+branch of openembedded-core.
+
+You can see what Go versions are provided by listing recipes-devtools/ content.
+
+Including the layer automatically picks up the latest Go version; different versions
+need to be set explicitly by adding the following line to your distro config
+or local.conf:
+
+GOVERSION = "1.16%"
+
+Please note: enabling these newer Go versions makes docker from dunfell branch
+of meta-virtualization unbuildable as it is too old. If you need a working docker
+recipe, you can use the supplementary 'dunfell/docker' layer from this meta-lts-mixin
+repository.
+
+
+Maintainers:
+Alexander Kanavin <alex@...>
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..5f74224
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,19 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "lts-go-mixin"
+BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
+BBFILE_PRIORITY_lts-go-mixin = "6"
+
+LAYERSERIES_COMPAT_lts-go-mixin = "dunfell"
+
+LAYERDEPENDS_lts-go-mixin = " \
+ core \
+"
+
+GOVERSION ?= "1.17%"
+PREFERRED_PROVIDER_go-native = "go-binary-native"
+
--
2.20.1





Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Alexander Kanavin
 

A question specifically to Denys, how can I actually get this into the mixin repo, and have commit rights to the branch? We've tested this quite well in private, and there are further enhancements coming up.

Alex


On Thu, 27 Jan 2022 at 15:43, Alexander Kanavin via lists.yoctoproject.org <alex.kanavin=gmail.com@...> wrote:
Reviewed-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
 COPYING.MIT     | 17 +++++++++++++++++
 README          | 23 +++++++++++++++++++++++
 conf/layer.conf | 19 +++++++++++++++++++
 3 files changed, 59 insertions(+)
 create mode 100644 COPYING.MIT
 create mode 100644 README
 create mode 100644 conf/layer.conf

diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..5b22b72
--- /dev/null
+++ b/README
@@ -0,0 +1,23 @@
+"Mixin" layer for adding latest Go toolchain versions into the Yocto Project LTS.
+
+At the time Dunfell was released in April 2020, Go 1.14 was the latest version
+and officially Dunfell supports only that. This thin special-purpose mixin
+layer is meant to address this issue by backporting Go recipes from the master
+branch of openembedded-core.
+
+You can see what Go versions are provided by listing recipes-devtools/ content.
+
+Including the layer automatically picks up the latest Go version; different versions
+need to be set explicitly by adding the following line to your distro config
+or local.conf:
+
+GOVERSION = "1.16%"
+
+Please note: enabling these newer Go versions makes docker from dunfell branch
+of meta-virtualization unbuildable as it is too old. If you need a working docker
+recipe, you can use the supplementary 'dunfell/docker' layer from this meta-lts-mixin
+repository.
+
+
+Maintainers:
+Alexander Kanavin <alex@...>
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..5f74224
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,19 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "lts-go-mixin"
+BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
+BBFILE_PRIORITY_lts-go-mixin = "6"
+
+LAYERSERIES_COMPAT_lts-go-mixin = "dunfell"
+
+LAYERDEPENDS_lts-go-mixin = " \
+    core \
+"
+
+GOVERSION ?= "1.17%"
+PREFERRED_PROVIDER_go-native = "go-binary-native"
+
--
2.20.1





Re: bbappend conditional check for advanced metadata (yocto-kernel-cache)?

Matthias Klein
 

Hello Bruce,

Another is to make that append conditional based on something you can test. i.e. test for kernel-cache in the SRC_URI, and if present, do the append. Or you could test for the defconfig in the SRC_URI and don't do the append. There may be other options for this, but without all the details of the recipes, I can't say for sure.
I have a few variations of that theme in meta-virtualization, since there's a broad range of kernel types supported (https://git.yoctoproject.org/meta-virtualization/tree/recipes-kernel/linux/linux-yocto_virtualization.inc).
I chose the variant based on SRC_URI, but used KERNEL_CONFIG_URI because I got endless recursion between SRC_URI and KERNEL_FEATURES in the kernel recipe I use.
I ended up with this function:

def insert_if_kernel_cache_available(feature, d):
import re
if d.getVar('KERNEL_CONFIG_URI'):
config_uri = d.getVar('KERNEL_CONFIG_URI')
kernel_cache = re.search("kernel-cache", config_uri)
if kernel_cache:
return feature
return ""

KERNEL_FEATURES:append = "${@insert_if_kernel_cache_available(' features/overlayfs/overlayfs.scc', d)}"

Many greetings,
Matthias


Re: [PATCH yocto-autobuilder-helper] run-docs-build: fix checkout of releases.rst from master

Michael Opdenacker
 

Hi Quentin,

Thank you very much for the review.

On 1/26/22 09:11, Quentin Schulz wrote:
Hi Michael,

On January 25, 2022 5:45:46 PM GMT+01:00, Michael Opdenacker <michael.opdenacker@...> wrote:
A wrong path was given given the working directory.

Also revert the changes with "git reset --hard" to
have a clean state before further branch switches.
One change at a time please ☺️

Well, here, the two should go together. I admit my description is
probably misleading.

My initial "git checkout" was wrong (wrong path), so wasn't doing
anything. Now that "git checkout" works as expected, I need a way to
clean the branch after the docs are generated. Otherwise, I'll switch
branches in the rest of the script from an unclean state.


Signed-off-by: Michael Opdenacker <michael.opdenacker@...>
---
scripts/run-docs-build | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 5d6d24a..c93b3e6 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -43,11 +43,12 @@ cp -r ./_build/final/* $outputdir/bitbake/next
# see the latest releases.
for branch in 1.46 1.48 1.50 1.52; do
git checkout $branch
- git checkout master doc/releases.rst
+ git checkout master releases.rst
make clean
make publish
mkdir $outputdir/bitbake/$branch
cp -r ./_build/final/* $outputdir/bitbake/$branch
+ git reset --hard
This should be done right after the git checkout. It's better to ensure what you build is clean that try to ensure the next oneto build has a clean env. Especially since checkouts can dirty the git repo I think (I've had this issue multiple times when switching between kernel branches far enough from one another).

Also git reset --hard is not enough. I use git clean -ffdx instead usually. Didn't have a problem with this one for a while now.

My point was just to undo the "git checkout" to fetch releases.txt from
"master", not to be a substitute for "make clean".  I can't do it right
after "git checkout" otherwise I'm not doing anything at all.

You have a valid point about a possible "dirty" git version though.
Fortunately, I checked and it seems that uncommitted changes have no
impact on the generated docs. I couldn't find any git commit anywhere.

Thanks
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Minutes: Yocto Project Weekly Triage Meeting 1/27/2022

Trevor Gamblin
 

Wiki: https://wiki.yoctoproject.org/wiki/Bug_Triage

Attendees: Alexandre, Armin, Daiane, Michael, Randy, Richard, Ross, Saul, Stephen, Steve, Tim, Trevor

ARs:

- Randy to take a look AB-INT defects for M2s and update them to M3

- Everyone to review open bugs and move Old Milestone (M2) bugs to M3 or later

Notes:

- ~50% of AB workers have been switched to SSDs. Failure rate appears lower, but still TBD

Medium+ 3.5 Unassigned Enhancements/Bugs: 76 (Last week 80)

Medium+ 3.99 Unassigned Enhancements/Bugs: 39 (Last week 38)

AB Bugs: 76 (Last week 76)


Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Alexander Kanavin
 

On Thu, 27 Jan 2022 at 15:48, Konrad Weihmann <kweihmann@...> wrote:
> +GOVERSION ?= "1.17%"
> +PREFERRED_PROVIDER_go-native = "go-binary-native"

Just out of curiosity: I thought the agreement was that neither
PREFERRED_PROVIDER_* nor recipe/provider specific settings should be
part of a layer.conf
PREFERRED_PROVIDER_go-native as a hard assignment might be troublesome
in some setups (mainly depending on what order bblayers.conf actually has)

Yes, but this way it 'just works'. I do not think writing complicated instructions in README for what needs to be in local.conf or distro config is a better alternative. Suggestions welcome.

Alex


Re: [meta-lts-mixins][dunfell/go PATCH 1/4] Initial commit: add license, readme and layer config.

Konrad Weihmann <kweihmann@...>
 

On 27.01.22 15:43, Alexander Kanavin wrote:
Reviewed-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
COPYING.MIT | 17 +++++++++++++++++
README | 23 +++++++++++++++++++++++
conf/layer.conf | 19 +++++++++++++++++++
3 files changed, 59 insertions(+)
create mode 100644 COPYING.MIT
create mode 100644 README
create mode 100644 conf/layer.conf
diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..5b22b72
--- /dev/null
+++ b/README
@@ -0,0 +1,23 @@
+"Mixin" layer for adding latest Go toolchain versions into the Yocto Project LTS.
+
+At the time Dunfell was released in April 2020, Go 1.14 was the latest version
+and officially Dunfell supports only that. This thin special-purpose mixin
+layer is meant to address this issue by backporting Go recipes from the master
+branch of openembedded-core.
+
+You can see what Go versions are provided by listing recipes-devtools/ content.
+
+Including the layer automatically picks up the latest Go version; different versions
+need to be set explicitly by adding the following line to your distro config
+or local.conf:
+
+GOVERSION = "1.16%"
+
+Please note: enabling these newer Go versions makes docker from dunfell branch
+of meta-virtualization unbuildable as it is too old. If you need a working docker
+recipe, you can use the supplementary 'dunfell/docker' layer from this meta-lts-mixin
+repository.
+
+
+Maintainers:
+Alexander Kanavin <alex@...>
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..5f74224
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,19 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "lts-go-mixin"
+BBFILE_PATTERN_lts-go-mixin := "^${LAYERDIR}/"
+BBFILE_PRIORITY_lts-go-mixin = "6"
+
+LAYERSERIES_COMPAT_lts-go-mixin = "dunfell"
+
+LAYERDEPENDS_lts-go-mixin = " \
+ core \
+"
+
+GOVERSION ?= "1.17%"
+PREFERRED_PROVIDER_go-native = "go-binary-native"
Just out of curiosity: I thought the agreement was that neither PREFERRED_PROVIDER_* nor recipe/provider specific settings should be part of a layer.conf
PREFERRED_PROVIDER_go-native as a hard assignment might be troublesome in some setups (mainly depending on what order bblayers.conf actually has)

+


[meta-lts-mixins][dunfell/docker PATCH 2/2] docker-ce: add the recipes and its dependencies from meta-virtualization

Alexander Kanavin
 

These recipes are copied verbatim from:
https://git.yoctoproject.org/meta-virtualization/tree/?id=dbd37caa6d48772b87426450fb6b816c11acc68a

(copy from external source:
git: https://git.yoctoproject.org/meta-virtualization
archive: dbd37caa6d48772b87426450fb6b816c11acc68a
copy: recipes-containers/ --> recipes-containers/
copy: recipes-devtools/go/ --> recipes-devtools/go/
)

Acked-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
.../cgroup-lite/cgroup-lite_1.15.bb | 34 ++++
.../cgroup-lite/files/cgroups-init | 27 +++
recipes-containers/containerd/README.md | 30 +++
.../0001-Add-build-option-GODEBUG-1.patch | 32 ++++
...O_BUILD_FLAGS-to-be-externally-speci.patch | 38 ++++
.../containerd-opencontainers_git.bb | 127 +++++++++++++
...1-build-use-oe-provided-GO-and-flags.patch | 64 +++++++
recipes-containers/docker/docker-ce_git.bb | 57 ++++++
recipes-containers/docker/docker.inc | 179 ++++++++++++++++++
...ernal-GO111MODULE-and-cross-compiler.patch | 27 +++
...0001-dynbinary-use-go-cross-compiler.patch | 23 +++
...0001-libnetwork-use-GO-instead-of-go.patch | 59 ++++++
recipes-containers/docker/files/docker.init | 131 +++++++++++++
...-GOBUILDFLAGS-for-runc-and-remove-re.patch | 37 ++++
...001-runc-Add-console-socket-dev-null.patch | 30 +++
.../0001-runc-docker-SIGUSR1-daemonize.patch | 131 +++++++++++++
recipes-containers/runc/runc-docker_git.bb | 14 ++
.../runc/runc-opencontainers_git.bb | 10 +
recipes-containers/runc/runc.inc | 83 ++++++++
...-output-binary-allow-yocto-to-do-thi.patch | 28 +++
recipes-containers/tini/tini_0.19.0.bb | 32 ++++
recipes-devtools/go/compose-file_git.bb | 41 ++++
.../0001-build-use-instead-of-go.patch | 30 +++
recipes-devtools/go/go-build_git.bb | 58 ++++++
recipes-devtools/go/go-capability_git.bb | 29 +++
recipes-devtools/go/go-cli_git.bb | 29 +++
recipes-devtools/go/go-connections_git.bb | 39 ++++
recipes-devtools/go/go-context_git.bb | 28 +++
recipes-devtools/go/go-dbus_git.bb | 29 +++
recipes-devtools/go/go-distribution_git.bb | 39 ++++
recipes-devtools/go/go-fsnotify_git.bb | 29 +++
recipes-devtools/go/go-libtrust_git.bb | 29 +++
recipes-devtools/go/go-logrus_git.bb | 29 +++
recipes-devtools/go/go-md2man_git.bb | 23 +++
recipes-devtools/go/go-metalinter_git.bb | 24 +++
recipes-devtools/go/go-mux_git.bb | 28 +++
recipes-devtools/go/go-patricia_git.bb | 29 +++
recipes-devtools/go/go-pty_git.bb | 28 +++
recipes-devtools/go/go-systemd_git.bb | 31 +++
recipes-devtools/go/grpc-go_git.bb | 41 ++++
recipes-devtools/go/notary_git.bb | 39 ++++
41 files changed, 1845 insertions(+)
create mode 100644 recipes-containers/cgroup-lite/cgroup-lite_1.15.bb
create mode 100755 recipes-containers/cgroup-lite/files/cgroups-init
create mode 100644 recipes-containers/containerd/README.md
create mode 100644 recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
create mode 100644 recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
create mode 100644 recipes-containers/containerd/containerd-opencontainers_git.bb
create mode 100644 recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
create mode 100644 recipes-containers/docker/docker-ce_git.bb
create mode 100644 recipes-containers/docker/docker.inc
create mode 100644 recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
create mode 100644 recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
create mode 100644 recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
create mode 100644 recipes-containers/docker/files/docker.init
create mode 100644 recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch
create mode 100644 recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
create mode 100644 recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
create mode 100644 recipes-containers/runc/runc-docker_git.bb
create mode 100644 recipes-containers/runc/runc-opencontainers_git.bb
create mode 100644 recipes-containers/runc/runc.inc
create mode 100644 recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
create mode 100644 recipes-containers/tini/tini_0.19.0.bb
create mode 100644 recipes-devtools/go/compose-file_git.bb
create mode 100644 recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch
create mode 100644 recipes-devtools/go/go-build_git.bb
create mode 100644 recipes-devtools/go/go-capability_git.bb
create mode 100644 recipes-devtools/go/go-cli_git.bb
create mode 100644 recipes-devtools/go/go-connections_git.bb
create mode 100644 recipes-devtools/go/go-context_git.bb
create mode 100644 recipes-devtools/go/go-dbus_git.bb
create mode 100644 recipes-devtools/go/go-distribution_git.bb
create mode 100644 recipes-devtools/go/go-fsnotify_git.bb
create mode 100644 recipes-devtools/go/go-libtrust_git.bb
create mode 100644 recipes-devtools/go/go-logrus_git.bb
create mode 100644 recipes-devtools/go/go-md2man_git.bb
create mode 100644 recipes-devtools/go/go-metalinter_git.bb
create mode 100644 recipes-devtools/go/go-mux_git.bb
create mode 100644 recipes-devtools/go/go-patricia_git.bb
create mode 100644 recipes-devtools/go/go-pty_git.bb
create mode 100644 recipes-devtools/go/go-systemd_git.bb
create mode 100644 recipes-devtools/go/grpc-go_git.bb
create mode 100644 recipes-devtools/go/notary_git.bb

diff --git a/recipes-containers/cgroup-lite/cgroup-lite_1.15.bb b/recipes-containers/cgroup-lite/cgroup-lite_1.15.bb
new file mode 100644
index 0000000..8bed040
--- /dev/null
+++ b/recipes-containers/cgroup-lite/cgroup-lite_1.15.bb
@@ -0,0 +1,34 @@
+SECTION = "devel"
+SUMMARY = "Light-weight package to set up cgroups at system boot."
+DESCRIPTION = "Light-weight package to set up cgroups at system boot."
+HOMEPAGE = "http://packages.ubuntu.com/source/artful/cgroup-lite"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=5d5da4e0867cf06014f87102154d0102"
+SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/cgroup-lite_1.15.tar.xz"
+SRC_URI += "file://cgroups-init"
+SRC_URI[md5sum] = "1438c1f4a7227c0dedfce5f86f02591d"
+SRC_URI[sha256sum] = "02f44c70ed3cf27b9e89e5266492fddf4b455336ab4e03abc85e92297537201f"
+
+inherit allarch update-rc.d systemd
+
+INITSCRIPT_NAME = "cgroups-init"
+INITSCRIPT_PARAMS = "start 8 2 3 4 5 . stop 20 0 1 6 ."
+
+# Keeps the sysvinit scripts out of the image if building
+# where systemd is in use.
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "cgroups-init.service"
+SYSTEMD_AUTO_ENABLE:${PN} = "mask"
+
+
+do_install() {
+ install -d ${D}/${base_bindir}
+ install -m 0755 ${S}/scripts/cgroups-mount ${D}/${base_bindir}
+ install -m 0755 ${S}/scripts/cgroups-umount ${D}/${base_bindir}
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/cgroups-init ${D}${sysconfdir}/init.d/cgroups-init
+
+ install -d ${D}${systemd_unitdir}/system
+ ln -sf /dev/null ${D}${systemd_unitdir}/system/cgroups-init.service
+}
diff --git a/recipes-containers/cgroup-lite/files/cgroups-init b/recipes-containers/cgroup-lite/files/cgroups-init
new file mode 100755
index 0000000..e504024
--- /dev/null
+++ b/recipes-containers/cgroup-lite/files/cgroups-init
@@ -0,0 +1,27 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: cgroups mount
+# Required-Start: $network $remote_fs
+# Required-Stop: $network $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: mount/unmount cgroups
+### END INIT INFO
+
+# must start before libvirtd is run
+case "$1" in
+ start)
+ echo -n "Mounting cgroups..."
+ /bin/cgroups-mount
+ echo "Done"
+ ;;
+ stop)
+ echo -n "Unmounting cgroups..."
+ /bin/cgroups-umount
+ echo "Done"
+ ;;
+ *)
+ echo "Usage: /etc/init.d/cgroups-init {start|stop}"
+ exit 1
+ ;;
+esac
diff --git a/recipes-containers/containerd/README.md b/recipes-containers/containerd/README.md
new file mode 100644
index 0000000..f773079
--- /dev/null
+++ b/recipes-containers/containerd/README.md
@@ -0,0 +1,30 @@
+# containerd: sample image fetch and exec commands
+
+```shell
+root@qemux86-64:~# ctr images list
+REF TYPE DIGEST SIZE PLATFORMS
+docker.io/calico/node:v3.11.2 application/vnd.docker.distribution.manifest.list.v2+json sha256:887bcd551668cccae1fbfd6d2eb0f635ec37bb4cf599e1169989aa49dfac5b57 84.8 MiB linux/amd64,linux/arm64,linux/ppc64le
+docker.io/library/alpine:latest application/vnd.docker.distribution.manifest.list.v2+json sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a 2.7 MiB linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,l
+
+root@qemux86-64:~# ctr image pull docker.io/library/alpine:latest
+docker.io/library/alpine:latest: resolved |++++++++++++++++++++++++++++++++++++++|
+index-sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a: exists |++++++++++++++++++++++++++++++++++++++|
+manifest-sha256:d7342993700f8cd7aba8496c2d0e57be0666e80b4c441925fc6f9361fa81d10e: exists |++++++++++++++++++++++++++++++++++++++|
+layer-sha256:188c0c94c7c576fff0792aca7ec73d67a2f7f4cb3a6e53a84559337260b36964: exists |++++++++++++++++++++++++++++++++++++++|
+config-sha256:d6e46aa2470df1d32034c6707c8041158b652f38d2a9ae3d7ad7e7532d22ebe0: exists |++++++++++++++++++++++++++++++++++++++|
+elapsed: 6.5 s total: 0.0 B (0.0 B/s)
+unpacking linux/amd64 sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a...
+
+
+root@qemux86-64:~# ctr run -t docker.io/library/alpine:latest dtest /bin/sh
+/ # uname -a
+Linux qemux86-64 5.8.13-yocto-standard #1 SMP PREEMPT Tue Oct 6 12:23:29 UTC 2020 x86_64 Linux
+/ #
+
+
+ # root@qemux86-64:~# ctr c list
+CONTAINER IMAGE RUNTIME
+dtest docker.io/library/alpine:latest io.containerd.runc.v2
+
+root@qemux86-64:~# ctr c delete dtest
+```
\ No newline at end of file
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch b/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
new file mode 100644
index 0000000..8b43c8a
--- /dev/null
+++ b/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
@@ -0,0 +1,32 @@
+From 84874e47aa2025b8e73df0286c44f3b8a1d9fdb2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@...>
+Date: Mon, 2 Sep 2019 16:20:07 +0800
+Subject: [PATCH] Add build option "GODEBUG=1"
+
+Make will generate GDB friendly binary with this build option.
+
+Signed-off-by: Hui Zhu <teawater@...>
+
+Upstream-Status: Backport [c5a0c7f491b435e4eb45972903b00e2d8ed46495]
+
+Partly backport and refresh to v1.2.7
+Signed-off-by: Hongxu Jia <hongxu.jia@...>
+---
+ src/import/Makefile | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+Index: git/src/import/Makefile
+===================================================================
+--- git.orig/src/import/Makefile 2020-10-12 08:09:41.638977052 -0700
++++ git/src/import/Makefile 2020-10-12 08:10:49.783074373 -0700
+@@ -72,6 +72,10 @@
+ COMMANDS=ctr containerd containerd-stress
+ MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5
+
++ifndef GODEBUG
++ EXTRA_LDFLAGS += -s -w
++endif
++
+ ifdef BUILDTAGS
+ GO_BUILDTAGS = ${BUILDTAGS}
+ endif
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
new file mode 100644
index 0000000..7f4d751
--- /dev/null
+++ b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
@@ -0,0 +1,38 @@
+From 474b93f8f643651144304a6971ef476add7f06f8 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Tue, 25 May 2021 12:49:41 -0400
+Subject: [PATCH] Makefile: allow GO_BUILD_FLAGS to be externally specified
+
+Since our oe-core go infrastructure insists on both -pie and static
+builds (for the most part), and that is not recommended by many
+packages, we end up with errors like:
+
+ cannot find package runtime/cgo (using -importcfg)
+ ...
+ recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
+ cannot open file : open : no such file or directory
+
+Upstream-Status: Inappropriate: specific to OE go configuration and build
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git git.orig/src/import/Makefile git.orig/src/import/Makefile
+index c61418e60..54a10eb42 100644
+--- git.orig/src/import/Makefile
++++ git.orig/src/import/Makefile
+@@ -112,7 +112,8 @@ endif
+ GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n")
+
+ TESTFLAGS_RACE=
+-GO_BUILD_FLAGS=
++# allow flags to be exported and picked up.
++# GO_BUILD_FLAGS=
+ # See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809
+ GO_GCFLAGS=$(shell \
+ set -- ${GOPATHS}; \
+--
+2.19.1
+
diff --git a/recipes-containers/containerd/containerd-opencontainers_git.bb b/recipes-containers/containerd/containerd-opencontainers_git.bb
new file mode 100644
index 0000000..361ed25
--- /dev/null
+++ b/recipes-containers/containerd/containerd-opencontainers_git.bb
@@ -0,0 +1,127 @@
+HOMEPAGE = "https://github.com/docker/containerd"
+SUMMARY = "containerd is a daemon to control runC"
+DESCRIPTION = "containerd is a daemon to control runC, built for performance and density. \
+ containerd leverages runC's advanced features such as seccomp and user namespace \
+ support as well as checkpoint and restore for cloning and live migration of containers."
+
+
+SRCREV = "1e5ef943eb76627a6d3b6de8cd1ef6537f393a71"
+SRC_URI = "git://github.com/containerd/containerd;branch=release/1.5;protocol=https \
+ file://0001-Add-build-option-GODEBUG-1.patch \
+ file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \
+ "
+
+# Apache-2.0 for containerd
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89"
+
+CONTAINERD_VERSION = "v1.5.8"
+
+EXTRA_OEMAKE += "GODEBUG=1"
+
+PROVIDES += "virtual/containerd"
+RPROVIDES:${PN} = "virtual-containerd"
+
+S = "${WORKDIR}/git"
+
+PV = "${CONTAINERD_VERSION}+git${SRCPV}"
+
+inherit go
+inherit goarch
+
+GO_IMPORT = "import"
+
+CONTAINERD_PKG="github.com/containerd/containerd"
+
+INSANE_SKIP:${PN} += "ldflags"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ export GOARCH="${TARGET_GOARCH}"
+
+ # link fixups for compilation
+ rm -f ${S}/src/import/vendor/src
+ ln -sf ./ ${S}/src/import/vendor/src
+
+ mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/
+ mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/pkg/
+ mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/contrib/
+ # without this, the stress test parts of the build fail
+ cp ${S}/src/import/*.go ${S}/src/import/vendor/src/github.com/containerd/containerd
+
+ for c in content timeout ttrpcutil oom stdio process errdefs fs images mount snapshots linux api runtimes defaults progress \
+ protobuf reference diff platforms runtime remotes version archive dialer gc metadata \
+ metrics filters identifiers labels leases plugin server services \
+ cmd cio containers namespaces oci events log reaper sys rootfs nvidia seed apparmor seccomp \
+ cap cri userns atomic ioutil os registrar seutil runtimeoptions netns; do
+ if [ -d ${S}/src/import/${c} ]; then
+ ln -sfn ${S}/src/import/${c} ${S}/src/import/vendor/github.com/containerd/containerd/${c}
+ fi
+ if [ -d ${S}/src/import/pkg/${c} ]; then
+ ln -sfn ${S}/src/import/pkg/${c} ${S}/src/import/vendor/github.com/containerd/containerd/pkg/${c}
+ fi
+ if [ -d ${S}/src/import/contrib/${c} ]; then
+ ln -sfn ${S}/src/import/contrib/${c} ${S}/src/import/vendor/github.com/containerd/containerd/contrib/${c}
+ fi
+ done
+
+ export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+ export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export BUILDTAGS="no_btrfs static_build netgo"
+ export CFLAGS="${CFLAGS}"
+ export LDFLAGS="${LDFLAGS}"
+ export SHIM_CGO_ENABLED="${CGO_ENABLED}"
+ # fixes:
+ # cannot find package runtime/cgo (using -importcfg)
+ # ... recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
+ # cannot open file : open : no such file or directory
+ export GO_BUILD_FLAGS="-a -pkgdir dontusecurrentpkgs"
+ export GO111MODULE=off
+
+ cd ${S}/src/import
+ oe_runmake binaries
+}
+
+inherit systemd
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','containerd.service','',d)}"
+
+do_install() {
+ mkdir -p ${D}/${bindir}
+
+ cp ${S}/src/import/bin/containerd ${D}/${bindir}/containerd
+ cp ${S}/src/import/bin/containerd-shim ${D}/${bindir}/containerd-shim
+ cp ${S}/src/import/bin/containerd-shim-runc-v1 ${D}/${bindir}/containerd-shim-runc-v1
+ cp ${S}/src/import/bin/containerd-shim-runc-v2 ${D}/${bindir}/containerd-shim-runc-v2
+ cp ${S}/src/import/bin/ctr ${D}/${bindir}/containerd-ctr
+
+ ln -sf containerd ${D}/${bindir}/docker-containerd
+ ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim
+ ln -sf containerd-ctr ${D}/${bindir}/docker-containerd-ctr
+
+ ln -sf containerd-ctr ${D}/${bindir}/ctr
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${S}/src/import/containerd.service ${D}/${systemd_unitdir}/system
+ # adjust from /usr/local/bin to /usr/bin/
+ sed -e "s:/usr/local/bin/containerd:${bindir}/containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service
+ fi
+}
+
+FILES:${PN} += "${systemd_system_unitdir}/*"
+
+INSANE_SKIP:${PN} += "ldflags already-stripped"
+
+COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
+
+RDEPENDS:${BPN} += " virtual-runc"
+
+CVE_PRODUCT = "containerd"
diff --git a/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
new file mode 100644
index 0000000..544881e
--- /dev/null
+++ b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
@@ -0,0 +1,64 @@
+From 408e8b526d490af817a64b7220e8e2c3789de58f Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Sun, 10 Feb 2019 23:46:06 +0000
+Subject: [PATCH] build: use oe provided GO and flags
+
+We want to use the go compiler as defined in the oe-enviroment, not the
+generic call to 'go'. Without changing this, we'll get things like cgo
+errors and invalid flag combos.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: git/src/import/Makefile
+===================================================================
+--- git.orig/src/import/Makefile
++++ git/src/import/Makefile
+@@ -121,7 +121,7 @@
+ TESTFLAGS_PARALLEL ?= 8
+
+ # Use this to replace `go test` with, for instance, `gotestsum`
+-GOTEST ?= go test
++GOTEST ?= $(GO) test
+
+ OUTPUTDIR = $(join $(ROOTDIR), _output)
+ CRIDIR=$(OUTPUTDIR)/cri
+@@ -169,7 +169,7 @@
+
+ build: ## build the go packages
+ @echo "$(WHALE) $@"
+- @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES}
++ @$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} ${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES}
+
+ test: ## run tests, except integration tests and tests that require root
+ @echo "$(WHALE) $@"
+@@ -201,7 +201,7 @@
+
+ define BUILD_BINARY
+ @echo "$(WHALE) $@"
+-@go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$<
++@$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$<
+ endef
+
+ # Build a binary from a cmd.
+@@ -210,15 +210,15 @@
+
+ bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
+ @echo "$(WHALE) bin/containerd-shim"
+- @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
++ @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build -a -pkgdir dontusecurrentpkgs ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
+
+ bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
+ @echo "$(WHALE) bin/containerd-shim-runc-v1"
+- @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
++ @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build -a -pkgdir dontusecurrentpkgs ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
+
+ bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
+ @echo "$(WHALE) bin/containerd-shim-runc-v2"
+- @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
++ @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build -a -pkgdir dontusecurrentpkgs ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
+
+ binaries: $(BINARIES) ## build binaries
+ @echo "$(WHALE) $@"
diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb
new file mode 100644
index 0000000..5fe8fbd
--- /dev/null
+++ b/recipes-containers/docker/docker-ce_git.bb
@@ -0,0 +1,57 @@
+HOMEPAGE = "http://www.docker.com"
+SUMMARY = "Linux container runtime"
+DESCRIPTION = "Linux container runtime \
+ Docker complements kernel namespacing with a high-level API which \
+ operates at the process level. It runs unix processes with strong \
+ guarantees of isolation and repeatability across servers. \
+ . \
+ Docker is a great building block for automating distributed systems: \
+ large-scale web deployments, database clusters, continuous deployment \
+ systems, private PaaS, service-oriented architectures, etc. \
+ . \
+ This package contains the daemon and client, which are \
+ officially supported on x86_64 and arm hosts. \
+ Other architectures are considered experimental. \
+ . \
+ Also, note that kernel version 3.10 or above is required for proper \
+ operation of the daemon process, and that any lower versions may have \
+ subtle and/or glaring issues. \
+ "
+
+#
+# https://github.com/docker/docker-ce-packaging.git
+# common.mk:
+# DOCKER_CLI_REPO ?= https://github.com/docker/cli.git
+# DOCKER_ENGINE_REPO ?= https://github.com/docker/docker.git
+# REF ?= HEAD
+# DOCKER_CLI_REF ?= $(REF)
+# DOCKER_ENGINE_REF ?= $(REF)
+#
+# These follow the tags for our releases in the listed repositories
+# so we get that tag, and make it our SRCREVS:
+#
+
+SRCREV_docker = "d24c6dc5cf5e68dfb30027b2db454099566a9b9e"
+SRCREV_libnetwork = "64b7a4574d1426139437d20e81c0b6d391130ec8"
+SRCREV_cli = "62eae52c2a76f4c1dcf79dfc7b5ea3bf5eebab8b"
+SRCREV_FORMAT = "docker_libnetwork"
+SRC_URI = "\
+ git://github.com/docker/docker.git;branch=20.10;name=docker;protocol=https \
+ git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https \
+ git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli;protocol=https \
+ file://0001-libnetwork-use-GO-instead-of-go.patch \
+ file://docker.init \
+ file://0001-dynbinary-use-go-cross-compiler.patch \
+ file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \
+ "
+
+require docker.inc
+
+# Apache-2.0 for docker
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28"
+
+DOCKER_VERSION = "20.10.8-ce"
+PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
+
+CVE_PRODUCT = "docker"
diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc
new file mode 100644
index 0000000..40a3642
--- /dev/null
+++ b/recipes-containers/docker/docker.inc
@@ -0,0 +1,179 @@
+DEPENDS = " \
+ go-cli \
+ go-pty \
+ go-context \
+ go-mux \
+ go-patricia \
+ go-logrus \
+ go-fsnotify \
+ go-dbus \
+ go-capability \
+ go-systemd \
+ btrfs-tools \
+ sqlite3 \
+ go-distribution \
+ compose-file \
+ go-connections \
+ notary \
+ grpc-go \
+ libtool-native \
+ libtool \
+ "
+
+DEPENDS:append:class-target = " lvm2"
+RDEPENDS:${PN} = "util-linux util-linux-unshare iptables \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \
+ bridge-utils \
+ ca-certificates \
+ "
+RDEPENDS:${PN} += "virtual-containerd virtual-runc"
+
+RRECOMMENDS:${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat kernel-module-nf-conntrack-netlink kernel-module-xt-addrtype kernel-module-xt-masquerade"
+
+PROVIDES += "virtual/docker"
+
+# we want all the docker variant recpes to be installable via "docker"
+PACKAGE_NAME = "docker"
+RPROVIDES:${PN} += "docker"
+RPROVIDES:${PN}-dbg += "docker-dbg"
+RPROVIDES:${PN}-dev += "docker-dev"
+RPROVIDES:${PN}-contrip += "docker-dev"
+
+inherit pkgconfig
+PACKAGECONFIG ??= "docker-init"
+PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
+PACKAGECONFIG[docker-init] = ",,,docker-init"
+PACKAGECONFIG[transient-config] = "transient-config"
+
+
+GO_IMPORT = "import"
+S = "${WORKDIR}/git"
+
+
+inherit systemd update-rc.d
+inherit go
+inherit goarch
+inherit pkgconfig
+
+do_configure[noexec] = "1"
+
+DOCKER_PKG="github.com/docker/docker"
+# in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056
+BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper"
+
+do_compile() {
+ # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
+ # docker to download its dependencies but rather
+ # use dependencies packaged independently.
+ cd ${S}/src/import
+ rm -rf .gopath
+ mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
+ ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
+
+ mkdir -p .gopath/src/github.com/docker
+ ln -sf ${WORKDIR}/git/libnetwork .gopath/src/github.com/docker/libnetwork
+ ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli
+
+ export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+ export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export GOARCH=${TARGET_GOARCH}
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export DOCKER_BUILDTAGS='${BUILD_TAGS} ${PACKAGECONFIG_CONFARGS}'
+ export GO111MODULE=off
+
+ export DISABLE_WARN_OUTSIDE_CONTAINER=1
+
+ cd ${S}/src/import/
+
+ # this is the unsupported built structure
+ # that doesn't rely on an existing docker
+ # to build this:
+ VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" ./hack/make.sh dynbinary
+
+ # build the cli
+ cd ${S}/src/import/.gopath/src/github.com/docker/cli
+ export CFLAGS=""
+ export LDFLAGS=""
+ export DOCKER_VERSION=${DOCKER_VERSION}
+ VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" make dynbinary
+
+ # build the proxy
+ cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork
+ oe_runmake cross-local
+}
+
+do_install() {
+ mkdir -p ${D}/${bindir}
+ cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker
+ cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
+ cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system
+ # replaces one copied from above with one that uses the local registry for a mirror
+ install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system
+ rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm
+ fi
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
+ fi
+ # TLS key that docker creates at run-time if not found is what resides here
+ if ${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then
+ install -d ${D}${sysconfdir}
+ ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker
+ else
+ install -d ${D}${sysconfdir}/docker
+ fi
+
+ mkdir -p ${D}${datadir}/docker/
+ install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/
+}
+
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',d)}"
+SYSTEMD_AUTO_ENABLE:${PN} = "enable"
+
+INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}"
+INITSCRIPT_NAME:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}"
+INITSCRIPT_PARAMS:${PN} = "defaults"
+
+inherit useradd
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "-r docker"
+
+COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
+
+INSANE_SKIP:${PN} += "ldflags textrel"
+
+FILES:${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker"
+
+PACKAGES =+ "${PN}-contrib"
+FILES:${PN}-contrib += "${datadir}/docker/check-config.sh"
+RDEPENDS:${PN}-contrib += "bash"
+
+# By the docker-packaging repository and https://docs.docker.com/engine/install/centos/#installation-methods
+# docker is packaged by most distros with a split between the engine and the CLI.
+#
+# We do the same here, by introducing the -cli package
+#
+# But to keep existing use cases working, we also create a RDEPENDS between the main
+# docker package (the engine) and the cli, so existing "docker" package installs will
+# continue to work the same way. To have separate and non-redepending packages created
+# set the DOCKER_UNIFIED_PACKAGE variable to False
+#
+PACKAGES =+ "${PN}-cli"
+FILES:${PN}-cli += "${bindir}/docker"
+
+# set to "False" if packages should be generated for the cli and engine, and
+# NOT rdepend to get a classic one-package install
+DOCKER_UNIFIED_PACKAGE ?= "True"
+RDEPENDS:${PN} += "${@bb.utils.contains("DOCKER_UNIFIED_PACKAGE", "True", "${PN}-cli", "", d)}"
diff --git a/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch b/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
new file mode 100644
index 0000000..dc32261
--- /dev/null
+++ b/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
@@ -0,0 +1,27 @@
+From 650c882d3c53db118b01dd5e15fa1bc0ddaa36f1 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Thu, 15 Apr 2021 11:28:05 -0400
+Subject: [PATCH] cli: use external GO111MODULE and cross compiler
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ git/cli/scripts/build/binary | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git git/cli/scripts/build/binary git/cli/scripts/build/binary
+index e4c5e12a6b..7c47b75c2f 100755
+--- git/cli/scripts/build/binary
++++ git/cli/scripts/build/binary
+@@ -73,8 +73,7 @@ fi
+
+ echo "Building $GO_LINKMODE $(basename "${TARGET}")"
+
+-export GO111MODULE=auto
+
+-go build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}"
++${GO} build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}"
+
+ ln -sf "$(basename "${TARGET}")" "$(dirname "${TARGET}")/docker"
+--
+2.19.1
+
diff --git a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
new file mode 100644
index 0000000..971c60d
--- /dev/null
+++ b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
@@ -0,0 +1,23 @@
+From bbf600cc4d46c3f7ec0c1b486790a2402d41f550 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Tue, 30 Jun 2020 22:23:33 -0400
+Subject: [PATCH] dynbinary: use go cross compiler
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ hack/make/.binary | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/src/import/hack/make/.binary
+===================================================================
+--- git.orig/src/import/hack/make/.binary
++++ git/src/import/hack/make/.binary
+@@ -81,7 +81,7 @@
+
+ echo "Building: $DEST/$BINARY_FULLNAME"
+ echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\""
+- go build \
++ ${GO} build \
+ -o "$DEST/$BINARY_FULLNAME" \
+ "${BUILDFLAGS[@]}" \
+ -ldflags "
diff --git a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
new file mode 100644
index 0000000..c623b26
--- /dev/null
+++ b/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
@@ -0,0 +1,59 @@
+From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Fri, 6 Apr 2018 23:58:22 -0400
+Subject: [PATCH] libnetwork: use $(GO) instead of go
+
+Ensure that the libnetwork makefile uses the go cross flags and
+utilities.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+Index: git/libnetwork/Makefile
+===================================================================
+--- git.orig/libnetwork/Makefile
++++ git/libnetwork/Makefile
+@@ -45,9 +45,9 @@
+ build-local:
+ @echo "🐳 $@"
+ @mkdir -p "bin"
+- go build -tags experimental -o "bin/dnet" ./cmd/dnet
+- go build -o "bin/docker-proxy" ./cmd/proxy
+- CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic
++ $(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet
++ $(GO) build -o "bin/proxy" ./cmd/proxy
++ CGO_ENABLED=0 $(GO) build -o "bin/diagnosticClient" ./cmd/diagnostic
+ CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go
+
+ build-images:
+@@ -82,8 +82,8 @@
+
+ cross-local:
+ @echo "🐳 $@"
+- go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet
+- go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy
++ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy
++ @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet
+
+ # Rebuild protocol buffers.
+ # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt.
+@@ -130,7 +130,7 @@
+ if ls $$dir/*.go &> /dev/null; then \
+ pushd . &> /dev/null ; \
+ cd $$dir ; \
+- go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \
++ $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \
+ ret=$$? ;\
+ if [ $$ret -ne 0 ]; then exit $$ret; fi ;\
+ popd &> /dev/null; \
+@@ -145,7 +145,7 @@
+ # Depends on binaries because vet will silently fail if it can not load compiled imports
+ vet: ## run go vet
+ @echo "🐳 $@"
+- @test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)"
++ @test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)"
+
+ misspell:
+ @echo "🐳 $@"
diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/files/docker.init
new file mode 100644
index 0000000..24f8fea
--- /dev/null
+++ b/recipes-containers/docker/files/docker.init
@@ -0,0 +1,131 @@
+#!/bin/sh
+#
+# /etc/rc.d/init.d/docker
+#
+# Daemon for docker.com
+#
+# chkconfig: 2345 95 95
+# description: Daemon for docker.com
+
+### BEGIN INIT INFO
+# Provides: docker
+# Required-Start: $network cgconfig
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop docker
+# Description: Daemon for docker.com
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+prog="dockerd"
+unshare=/usr/bin/unshare
+exec="/usr/bin/$prog"
+pidfile="/var/run/$prog.pid"
+lockfile="/var/lock/subsys/$prog"
+logfile="/var/log/$prog"
+other_args="--pidfile $pidfile --registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+
+ check_for_cleanup
+
+ if ! [ -f $pidfile ]; then
+ printf "Starting $prog:\t"
+ echo -e "\n$(date)\n" >> $logfile
+ "$unshare" -m -- $exec $other_args >> $logfile 2>&1 &
+ pid=$!
+ touch $lockfile
+ # wait up to 10 seconds for the pidfile to exist. see
+ # https://github.com/docker/docker/issues/5359
+ tries=0
+ while [ ! -f $pidfile -a $tries -lt 10 ]; do
+ sleep 1
+ tries=$((tries + 1))
+ done
+ success
+ echo
+ else
+ failure
+ echo
+ printf "$pidfile still exists...\n"
+ exit 7
+ fi
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+check_for_cleanup() {
+ if [ -f ${pidfile} ]; then
+ /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile}
+ fi
+}
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+
+exit $?
diff --git a/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch
new file mode 100644
index 0000000..c855d7b
--- /dev/null
+++ b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch
@@ -0,0 +1,37 @@
+From 0fe50d2ca4517f5e3070585040f35ace413acd44 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Tue, 24 Aug 2021 11:38:23 -0400
+Subject: [PATCH] Makefile: respect GOBUILDFLAGS for runc and remove recvtty
+ from static
+
+Signed-off-by: Chen Qi <Qi.Chen@...>
+[bva: refreshed for release 1.0.2]
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ Makefile | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/import/Makefile b/src/import/Makefile
+index efbddf0d..4b174c80 100644
+--- a/src/import/Makefile
++++ b/src/import/Makefile
+@@ -24,7 +24,7 @@ ifeq ($(shell $(GO) env GOOS),linux)
+ endif
+ endif
+ endif
+-GO_BUILD := $(GO) build -trimpath $(MOD_VENDOR) $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
++GO_BUILD := $(GO) build $(GOBUILDFLAGS) -trimpath $(MOD_VENDOR) $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
+ -ldflags "-X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
+ GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build -trimpath $(MOD_VENDOR) $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \
+ -ldflags "-extldflags -static -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
+@@ -41,7 +41,6 @@ recvtty:
+
+ static:
+ $(GO_BUILD_STATIC) -o runc .
+- $(GO_BUILD_STATIC) -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
+
+ release:
+ script/release.sh -r release/$(VERSION) -v $(VERSION)
+--
+2.19.1
+
diff --git a/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
new file mode 100644
index 0000000..bcf4c10
--- /dev/null
+++ b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
@@ -0,0 +1,30 @@
+From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@...>
+Date: Wed, 12 Jul 2017 13:35:03 -0700
+Subject: [PATCH] runc: Add --console-socket=/dev/null
+
+This allows for setting up a detached session where you do not want to
+set the terminal to false in the config.json. More or less this is a
+runtime override.
+
+Signed-off-by: Jason Wessel <jason.wessel@...>
+---
+ utils_linux.go | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+Index: git/src/import/utils_linux.go
+===================================================================
+--- git.orig/src/import/utils_linux.go
++++ git/src/import/utils_linux.go
+@@ -267,6 +267,11 @@
+ }
+
+ func (r *runner) run(config *specs.Process) (int, error) {
++ if (r.consoleSocket == "/dev/null") {
++ r.detach = false
++ r.consoleSocket = ""
++ config.Terminal = false
++ }
+ var err error
+ defer func() {
+ if err != nil {
diff --git a/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch b/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
new file mode 100644
index 0000000..4350c40
--- /dev/null
+++ b/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
@@ -0,0 +1,131 @@
+From cd7d76a6d1ecb1856f6ed666fb5c30dc105aa94e Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@...>
+Date: Tue, 5 Dec 2017 18:28:28 -0800
+Subject: [PATCH] runc-docker: Allow "run start ..." to daemonize with $SIGUSR1_PARENT_PID
+
+The runc-docker has all the code in it to properly run a stop hook if
+you use it in the foreground. It doesn't work in the back ground
+because there is no way for a golang application to fork a child exit
+out of the parent process because all the golang threads stay with the
+parent.
+
+This patch has three parts that happen ONLY when $SIGUSR1_PARENT_PID
+is set.
+
+1) The code was copied which performs the normal the signal handling
+ block which is used for the foreground operation of runc.
+
+2) At the point where runc start would normally exit, it closes
+ stdin/stdout/stderr so it would be possible to daemonize "runc start ...".
+
+3) The code to send a SIGUSR1 to the parent process was added. The
+ idea being that a parent process would simply exit at that point
+ because it was blocking until runc performed everything it was
+ required to perform.
+
+Signed-off-by: Jason Wessel <jason.wessel@...>
+---
+ signals.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++----
+ utils_linux.go | 2 +-
+ 2 files changed, 51 insertions(+), 5 deletions(-)
+
+Index: git/src/import/signals.go
+===================================================================
+--- git.orig/src/import/signals.go
++++ git/src/import/signals.go
+@@ -5,7 +5,9 @@
+ import (
+ "os"
+ "os/signal"
++ "syscall" // only for Signal
+
++ "strconv"
+ "github.com/opencontainers/runc/libcontainer"
+ "github.com/opencontainers/runc/libcontainer/system"
+ "github.com/opencontainers/runc/libcontainer/utils"
+@@ -55,9 +57,6 @@
+ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach bool) (int, error) {
+ // make sure we know the pid of our main process so that we can return
+ // after it dies.
+- if detach && h.notifySocket == nil {
+- return 0, nil
+- }
+
+ pid1, err := process.Pid()
+ if err != nil {
+@@ -67,12 +66,61 @@
+ if h.notifySocket != nil {
+ if detach {
+ _ = h.notifySocket.run(pid1)
+- return 0, nil
+ }
+ _ = h.notifySocket.run(os.Getpid())
+ go func() { _ = h.notifySocket.run(0) }()
+ }
+
++ if (detach) {
++ // This allows the parent process to daemonize this process
++ // so long as stdin/stderr/stdout are closed
++ if envVal := os.Getenv("SIGUSR1_PARENT_PID"); envVal != "" {
++ // Close stdin/stdout/stderr
++ os.Stdin.Close()
++ os.Stdout.Close()
++ os.Stderr.Close()
++ // Notify parent to detach
++ i, err := strconv.Atoi(envVal)
++ if (err != nil) {
++ return 0, nil
++ }
++ unix.Kill(i, unix.SIGUSR1)
++ // Loop waiting on the child to signal or exit,
++ // after which all stop hooks will be run
++ for s := range h.signals {
++ switch s {
++ case unix.SIGCHLD:
++ exits, err := h.reap()
++ if err != nil {
++ logrus.Error(err)
++ }
++ for _, e := range exits {
++ logrus.WithFields(logrus.Fields{
++ "pid": e.pid,
++ "status": e.status,
++ }).Debug("process exited")
++ if e.pid == pid1 {
++ // call Wait() on the process even though we already have the exit
++ // status because we must ensure that any of the go specific process
++ // fun such as flushing pipes are complete before we return.
++ process.Wait()
++ if h.notifySocket != nil {
++ h.notifySocket.Close()
++ }
++ return e.status, nil
++ }
++ }
++ default:
++ logrus.Debugf("sending signal to process %s", s)
++ if err := unix.Kill(pid1, s.(syscall.Signal)); err != nil {
++ logrus.Error(err)
++ }
++ }
++ }
++ }
++ return 0, nil
++ }
++
+ // Perform the initial tty resize. Always ignore errors resizing because
+ // stdout might have disappeared (due to races with when SIGHUP is sent).
+ _ = tty.resize()
+Index: git/src/import/utils_linux.go
+===================================================================
+--- git.orig/src/import/utils_linux.go
++++ git/src/import/utils_linux.go
+@@ -345,7 +345,7 @@
+ if err != nil {
+ r.terminate(process)
+ }
+- if detach {
++ if (detach && os.Getenv("SIGUSR1_PARENT_PID") == "") {
+ return 0, nil
+ }
+ if err == nil {
diff --git a/recipes-containers/runc/runc-docker_git.bb b/recipes-containers/runc/runc-docker_git.bb
new file mode 100644
index 0000000..4a46fd2
--- /dev/null
+++ b/recipes-containers/runc/runc-docker_git.bb
@@ -0,0 +1,14 @@
+include runc.inc
+
+# Note: this rev is before the required protocol field, update when all components
+# have been updated to match.
+SRCREV_runc-docker = "04bcb7c71550a0212bfb876db7bac723ae13296a"
+SRC_URI = "git://github.com/opencontainers/runc;branch=release-1.0;name=runc-docker;protocol=https \
+ file://0001-runc-Add-console-socket-dev-null.patch \
+ file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \
+ file://0001-runc-docker-SIGUSR1-daemonize.patch \
+ "
+
+RUNC_VERSION = "1.0.2"
+
+CVE_PRODUCT = "runc"
diff --git a/recipes-containers/runc/runc-opencontainers_git.bb b/recipes-containers/runc/runc-opencontainers_git.bb
new file mode 100644
index 0000000..16ef509
--- /dev/null
+++ b/recipes-containers/runc/runc-opencontainers_git.bb
@@ -0,0 +1,10 @@
+include runc.inc
+
+SRCREV = "86d83333d765f4535e4898d6778388dab715eb7c"
+SRC_URI = " \
+ git://github.com/opencontainers/runc;branch=release-1.0;protocol=https \
+ file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \
+ "
+RUNC_VERSION = "1.0.2"
+
+CVE_PRODUCT = "runc"
diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc
new file mode 100644
index 0000000..c8e7427
--- /dev/null
+++ b/recipes-containers/runc/runc.inc
@@ -0,0 +1,83 @@
+HOMEPAGE = "https://github.com/opencontainers/runc"
+SUMMARY = "runc container cli tools"
+DESCRIPTION = "runc is a CLI tool for spawning and running containers according to the OCI specification."
+
+# Apache-2.0 for containerd
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
+
+S = "${WORKDIR}/git"
+
+PV = "${RUNC_VERSION}+git${SRCPV}"
+
+inherit go
+inherit goarch
+inherit pkgconfig
+
+PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
+PACKAGECONFIG[selinux] = "selinux,,libselinux"
+# This PACKAGECONFIG serves the purpose of whether building runc as static or not
+PACKAGECONFIG[static] = ""
+
+PACKAGECONFIG ??= "static \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+ "
+
+
+PROVIDES += "virtual/runc"
+RPROVIDES:${PN} = "virtual-runc"
+
+GO_IMPORT = "import"
+
+LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
+
+do_configure[noexec] = "1"
+
+
+DISTRO_BUILDTAGS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
+
+EXTRA_OEMAKE="BUILDTAGS='${PACKAGECONFIG_CONFARGS} ${DISTRO_BUILDTAGS}' GO=${GO}"
+
+do_compile() {
+ # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
+ # docker to download its dependencies but rather
+ # use dependencies packaged independently.
+ cd ${S}/src/import
+ rm -rf .gopath
+ dname=`dirname "${LIBCONTAINER_PACKAGE}"`
+ bname=`basename "${LIBCONTAINER_PACKAGE}"`
+ mkdir -p .gopath/src/${dname}
+
+ (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
+ export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+
+ # Fix up symlink for go-cross compiler
+ rm -f ${S}/src/import/vendor/src
+ ln -sf ./ ${S}/src/import/vendor/src
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export GO=${GO}
+
+ export CFLAGS=""
+ export LDFLAGS=""
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'static', 'true', 'false', d)}; then
+ oe_runmake static
+ else
+ oe_runmake runc
+ fi
+}
+
+do_install() {
+ mkdir -p ${D}/${bindir}
+
+ cp ${S}/src/import/runc ${D}/${bindir}/runc
+ ln -sf runc ${D}/${bindir}/docker-runc
+}
+
diff --git a/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch b/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
new file mode 100644
index 0000000..6797720
--- /dev/null
+++ b/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
@@ -0,0 +1,28 @@
+From b99ef9954a34cffd85a5cc09922b201ae11b494d Mon Sep 17 00:00:00 2001
+From: Theodor Gherzan <theodor@...>
+Date: Mon, 5 Jun 2017 18:16:56 +0200
+Subject: [PATCH] Do not strip the output binary, allow yocto to do this
+
+Upstream-Status: Inappropriate [configuration specific]
+
+Signed-off-by: Theodor Gherzan <theodor@...>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5b93ba..c2907e2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -54,7 +54,7 @@ if(NOT HAS_BUILTIN_FORTIFY)
+ endif()
+
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Werror -Wextra -Wall -pedantic-errors -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat")
+-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-s")
++set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bsymbolic-functions -Wl,-z,relro")
+
+ # Build
+
+--
+2.7.4
+
diff --git a/recipes-containers/tini/tini_0.19.0.bb b/recipes-containers/tini/tini_0.19.0.bb
new file mode 100644
index 0000000..914cffb
--- /dev/null
+++ b/recipes-containers/tini/tini_0.19.0.bb
@@ -0,0 +1,32 @@
+HOMEPAGE = "http://github.com/krallin/tini"
+SUMMARY = "Minimal init for containers"
+DESCRIPTION = "Tini is the simplest init you could think of. All Tini does is \
+spawn a single child (Tini is meant to be run in a container), and wait for \
+it to exit all the while reaping zombies and performing signal forwarding. "
+
+SRCREV = "b9f42a0e7bb46efea0c9e3d8610c96ab53b467f8"
+SRC_URI = " \
+ git://github.com/krallin/tini.git;branch=master;protocol=https \
+ file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \
+ "
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ffc9091894702bc5dcf4cc0085561ef5"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
+
+# tini links with -static, so no PIE for us
+SECURITY_CFLAGS:pn-${PN} = "${SECURITY_NO_PIE_CFLAGS}"
+
+inherit cmake
+
+do_install() {
+ mkdir -p ${D}/${bindir}
+ install -m 0755 ${B}/tini-static ${D}/${bindir}/docker-init
+}
+
+# Tini is the currently the provider for docker-init
+PROVIDES += "docker-init"
+RPROVIDES:${PN} = "docker-init"
diff --git a/recipes-devtools/go/compose-file_git.bb b/recipes-devtools/go/compose-file_git.bb
new file mode 100644
index 0000000..c33a7ac
--- /dev/null
+++ b/recipes-devtools/go/compose-file_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Parser for the Compose file format (version 3)"
+HOMEPAGE = "https://github.com/aanand/compose-file"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=9cd86830b557232ce55e2a6b47387471"
+
+SRCNAME = "compose-file"
+
+PKG_NAME = "github.com/aanand/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "a3e58764f50597b6217fec07e9bff7225c4a1719"
+PV = "3.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+ if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+ mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+ fi
+ cp $j ${D}${prefix}/local/go/$j
+ done
+ cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_compose_file_sysroot_preprocess"
+
+go_compose_file_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
diff --git a/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch b/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch
new file mode 100644
index 0000000..873d7ab
--- /dev/null
+++ b/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch
@@ -0,0 +1,30 @@
+From 4db28c98481056c41097f808335c37e8517fe485 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@...>
+Date: Fri, 7 Aug 2020 23:39:18 -0400
+Subject: [PATCH] build: use instead of 'go'
+
+While we can get away with 'go' if the host/target arch match, the
+new go-binary toolchain blows up in a cross compile situation.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@...>
+---
+ gobuild/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/src/import/gobuild/Makefile
+===================================================================
+--- git.orig/src/import/gobuild/Makefile
++++ git/src/import/gobuild/Makefile
+@@ -19,10 +19,10 @@
+
+ ${GODEPPATHS}:
+ mkdir -p ${GOSRC}
+- GOPATH=${GOPATH} go get -d $(subst ${GOSRC}/,,$@)
++ GOPATH=${GOPATH} ${GO} get -d $(subst ${GOSRC}/,,$@)
+
+ ${BIN}: ${GODEPPATHS} $(filter %/$@.go, ${MAIN})
+- GOPATH=${GOPATH} ${ARCH} go build $(filter %/$@.go, ${MAIN})
++ GOPATH=${GOPATH} ${ARCH} ${GO} build $(filter %/$@.go, ${MAIN})
+
+ clean:
+ rm -f ${BIN}
diff --git a/recipes-devtools/go/go-build_git.bb b/recipes-devtools/go/go-build_git.bb
new file mode 100644
index 0000000..831b3c0
--- /dev/null
+++ b/recipes-devtools/go/go-build_git.bb
@@ -0,0 +1,58 @@
+HOMEPAGE = "https://github.com/lf-edge/runx"
+SUMMARY = "console for runx"
+DESCRIPTION = "Xen Runtime for OCI"
+
+SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
+
+SRC_URI = "\
+ git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
+ file://0001-build-use-instead-of-go.patch \
+ "
+SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b"
+SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=945fc9aa694796a6337395cc291ddd8c"
+
+S = "${WORKDIR}/git"
+PV = "0.1-git${SRCREV_runx}"
+
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "vmsep"
+GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
+
+inherit pkgconfig
+
+GO_IMPORT = "import"
+inherit go
+
+RDEPENDS:${PN}-dev = "bash"
+
+do_compile() {
+
+ export GOARCH="${TARGET_GOARCH}"
+ cd ${S}/src/import/gobuild
+
+ # Build the target binaries
+ export GOARCH="${TARGET_GOARCH}"
+ # Pass the needed cflags/ldflags so that cgo can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CC="${CC}"
+ export LD="${LD}"
+ export GOBIN=""
+ export GO111MODULE=off
+
+ oe_runmake GO=${GO}
+}
+
+do_install() {
+
+ install -d ${D}${datadir}/runX
+ install -m 755 ${B}/src/import/gobuild/serial_fd_handler ${D}${datadir}/runX/
+}
+
+FILES:${PN} += "${datadir}/runX/*"
diff --git a/recipes-devtools/go/go-capability_git.bb b/recipes-devtools/go/go-capability_git.bb
new file mode 100644
index 0000000..7e5ab11
--- /dev/null
+++ b/recipes-devtools/go/go-capability_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Utilities for manipulating POSIX capabilities in Go."
+HOMEPAGE = "https://github.com/syndtr/gocapability"
+SECTION = "devel/go"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a7304f5073e7be4ba7bffabbf9f2bbca"
+
+SRCNAME = "gocapability"
+
+PKG_NAME = "github.com/syndtr/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "2c00daeb6c3b45114c80ac44119e7b8801fdd852"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_capability_sysroot_preprocess"
+
+go_capability_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-cli_git.bb b/recipes-devtools/go/go-cli_git.bb
new file mode 100644
index 0000000..ae67f8e
--- /dev/null
+++ b/recipes-devtools/go/go-cli_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A small package for building command line apps in Go"
+HOMEPAGE = "https://github.com/codegangsta/cli"
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ed9b539ed65d73926f30ff1f1587dc44"
+
+SRCNAME = "cli"
+
+PKG_NAME = "github.com/codegangsta/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "27ecc97192df1bf053a22b04463f2b51b8b8373e"
+PV = "1.1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_cli_sysroot_preprocess"
+
+go_cli_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-connections_git.bb b/recipes-devtools/go/go-connections_git.bb
new file mode 100644
index 0000000..ebfdb9f
--- /dev/null
+++ b/recipes-devtools/go/go-connections_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Utility package to work with network connections"
+HOMEPAGE = "https://github.com/docker/connections"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=04424bc6f5a5be60691b9824d65c2ad8"
+
+SRCNAME = "go-connections"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "4ccf312bf1d35e5dbda654e57a9be4c3f3cd0366"
+PV = "0.2.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+ if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+ mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+ fi
+ cp $j ${D}${prefix}/local/go/$j
+ done
+ cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_connections_sysroot_preprocess"
+
+go_connections_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-context_git.bb b/recipes-devtools/go/go-context_git.bb
new file mode 100644
index 0000000..37f39b3
--- /dev/null
+++ b/recipes-devtools/go/go-context_git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "A golang registry for global request variables."
+HOMEPAGE = "https://github.com/gorilla/context"
+SECTION = "devel/go"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c50f6bd9c1e15ed0bad3bea18e3c1b7f"
+
+SRCNAME = "context"
+
+PKG_NAME = "github.com/gorilla/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "14f550f51af52180c2eefed15e5fd18d63c0a64a"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_context_sysroot_preprocess"
+
+go_context_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-dbus_git.bb b/recipes-devtools/go/go-dbus_git.bb
new file mode 100644
index 0000000..4bf44d6
--- /dev/null
+++ b/recipes-devtools/go/go-dbus_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Native Go bindings for D-Bus"
+HOMEPAGE = "https://github.com/godbus/dbus"
+SECTION = "devel/go"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=09042bd5c6c96a2b9e45ddf1bc517eed"
+
+SRCNAME = "dbus"
+
+PKG_NAME = "github.com/godbus/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "5f6efc7ef2759c81b7ba876593971bfce311eab3"
+PV = "4.0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_dbus_sysroot_preprocess"
+
+go_dbus_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-distribution_git.bb b/recipes-devtools/go/go-distribution_git.bb
new file mode 100644
index 0000000..948831b
--- /dev/null
+++ b/recipes-devtools/go/go-distribution_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "The Docker toolset to pack, ship, store, and deliver content"
+HOMEPAGE = "https://github.com/docker/distribution"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRCNAME = "distribution"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=docker/1.13;destsuffix=git/src/${PKG_NAME};protocol=https"
+
+SRCREV = "28602af35aceda2f8d571bad7ca37a54cf0250bc"
+PV = "2.6.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+ if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+ mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+ fi
+ cp $j ${D}${prefix}/local/go/$j
+ done
+ cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_distribution_digeset_sysroot_preprocess"
+
+go_distribution_digeset_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-fsnotify_git.bb b/recipes-devtools/go/go-fsnotify_git.bb
new file mode 100644
index 0000000..8aa1c76
--- /dev/null
+++ b/recipes-devtools/go/go-fsnotify_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A golang registry for global request variables."
+HOMEPAGE = "https://github.com/go-fsnotify/fsnotify"
+SECTION = "devel/go"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c38914c9a7ab03bb2b96d4baaee10769"
+
+SRCNAME = "fsnotify"
+
+PKG_NAME = "github.com/fsnotify/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6"
+PV = "1.2.11+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_fsnotify_sysroot_preprocess"
+
+go_fsnotify_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-libtrust_git.bb b/recipes-devtools/go/go-libtrust_git.bb
new file mode 100644
index 0000000..e2a28ec
--- /dev/null
+++ b/recipes-devtools/go/go-libtrust_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Primitives for identity and authorization"
+HOMEPAGE = "https://github.com/docker/libtrust"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
+
+SRCNAME = "libtrust"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "9cbd2a1374f46905c68a4eb3694a130610adc62a"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_libtrust_sysroot_preprocess"
+
+go_libtrust_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-logrus_git.bb b/recipes-devtools/go/go-logrus_git.bb
new file mode 100644
index 0000000..2c59d34
--- /dev/null
+++ b/recipes-devtools/go/go-logrus_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A golang registry for global request variables."
+HOMEPAGE = "https://github.com/Sirupsen/logrus"
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8dadfef729c08ec4e631c4f6fc5d43a0"
+
+SRCNAME = "logrus"
+
+PKG_NAME = "github.com/Sirupsen/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "d26492970760ca5d33129d2d799e34be5c4782eb"
+PV = "0.11.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_logrus_sysroot_preprocess"
+
+go_logrus_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-md2man_git.bb b/recipes-devtools/go/go-md2man_git.bb
new file mode 100644
index 0000000..aa05899
--- /dev/null
+++ b/recipes-devtools/go/go-md2man_git.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "A markdown to manpage generator."
+HOMEPAGE = "https://github.com/cpuguy83/go-md2man"
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE.md;md5=80794f9009df723bbc6fe19234c9f517"
+
+BBCLASSEXTEND = "native"
+
+GO_IMPORT = "github.com/cpuguy83/go-md2man"
+#GO_INSTALL = "${GO_IMPORT}/bin/go-md2man"
+
+SRC_URI = "git://${GO_IMPORT}.git;branch=master;protocol=https"
+
+SRCREV = "f79a8a8ca69da163eee19ab442bedad7a35bba5a"
+PV = "1.0.10+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit go
+
+do_compile:prepend() {
+ export GO111MODULE=off
+}
diff --git a/recipes-devtools/go/go-metalinter_git.bb b/recipes-devtools/go/go-metalinter_git.bb
new file mode 100644
index 0000000..3dda45c
--- /dev/null
+++ b/recipes-devtools/go/go-metalinter_git.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Go Meta Linter."
+HOMEPAGE = "https://github.com/alecthomas/gometalinter"
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dee20b35647295553d32faef05846a7b"
+
+BBCLASSEXTEND = "native"
+
+SRCNAME = "gometalinter"
+
+PKG_NAME = "github.com/alecthomas/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "e8d801238da6f0dfd14078d68f9b53fa50a7eeb5"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-mux_git.bb b/recipes-devtools/go/go-mux_git.bb
new file mode 100644
index 0000000..3f939f4
--- /dev/null
+++ b/recipes-devtools/go/go-mux_git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "A powerful URL router and dispatcher for golang."
+HOMEPAGE = "https://github.com/gorilla/mux"
+SECTION = "devel/go"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c50f6bd9c1e15ed0bad3bea18e3c1b7f"
+
+SRCNAME = "mux"
+
+PKG_NAME = "github.com/gorilla/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "136d54f81f00414c45c3c68dd47e98cc97519c5e"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_mux_sysroot_preprocess"
+
+go_mux_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-patricia_git.bb b/recipes-devtools/go/go-patricia_git.bb
new file mode 100644
index 0000000..4c29b57
--- /dev/null
+++ b/recipes-devtools/go/go-patricia_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A generic patricia trie (also called radix tree) implemented in Go (Golang)"
+HOMEPAGE = "https://github.com/gorilla/context"
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9949b99212edd6b1e24ce702376c3baf"
+
+SRCNAME = "go-patricia"
+
+PKG_NAME = "github.com/tchap/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "666120de432aea38ab06bd5c818f04f4129882c9"
+PV = "2.2.6+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_patricia_sysroot_preprocess"
+
+go_patricia_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-pty_git.bb b/recipes-devtools/go/go-pty_git.bb
new file mode 100644
index 0000000..132e82d
--- /dev/null
+++ b/recipes-devtools/go/go-pty_git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "PTY interface for Go"
+HOMEPAGE = "https://github.com/creack/pty"
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://License;md5=93958070863d769117fa33b129020050"
+
+SRCNAME = "pty"
+
+PKG_NAME = "github.com/creack/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "05017fcccf23c823bfdea560dcc958a136e54fb7"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_pty_sysroot_preprocess"
+
+go_pty_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-systemd_git.bb b/recipes-devtools/go/go-systemd_git.bb
new file mode 100644
index 0000000..91f67da
--- /dev/null
+++ b/recipes-devtools/go/go-systemd_git.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "Go bindings to systemd socket activation, journal, D-Bus, and unit files"
+HOMEPAGE = "https://github.com/coreos/go-systemd"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=19cbd64715b51267a47bf3750cc6a8a5"
+
+SRCNAME = "systemd"
+
+PKG_NAME = "github.com/coreos/go-${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=main;protocol=https"
+
+SRCREV = "b4a58d95188dd092ae20072bac14cece0e67c388"
+PV = "4+git${SRCPV}"
+
+RDEPENDS:${PN} += "bash"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_systemd_sysroot_preprocess"
+
+go_systemd_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/grpc-go_git.bb b/recipes-devtools/go/grpc-go_git.bb
new file mode 100644
index 0000000..b516e21
--- /dev/null
+++ b/recipes-devtools/go/grpc-go_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The Go language implementation of gRPC. HTTP/2 based RPC"
+HOMEPAGE = "https://github.com/grpc/grpc-go"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRCNAME = "grpc-go"
+
+PKG_NAME = "google.golang.org/grpc"
+SRC_URI = "git://github.com/grpc/${SRCNAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "5d8e5aad40bedb696205b96b786f1d0e1326b3f8"
+PV = "1.41.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+ if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+ mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+ fi
+ cp $j ${D}${prefix}/local/go/$j
+ done
+ cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_grpc_sysroot_preprocess"
+
+go_grpc_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += " \
+ ${prefix}/local/go/src/${PKG_NAME}/* \
+"
diff --git a/recipes-devtools/go/notary_git.bb b/recipes-devtools/go/notary_git.bb
new file mode 100644
index 0000000..972da5e
--- /dev/null
+++ b/recipes-devtools/go/notary_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Notary is a Docker project that allows anyone to have trust over arbitrary collections of data"
+HOMEPAGE = "https://github.com/docker/notary"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=3596b980bb036e0875174ed15e4b982a"
+
+SRCNAME = "notary"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "d6e1431feb32348e0650bf7551ac5cffd01d857b"
+PV = "0.6.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+ for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+ if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+ mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+ fi
+ cp $j ${D}${prefix}/local/go/$j
+ done
+ cp -r ${S}/src/${PKG_NAME}/LICENSE ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_notary_sysroot_preprocess"
+
+go_notary_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+ cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
--
2.20.1


[meta-lts-mixins][dunfell/docker PATCH 1/2] Initial commit: add license, readme, layer configuration.

Alexander Kanavin
 

Reviewed-by: Martin Kaistra <martin.kaistra@...>
Signed-off-by: Alexander Kanavin <alex@...>
---
COPYING.MIT | 17 +++++++++++++++++
README | 10 ++++++++++
conf/layer.conf | 23 +++++++++++++++++++++++
3 files changed, 50 insertions(+)
create mode 100644 COPYING.MIT
create mode 100644 README
create mode 100644 conf/layer.conf

diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..fb950dc
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,17 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..417038e
--- /dev/null
+++ b/README
@@ -0,0 +1,10 @@
+"Mixin" layer for adding latest Docker versions into the Yocto Project LTS.
+
+This is a supplementary layer to dunfell/go branch of meta-lts-mixins. As that
+layer updates go toolchain to newer versions, this renders the docker recipes
+from dunfell branch of meta-virtualization unbuildable. The purpose of this layer
+is to backport latest, compatible docker from meta-virtualization master to
+dunfell.
+
+Maintainers:
+Alexander Kanavin <alex@...>
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..9918c46
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,23 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "lts-docker-mixin"
+BBFILE_PATTERN_lts-docker-mixin := "^${LAYERDIR}/"
+BBFILE_PRIORITY_lts-docker-mixin = "6"
+
+LAYERSERIES_COMPAT_lts-docker-mixin = "dunfell"
+
+LAYERDEPENDS_lts-docker-mixin = " \
+ core \
+ openembedded-layer \
+ networking-layer \
+ meta-python \
+"
+
+PREFERRED_PROVIDER_virtual/runc ?= "runc-opencontainers"
+PREFERRED_PROVIDER_virtual/containerd ?= "containerd-opencontainers"
+PREFERRED_PROVIDER_virtual/docker ?= "docker-ce"
+
--
2.20.1

1441 - 1460 of 57408