meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [meta-virtualization][master][kirkstone][PATCH 1/3] docker-distribution: fix the inehrit and systemd settings
@ 2022-06-10  4:20 Chen Qi
  2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts Chen Qi
  2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 3/3] docker-distribution: upgrade to 2.8.1 Chen Qi
  0 siblings, 2 replies; 6+ messages in thread
From: Chen Qi @ 2022-06-10  4:20 UTC (permalink / raw)
  To: meta-virtualization

In order for systemd variables such as SYSTEMD_AUTO_ENABLE to have
effect, we need to inherit the systemd class. We also need to specify
the package which contains the service.

As go.bbclass already inherits goarch.bbclass, we only need to inehrit
go.bbclass.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../docker-distribution/docker-distribution_git.bb            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
index 95e2b66c..1d074bf3 100644
--- a/recipes-containers/docker-distribution/docker-distribution_git.bb
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -16,8 +16,7 @@ S = "${WORKDIR}/git/src/github.com/docker/distribution"
 
 GO_IMPORT = "import"
 
-inherit goarch
-inherit go
+inherit go systemd
 
 # This disables seccomp and apparmor, which are on by default in the
 # go package. 
@@ -66,6 +65,7 @@ FILES:docker-registry += "${systemd_unitdir}/system/docker-registry.service"
 FILES:docker-registry += "${sysconfdir}/docker-distribution/*"
 FILES:docker-registry += "${localstatedir}/lib/registry/"
 
+SYSTEMD_PACKAGES = "docker-registry"
 SYSTEMD_SERVICE:docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
 SYSTEMD_AUTO_ENABLE:docker-registry = "enable"
 
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts
  2022-06-10  4:20 [meta-virtualization][master][kirkstone][PATCH 1/3] docker-distribution: fix the inehrit and systemd settings Chen Qi
@ 2022-06-10  4:20 ` Chen Qi
  2022-06-10 13:00   ` Bruce Ashfield
  2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 3/3] docker-distribution: upgrade to 2.8.1 Chen Qi
  1 sibling, 1 reply; 6+ messages in thread
From: Chen Qi @ 2022-06-10  4:20 UTC (permalink / raw)
  To: meta-virtualization

The CGO_CFLAGS and other related variables have already been set
appropriately by the go.bbclass in oe-core. Setting them in this
recipe is not only unncessary but also error prone.

For example CGO_CFLAGS is set to use BUILDSDK_CFLAGS, and this is
incorrect. We need target flags instead of SDK related flags. Such
setting happens to work for some hosts. However, when building on
newer hosts, we get QA error like below:

  ERROR: docker-distribution-v2.7.1-r0 do_package_qa:
  QA Issue: /usr/sbin/registry contained in package docker-registry requires
  libc.so.6(GLIBC_2.34)(64bit), but no providers found in RDEPENDS_docker-registry? [file-rdeps]

The above error was found on hardknott on host Fedora 35.
Tracking down the error and I found it's using host stuff which is likely
to be caused by using incorrect CGO_CFLAGS. As the master branch is
using the same settings, it has the same issue.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../docker-distribution/docker-distribution_git.bb       | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
index 1d074bf3..679bcf8b 100644
--- a/recipes-containers/docker-distribution/docker-distribution_git.bb
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -23,17 +23,8 @@ inherit go systemd
 EXTRA_OEMAKE="BUILDTAGS=''"
 
 do_compile() {
-	export GOARCH="${TARGET_GOARCH}"
 	export GOPATH="${WORKDIR}/git/"
-	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
-	# Pass the needed cflags/ldflags so that cgo
-	# can find the needed headers files and libraries
-	export CGO_ENABLED="1"
-	export CFLAGS=""
-	export LDFLAGS=""
-	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 	export GO_GCFLAGS=""
-	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 	export GO111MODULE=off
 
 	cd ${S}
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-virtualization][master][kirkstone][PATCH 3/3] docker-distribution: upgrade to 2.8.1
  2022-06-10  4:20 [meta-virtualization][master][kirkstone][PATCH 1/3] docker-distribution: fix the inehrit and systemd settings Chen Qi
  2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts Chen Qi
@ 2022-06-10  4:20 ` Chen Qi
  1 sibling, 0 replies; 6+ messages in thread
From: Chen Qi @ 2022-06-10  4:20 UTC (permalink / raw)
  To: meta-virtualization

v2.8.1 is the latest stable version.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../docker-distribution/docker-distribution_git.bb          | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
index 679bcf8b..0d497916 100644
--- a/recipes-containers/docker-distribution/docker-distribution_git.bb
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -3,15 +3,15 @@ SUMMARY = "The Docker toolset to pack, ship, store, and deliver content"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
 
-SRCREV_distribution= "3b7b534569220c840993aad03e3eafe54b923f4d"
-SRC_URI = "git://github.com/docker/distribution.git;branch=release/2.7;name=distribution;destsuffix=git/src/github.com/docker/distribution;protocol=https \
+SRCREV_distribution= "b5ca020cfbe998e5af3457fda087444cf5116496"
+SRC_URI = "git://github.com/docker/distribution.git;branch=release/2.8;name=distribution;destsuffix=git/src/github.com/docker/distribution;protocol=https \
            file://docker-registry.service \
            file://0001-build-use-to-use-cross-go-compiler.patch \
           "
 
 PACKAGES =+ "docker-registry"
 
-PV = "v2.8.0+git${SRCPV}"
+PV = "v2.8.1+git${SRCPV}"
 S = "${WORKDIR}/git/src/github.com/docker/distribution"
 
 GO_IMPORT = "import"
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts
  2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts Chen Qi
@ 2022-06-10 13:00   ` Bruce Ashfield
  2022-06-10 13:58     ` Chen, Qi
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2022-06-10 13:00 UTC (permalink / raw)
  To: Chen Qi; +Cc: meta-virtualization

On Fri, Jun 10, 2022 at 12:21 AM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> The CGO_CFLAGS and other related variables have already been set
> appropriately by the go.bbclass in oe-core. Setting them in this
> recipe is not only unncessary but also error prone.
>
> For example CGO_CFLAGS is set to use BUILDSDK_CFLAGS, and this is
> incorrect. We need target flags instead of SDK related flags. Such
> setting happens to work for some hosts. However, when building on
> newer hosts, we get QA error like below:
>
>   ERROR: docker-distribution-v2.7.1-r0 do_package_qa:
>   QA Issue: /usr/sbin/registry contained in package docker-registry requires
>   libc.so.6(GLIBC_2.34)(64bit), but no providers found in RDEPENDS_docker-registry? [file-rdeps]
>
> The above error was found on hardknott on host Fedora 35.
> Tracking down the error and I found it's using host stuff which is likely
> to be caused by using incorrect CGO_CFLAGS. As the master branch is
> using the same settings, it has the same issue.

And as I mentioned, feel free to adjust the flags and explicit
settings, but I won't be dropping them.

I've been through 6 years of getting these recipes working, and
continually being broken by changes in the core classes, so I'm not
going to drop the explicit settings.

Bruce

>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  .../docker-distribution/docker-distribution_git.bb       | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
> index 1d074bf3..679bcf8b 100644
> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
> @@ -23,17 +23,8 @@ inherit go systemd
>  EXTRA_OEMAKE="BUILDTAGS=''"
>
>  do_compile() {
> -       export GOARCH="${TARGET_GOARCH}"
>         export GOPATH="${WORKDIR}/git/"
> -       export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
> -       # Pass the needed cflags/ldflags so that cgo
> -       # can find the needed headers files and libraries
> -       export CGO_ENABLED="1"
> -       export CFLAGS=""
> -       export LDFLAGS=""
> -       export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>         export GO_GCFLAGS=""
> -       export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>         export GO111MODULE=off
>
>         cd ${S}
> --
> 2.36.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7356): https://lists.yoctoproject.org/g/meta-virtualization/message/7356
> Mute This Topic: https://lists.yoctoproject.org/mt/91662218/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts
  2022-06-10 13:00   ` Bruce Ashfield
@ 2022-06-10 13:58     ` Chen, Qi
  2022-06-10 14:03       ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Chen, Qi @ 2022-06-10 13:58 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

Hi Bruce,

Got it. I'll adjust these CGO_XXX settings and send out V2 next week.

Regards,
Qi

-----Original Message-----
From: Bruce Ashfield <bruce.ashfield@gmail.com> 
Sent: Friday, June 10, 2022 9:01 PM
To: Chen, Qi <Qi.Chen@windriver.com>
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts

On Fri, Jun 10, 2022 at 12:21 AM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> The CGO_CFLAGS and other related variables have already been set 
> appropriately by the go.bbclass in oe-core. Setting them in this 
> recipe is not only unncessary but also error prone.
>
> For example CGO_CFLAGS is set to use BUILDSDK_CFLAGS, and this is 
> incorrect. We need target flags instead of SDK related flags. Such 
> setting happens to work for some hosts. However, when building on 
> newer hosts, we get QA error like below:
>
>   ERROR: docker-distribution-v2.7.1-r0 do_package_qa:
>   QA Issue: /usr/sbin/registry contained in package docker-registry requires
>   libc.so.6(GLIBC_2.34)(64bit), but no providers found in 
> RDEPENDS_docker-registry? [file-rdeps]
>
> The above error was found on hardknott on host Fedora 35.
> Tracking down the error and I found it's using host stuff which is 
> likely to be caused by using incorrect CGO_CFLAGS. As the master 
> branch is using the same settings, it has the same issue.

And as I mentioned, feel free to adjust the flags and explicit settings, but I won't be dropping them.

I've been through 6 years of getting these recipes working, and continually being broken by changes in the core classes, so I'm not going to drop the explicit settings.

Bruce

>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  .../docker-distribution/docker-distribution_git.bb       | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git 
> a/recipes-containers/docker-distribution/docker-distribution_git.bb 
> b/recipes-containers/docker-distribution/docker-distribution_git.bb
> index 1d074bf3..679bcf8b 100644
> --- 
> a/recipes-containers/docker-distribution/docker-distribution_git.bb
> +++ b/recipes-containers/docker-distribution/docker-distribution_git.b
> +++ b
> @@ -23,17 +23,8 @@ inherit go systemd
>  EXTRA_OEMAKE="BUILDTAGS=''"
>
>  do_compile() {
> -       export GOARCH="${TARGET_GOARCH}"
>         export GOPATH="${WORKDIR}/git/"
> -       export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
> -       # Pass the needed cflags/ldflags so that cgo
> -       # can find the needed headers files and libraries
> -       export CGO_ENABLED="1"
> -       export CFLAGS=""
> -       export LDFLAGS=""
> -       export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>         export GO_GCFLAGS=""
> -       export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>         export GO111MODULE=off
>
>         cd ${S}
> --
> 2.36.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7356): 
> https://lists.yoctoproject.org/g/meta-virtualization/message/7356
> Mute This Topic: https://lists.yoctoproject.org/mt/91662218/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: 
> https://lists.yoctoproject.org/g/meta-virtualization/unsub 
> [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts
  2022-06-10 13:58     ` Chen, Qi
@ 2022-06-10 14:03       ` Bruce Ashfield
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Ashfield @ 2022-06-10 14:03 UTC (permalink / raw)
  To: Chen, Qi; +Cc: meta-virtualization

On Fri, Jun 10, 2022 at 9:58 AM Chen, Qi <Qi.Chen@windriver.com> wrote:
>
> Hi Bruce,
>
> Got it. I'll adjust these CGO_XXX settings and send out V2 next week.
>

Sounds good to me. Thanks for adjusting them!

I will merge your docker-distribution fix though, since it is
unrelated to the flags.

I'm doing some upgrades to the packages right now, but will make sure
to not impact the changes I know you are making.

Bruce

> Regards,
> Qi
>
> -----Original Message-----
> From: Bruce Ashfield <bruce.ashfield@gmail.com>
> Sent: Friday, June 10, 2022 9:01 PM
> To: Chen, Qi <Qi.Chen@windriver.com>
> Cc: meta-virtualization@lists.yoctoproject.org
> Subject: Re: [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts
>
> On Fri, Jun 10, 2022 at 12:21 AM Chen Qi <Qi.Chen@windriver.com> wrote:
> >
> > The CGO_CFLAGS and other related variables have already been set
> > appropriately by the go.bbclass in oe-core. Setting them in this
> > recipe is not only unncessary but also error prone.
> >
> > For example CGO_CFLAGS is set to use BUILDSDK_CFLAGS, and this is
> > incorrect. We need target flags instead of SDK related flags. Such
> > setting happens to work for some hosts. However, when building on
> > newer hosts, we get QA error like below:
> >
> >   ERROR: docker-distribution-v2.7.1-r0 do_package_qa:
> >   QA Issue: /usr/sbin/registry contained in package docker-registry requires
> >   libc.so.6(GLIBC_2.34)(64bit), but no providers found in
> > RDEPENDS_docker-registry? [file-rdeps]
> >
> > The above error was found on hardknott on host Fedora 35.
> > Tracking down the error and I found it's using host stuff which is
> > likely to be caused by using incorrect CGO_CFLAGS. As the master
> > branch is using the same settings, it has the same issue.
>
> And as I mentioned, feel free to adjust the flags and explicit settings, but I won't be dropping them.
>
> I've been through 6 years of getting these recipes working, and continually being broken by changes in the core classes, so I'm not going to drop the explicit settings.
>
> Bruce
>
> >
> > Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> > ---
> >  .../docker-distribution/docker-distribution_git.bb       | 9 ---------
> >  1 file changed, 9 deletions(-)
> >
> > diff --git
> > a/recipes-containers/docker-distribution/docker-distribution_git.bb
> > b/recipes-containers/docker-distribution/docker-distribution_git.bb
> > index 1d074bf3..679bcf8b 100644
> > ---
> > a/recipes-containers/docker-distribution/docker-distribution_git.bb
> > +++ b/recipes-containers/docker-distribution/docker-distribution_git.b
> > +++ b
> > @@ -23,17 +23,8 @@ inherit go systemd
> >  EXTRA_OEMAKE="BUILDTAGS=''"
> >
> >  do_compile() {
> > -       export GOARCH="${TARGET_GOARCH}"
> >         export GOPATH="${WORKDIR}/git/"
> > -       export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
> > -       # Pass the needed cflags/ldflags so that cgo
> > -       # can find the needed headers files and libraries
> > -       export CGO_ENABLED="1"
> > -       export CFLAGS=""
> > -       export LDFLAGS=""
> > -       export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
> >         export GO_GCFLAGS=""
> > -       export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
> >         export GO111MODULE=off
> >
> >         cd ${S}
> > --
> > 2.36.0
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#7356):
> > https://lists.yoctoproject.org/g/meta-virtualization/message/7356
> > Mute This Topic: https://lists.yoctoproject.org/mt/91662218/1050810
> > Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> > Unsubscribe:
> > https://lists.yoctoproject.org/g/meta-virtualization/unsub
> > [bruce.ashfield@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-10 14:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10  4:20 [meta-virtualization][master][kirkstone][PATCH 1/3] docker-distribution: fix the inehrit and systemd settings Chen Qi
2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 2/3] docker-distribution: fix build error on new hosts Chen Qi
2022-06-10 13:00   ` Bruce Ashfield
2022-06-10 13:58     ` Chen, Qi
2022-06-10 14:03       ` Bruce Ashfield
2022-06-10  4:20 ` [meta-virtualization][master][kirkstone][PATCH 3/3] docker-distribution: upgrade to 2.8.1 Chen Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).