meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH] skopeo: clean up depends and fix CGO settings
@ 2022-06-10  9:02 Chen Qi
  2022-06-10 12:58 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2022-06-10  9:02 UTC (permalink / raw)
  To: meta-virtualization

According to https://github.com/containers/skopeo/blob/main/install.md#building-from-source,
the ostree dependency is not needed.

Also, remove the CGO settings which incorrectly use BUILDSDK_XXX.
The CGO_CFLAGS and CGO_LDFALGS should use target flags instead of
SDK ones. As the CGO_XXX vars have already been set in go.bbclass,
there's no need to set them here.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 recipes-containers/skopeo/skopeo_git.bb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/recipes-containers/skopeo/skopeo_git.bb b/recipes-containers/skopeo/skopeo_git.bb
index f3217dbf..24d951ef 100644
--- a/recipes-containers/skopeo/skopeo_git.bb
+++ b/recipes-containers/skopeo/skopeo_git.bb
@@ -9,10 +9,9 @@ DEPENDS = " \
     lvm2 \
     btrfs-tools \
     glib-2.0 \
-    ostree \
 "
 
-inherit go
+inherit go pkgconfig
 
 RDEPENDS:${PN} = " \
      gpgme \
@@ -33,8 +32,6 @@ GO_IMPORT = "import"
 
 S = "${WORKDIR}/git"
 
-inherit goarch
-inherit pkgconfig
 
 # This disables seccomp and apparmor, which are on by default in the
 # go package. 
@@ -61,8 +58,6 @@ do_compile() {
 	export CGO_ENABLED="1"
 	export CFLAGS=""
 	export LDFLAGS=""
-	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 	cd ${S}/src/import
 
 	export GO111MODULE=off
-- 
2.36.0



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

* Re: [meta-virtualization][PATCH] skopeo: clean up depends and fix CGO settings
  2022-06-10  9:02 [meta-virtualization][PATCH] skopeo: clean up depends and fix CGO settings Chen Qi
@ 2022-06-10 12:58 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2022-06-10 12:58 UTC (permalink / raw)
  To: Chen Qi; +Cc: meta-virtualization

On Fri, Jun 10, 2022 at 5:03 AM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> According to https://github.com/containers/skopeo/blob/main/install.md#building-from-source,
> the ostree dependency is not needed.
>
> Also, remove the CGO settings which incorrectly use BUILDSDK_XXX.
> The CGO_CFLAGS and CGO_LDFALGS should use target flags instead of
> SDK ones. As the CGO_XXX vars have already been set in go.bbclass,
> there's no need to set them here.

I'll take the ostree change (it is now handled by vendor/), and that
wasn't always the case.

But like the others, I'm not going to drop the explicit arch/flag settings.

Cheers,

Bruce

>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  recipes-containers/skopeo/skopeo_git.bb | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/recipes-containers/skopeo/skopeo_git.bb b/recipes-containers/skopeo/skopeo_git.bb
> index f3217dbf..24d951ef 100644
> --- a/recipes-containers/skopeo/skopeo_git.bb
> +++ b/recipes-containers/skopeo/skopeo_git.bb
> @@ -9,10 +9,9 @@ DEPENDS = " \
>      lvm2 \
>      btrfs-tools \
>      glib-2.0 \
> -    ostree \
>  "
>
> -inherit go
> +inherit go pkgconfig
>
>  RDEPENDS:${PN} = " \
>       gpgme \
> @@ -33,8 +32,6 @@ GO_IMPORT = "import"
>
>  S = "${WORKDIR}/git"
>
> -inherit goarch
> -inherit pkgconfig
>
>  # This disables seccomp and apparmor, which are on by default in the
>  # go package.
> @@ -61,8 +58,6 @@ do_compile() {
>         export CGO_ENABLED="1"
>         export CFLAGS=""
>         export LDFLAGS=""
> -       export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
> -       export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>         cd ${S}/src/import
>
>         export GO111MODULE=off
> --
> 2.36.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7358): https://lists.yoctoproject.org/g/meta-virtualization/message/7358
> Mute This Topic: https://lists.yoctoproject.org/mt/91664552/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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10  9:02 [meta-virtualization][PATCH] skopeo: clean up depends and fix CGO settings Chen Qi
2022-06-10 12:58 ` Bruce Ashfield

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).