Skip to content

Commit c3fe645

Browse files
committed
WIP: Try building with Sequoia
Signed-off-by: Miloslav Trmač <[email protected]>
1 parent cae44b1 commit c3fe645

File tree

14 files changed

+714
-66
lines changed

14 files changed

+714
-66
lines changed

.cirrus.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ test_skopeo_task:
198198
- name: "Skopeo Test w/ opengpg"
199199
env:
200200
BUILDTAGS: *withopengpg
201+
- name: "Skopeo test w/ Sequoia"
202+
env:
203+
BUILDTAGS: 'containers_image_sequoia'
201204
setup_script: >-
202205
"${GOSRC}/${SCRIPT_BASE}/runner.sh" setup
203206
vendor_script: >-

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ GOBIN := $(shell $(GO) env GOBIN)
2424
GOOS ?= $(shell go env GOOS)
2525
GOARCH ?= $(shell go env GOARCH)
2626

27+
SEQUOIA_SONAME_DIR =
28+
2729
# N/B: This value is managed by Renovate, manual changes are
2830
# possible, as long as they don't disturb the formatting
2931
# (i.e. DO NOT ADD A 'v' prefix!)
@@ -85,7 +87,7 @@ CONTAINER_RUN ?= $(CONTAINER_CMD) --security-opt label=disable -v $(CURDIR):$(CO
8587
GIT_COMMIT := $(shell GIT_CEILING_DIRECTORIES=$$(cd ..; pwd) git rev-parse HEAD 2> /dev/null || true)
8688

8789
EXTRA_LDFLAGS ?=
88-
SKOPEO_LDFLAGS := -ldflags '-X main.gitCommit=${GIT_COMMIT} $(EXTRA_LDFLAGS)'
90+
SKOPEO_LDFLAGS := -ldflags '-X main.gitCommit=${GIT_COMMIT} -X github.com/containers/image/v5/signature/internal/sequoia.sequoiaLibraryDir="$(SEQUOIA_SONAME_DIR)" $(EXTRA_LDFLAGS)'
8991

9092
MANPAGES_MD = $(wildcard docs/*.md)
9193
MANPAGES ?= $(MANPAGES_MD:%.md=%)

contrib/cirrus/runner.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ _run_vendor() {
9696
}
9797

9898
_run_build() {
99+
if [[ "$BUILDTAGS" =~ containers_image_sequoia ]]; then
100+
# FIXME: All of this should be removed after libimage_sequoia is packaged; instead, install the RPM at image build time.
101+
dnf install -y rustc cargo clang-devel capnproto
102+
msg "Checking out libimage_sequoia"
103+
# Get the containers/image commit hash from go.mod. FIXME: This assumes a replace directive; for using a tagged version, we will need something else.
104+
image_commit=$(go list -m -f '{{.Replace.Version}}' github.com/containers/image/v5 | sed 's/.*-//')
105+
git clone --depth 1 -b $image_commit https://github.com/containers/image
106+
msg "Building libimage_sequoia"
107+
(cd image/signature/internal/sequoia/rust; cargo build --release)
108+
export SEQUOIA_SONAME_DIR=$(pwd)/image/signature/internal/sequoia/rust/target/release
109+
fi
110+
99111
make bin/skopeo BUILDTAGS="$BUILDTAGS"
100112
make install PREFIX=/usr/local
101113
}

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,5 @@ require (
116116
google.golang.org/grpc v1.72.2 // indirect
117117
google.golang.org/protobuf v1.36.6 // indirect
118118
)
119+
120+
replace github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20250707211531-f082eb5c5f66

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++
3939
github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk=
4040
github.com/containers/common v0.63.1 h1:6g02gbW34PaRVH4Heb2Pk11x0SdbQ+8AfeKKeQGqYBE=
4141
github.com/containers/common v0.63.1/go.mod h1:+3GCotSqNdIqM3sPs152VvW7m5+Mg8Kk+PExT3G9hZw=
42-
github.com/containers/image/v5 v5.35.1-0.20250707180819-778317a88563 h1:LDvwngzUOv0V0UUuGQXXaxUeH7HNRDe+gl+3Plv8A5s=
43-
github.com/containers/image/v5 v5.35.1-0.20250707180819-778317a88563/go.mod h1:djHq2If38NWdEC9aZxGoZj4HxKOrkDo6QOOKz5wdJTs=
4442
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
4543
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
4644
github.com/containers/ocicrypt v1.2.1 h1:0qIOTT9DoYwcKmxSt8QJt+VzMY18onl9jUXsxpVhSmM=
@@ -202,6 +200,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
202200
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
203201
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
204202
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
203+
github.com/mtrmac/image/v5 v5.0.0-20250707211531-f082eb5c5f66 h1:pk258FPEYpi/Fji93vvM4sgKtzr+oavnayJZ1GECnnk=
204+
github.com/mtrmac/image/v5 v5.0.0-20250707211531-f082eb5c5f66/go.mod h1:djHq2If38NWdEC9aZxGoZj4HxKOrkDo6QOOKz5wdJTs=
205205
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
206206
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
207207
github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=

vendor/github.com/containers/image/v5/signature/internal/sequoia/gosequoia.c

Lines changed: 200 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containers/image/v5/signature/internal/sequoia/gosequoia.h

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containers/image/v5/signature/internal/sequoia/gosequoiafuncs.h

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)