mirror of
https://github.com/YunoHost/lxd_img_builder.git
synced 2024-09-03 19:56:55 +02:00
We are in bullseye era now
This commit is contained in:
parent
eefed3de5e
commit
16be81aaaa
1 changed files with 18 additions and 12 deletions
24
image_builder
Executable file → Normal file
24
image_builder
Executable file → Normal file
|
@ -48,7 +48,7 @@ function rotate_image()
|
|||
function rebuild_base_lxc()
|
||||
{
|
||||
local YNH_BRANCH=${1:-stable}
|
||||
local DIST=${2:-buster}
|
||||
local DIST=${2:-bullseye}
|
||||
local ARCH=${3:-amd64}
|
||||
local img_name=$YNH_BRANCH-$DIST-$ARCH
|
||||
|
||||
|
@ -128,24 +128,30 @@ function rebuild_base_lxc()
|
|||
function from_stable_to_another_version()
|
||||
{
|
||||
local YNH_BRANCH=${1:-testing}
|
||||
local DIST=${2:-buster}
|
||||
local DIST=${2:-bullseye}
|
||||
local ARCH=${3:-amd64}
|
||||
local OLD_LXC_BASE="ynh-dev-$DIST-$ARCH-stable-base"
|
||||
local NEW_LXC_BASE="ynh-dev-$DIST-$ARCH-$YNH_BRANCH-base"
|
||||
|
||||
if [ "$YNH_BRANCH" == "testing" ]; then
|
||||
source="testing"
|
||||
else
|
||||
source="testing unstable"
|
||||
local CUSTOMAPT=/etc/apt/sources.list.d/yunohost.list
|
||||
|
||||
if [[ "$YNH_BRANCH" == "testing" ]] ; then
|
||||
CHANNELS="testing"
|
||||
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
|
||||
IN_LXC="lxc exec $NEW_LXC_BASE --"
|
||||
|
||||
lxc launch $OLD_LXC_BASE $NEW_LXC_BASE -c security.privileged=true -c security.nesting=true
|
||||
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 dist-upgrade -y"
|
||||
|
||||
|
@ -160,7 +166,7 @@ function from_stable_to_another_version()
|
|||
lxc launch $OLD_LXC_BASE $NEW_LXC_BASE -c security.privileged=true -c security.nesting=true
|
||||
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 dist-upgrade -y"
|
||||
|
||||
|
@ -170,7 +176,7 @@ function from_stable_to_another_version()
|
|||
set +x
|
||||
}
|
||||
|
||||
for DIST in "buster" "bullseye" # Add new debian version here
|
||||
for DIST in "bullseye" # Add new debian version here
|
||||
do
|
||||
for ARCH in "$(get_arch)"
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue