From 2ab18f465bb026cdde2164cc37667d02f177c7a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 18 Dec 2020 20:43:54 +0100 Subject: [PATCH] tidy up example config --- live-cd.mk | 99 +++++++++++++---------------------------------------- live-dvd.mk | 13 +++++++ 2 files changed, 37 insertions(+), 75 deletions(-) diff --git a/live-cd.mk b/live-cd.mk index 24cd8a9..ab18dc1 100644 --- a/live-cd.mk +++ b/live-cd.mk @@ -1,106 +1,40 @@ -## Choose only on of the possible target types -# image=disk.img -# squash=rootfs.squash iso=live-cd.iso -## Image size in MB. Needs to be able to hold all software. -# imagesize=3072 - -## Additional packages packages=alsa-utils,aqemu,debian-installer-launcher,debootstrap,dnsutils,dosfstools,exfat-fuse,exfat-utils,firefox-esr,firefox-esr-l10n-de,git,gparted,gwenview,make,man-db,manpages-de,mousepad,ncat,network-manager-gnome,ntfs-3g,okular,pavucontrol,pulseaudio,qemu-kvm,qemu-system-gui,qemu-utils,rdesktop,ssh,synaptic,telnet,tmux,vlc packages+=linux-image-4.19.0-11-amd64 packages+=firmware-atheros,firmware-brcm80211,firmware-iwlwifi,firmware-misc-nonfree # packages+=firmware-ipw2x00 -## Debian release, so far only stretch has been tested -release=buster - -## Comma separated list of config modules from modules/ directory -modules=nodm,xfce,live,approx - define SOURCES := deb http://cdn.debian.net/debian ${release} main non-free endef -## Hostname for the generated machine +release=buster +modules=nodm,xfce,live,approx hostname=live - -## Root password will be salted and encrypted in image rootpass=root - -## The corresponding .pub file for the given rootkey will be applied as -## SSH login file for the root user. -## If the pub file is not found, a new key pair will be generated # rootkey=image_ssh - -## Comma separated list of users to be set up. -## User logins will start out with an empty password -## If the live module is in use, users will also be added to the sudo group -# users=adam,steve users=live - -## Wifi configuration, if a Wifi password is given, WPA encryption will be used -## without the password, the system will try to connect to an open wifi -#wifi=berlin.freifunk.net # wifi=MyWiFi # wifipass=P4ssW0rD - -## Timezone as offered by Debians tzdata selection timezone=Europe/Berlin - -## Comma separated list of locales, first one will become default locale locales=de_DE.UTF-8 #,en_US.UTF-8 - keyboard=de - -## If nodm is installed, you can choose a user to login automatically -## If no user is given here, then nodm will default to root nodm_user=live - -## In nodm, use full screen chromium web browser as session -# webui=http://localhost/ - -## When using NIS modules the directory server should be given -# nis_server=nismaster - -## If the approxmodule is enabled, then one (and only one) apt-source -## can be choosen to install packages from -## See modules/approx.mk if you need more flexibility approx=http://localhost:9000/debian -.PHONY: _live_initrd _favorites _bootmount -_config: _live_initrd _favorites -_isosquash: _bootmount +.PHONY: _live_initrd +_config: _live_initrd _live_initrd: cfg_root _live_modules # printf '%s\n' "isofs" "squashfs" "ata_generic" "usb_storage" "sr_mod" "mmc_block" >>"$${CFGROOT}/etc/initramfs-tools/modules" sed -i 's;^MODULES=.*$$;MODULES=most;' "$${CFGROOT}/etc/initramfs-tools/initramfs.conf" - -_config: cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc -_config: cfg_root/usr/local/bin/gksu - -cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc: cfg_root _xfce - mkdir -p "$(dir $@)" - printf '%s\n' '' \ - '' \ - '' \ - '' \ - '' \ - '' \ - >$@ - -cfg_root/usr/local/bin/gksu: - ln -s /usr/bin/sudo $@ - ln -s /usr/bin/sudo $@do - +.PHONY: _favorites +_config: _favorites _favorites: _xfce printf 'favorites=debian-installer-launcher.desktop,libreoffice-startcenter.desktop,firefox-esr.desktop,xfce4-terminal.desktop,org.kde.dolphin.desktop,mousepad.desktop,synaptic.desktop,aqemu.desktop,gparted.desktop' \ >"$${CFGROOT}/etc/xdg/xfce4/panel/whiskermenu-10.rc" -_iso_image: iso_root/install/gtk/initrd.gz -iso_root/install/gtk/initrd.gz: /usr/lib/debian-installer/images/10/amd64/gtk/debian-installer/amd64/initrd.gz - mkdir -p "$(dir $@)" - cp "$<" "$@" - +# Place some helpers in bash history ;-) _config: cfg_root/home/live/.bash_history cfg_root/home/live/.bash_history: cfg_root _users mkdir "$${CFGROOT}/home/live" @@ -110,9 +44,24 @@ cfg_root/home/live/.bash_history: cfg_root _users >$@ chroot "$${CFGROOT}" chown live:live -R /home/live +# Fake gksu/gksudo, because live password is empty anyway, needed for installer +_config: cfg_root/usr/local/bin/gksu +cfg_root/usr/local/bin/gksu: + ln -s /usr/bin/sudo $@ + ln -s /usr/bin/sudo $@do + + +# include debian installer +_iso_image: iso_root/install/gtk/initrd.gz +iso_root/install/gtk/initrd.gz: /usr/lib/debian-installer/images/10/amd64/gtk/debian-installer/amd64/initrd.gz + mkdir -p "$(dir $@)" + cp "$<" "$@" + +# Make boot folder available for browsing and for debian-installer +# Need to create boot folder in ramdrive because it will not be contained in squashfs +.PHONY: _bootmount +_isosquash: _bootmount _bootmount: cfg_root _config - # mkdir -m 1730 "$${CFGROOT}/var/spool/cron/crontabs/" - # chroot "$${CFGROOT}" chgrp crontab "/var/spool/cron/crontabs/" printf '@reboot mkdir -m755 /boot\n' >>"$${CFGROOT}/var/spool/cron/crontabs/root" chmod 600 "$${CFGROOT}/var/spool/cron/crontabs/root" printf '%s 0 0\n' \ diff --git a/live-dvd.mk b/live-dvd.mk index 9f798a3..7f7d00a 100644 --- a/live-dvd.mk +++ b/live-dvd.mk @@ -4,3 +4,16 @@ iso=live-dvd.iso packages+=audacity,chromium,chromium-sandbox,chromium-l10n,dolphin,dvdauthor,dvd+rw-tools,ffmpeg,frei0r-plugins,gambas3,gcc,genisoimage,growisofs,hunspell-de-de-frami,hyphen-de,ipython3,k3b-i18n,kdenlive,konsole,krita,lazarus,libc-dev,libk3b7-extracodecs,libreoffice-calc,libreoffice-gnome,libreoffice-l10n-de,libreoffice-writer,marble,mencoder,mplayer,mypaint,normalize-audio,obs-studio,osspd,php-cli,recordmydesktop,scribus,sox,xfce4-power-manager-plugins packages+=,extremetuxracer,hedgewars,frozen-bubble,gnome-2048,kpat,supertuxkart,torus-trooper + +# Bugfix: prevent warning from faulty dolphin config +_config: cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc +cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc: cfg_root _xfce + mkdir -p "$(dir $@)" + printf '%s\n' \ + '' \ + '' \ + ' ' \ + ' ' \ + ' ' \ + '' \ + >$@ -- 2.39.2