Skip to content

Commit

Permalink
feat(erofs): initial commit for erofs support
Browse files Browse the repository at this point in the history
Fixes opencontainers/image-spec#1190

Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Aug 29, 2024
1 parent 4cb72cf commit 762bfcb
Show file tree
Hide file tree
Showing 8 changed files with 1,702 additions and 2 deletions.
10 changes: 9 additions & 1 deletion cmd/stacker/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

cli "github.com/urfave/cli/v2"
"stackerbuild.io/stacker/pkg/erofs"
"stackerbuild.io/stacker/pkg/squashfs"
"stackerbuild.io/stacker/pkg/stacker"
"stackerbuild.io/stacker/pkg/types"
Expand Down Expand Up @@ -52,13 +53,17 @@ func initCommonBuildFlags() []cli.Flag {
},
&cli.StringSliceFlag{
Name: "layer-type",
Usage: "set the output layer type (supported values: tar, squashfs); can be supplied multiple times",
Usage: "set the output layer type (supported values: tar, squashfs, erofs); can be supplied multiple times",
Value: cli.NewStringSlice("tar"),
},
&cli.BoolFlag{
Name: "no-squashfs-verity",
Usage: "do not append dm-verity data to squashfs archives",
},
&cli.BoolFlag{
Name: "no-verity",
Usage: "do not append dm-verity data to non-tar archives",
},
&cli.BoolFlag{
Name: "require-hash",
Usage: "require all remote imports to have a hash provided in stackerfiles",
Expand Down Expand Up @@ -105,6 +110,9 @@ func newBuildArgs(ctx *cli.Context) (stacker.BuildArgs, error) {
var err error
verity := squashfs.VerityMetadata(!ctx.Bool("no-squashfs-verity"))
args.LayerTypes, err = types.NewLayerTypes(ctx.StringSlice("layer-type"), verity)
everity := erofs.VerityMetadata(!ctx.Bool("no-erofs-verity"))
if everity {
}
return args, err
}

Expand Down
3 changes: 2 additions & 1 deletion install-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ installdeps_ubuntu() {
pkg-config \
squashfs-tools \
squashfuse \
libarchive-tools
libarchive-tools \
erofs-utils
# skopeo deps
sudo apt -yy install \
libgpgme-dev \
Expand Down
Loading

0 comments on commit 762bfcb

Please sign in to comment.