-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat(erofs): initial commit for erofs support #626
base: main
Are you sure you want to change the base?
Conversation
Hi @rchincha, I'm currently working on incremental builds and I plan to release erofs-utils v1.8 this month (with multi-threaded mkfs, incremental builds, Intel QPL, etc.), but anyway, I'd suggest use cgo for initial EROFS support (with formal liberofs APIs exported) for now (or even binary integration as the very first step) since this go implemention seems somewhat incomplete (and maybe even broken.. I don't have enough time to look into that since other prioritied stuffs are on hands..) |
@hsiangkao I suspect that cgo path may be what ends up happening. Currently, just prototyping quickly to understand the interfaces and scope of changes/work. |
c700aaa
to
762bfcb
Compare
One thing I might need to mention here is that I'm not sure if it's worthwhile to highlight this, you could just make a tiny metadata with external blobs (which can be used for multiple images) for reference. |
7814fb5
to
7f7504c
Compare
|
@hsiangkao an update. Now have a stacker (this PR) that can build OCI images with erofs+dm-verity layers - no change to the overall workflow. |
31b8397
to
ea8d893
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #626 +/- ##
=========================================
- Coverage 13.08% 6.65% -6.43%
=========================================
Files 35 57 +22
Lines 5084 6457 +1373
=========================================
- Hits 665 430 -235
- Misses 4309 5964 +1655
+ Partials 110 63 -47 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
atomfs has added support for additional filesystem types such as erofs. Signed-off-by: Ramkumar Chinchani <[email protected]>
460e2de
to
77e6c38
Compare
Is there an equivalent of "unsquashfs" in erofs-utils? https://manpages.debian.org/testing/squashfs-tools/unsquashfs.1.en.html SYNOPSIS unsquashfs [OPTIONS] FILESYSTEM [files to extract or exclude (with -excludes) or cat (with -cat )] |
7d76f40
to
ffe1908
Compare
Hi!
Currently, there is no exclude way but it can be added later. |
Signed-off-by: Ramkumar Chinchani <[email protected]>
@@ -43,6 +43,7 @@ installdeps_ubuntu() { | |||
squashfs-tools | |||
squashfuse | |||
libarchive-tools | |||
erofs-utils erofsfuse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one per line
fallthrough | ||
case squashfs.GenerateSquashfsMediaType(squashfs.ZstdCompression): | ||
return NewLayerType("squashfs", verity.VerityMetadataMissing) | ||
case squashfs.GenerateSquashfsMediaType(squashfs.GzipCompression): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already had a case for Squash + Gzip -- was this supposed to be zstd?
case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression): | ||
return NewLayerType("erofs", verity.VerityMetadataMissing) | ||
case erofs.GenerateErofsMediaType(erofs.LZ4HCCompression): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the same case right? LZ4H , fallthrough?
manifest=$(cat oci/index.json | jq -r .manifests[0].digest | cut -f2 -d:) | ||
last_layer_num=$(($(cat oci/blobs/sha256/$manifest | jq -r '.layers | length')-1)) | ||
last_layer_hash=$(cat oci/blobs/sha256/$manifest | jq -r .layers[$last_layer].digest | cut -f2 -d:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a general comment, prolly worth an issue, but we can avoid the cat | jq
and just jq xxx < file
return | ||
fi | ||
if [ -z "$SUDO_UID" ]; then | ||
echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_USER" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUDO_USER or SUDO_UID ? both are present, but your error prints a different ENV value than what is checked.
echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_USER" | |
echo "PRIVILEGE_LEVEL=$PRIVILEGE_LEVEL but empty SUDO_UID" |
if [ "$PRIVILEGE_LEVEL" = "priv" ]; then | ||
return | ||
fi | ||
if [ -z "$SUDO_UID" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -z "$SUDO_UID" ]; then | |
if [ -z "$SUDO_USER" ]; then |
which one? SUDO_UID or SUDO_USER?
Fixes opencontainers/image-spec#1190
What type of PR is this?
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.