Hi,

I updated my current FAI setup to install the recently released
Ubuntu-22.04 with it.

Ubuntu-22.04 now uses the zstd(1) compression program for packages.  FAI
can't install these packages out of the box because debootstrap on
Debian-11 doesn't know about this compression format.  Here are the things
I changed.

1) Create the directory /srv/fai/config/debootstrap in my config space and
populate it with the content of the original /usr/share/debootstrap.
I didn't want to mess with the original files installed by Debian, so
I use a local copy that I can update for FAI.

2) Apply the attached patch "functions.patch" to
/srv/fai/config/debootstrap/functions.  This will add support for zstd
compression.

3) Apply the attached patch "mk-basefile.patch" to the mk-basefile script.
Now debootstrap will a) use the patched functions and b) use "ar" to
unpack the Ubuntu-22.04 packages.  Make sure you have the packages zstd
and binutils installed on the FAI server to provide the needed binaries.

These are the changes I made to create a basefile for Ubuntu-22.04.

The patches do not include other changes to support Ubuntu-22.04 with
mk-basefile to prevent to much noise.  Obviously the list of packages and
the name of the OS need to be configured.  Other files/scripts in the
config space also need to be updated.

Maybe this will get you started when you plan to include the new Ubuntu
release in your FAI setup.

Regards,
Stefan

--- functions.orig	2019-01-09 14:00:04.000000000 +0100
+++ functions	2022-04-12 14:12:51.590232162 +0200
@@ -958,6 +958,7 @@
 	case "$tarball" in
 		control.tar.gz) cat_cmd=zcat ;;
 		control.tar.xz) cat_cmd=xzcat ;;
+		control.tar.zst) cat_cmd=zstdcat ;;
 		control.tar)    cat_cmd=cat ;;
 		*) error 1 UNKNOWNCONTROLCOMP "Unknown compression type for %s in %s" "$tarball" "$pkg" ;;
 	esac
@@ -980,6 +981,7 @@
 		data.tar.gz)  cat_cmd=zcat ;;
 		data.tar.bz2) cat_cmd=bzcat ;;
 		data.tar.xz)  cat_cmd=xzcat ;;
+		data.tar.zst) cat_cmd=zstdcat ;;
 		data.tar)     cat_cmd=cat ;;
 		*) error 1 UNKNOWNDATACOMP "Unknown compression type for %s in %s" "$tarball" "$pkg" ;;
 	esac
diff --git i/basefiles/mk-basefile w/basefiles/mk-basefile
index 085b9a48..e3c2f430 100755
--- i/basefiles/mk-basefile
+++ w/basefiles/mk-basefile
@@ -15,8 +15,9 @@
 # Scientific Linux Cern 5/6
 #
 # Packages you might want to install to use this command:
-# debootstrap, rinse, xz-utils
+# debootstrap, rinse, xz-utils, zstd
 
+export DEBOOTSTRAP_DIR=/srv/fai/config/debootstrap
 
 # Define your local mirros here
 # For the first stage, set the CentOS/SLC mirror in /etc/rinse/rinse.conf
@@ -195,7 +196,7 @@ debgeneric() {
 	else
             arch=i386
 	fi
-	debootstrap --arch $arch ${exc} $inc $dist $xtmp $mirror
+	debootstrap --extractor=ar --arch $arch ${exc} $inc $dist $xtmp $mirror
     fi
     cleanup-deb
     tarit
-- 
Lisp without parentheses is like Python without whitespace.

Antwort per Email an