Commit Graph

26 Commits

Author SHA1 Message Date
Martin Jansa
c01273e001 metadata: add whitespace around assignments
With:
https://lists.openembedded.org/g/bitbake-devel/message/17508
there are many WARNINGs from this layer will cover src_uri.inc files
in next commit.

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2025-04-03 17:56:53 +00:00
Chen Qi
a4b847830f oci-image-tools: remove unneeded deps
These deps no longer have any effect. Remove them.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2024-03-15 17:17:19 +00:00
Changqing Li
8f25bfcbae oci-image-tools: don't build for riscv64
Currently oci-image-tools has a do_compile error for riscv64. The
problem could be reproduced by:
    MACHINE=qemuriscv64 bitbake oci-image-tools

So explicitly set COMPATIBLE_HOST here to avoid it building for riscv64.
When someone interested in using this recipe for riscv64 fixes the
compile issue, this setting could be removed.

Also don't build packagegroup-container/packagegroup-kubernetes since
they depends on oci-image-tools

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-09-04 03:05:49 +00:00
Bruce Ashfield
08435d20b1 recipes/classes/scripts: Drop SRCPV usage
bitbake has been enhanced such that SRCPV is no longer needed in
PV to handle updating git hashes and task signatures.

We can simplify our PV by dropping SRCPV

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2023-08-24 01:38:21 +00:00
Bruce Ashfield
79ff2a5b00 oci-image-tools: fix TMPDIR references
The structure of the source code layout that was used by
this recipe required symlinking subirectories of the source
into a location that would be searched by go. While this
fixes the build, and produces a working binary, go stores
the location into the binary itself. Those stored paths
reference the build directory, making the result not
reproducible.

With this change, we create an alternate structure that
doesn't require symlinking and allows go to find the
components during build. This results in a simpler recipe
and binaries without TMPDIR references.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-09-14 22:01:22 -04:00
Bruce Ashfield
26f698cdb8 oci-image-tools: remove TMPDIR references
Pass -trimpath to the build to remove most (but not all)
TMDIR references.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-09-14 14:49:17 -04:00
Chen Qi
614b5dbb4f oci-image-tools: adjust GOROOT, CGO_CFLAGS and CGO_LDFALGS
Adjust the GOROOT setting as directory specified by the original
one does not exist.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags instead
of the nativesdk ones.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-06-20 12:09:46 -04:00
Bruce Ashfield
5fd91604ef oci-image-tools: update to 1.0.0-rc3
Bumping image-tools to version v1.0.0-rc3-6-g11f9988, which comprises the following commits:

    8899fa9 README: add summary of project status
    c6e5a1b version: back to development
    25e557a version: update to 1.0.0-rc3
    e324098 update email in MAINTAINERS
    c3f8284 Revert "Relax LGTMs"

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-03-21 17:31:29 -04:00
Bruce Ashfield
108e089f7e global: update licence values to SPDX values
These changes are the result of running the convert-spdx-licenses.py
oe-core script.

There's no impact to the build, but we will avoid issues when
interacting with core QA by the alignment.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-02-18 13:07:10 -05:00
Bruce Ashfield
0a7ae8bc50 global: convert github SRC_URIs to use https protocol
github is removing git:// access, and fetches will start experiencing
interruptions in service, and eventually will fail completely.

bitbake will also begin to warn on github src_uri's that don't use
https. So we convert the meta-virt instances to use protocol=https
(done using the oe-core contrib conversion script)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-02 09:57:03 -04:00
Bruce Ashfield
ac399ad091 global: add explicit branch to all SRC_URIs
As introduced in the oe-core post:

  https://lists.openembedded.org/g/openembedded-core/message/157623

SRC_URIs without an explicit branch will generate warnings, and
eventually be an error.

We run the provided conversion script to make sure that meta-virt
is ready for the change.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-11-02 09:57:03 -04:00
Bruce Ashfield
d876cfc5bf global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides
separator.

This is pass one of updating the meta-virt recipes to use that
syntax.

This has only been minimally build/runtime tested, more changes
will be required for missed overrides, or incorrect conversions

Note: A recent bitbake is required:

    commit 75fad23fc06c008a03414a1fc288a8614c6af9ca
    Author: Richard Purdie <richard.purdie@linuxfoundation.org>
    Date:   Sun Jul 18 12:59:15 2021 +0100

        bitbake: data_smart/parse: Allow ':' characters in variable/function names

        It is becomming increasingly clear we need to find a way to show what
        is/is not an override in our syntax. We need to do this in a way which
        is clear to users, readable and in a way we can transition to.

        The most effective way I've found to this is to use the ":" charater
        to directly replace "_" where an override is being specified. This
        includes "append", "prepend" and "remove" which are effectively special
        override directives.

        This patch simply adds the character to the parser so bitbake accepts
        the value but maps it back to "_" internally so there is no behaviour
        change.

        This change is simple enough it could potentially be backported to older
        version of bitbake meaning layers using the new syntax/markup could
        work with older releases. Even if other no other changes are accepted
        at this time and we don't backport, it does set us on a path where at
        some point in future we could
        require a more explict syntax.

        I've tested this patch by converting oe-core/meta-yocto to the new
        syntax for overrides (9000+ changes) and then seeing that builds
        continue to work with this patch.

        (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284)

        Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-08-02 17:17:53 -04:00
Bruce Ashfield
ec60660c3c oci-image-tools: export GO111MODULE=off
With the latest go version bump in oe-core export GO111MODULE is
on by default. Our build is not setup to use go modules, so we
disable it and avoid configuration errors:

  no required module provides package ... : working directory is not part of a module

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2021-03-01 15:52:39 -05:00
Bruce Ashfield
986d873e7f oci-image-tools: use GO flags/compiler from recipe
The image tools were not building with the oe/cross GO compiler
and flags. As such, you could end up with a binary on target with
the wong elf interpreter (the host one).

With this, we properly use the settings from our build.

We also bump the SRCREV to pickup a few minor fixes to the package.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-10-15 11:38:53 -04:00
Bruce Ashfield
0a2af19893 oci-image-tools: refresh to tip of master
Updating the oci-image-tools to the tip of the master branch. This gets
us official integrations of some backported patches (along with other
associated minor fixes).

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2019-07-12 14:50:34 +00:00
Changqing Li
2a9bdedc3b oci-image-tools: fix do package qa warning
1. After security flag PIE is enabled by default, we might met
below QA warning on some arch, like aarch64, fix it by skip
textrel QA check refer commit b689c72a of oe-core

oci-image-tools-0.2.0-dev+gitAUTOINC+4abe1a166f-r0 do_package_qa:
QA Issue: ELF binary 'work/aarch64-poky-linux/oci-image-tools/
0.2.0-dev+gitAUTOINC+4abe1a166f-r0/packages-split/oci-image-tools/
usr/sbin/oci-image-tool' has relocations in .text [textrel]

2. This problem is caused since security_flags.inc is used by default.
   so alternative work around is:
      SECURITY_CFLAGS_pn-oci-image-tools = "${SECURITY_NOPIE_CFLAGS}"
      SECURITY_LDFLAGS_pn-oci-image-tools = ""

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2018-10-11 14:38:18 -04:00
Bruce Ashfield
68ab20d0c4 oci-image-tools: make Config.User mapping errors a warning
Rather than throwing an error if we can't map a user to a uid,
output a warning. We aren't actually running the code, but are
just extracting it .. so the user not existing isn't an issue.

With this, we avoid the not-so-useful traces like this:

  config.User: unsupported format
  github.com/opencontainers/image-tools/image.(*config).runtimeSpec
        oci-image-tools/0.2.0-dev+gitAUTOINC+4abe1a166f-r0/oci-image-tools-0.2.0-dev+gitAUTOINC+4abe1a16 6f/src/import/vendor/src/github.com/opencontainers/image-tools/image/config.go:109
  <...>
  src/import/cmd/oci-image-tool/main.go:57
  runtime.main /usr/lib64/go/src/runtime/proc.go:185
  runtime.goexit /usr/lib64/go/src/runtime/asm_amd64.s:2337

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-11-17 11:06:03 -05:00
Bruce Ashfield
e83556a3f4 oci-image-tools: fix LICENSE file location
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-09-14 16:00:43 -04:00
Jason Wessel
01a8d45370 nets, docker, runc, oci-*tools: go.bbclass compile fixes
Recently in the oe-core the go.bbclass changed and requires the
defition of the GO_IMPORT variable.  This was intended to simplify how
the compilation works with go packages and it is still a work in
progress.

This patch set makes the recipes compatible to generate the same end
result as before using the new go.bbclass from oe-core.

Any patches that were included in the recipes had to have the paths
adjusted because the new go.bbclass manipulates the notion of S to be
S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch
and compile.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-09-14 09:49:00 -04:00
Bruce Ashfield
718592922b oci-image-tools: uprev to 0.2.0-dev
To work with OCI spec v1.0 images/containers we need to update our
tools.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-09-13 17:23:30 -04:00
Bruce Ashfield
3e1d16db4a oci-image-tools: update to latest and fix symlink issues
Updating to the latest oci-image-tools for better support in unpack/creating
runtime bundles.

With this update, we get a single tool with subcommands, versus separate
commands previously.

We also add two proposed (but not merged) patches that can deal with existing
symlinks when unpacking layers. Without this, we fail to unpack many complex
containers due to duplicate files in layers.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-06-06 23:44:34 -04:00
Mark Asselstine
a20d51d5c6 housekeeping: swap out go-osarchmap in favor of goarch
Continue work to use go infra in oe-core instead of the support for go
previously found in meta-virt. This is a 1:1 drop in replacement and
removes one more go piece from meta-virt in favor of the common
support found in oe-core.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-04-11 23:09:01 -04:00
Khem Raj
a8e3eddaec recipes-containers: set GOROOT
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-03-21 08:22:32 -04:00
Bruce Ashfield
7d66b0cc41 go: replace explicit go-cross* with inherit go bbclass
Rather than expliciting depending on go-cross-${TARGET_ARCH}, we
can now simply inherit the oe-core go bbclass. This gets us the
correct go dependencies and other variables properly set.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-03-20 23:15:01 -04:00
Bruce Ashfield
776422fa04 oci-image-tools: use go-cross-${ARCH}
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-17 13:26:56 -05:00
Bruce Ashfield
b18acd8bc4 oci: introduce oci-image-tools (and dependencies)
The oci image tools allow the easy manipulation of containers and
bundles.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2017-02-15 14:57:35 -05:00