Update ynh-dev armhf wip2

This commit is contained in:
rosbeef andino 2023-11-12 23:39:11 +00:00 committed by GitHub
parent 5ef5a5420e
commit ae2b8b6108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

20
ynh-dev
View file

@ -226,22 +226,22 @@ function rebuild_ynhdev()
set -x set -x
sudo lxc info $BOX-rebuild >/dev/null && sudo lxc delete $BOX-rebuild --force sudo lxc info $BOX-rebuild >/dev/null && sudo lxc delete $BOX-rebuild --force
if [[ ${ARCH} eq "armhf" ]] if [[ ${ARCH} eq "armhf" ]]
apt install debootstrap sudo apt install debootstrap
mkdir ~/lxc-images/debian-bullseye sudo mkdir -p ~/lxc-images/debian-$DIST
debootstrap bullseye ~/lxc-images/debian-bullseye sudo debootstrap $DIST ~/lxc-images/debian-$DIST
tar -cvzf rootfs.tar.gz -C ~/lxc-images/debian-bullseye sudo tar -cvzf rootfs.tar.gz -C ~/lxc-images/debian-$DIST
cat << EOF > ~/lxc-images/debian-bullseye/metadata.yaml sudo cat << EOF > ~/lxc-images/debian-$DIST/metadata.yaml
architecture: "armhf" architecture: "armhf"
creation_date: ${date +%s} creation_date: $(date +%s)
properties: properties:
architecture: "armhf" architecture: "armhf"
description: "Debian Oldstable (bullseye)" description: "Debian ($DIST)"
os: "debian" os: "debian"
release: "bullseye" release: "bullseye"
EOF EOF
tar -cvzf ~/lxc-images/debian-bullseye/metadata.tar.gz ~/lxc-images/debian-bullseye/metadata.yaml sudo tar -cvzf ~/lxc-images/debian-$DIST/metadata.tar.gz ~/lxc-images/debian-$DIST/metadata.yaml
lxc image import metadata.tar.gz rootfs.tar.gz --alias $BOX-base sudo lxc image import ~/lxc-images/debian-$DIST/metadata.tar.gz ~/lxc-images/debian-$DIST/rootfs.tar.gz --alias $BOX-rebuild
lxc launch $BOX-base ynh sudo lxc launch $BOX-rebuild $BOX-rebuild -c security.nesting=true -c security.privileged=true
else else
sudo lxc launch images:debian/$DIST/$ARCH $BOX-rebuild -c security.nesting=true -c security.privileged=true sudo lxc launch images:debian/$DIST/$ARCH $BOX-rebuild -c security.nesting=true -c security.privileged=true
fi fi