]> git.plutz.net Git - blast/blob - live-cd.mk
examples files for live media
[blast] / live-cd.mk
1 ## Choose only on of the possible target types
2 # image=disk.img
3 # squash=rootfs.squash
4 iso=live-cd.iso
5
6 ## Image size in MB. Needs to be able to hold all software.
7 # imagesize=3072
8
9 ## Additional packages
10 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
11 packages+=linux-image-4.19.0-11-amd64
12 packages+=firmware-atheros,firmware-brcm80211,firmware-iwlwifi,firmware-misc-nonfree
13 # packages+=firmware-ipw2x00
14
15 ## Debian release, so far only stretch has been tested
16 release=buster
17
18 ## Comma separated list of config modules from modules/ directory
19 modules=nodm,xfce,live,approx
20
21 define SOURCES :=
22 deb     http://cdn.debian.net/debian ${release} main non-free
23 endef
24
25 ## Hostname for the generated machine
26 hostname=live
27
28 ## Root password will be salted and encrypted in image
29 rootpass=root
30
31 ## The corresponding .pub file for the given rootkey will be applied as
32 ## SSH login file for the root user.
33 ## If the pub file is not found, a new key pair will be generated
34 # rootkey=image_ssh
35
36 ## Comma separated list of users to be set up.
37 ## User logins will start out with an empty password
38 ## If the live module is in use, users will also be added to the sudo group
39 # users=adam,steve
40 users=live
41
42 ## Wifi configuration, if a Wifi password is given, WPA encryption will be used
43 ## without the password, the system will try to connect to an open wifi
44 #wifi=berlin.freifunk.net
45 # wifi=MyWiFi
46 # wifipass=P4ssW0rD
47
48 ## Timezone as offered by Debians tzdata selection
49 timezone=Europe/Berlin
50
51 ## Comma separated list of locales, first one will become default locale
52 locales=de_DE.UTF-8 #,en_US.UTF-8
53
54 keyboard=de
55
56 ## If nodm is installed, you can choose a user to login automatically
57 ## If no user is given here, then nodm will default to root
58 nodm_user=live
59
60 ## In nodm, use full screen chromium web browser as session
61 # webui=http://localhost/
62
63 ## When using NIS modules the directory server should be given
64 # nis_server=nismaster
65
66 ## If the approxmodule is enabled, then one (and only one) apt-source
67 ## can be choosen to install packages from
68 ## See modules/approx.mk if you need more flexibility
69 approx=http://localhost:9000/debian
70
71 .PHONY: _live_initrd _favorites _bootmount
72 _config: _live_initrd _favorites
73 _isosquash: _bootmount
74 _live_initrd: cfg_root _live_modules
75         # printf '%s\n' "isofs" "squashfs" "ata_generic" "usb_storage" "sr_mod" "mmc_block" >>"$${CFGROOT}/etc/initramfs-tools/modules"
76         sed -i 's;^MODULES=.*$$;MODULES=most;' "$${CFGROOT}/etc/initramfs-tools/initramfs.conf"
77
78 _config: cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc
79 _config: cfg_root/usr/local/bin/gksu
80
81 cfg_root/usr/share/kxmlgui5/dolphin/dolphinui.rc: cfg_root _xfce
82         mkdir -p "$(dir $@)"
83         printf '%s\n'   '<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">' \
84                         '<kpartgui name="dolphin" version="21">' \
85                         '<ActionProperties scheme="Default">' \
86                         '<Action name="new_tab" shortcut="Ctrl+T; "/>' \
87                         '</ActionProperties>' \
88                         '</kpartgui>' \
89                 >$@
90
91 cfg_root/usr/local/bin/gksu:
92         ln -s /usr/bin/sudo $@
93         ln -s /usr/bin/sudo $@do
94
95 _favorites: _xfce
96         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' \
97                 >"$${CFGROOT}/etc/xdg/xfce4/panel/whiskermenu-10.rc"
98
99 _iso_image: iso_root/install/gtk/initrd.gz
100 iso_root/install/gtk/initrd.gz: /usr/lib/debian-installer/images/10/amd64/gtk/debian-installer/amd64/initrd.gz
101         mkdir -p "$(dir $@)"
102         cp "$<" "$@"
103
104 _config: cfg_root/home/live/.bash_history
105 cfg_root/home/live/.bash_history: cfg_root _users
106         mkdir "$${CFGROOT}/home/live"
107         printf '%s\n' \
108                 "sudo git clone https://git.plutz.net/git/blast /mnt/blast" \
109                 "for m in /proc /sys /dev /run; do sudo mount -o rbind $$m /mnt/$$m; done" \
110                 >$@
111         chroot "$${CFGROOT}" chown live:live -R /home/live
112
113 _bootmount: cfg_root _config
114         # mkdir -m 1730 "$${CFGROOT}/var/spool/cron/crontabs/"
115         # chroot "$${CFGROOT}" chgrp crontab "/var/spool/cron/crontabs/"
116         printf '@reboot mkdir -m755 /boot\n' >>"$${CFGROOT}/var/spool/cron/crontabs/root"
117         chmod 600 "$${CFGROOT}/var/spool/cron/crontabs/root"
118         printf  '%s     0 0\n' \
119                 '/run/live/medium       /boot/  bind    auto,bind' \
120                 '/run/live/medium       /lib/live/mount/medium  bind    auto,bind' \
121                 >"$${CFGROOT}/etc/fstab"
122