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

Commits on Aug 9, 2024

  1. imgutils: Add mkerofs function and test

    Related: RHEL-48606
    bcl committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    8cd5833 View commit details
    Browse the repository at this point in the history
  2. Replace squashfs_only with rootfs_type

    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
    bcl committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    c45dd7c View commit details
    Browse the repository at this point in the history
  3. Add erofs and erofs-ext4 support to --rootfs-type

    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
    bcl committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    5d8b665 View commit details
    Browse the repository at this point in the history
  4. Add compression.erofs section to lorax.conf

    Set the default compression style to lzma and use the config values when
    creating the erofs compressed rootfs.
    
    Resolves: RHEL-48606
    bcl committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    d4ed0b2 View commit details
    Browse the repository at this point in the history
  5. Accept but ignore the old --squashfs-only argument

    [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>
    AdamWill authored and bcl committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    198a945 View commit details
    Browse the repository at this point in the history
  6. imgutils: mkfs.erofs options should come first

    It works either way, but this is easier to read in the logs and matches
    the manpage.
    
    Related: RHEL-48606
    bcl committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    d69d491 View commit details
    Browse the repository at this point in the history
  7. erofs: Use dedupe and all-fragments options

    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 committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    cd272e3 View commit details
    Browse the repository at this point in the history