Add support for tar.xz images

Bug #1843266 reported by Lee Trager on 2019-09-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Wishlist
Unassigned
curtin
Medium
Unassigned

Bug Description

Some vendors have begun to provide root.tar.xz images[1]. As MAAS/Curtin gains support for these images MAAS/Curtin should add the ability to deploy root.tar.xz. Ideally MAAS/Curtin should be able to deploy a tar using any compression type supported by Python's tar library using the following.

with tarfile.open(mode='r|*', fileobj=binary) as tar:
    tar.extractall(scripts_dir)

[1] https://download.opensuse.org/repositories/Cloud:/Images:/Leap_15.1/images/

Related branches

Scott Moser (smoser) wrote :

It seems like this might "just work" right now for curtin. The support for xz compression is already in `helpers/smtar`. smtar is used via `extract_root_tgz_url`.

It looks like maybe we would want sanitize_source to contain 'txz' (and might as well add tbz) in curtin/util.py .

Ryan Harper (raharper) wrote :

Thanks Scott,

that looks right to me, a quick test shows smtar knows how to extract:

cat /tmp/openSUSE-Leap-15.1-OpenStack-rootfs.x86_64.tar.xz | ./helpers/smtar -t | head
etc/
etc/named.d/
etc/named.d/rndc-access.conf
etc/tmpfiles.d/
etc/rsyncd.conf
etc/polkit-default-privs.restrictive
etc/idmapd.conf
etc/auto.master
etc/default/
etc/default/grub

Changed in curtin:
importance: Undecided → Medium
status: New → Triaged

This bug is fixed with commit 5f132478 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=5f132478

Changed in curtin:
status: Triaged → Fix Committed
Changed in maas:
milestone: none → next
status: Triaged → Fix Committed

This bug is believed to be fixed in curtin in version 19.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
Changed in maas:
milestone: next → 2.7.0b1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers