diff --git a/blends/devuan-live/config b/blends/devuan-live/config index 2139816..a5de82b 100644 --- a/blends/devuan-live/config +++ b/blends/devuan-live/config @@ -1,19 +1,80 @@ #!/usr/bin/env zsh ## configuration file for devuan-live blend -vars+=(username userpass default_shell) +vars+=(username userpass default_shell mkefi grubversion) arrs+=(custom_deb_packages) blend_name="devuan-live" -blend_vers="1.0" username="devuan" userpass="devuan" - default_shell="/bin/bash" -custom_deb_packages=( - #refracta-lang_1.1.deb - refractainstaller-base_9.2.1_all.deb - refractasnapshot-base_10.0.2_all.deb +grubversion="grub-pc" +image_name="${os}_${release}_${version}_${arch}" + +case "$4" in + uefi) + grubversion="grub-efi-${arch}" + image_name="${os}_${release}_${version}_${arch}_uefi" + mkefi="yes" + efi_work="$BLENDPATH/efi-files" + ;; +esac + +extra_packages+=( + lsof + bash-completion + texinfo + acpi-support-base + aptitude + apt-listchanges + discover + dnsutils + doc-debian + docutils-common + docutils-doc + ftp + gettext + gnupg2 + gparted + $grubversion + laptop-detect + mlocate + mutt + ncurses-term + nfs-common + procmail + reportbug + telnet + usbutils + w3m + whois + task-desktop + task-english + task-xfce-desktop + task-print-server +) + +purge_packages=( + btrfs-tools + debian-keyring + elinks + elinks-data + git + git-core + git-man + liberror-perl + libfsplib0 + libtre5 + openntpd + openssh-server + openssh-sftp-server + tmux + zsh + zsh-common +) + +custom_deb_packages+=( + yad_0.27.0-1_${arch}.deb ) diff --git a/blends/devuan-live/devuan-live.blend b/blends/devuan-live/devuan-live.blend index 213aa53..5f6d308 100644 --- a/blends/devuan-live/devuan-live.blend +++ b/blends/devuan-live/devuan-live.blend @@ -1,9 +1,11 @@ #!/usr/bin/env zsh # Copyright (c) 2017 Dyne.org Foundation # live-sdk is written and maintained by Ivan J. +# devuan-live blend patches maintained by fsmithred # # This file is part of live-sdk # +# # This source code 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 @@ -41,6 +43,8 @@ blend_postinst() { notice "executing $blend_name postinst" + [[ -n "$mkefi" ]] && iso_make_efi + install-custdebs || zerr pushd "$strapdir" sudo rsync -avx "$BLENDPATH"/rootfs-overlay/* . || zerr @@ -95,6 +99,130 @@ EOF sudo cp -rav "$BLENDPATH"/isolinux-overlay/* "$workdir"/binary/isolinux/ } +## uefi code borrowed and adapted from David Hare, who borrowed and adapted it +## from similar scripts by Colin Watson and Patrick J. Volkerding. +iso_make_efi() { + fn iso_make_efi + req=(workdir efi_work) + ckreq || return 1 + set -x + notice "creating efi boot files" + + _tempdir="$(mktemp -d /tmp/work_temp.XXXX)" + + ## for initial grub.cfg + mkdir -p "$_tempdir"/boot/grub + + + cat >"$_tempdir"/boot/grub/grub.cfg <> boot/grub/x86_64-efi/grub.cfg + + ## Additional modules so we don't boot in blind mode. + ## I don't know which ones are really needed. + _efimods=(efi_gop efi_uga ieee1275_fb vbe vga video_bochs + video_cirrus jpeg png gfxterm) + + for i in $_efimods; do + print "insmod $i" >> boot/grub/x86_64-efi/grub.cfg + done + print "source /boot/grub/grub.cfg" >> boot/grub/x86_64-efi/grub.cfg + + pushd "$_tempdir" + ## make a tarred "memdisk" to embed in the grub image + tar -cvf memdisk boot + + ## make the grub image + _grubmods=(search iso9660 configfile normal memdisk tar cat part_msdos + part_gpt fat ext2 ntfs ntfscomp hfsplus chain boot linux) + grub-mkimage \ + -O "x86_64-efi" \ + -m "memdisk" \ + -o "bootx64.efi" \ + -p '(memdisk)/boot/grub' \ + $_grubmods + popd + + ## copy the grub image to efi/boot (to go later in the device's root) + cp "$_tempdir"/bootx64.efi efi/boot + + ## Do the boot image "boot/grub/efiboot.img" + dd if=/dev/zero of=boot/grub/efiboot.img bs=1K count=1440 + /sbin/mkdosfs -F 12 boot/grub/efiboot.img + + sudo mkdir -p img-mnt/efi/boot + sudo mount -o loop boot/grub/efiboot.img img-mnt + sudo cp "$_tempdir"/bootx64.efi img-mnt/efi/boot/ + + cp /usr/lib/grub/x86_64-efi/* boot/grub/x86_64-efi/ + + ## if this doesn't work try another font from the same place + ## (grub's default, unicode.pf2, is much larger) + ## Either of these will work, and they look the same to me. + ## Unicode seems to work with qemu. -fsr + + #cp /usr/share/grub/ascii.pf2 boot/grub/font.pf2 + cp /usr/share/grub/unicode.pf2 boot/grub/font.pf2 + + ## doesn't need to be root-owned + #sudo chown -R 1000:1000 $(pwd) 2>/dev/null + + ## Cleanup efi temps + sudo umount img-mnt + sudo rmdir img-mnt + rm -rf "$_tempdir" + + popd # $efi_work + + + ## Copy efi files to iso + pushd $workdir + sudo rsync -avx "$efi_work"/boot binary/ + sudo rsync -avx "$efi_work"/efi binary/ + popd + + ## Do the main grub.cfg (which gets loaded last): + cat <> /etc/default/grub diff --git a/blends/devuan-live/refractainstaller-base_9.2.1_all.deb b/blends/devuan-live/refractainstaller-base_9.2.1_all.deb deleted file mode 100644 index 23fce6c..0000000 Binary files a/blends/devuan-live/refractainstaller-base_9.2.1_all.deb and /dev/null differ diff --git a/blends/devuan-live/refractasnapshot-base_10.0.2_all.deb b/blends/devuan-live/refractasnapshot-base_10.0.2_all.deb deleted file mode 100644 index a77109e..0000000 Binary files a/blends/devuan-live/refractasnapshot-base_10.0.2_all.deb and /dev/null differ diff --git a/blends/devuan-live/yad_0.27.0-1_amd64.deb b/blends/devuan-live/yad_0.27.0-1_amd64.deb new file mode 100644 index 0000000..2c2aeb4 Binary files /dev/null and b/blends/devuan-live/yad_0.27.0-1_amd64.deb differ diff --git a/blends/devuan-live/yad_0.27.0-1_i386.deb b/blends/devuan-live/yad_0.27.0-1_i386.deb new file mode 100644 index 0000000..a29b87a Binary files /dev/null and b/blends/devuan-live/yad_0.27.0-1_i386.deb differ diff --git a/lib/libdevuansdk b/lib/libdevuansdk index 93f015a..db35673 160000 --- a/lib/libdevuansdk +++ b/lib/libdevuansdk @@ -1 +1 @@ -Subproject commit 93f015a4a00ed1c42f939f44ded6f84bab7a6246 +Subproject commit db35673fa3bf58ac329dd91d9b8aa772e788f952