17 Commits

Author SHA1 Message Date
Tiger Kaovilai
31e3fca484 Fix xattr copy failures on SELinux systems
When copying the buildkit-qemu-emulator binary on systems with SELinux
enabled, the copy operation fails with "operation not supported" errors
when attempting to copy security.selinux xattrs.

This change adds an XAttrErrorHandler to the copy.Copy call that ignores
ENOTSUP errors, allowing the copy to succeed on SELinux-enabled systems.

Fixes #5544

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

Refactor xattr error handler to be a simple function

Changed ignoreSELinuxXAttrErrorHandler from a function that returns
a function to a direct error handler function. This simplifies the
code while maintaining the same functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

Add tests for xattr error handling in exec_binfmt

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

Update xattr error handling to ignore ENOTSUP for security.selinux only

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>

Refactor xattr error handling in exec_binfmt to use a single error handler function

Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-17 12:02:27 -05:00
Jonathan A. Sternberg
66016a8c63 vendor: switch from idtools to moby/sys/user
Convert usages of `github.com/docker/docker/pkg/idtools` to
`github.com/moby/sys/user` in order to break the dependency between
buildkit and docker.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-04-02 10:22:02 -05:00
Tonis Tiigi
8f16014dd3 remove unused emulators from exported image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-02-12 20:43:50 -08:00
Marat Radchenko
5be7edb69c Upgrade to containerd 2
Co-authored-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2025-01-13 16:42:48 -08:00
Sebastiaan van Stijn
175973babc switch to github.com/containerd/platforms module
Switch to use github.com/containerd/platforms module, because containerd's
platforms package has moved to a separate module. This allows updating the
platforms parsing independent of the containerd module itself.

The package in containerd is deprecated, but kept as an alias to provide
compatibility between codebases.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-02 22:59:12 +02:00
Tonis Tiigi
1f9988911f lint: unusedparams fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-04-09 07:23:16 -07:00
Paul "TBBle" Hampson
98e0d8dcff Whenever copying OCI Platform data, include OSVersion and OSFeatures
Trivially created by looking for every reference to .Variant and adding
OSVersion and OSFeatures, except the ones related to the string
representation of a Platform instance.

I then went through and ensured every assignment of OSFeatures that
might leak out, i.e., not local-only or for marhsalling purposes, uses
the append-to-nil idiom to avoid sharing the slice storage and allowing
accidental mutation after-the-fact.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2023-11-03 12:19:29 +09:00
Marcus Comstedt
c48cd2c62f add linux/ppc64
Signed-off-by: Marcus Comstedt <marcus@mc.pp.se>
2022-09-07 18:15:41 +02:00
Sebastiaan van Stijn
21e9e9641e Remove uses of deprecated io/ioutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-10 00:57:07 +01:00
Tonis Tiigi
9301b5f2e0 llbsolver: avoid embedded emulators for higher amd64 variants
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:08 -08:00
Tonis Tiigi
e38f34c7d4 archutil: refactor to return structs
Working with strings is error-prone because a platform
can be in multiple string forms and less flexible.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:02 -08:00
Tonis Tiigi
dc21885891 hack: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 12:20:30 -08:00
Tonis Tiigi
082c666bdb exec: check full platform vector when checking for emulator
Instead of doing a direct string comparison we should
use `platforms.Only` so that we can also detect the
variants that are compatible but don’t match directly.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-18 23:54:24 -08:00
Koichi Shiraishi
671ae38fb7 all: unify the specs-go package import alias to ocispecs
ocispecs means "O"pen "C"ontainer "I"nitiative image-spec/"specs"-go/v1
                      opencontainers          /image-spec/specs-go/v1

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-08-11 08:29:09 +09:00
Tonis Tiigi
dae8f156da update qemu emulators
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-01-21 18:33:00 -08:00
Tonis Tiigi
06c4197c05 rename binfmt_misc to archutil
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
f9e26128c0 exec: use qemu emulator automatically
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-07 22:08:52 -07:00