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

Port erofs root fs compression code to RHEL10 #1412

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Jul 17, 2024

No description provided.

src/pylorax/cmdline.py Show resolved Hide resolved
src/pylorax/creator.py Outdated Show resolved Hide resolved
bcl and others added 5 commits August 9, 2024 13:31
The cmdline switch, --squashfs-only, now sets this and the new
--rootfs-type can be used to select other rootfs types. Currently only
squashfs and squashfs-ext4 are actually implemented.

This also changes the default to a plain squashfs without the wrapped
ext4 image. This speeds up image creation and there is no longer a
reason to use the wrapped ext4 method.

Related: RHEL-48606
Passing 'erofs' will create a plain erofs compressed image. Passing
'erofs-ext4' will create a LiveOS/rootfs.img ext4 filesystem compressed
by erofs.

Related: RHEL-48606
Set the default compression style to lzma and use the config values when
creating the erofs compressed rootfs.

Resolves: RHEL-48606
[bcl - edited for brevity]

It seems safer, to me, to accept --squashfs-only but simply
ignore it (since the default value of --rootfs-type is squashfs
anyway, and if someone were to specify both, I think it's sane
for --rootfs-type to 'win').

Related: RHEL-48606

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
@bcl bcl marked this pull request as ready for review August 9, 2024 20:33
bcl added 2 commits August 9, 2024 14:51
It works either way, but this is easier to read in the logs and matches
the manpage.

Related: RHEL-48606
These produce smaller images, at the expense of time.

You can change the options used by passing a lorax.conf file that looks
like this, eg. use 64k cluster size along with the dedupe and
all-fragment options:

[compression.erofs]
type = lz4
args = -E dedupe,all-fragments -C 65536

And run with:
lorax -c ./lorax.conf --rootfs-type erofs ...

Related: RHEL-48606
@bcl bcl merged commit cd272e3 into weldr:rhel10-branch Aug 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants