radxa-repo / rbuild

Radxa Image Builder (Maintenance mode)
https://radxa-repo.github.io/rbuild/
GNU General Public License v3.0
53 stars 44 forks source link

Ubuntu Jammy build error: archive './/var/cache/apt/archives/base-files_12ubuntu4_arm64.deb' uses unknown compression for member 'control.tar.zst', giving up #12

Closed gsingh93 closed 1 year ago

gsingh93 commented 1 year ago

I know Ubuntu isn't fully supported at the moment, and the usage string hints that building directly on the host instead of a container is a workaround for building Ubuntu:

    -n, --native-build      Use locally installed debos instead of container
                            This is a workaround for building Ubuntu image on Ubuntu host                            

But I wanted to confirm whether this error is the known issue with building Ubuntu or if it's something else:

2023/04/22 00:24:09 debootstrap.log | dpkg-deb: error: archive './/var/cache/apt/archives/base-files_12ubuntu4_arm64.deb' uses unknown compression for member 'control.tar.zst', giving up

And if this is the known issue with building Ubuntu, can someone shed some light on why this is happening?

I'm building on an Ubuntu 23.04 host with this command: ./rbuild rock-pi-4b jammy cli

RadxaYuntian commented 1 year ago

By default, we build image with debos's Docker image, which is based on Debian. However, Ubuntu since Jammy uses zstd compression for their deb packages, which is unsupported by Debian's dpkg, giving you the error. If you build for Ubuntu Focal you can build with container, but its days are numbered.

You have to build Ubuntu image with -n|--native-build flag as mentioned in the help text, which will uses Ubuntu's dpkg.