Re: [PATCH] skopeo: clean up depends and fix CGO settings


Bruce Ashfield
 

On Fri, Jun 10, 2022 at 5:03 AM Chen Qi <Qi.Chen@...> 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@...>
---
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




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

Join meta-virtualization@lists.yoctoproject.org to automatically receive all group messages.