We are in bullseye era now

This commit is contained in:
Alexandre Aubin 2023-02-07 00:36:30 +01:00
parent eefed3de5e
commit 16be81aaaa

30
image_builder Executable file → Normal file
View file

@ -48,10 +48,10 @@ function rotate_image()
function rebuild_base_lxc() function rebuild_base_lxc()
{ {
local YNH_BRANCH=${1:-stable} local YNH_BRANCH=${1:-stable}
local DIST=${2:-buster} local DIST=${2:-bullseye}
local ARCH=${3:-amd64} local ARCH=${3:-amd64}
local img_name=$YNH_BRANCH-$DIST-$ARCH local img_name=$YNH_BRANCH-$DIST-$ARCH
set -x set -x
lxc info $img_name >/dev/null && lxc delete $img_name --force lxc info $img_name >/dev/null && lxc delete $img_name --force
@ -128,16 +128,22 @@ function rebuild_base_lxc()
function from_stable_to_another_version() function from_stable_to_another_version()
{ {
local YNH_BRANCH=${1:-testing} local YNH_BRANCH=${1:-testing}
local DIST=${2:-buster} local DIST=${2:-bullseye}
local ARCH=${3:-amd64} local ARCH=${3:-amd64}
local OLD_LXC_BASE="ynh-dev-$DIST-$ARCH-stable-base" local OLD_LXC_BASE="ynh-dev-$DIST-$ARCH-stable-base"
local NEW_LXC_BASE="ynh-dev-$DIST-$ARCH-$YNH_BRANCH-base" local NEW_LXC_BASE="ynh-dev-$DIST-$ARCH-$YNH_BRANCH-base"
if [ "$YNH_BRANCH" == "testing" ]; then local CUSTOMAPT=/etc/apt/sources.list.d/yunohost.list
source="testing"
else if [[ "$YNH_BRANCH" == "testing" ]] ; then
source="testing unstable" CHANNELS="testing"
fi elif [[ "$YNH_BRANCH" == "unstable" ]] ; then
CHANNELS="testing unstable"
fi
local CUSTOMDEB="deb [signed-by=/usr/share/keyrings/yunohost-archive-keyring.gpg] http://forge.yunohost.org/debian/ $DIST stable $CHANNELS"
#curl --fail --silent https://forge.yunohost.org/yunohost_bullseye.asc | gpg --dearmor > /usr/share/keyrings/yunohost-archive-keyring.gpg
set -x set -x
IN_LXC="lxc exec $NEW_LXC_BASE --" IN_LXC="lxc exec $NEW_LXC_BASE --"
@ -145,7 +151,7 @@ function from_stable_to_another_version()
lxc launch $OLD_LXC_BASE $NEW_LXC_BASE -c security.privileged=true -c security.nesting=true lxc launch $OLD_LXC_BASE $NEW_LXC_BASE -c security.privileged=true -c security.nesting=true
sleep 5 sleep 5
$IN_LXC /bin/bash -c "echo deb http://forge.yunohost.org/debian/ $DIST stable $source > /etc/apt/sources.list.d/yunohost.list" $IN_LXC /bin/bash -c "echo '$CUSTOMDEB' > $CUSTOMAPT"
$IN_LXC /bin/bash -c "apt-get update" $IN_LXC /bin/bash -c "apt-get update"
$IN_LXC /bin/bash -c "apt-get dist-upgrade -y" $IN_LXC /bin/bash -c "apt-get dist-upgrade -y"
@ -160,17 +166,17 @@ function from_stable_to_another_version()
lxc launch $OLD_LXC_BASE $NEW_LXC_BASE -c security.privileged=true -c security.nesting=true lxc launch $OLD_LXC_BASE $NEW_LXC_BASE -c security.privileged=true -c security.nesting=true
sleep 5 sleep 5
$IN_LXC /bin/bash -c "echo deb http://forge.yunohost.org/debian/ $DIST stable $source > /etc/apt/sources.list.d/yunohost.list" $IN_LXC /bin/bash -c "echo '$CUSTOMDEB' > $CUSTOMAPT"
$IN_LXC /bin/bash -c "apt-get update" $IN_LXC /bin/bash -c "apt-get update"
$IN_LXC /bin/bash -c "apt-get dist-upgrade -y" $IN_LXC /bin/bash -c "apt-get dist-upgrade -y"
lxc stop $NEW_LXC_BASE lxc stop $NEW_LXC_BASE
rotate_image $NEW_LXC_BASE $NEW_LXC_BASE "os=YunoHost" "ynh-release=$YNH_BRANCH" "stage=ynh-appci" "release=${DIST^}" "architecture=$ARCH" "description=YunoHost $DIST $YNH_BRANCH ynh-appci $ARCH ($(date '+%Y%m%d'))" rotate_image $NEW_LXC_BASE $NEW_LXC_BASE "os=YunoHost" "ynh-release=$YNH_BRANCH" "stage=ynh-appci" "release=${DIST^}" "architecture=$ARCH" "description=YunoHost $DIST $YNH_BRANCH ynh-appci $ARCH ($(date '+%Y%m%d'))"
lxc delete $NEW_LXC_BASE lxc delete $NEW_LXC_BASE
set +x set +x
} }
for DIST in "buster" "bullseye" # Add new debian version here for DIST in "bullseye" # Add new debian version here
do do
for ARCH in "$(get_arch)" for ARCH in "$(get_arch)"
do do