diff --git a/trisquel-manual-netinstall-lxc/Makefile b/trisquel-manual-netinstall-lxc/Makefile index b8b9a1b..1458d59 100644 --- a/trisquel-manual-netinstall-lxc/Makefile +++ b/trisquel-manual-netinstall-lxc/Makefile @@ -13,7 +13,7 @@ VERSION ?= 11.0 trisquel-netinst_$(VERSION)_amd64.iso \ trisquel-netinst_$(VERSION)_amd64.iso.asc -.PHONY: all +.PHONY: all install-vm all: verify-trisquel-netinst_$(VERSION)_amd64 trisquel-archive-signkey.gpg: @@ -30,3 +30,50 @@ trisquel-archive-signkey.gpg: verify-%: %.iso.asc gpg --verify $< + +install-iso: + virsh -c qemu:///system vol-list installation | \ + tail +3 | \ + awk '{print $1}' | \ + grep '^trisquel-netinst_11.0_amd64.iso$' || \ + ( \ + virsh -c qemu:///system \ + vol-create-as \ + installation trisquel-netinst_11.0_amd64.iso 0 && \ + virsh -c qemu:///system \ + vol-upload \ + --pool installation trisquel-netinst_11.0_amd64.iso \ + --file $PWD/trisquel-netinst_11.0_amd64.iso \ + ) + +# We need that for transparency reasons +install-signature: + virsh -c qemu:///system vol-list installation | \ + tail +3 | \ + awk '{print $1}' | \ + grep '^trisquel-netinst_11.0_amd64.iso.asc$' || \ + ( \ + virsh -c qemu:///system \ + vol-create-as \ + installation trisquel-netinst_11.0_amd64.iso.asc 0 && \ + virsh -c qemu:///system \ + vol-upload \ + --pool installation trisquel-netinst_11.0_amd64.iso \ + --file $PWD/trisquel-netinst_11.0_amd64.iso.asc \ + ) + +VM_DEPENDENCIES = \ + install-iso \ + install-signature \ + verify-trisquel-netinst_$(VERSION)_amd64 + +install-vm: $(VM_DEPENDENCIES) + if ! virsh -c qemu:///system \ + desc experimental-trisquel-netinstall ; then \ + virsh -c qemu:///system destroy \ + experimental-trisquel-netinstall || true ; \ + virsh -c qemu:///system undefine \ + experimental-trisquel-netinstall ; \ + fi + virsh -c qemu:///system \ + define --file experimental-trisquel-netinstall.xml diff --git a/trisquel-manual-netinstall-lxc/create-netinstall-volume.sh b/trisquel-manual-netinstall-lxc/create-netinstall-volume.sh deleted file mode 100755 index 55d5bb5..0000000 --- a/trisquel-manual-netinstall-lxc/create-netinstall-volume.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2023 Denis 'GNUtoo' Carikli -# -# This project is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This project is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this project. If not, see . - -virsh -c qemu:///system \ - vol-create-as installation trisquel-netinst_11.0_amd64.isoc 0 - -virsh -c qemu:///system \ - vol-upload --pool installation trisquel-netinst_11.0_amd64.iso \ - --file $PWD/trisquel-netinst_11.0_amd64.iso - -virsh -c qemu:///system \ - vol-create-as installation trisquel-netinst_11.0_amd64.iso.asc 0 - -virsh -c qemu:///system \ - vol-upload --pool installation trisquel-netinst_11.0_amd64.iso.asc \ - --file $PWD/trisquel-netinst_11.0_amd64.iso.asc - diff --git a/trisquel-manual-netinstall-lxc/create-vm.sh b/trisquel-manual-netinstall-lxc/create-vm.sh deleted file mode 100755 index 3503998..0000000 --- a/trisquel-manual-netinstall-lxc/create-vm.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2023 Denis 'GNUtoo' Carikli -# -# This project is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This project is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this project. If not, see . - -virsh -c qemu:///system define --file gnutoo-trisquel-netinstall.xml