From ff6c515e3f48304a346bbd2b28457339839cb8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Fri, 30 Dec 2022 20:59:35 +0100 Subject: [PATCH] Add next Ubuntu 23.04 / Lunar lobster (#4625) --- config/cli/lunar | 1 + config/desktop/lunar | 1 + config/distributions/lunar/name | 1 + config/distributions/lunar/support | 1 + config/sources/arm64.conf | 2 +- config/sources/families/bcm2711.conf | 2 +- lib/functions/cli/utils-cli.sh | 2 +- lib/functions/configuration/main-config.sh | 2 +- lib/functions/extras/buildpkg.sh | 7 +++++-- lib/functions/host/prepare-host.sh | 4 ++-- lib/functions/image/partitioning.sh | 2 +- lib/functions/rootfs/distro-specific.sh | 6 +++--- tools/repository/repo | 2 +- 13 files changed, 20 insertions(+), 13 deletions(-) create mode 120000 config/cli/lunar create mode 120000 config/desktop/lunar create mode 100644 config/distributions/lunar/name create mode 100644 config/distributions/lunar/support diff --git a/config/cli/lunar b/config/cli/lunar new file mode 120000 index 000000000..c23bec673 --- /dev/null +++ b/config/cli/lunar @@ -0,0 +1 @@ +kinetic \ No newline at end of file diff --git a/config/desktop/lunar b/config/desktop/lunar new file mode 120000 index 000000000..c23bec673 --- /dev/null +++ b/config/desktop/lunar @@ -0,0 +1 @@ +kinetic \ No newline at end of file diff --git a/config/distributions/lunar/name b/config/distributions/lunar/name new file mode 100644 index 000000000..92fcbb2ae --- /dev/null +++ b/config/distributions/lunar/name @@ -0,0 +1 @@ +Ubuntu lunar 23.04 diff --git a/config/distributions/lunar/support b/config/distributions/lunar/support new file mode 100644 index 000000000..03cd47015 --- /dev/null +++ b/config/distributions/lunar/support @@ -0,0 +1 @@ +csc diff --git a/config/sources/arm64.conf b/config/sources/arm64.conf index 6f6b0bab8..de41a5ed5 100644 --- a/config/sources/arm64.conf +++ b/config/sources/arm64.conf @@ -36,7 +36,7 @@ fi if [ "$(uname -m)" = "aarch64" ]; then case "$(lsb_release -sc)" in - "bullseye" | "focal" | "hirsute" | "impish" | "jammy") + "bullseye" | "focal" | "hirsute" | "impish" | "jammy" | "lunar") PKG_PREFIX="qemu-x86_64-static -L /usr/x86_64-linux-gnu " ;; *) diff --git a/config/sources/families/bcm2711.conf b/config/sources/families/bcm2711.conf index 964af6e19..d3f141528 100644 --- a/config/sources/families/bcm2711.conf +++ b/config/sources/families/bcm2711.conf @@ -68,7 +68,7 @@ extension_prepare_config__prepare_rpi_flash_kernel() { display_alert "Preparing bcm2711" "${RELEASE}, distro kernel?: ${RASPI_DISTRO_KERNEL}" "info" export RASPI_DISTRO_KERNEL="${RASPI_DISTRO_KERNEL:-no}" # Include a distro-built kernel? export SERIALCON="${RASPI_SERIALCON:-tty1}" # HDMI etc, not serial. most people don't have UART on rpi - local usable_releases="jammy|kinetic" + local usable_releases="jammy|kinetic|lunar" if [[ "$RELEASE" =~ ^(${usable_releases})$ ]]; then export FK__EXTRA_PACKAGES="rpi-eeprom linux-firmware linux-firmware-raspi libraspberrypi-bin cloud-initramfs-growroot" diff --git a/lib/functions/cli/utils-cli.sh b/lib/functions/cli/utils-cli.sh index 909b420e1..944a1240b 100644 --- a/lib/functions/cli/utils-cli.sh +++ b/lib/functions/cli/utils-cli.sh @@ -99,7 +99,7 @@ function handle_docker() { codename=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d"=" -f2) codeid=$(cat /etc/os-release | grep ^NAME | cut -d"=" -f2 | awk '{print tolower($0)}' | tr -d '"' | awk '{print $1}') [[ "${codename}" == "debbie" ]] && codename="buster" && codeid="debian" - [[ "${codename}" == "ulyana" || "${codename}" == "jammy" || "${codename}" == "kinetic" ]] && codename="focal" && codeid="ubuntu" + [[ "${codename}" == "ulyana" || "${codename}" == "jammy" || "${codename}" == "kinetic" || "${codename}" == "lunar" ]] && codename="focal" && codeid="ubuntu" # different binaries for some. TBD. Need to check for all others [[ "${codename}" =~ focal|hirsute ]] && DOCKER_BINARY="docker containerd docker.io" diff --git a/lib/functions/configuration/main-config.sh b/lib/functions/configuration/main-config.sh index 714a85538..d8173a9c4 100644 --- a/lib/functions/configuration/main-config.sh +++ b/lib/functions/configuration/main-config.sh @@ -221,7 +221,7 @@ POST_FAMILY_CONFIG [[ -z $ATFPATCHDIR ]] && ATFPATCHDIR="atf-$LINUXFAMILY" [[ -z $KERNELPATCHDIR ]] && KERNELPATCHDIR="$LINUXFAMILY-$BRANCH" - if [[ "$RELEASE" =~ ^(focal|jammy|kinetic)$ ]]; then + if [[ "$RELEASE" =~ ^(focal|jammy|kinetic|lunar)$ ]]; then DISTRIBUTION="Ubuntu" else DISTRIBUTION="Debian" diff --git a/lib/functions/extras/buildpkg.sh b/lib/functions/extras/buildpkg.sh index 126e4c6a6..e5d6eed98 100644 --- a/lib/functions/extras/buildpkg.sh +++ b/lib/functions/extras/buildpkg.sh @@ -13,18 +13,20 @@ create_chroot() { apt_mirror['focal']="$UBUNTU_MIRROR" apt_mirror['jammy']="$UBUNTU_MIRROR" apt_mirror['kinetic']="$UBUNTU_MIRROR" + apt_mirror['lunar']="$UBUNTU_MIRROR" components['buster']='main,contrib' components['bullseye']='main,contrib' components['sid']='main,contrib' components['focal']='main,universe,multiverse' components['jammy']='main,universe,multiverse' + components['lunar']='main,universe,multiverse' components['kinetic']='main,universe,multiverse' display_alert "Creating build chroot" "$release/$arch" "info" local includes="ccache,locales,git,ca-certificates,libfile-fcntllock-perl,rsync,python3,distcc,apt-utils" # perhaps a temporally workaround case $release in - bullseye | focal | jammy | sid | kinetic) + bullseye | focal | jammy | sid | kinetic | lunar) includes=${includes}",perl-openssl-defaults,libnet-ssleay-perl" ;; esac @@ -120,6 +122,7 @@ chroot_prepare_distccd() { gcc_version['sid']='10.2' gcc_version['jammy']='12' gcc_version['kinetic']='12' + gcc_version['lunar']='12' gcc_type['armhf']='arm-linux-gnueabihf-' gcc_type['arm64']='aarch64-linux-gnu-' rm -f "${dest}"/cmdlist @@ -153,7 +156,7 @@ chroot_build_packages() { target_arch="${ARCH}" else # only make packages for recent releases. There are no changes on older - target_release="bullseye focal jammy sid" + target_release="bullseye focal jammy lunar sid" target_arch="armhf arm64 amd64" fi diff --git a/lib/functions/host/prepare-host.sh b/lib/functions/host/prepare-host.sh index df31f9c01..022132caa 100644 --- a/lib/functions/host/prepare-host.sh +++ b/lib/functions/host/prepare-host.sh @@ -68,7 +68,7 @@ prepare_host() { fi # Add support for Ubuntu 20.04, 21.04 and Mint 20.x - if [[ $HOSTRELEASE =~ ^(focal|impish|hirsute|jammy|kinetic|ulyana|ulyssa|vanessa|bullseye|uma|una)$ ]]; then + if [[ $HOSTRELEASE =~ ^(focal|impish|hirsute|jammy|kinetic|lunar|ulyana|ulyssa|vanessa|bullseye|uma|una)$ ]]; then hostdeps+=" python2 python3" ln -fs /usr/bin/python2.7 /usr/bin/python2 ln -fs /usr/bin/python2.7 /usr/bin/python @@ -83,7 +83,7 @@ prepare_host() { # # NO_HOST_RELEASE_CHECK overrides the check for a supported host system # Disable host OS check at your own risk. Any issues reported with unsupported releases will be closed without discussion - if [[ -z $HOSTRELEASE || "buster bullseye focal impish hirsute jammy kinetic debbie tricia ulyana ulyssa vanessa uma una" != *"$HOSTRELEASE"* ]]; then + if [[ -z $HOSTRELEASE || "buster bullseye focal impish hirsute jammy lunar kinetic debbie tricia ulyana ulyssa vanessa uma una" != *"$HOSTRELEASE"* ]]; then if [[ $NO_HOST_RELEASE_CHECK == yes ]]; then display_alert "You are running on an unsupported system" "${HOSTRELEASE:-(unknown)}" "wrn" display_alert "Do not report any errors, warnings or other issues encountered beyond this point" "" "wrn" diff --git a/lib/functions/image/partitioning.sh b/lib/functions/image/partitioning.sh index a6df23673..f825c817c 100644 --- a/lib/functions/image/partitioning.sh +++ b/lib/functions/image/partitioning.sh @@ -28,7 +28,7 @@ prepare_partitions() { # parttype[nfs] is empty # metadata_csum and 64bit may need to be disabled explicitly when migrating to newer supported host OS releases - if [[ $HOSTRELEASE =~ buster|bullseye|focal|jammy|kinetic|sid ]]; then + if [[ $HOSTRELEASE =~ buster|bullseye|focal|jammy|kinetic|lunar|sid ]]; then mkopts[ext4]="-q -m 2 -O ^64bit,^metadata_csum" fi # mkopts[fat] is empty diff --git a/lib/functions/rootfs/distro-specific.sh b/lib/functions/rootfs/distro-specific.sh index 040492a2e..5cb8f2265 100644 --- a/lib/functions/rootfs/distro-specific.sh +++ b/lib/functions/rootfs/distro-specific.sh @@ -13,7 +13,7 @@ install_distribution_specific() { case $RELEASE in - focal | jammy | kinetic ) + focal | jammy | kinetic | lunar ) # by using default lz4 initrd compression leads to corruption, go back to proven method sed -i "s/^COMPRESS=.*/COMPRESS=gzip/" "${SDCARD}"/etc/initramfs-tools/initramfs.conf @@ -88,7 +88,7 @@ install_distribution_specific() { # create_sources_list # -# : bullseye|focal|jammy|kinetic|sid +# : bullseye|focal|jammy|kinetic|lunar|sid # : path to root directory # create_sources_list() { @@ -136,7 +136,7 @@ create_sources_list() { EOF ;; - focal | jammy | kinetic) + focal | jammy | kinetic | lunar) cat <<- EOF > "${basedir}"/etc/apt/sources.list deb http://${UBUNTU_MIRROR} $release main restricted universe multiverse #deb-src http://${UBUNTU_MIRROR} $release main restricted universe multiverse diff --git a/tools/repository/repo b/tools/repository/repo index 23fea3a7a..a4ae237d4 100755 --- a/tools/repository/repo +++ b/tools/repository/repo @@ -40,7 +40,7 @@ publishing() { IFS=', ' read -r -a DISTROS <<< "$5" local errors=0 # publish all, update selected -local distributions=("jessy" "xenial" "stretch" "bionic" "buster" "bullseye" "focal" "hirsute" "impish" "jammy" "kinetic" "sid") +local distributions=("jessy" "xenial" "stretch" "bionic" "buster" "bullseye" "focal" "hirsute" "impish" "jammy" "lunar" "kinetic" "sid") for release in "${distributions[@]}"; do local forceoverwrite=""