diff --git a/Makefile b/Makefile index fea5e91..f86e94a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ #!/usr/bin/make -f +# Change the default shell /bin/sh which does not implement 'source' +# source is needed to work in a python virtualenv +SHELL := /bin/bash # remove 'download_extra' to build without third party software/dotfiles all: install_buildenv clean download_extra build @@ -19,7 +22,7 @@ clean: bump_version: @last_tag=$$(git tag | tail -n1); \ - echo "Please set version to $$last_tag in Makefile config/bootloaders/isolinux/live.cfg.in config/bootloaders/isolinux/menu.cfg auto/config" + echo "Please set version to $$last_tag in Makefile config/bootloaders/isolinux/live.cfg.in config/bootloaders/isolinux/menu.cfg auto/config doc/md/download-and-installation.md" build: # Build the live system/ISO image @@ -51,7 +54,14 @@ release_archive: ################################ -tests: download_iso test_kvm_bios test_kvm_uefi +tests: test_imagesize download_iso test_kvm_bios test_kvm_uefi + +test_imagesize: + @size=$$(du -b iso/*.iso | cut -f 1); \ + echo "[INFO] ISO image size: $$size bytes"; \ + if [[ "$$size" -gt 2147483648 ]]; then \ + echo '[WARNING] ISO image size is larger than 2GB!'; \ + fi download_iso: # download the iso image from a build server @@ -59,7 +69,7 @@ download_iso: test_kvm_bios: # Run the resulting image in KVM/virt-manager (legacy BIOS mode) - sudo virt-install --name dlc-test --boot cdrom --disk path=/dlc-test-disk0.qcow2,format=qcow2,size=20,device=disk,bus=virtio,cache=none --cdrom 'iso/dlc-2.2-debian-buster-amd64.hybrid.iso' --memory 2048 --vcpu 2 + sudo virt-install --name dlc-test --boot cdrom --disk path=/dlc-test-disk0.qcow2,format=qcow2,size=20,device=disk,bus=virtio,cache=none --cdrom 'iso/dlc-2.2.2-debian-buster-amd64.hybrid.iso' --memory 2048 --vcpu 2 sudo virsh destroy dlc-test sudo virsh undefine dlc-test sudo rm /dlc-test-disk0.qcow2 @@ -67,7 +77,7 @@ test_kvm_bios: test_kvm_uefi: # Run the resulting image in KVM/virt-manager (UEFI mode) # UEFI support must be enabled in QEMU config for EFI install tests https://wiki.archlinux.org/index.php/Libvirt#UEFI_Support (/usr/share/OVMF/*.fd) - sudo virt-install --name dlc-test --boot loader=/usr/share/OVMF/OVMF_CODE.fd --disk path=/dlc-test-disk0.qcow2,format=qcow2,size=20,device=disk,bus=virtio,cache=none --cdrom 'iso/dlc-2.2-debian-buster-amd64.hybrid.iso' --memory 2048 --vcpu 2 + sudo virt-install --name dlc-test --boot loader=/usr/share/OVMF/OVMF_CODE.fd --disk path=/dlc-test-disk0.qcow2,format=qcow2,size=20,device=disk,bus=virtio,cache=none --cdrom 'iso/dlc-2.2.2-debian-buster-amd64.hybrid.iso' --memory 2048 --vcpu 2 sudo virsh destroy dlc-test sudo virsh undefine dlc-test sudo rm /dlc-test-disk0.qcow2 @@ -79,7 +89,7 @@ test_kvm_uefi: # gitea-cli config defined in ~/.config/gitearc update_todo: git clone https://github.com/bashup/gitea-cli gitea-cli - -rm TODO.md - echo '' > TODO.md - ./gitea-cli/bin/gitea issues zerodb/debian-live-config | jq -r '.[] | "- #\(.number) - \(.title)"' >> TODO.md; \ + -rm doc/md/TODO.md + echo '' > doc/md/TODO.md + ./gitea-cli/bin/gitea issues zerodb/debian-live-config | jq -r '.[] | "- #\(.number) - \(.title)"' >> doc/md/TODO.md; \ rm -rf gitea-cli