Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(umoci)!: umoci's copy buffer set to 1 MiB (#531) #536

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- rel-**
pull_request:
branches:
- main
- rel-**

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
push:
branches:
- main
- rel-**
pull_request:
branches:
- main
- rel-**
release:
types:
- published
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [ main, rel-** ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [ main, rel-** ]
schedule:
- cron: '17 11 * * 0'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/commit-msg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
push:
branches:
- main
- rel-**

jobs:
check-commit-message-style:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- rel-**

permissions: read-all

Expand Down
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ STACKER_BUILD_UBUNTU_IMAGE?=$(STACKER_DOCKER_BASE)ubuntu:latest
LXC_CLONE_URL?=https://github.com/lxc/lxc
LXC_BRANCH?=stable-5.0

HACK_D := $(TOP_LEVEL)/hack
# helper tools
TOOLS_D := $(HACK_D)/tools
export SKOPEO = $(TOOLS_D)/bin/skopeo
export SKOPEO_VERSION = 1.9.3

stacker: stacker-dynamic
./stacker-dynamic --debug $(STACKER_OPTS) build \
-f build.yaml --shell-fail \
Expand Down Expand Up @@ -44,13 +50,26 @@ lint: cmd/stacker/lxc-wrapper/lxc-wrapper $(GO_SRC)
go test -tags "$(BUILD_TAGS)" ./...
$(shell go env GOPATH)/bin/golangci-lint run --build-tags "$(BUILD_TAGS)"

$(SKOPEO):
@mkdir -p "$(TOOLS_D)/bin"; \
tmpdir=$$(mktemp -d); \
cd $$tmpdir; \
git clone https://github.com/containers/skopeo.git; \
cd skopeo; \
git fetch --all --tags --prune; \
git checkout tags/v$(SKOPEO_VERSION) -b tag-$(SKOPEO_VERSION); \
make bin/skopeo; \
cp bin/skopeo $(SKOPEO); \
cd $(TOP_LEVEL); \
rm -rf $$tmpdir;

TEST?=$(patsubst test/%.bats,%,$(wildcard test/*.bats))
PRIVILEGE_LEVEL?=

# make check TEST=basic will run only the basic test
# make check PRIVILEGE_LEVEL=unpriv will run only unprivileged tests
.PHONY: check
check: stacker lint
check: stacker lint $(SKOPEO)
sudo -E PATH="$$PATH" \
LXC_BRANCH=$(LXC_BRANCH) \
LXC_CLONE_URL=$(LXC_CLONE_URL) \
Expand Down
12 changes: 7 additions & 5 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ build-env:
head -n1 /etc/apk/repositories | sed 's/main/testing/g' >> /etc/apk/repositories

apk add git findutils go automake autoconf make gcc libtool \
acl-dev acl-static \
acl-dev acl-static build-base \
libseccomp-dev libseccomp-static \
libcap-dev libcap-static \
libapparmor-dev \
zlib-static lz4-static \
zstd-dev \
zstd-dev zstd-static \
xz \
gettext-dev \
lvm2-dev util-linux-dev \
squashfs-tools-ng-dev \
linux-headers
linux-headers \
util-linux-static \
po4a

# json-c doesn't have static binaries in alpine
apk add cmake
Expand All @@ -44,10 +45,11 @@ build-env:

# build static cryptsetup without all the command line tools
apk add gettext gettext-dev zlib-static lz4-static openssl-dev \
openssl-libs-static popt-dev
openssl-libs-static popt-dev bash
tar -xf /stacker/cryptsetup*
cd cryptsetup*
./autogen.sh
CFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE" \
./configure --enable-static \
--disable-cryptsetup --disable-veritysetup --disable-integritysetup \
--disable-nls --disable-ssh-token
Expand Down
38 changes: 21 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be
github.com/anuvu/squashfs v0.0.0-20220228153512-67c8ca12cbf4
github.com/anuvu/squashfs v0.0.4
github.com/apex/log v1.9.0
github.com/cheggaaa/pb/v3 v3.1.0
github.com/containers/image/v5 v5.16.1
Expand All @@ -23,24 +23,25 @@ require (
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.9
github.com/smartystreets/goconvey v1.7.2
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.4
github.com/twmb/algoimpl v0.0.0-20170717182524-076353e90b94
github.com/udhos/equalfile v0.3.0
github.com/urfave/cli v1.22.10
github.com/vbatts/go-mtree v0.5.2
golang.org/x/sys v0.3.0
golang.org/x/term v0.3.0
github.com/urfave/cli v1.22.12
github.com/vbatts/go-mtree v0.5.3
golang.org/x/sys v0.13.0
golang.org/x/term v0.7.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20211102141018-f7be0cbad29c // indirect
github.com/BurntSushi/toml v0.4.1 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Microsoft/hcsshim v0.9.2 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/containerd v1.6.1 // indirect
Expand All @@ -56,7 +57,7 @@ require (
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
Expand All @@ -73,7 +74,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.14.4 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/klauspost/cpuid/v2 v2.0.4 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
Expand All @@ -86,7 +87,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mtrmac/gpgme v0.1.2 // indirect
github.com/opencontainers/runc v1.1.2 // indirect
github.com/opencontainers/runc v1.1.8 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/opencontainers/selinux v1.10.0 // indirect
github.com/pborman/uuid v1.2.1 // indirect
Expand All @@ -96,7 +97,7 @@ require (
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rootless-containers/proto/go-proto v0.0.0-20210921234734-69430b6543fb // indirect
github.com/rootless-containers/proto/go-proto v0.0.0-20230421021042-4cd87ebadd67 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/smartystreets/assertions v1.2.0 // indirect
Expand All @@ -109,16 +110,19 @@ require (
go.etcd.io/bbolt v1.3.6 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20220303160752-862486edd9cc // indirect
google.golang.org/grpc v1.44.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/containers/image/v5 => github.com/anuvu/image/v5 v5.0.0-20211117201351-4c24aa76235c
replace (
github.com/containers/image/v5 => github.com/anuvu/image/v5 v5.0.0-20211117201351-4c24aa76235c
github.com/opencontainers/umoci => github.com/project-stacker/umoci v0.0.0-20231025233220-c7bb24d57e98
)
Loading
Loading