Tar command fails when creating Plamo 8 image
tenforward opened this issue ยท 4 comments
The build-distrbuilder-cache image used by build-distro to create images for each distribution on jenkins.linuxcontainers.org is bionic-based (ref. https://github.com/lxc/lxc-ci/blob/master/bin/build-image-distrobuilder#L16). Is there a reason it is bionic?
Yesterday, I sent a pull request for Plamo Linux 8 image support, but during the process, it expands the archive in tar+zstd format, but the bionic tar command does not seem to recognise the tar+zstd format.
Trying with a jammy-based distrobuilder image created with the following patched script, I was able to create a Plamo8 image.
Just adding the zstd package to bionic failed.
I have not tried with any other distro.
$ git diff
diff --git a/bin/build-image-distrobuilder b/bin/build-image-distrobuilder
index 9b75ba8..85ee893 100755
--- a/bin/build-image-distrobuilder
+++ b/bin/build-image-distrobuilder
@@ -13,7 +13,7 @@ ARCH="$1"
TARGET="$2"
# Create the container
-lxc init "images:ubuntu/bionic/${ARCH}" build-distrobuilder-cache \
+lxc init "images:ubuntu/jammy/${ARCH}" build-distrobuilder-cache \
-c security.privileged=true -c security.nesting=true \
-c raw.lxc="lxc.cgroup.devices.allow = b 259:* rw"
@@ -66,19 +66,19 @@ umount -l /sys/devices/system/cpu || true
# Setup clean sources
echo force-unsafe-io >> /etc/dpkg/dpkg.cfg
cat > /etc/apt/sources.list << EOL
-deb \${ARCHIVE} bionic main universe restricted multiverse
-deb \${ARCHIVE} bionic-updates main universe restricted multiverse
-deb \${ARCHIVE} bionic-security main universe restricted multiverse
-deb \${ARCHIVE} bionic-backports main universe restricted multiverse
+deb \${ARCHIVE} jammy main universe restricted multiverse
+deb \${ARCHIVE} jammy-updates main universe restricted multiverse
+deb \${ARCHIVE} jammy-security main universe restricted multiverse
+deb \${ARCHIVE} jammy-backports main universe restricted multiverse
EOL
apt-get update --yes
# Install dependencies
apt-get install --yes --no-install-recommends \
build-essential btrfs-progs git ca-certificates gcc libc6-dev debootstrap \
- xz-utils squashfs-tools gpg dirmngr gpg-agent rsync kpartx python \
+ xz-utils squashfs-tools gpg dirmngr gpg-agent rsync kpartx python3 \
subversion patch build-essential gawk libncurses-dev unzip qemu-utils \
- gdisk dosfstools snapd
+ gdisk dosfstools snapd zstd
apt-get clean
export PATH=/snap/bin:\${PATH}
We(Plamo Project) have temporarily changed the pkgtools8 package, which was in tar+zstd format, to tar+xz format so that the image build does not fail. This will probably prevent the Plamo 8 image build from failing this evening. ๐
Moving to distrobuilder as that's where we probably should be tracking this.
distrobuilder itself uses core18 as its base (bionic) as that's the last Ubuntu release to support i386.
Now, we've dropped i386 for all our images so it should be possible to update the distrobuilder snap to core22 at which point it will be reasonable to also switch the Jenkins base image for distrobuilder over to Ubuntu 22.04.
I'm closing this issue as the distrobuilder snap has been updated to core22, and zstd has been added to the builder.