]> git.plutz.net Git - bootimage/commitdiff
updated files from master
authorPaul Hänsch <paul@plutz.net>
Tue, 24 Jul 2018 11:33:32 +0000 (13:33 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 24 Jul 2018 11:33:32 +0000 (13:33 +0200)
12 files changed:
.gitignore
Makefile
config_base/etc/X11/Xresources/xscreensaver
config_base/etc/apt/preferences [new file with mode: 0644]
config_base/etc/apt/sources.list
config_base/etc/hostname
config_base/etc/hosts [new file with mode: 0644]
config_base/etc/lxdm/lxdm.conf [new file with mode: 0644]
config_base/etc/sudoers [moved from config_elok/etc/sudoers with 100% similarity]
config_elok/etc/sddm.conf [deleted file]
partitions [new file with mode: 0644]
permissions.mk [new file with mode: 0644]

index 82234ff53c6a518c5e5d839d7a146c0edfd07498..a7074f2291574fedab2cab98d6f2319d86d12e39 100644 (file)
@@ -1,2 +1,6 @@
 stretch_*_config/
 stretch_*_root/
+stretch_*.squashfs
+mount/
+vmlinuz
+initrd.img
index a80a8a73fac6f26b11b3c992c99d400f97fcd6df..00c2c4ea7474a634ebb593b701e8d4f22bb7b76f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,20 +7,22 @@ GROUPS := sudo
 ARCH := amd64
 CONFIG := config_base/
 
-PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan extlinux gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip
+PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan efibootmgr firmware-linux-free gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo syslinux syslinux-common syslinux-efi systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip
 
-Include *.mk
+include *.mk
+
+.PRECIOUS: stretch_%_root/bin/sh
 
 stretch_%_root/bin/sh:
        btrfs subvolume create "$(subst bin/sh,,$@)" || mkdir "$(subst bin/sh,,$@)"
        chmod 755 "$(subst bin/sh,,$@)"
        debootstrap --arch=${ARCH} --variant=minbase stretch "$(subst bin/sh,,$@)"
 
-stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} .FORCE
+stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} permissions .FORCE
        for tree in ${CONFIG}; do for file in apt default timezone; do cp -av "$$tree/etc/$$file" "$@/etc/" || true; done; done
        chroot "$@" ln -sf /bin/true /usr/local/sbin/invoke-rc.d
        chroot "$@" sh -c 'apt-mark showmanual |xargs apt-mark auto || true'
-       chroot "$@" apt-get update
+       -chroot "$@" apt-get update
        chroot "$@" umount /proc /dev || true
        chroot "$@" mount -t devtmpfs udev /dev
        chroot "$@" mount -t proc proc /proc
@@ -32,16 +34,59 @@ stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} .FORCE
        chroot "$@" apt-get clean
        touch "$@"
 
-stretch_%_config/: stretch_%_root/ ${CONFIG} .FORCE
-       btrfs subvolume delete "$@" || rm -r "$@" || true
+stretch_%_config/: stretch_%_root/ ${CONFIG} permissions .FORCE
+       if [ -d "$@" ]; then btrfs subvolume delete "$@" || rm -r "$@"; else true; fi
        btrfs subvolume snapshot "$<" "$@" || cp -rlv "$<" "$@"
        cp -av $(addsuffix /*, ${CONFIG}) "$@"
-       chroot "$@" locale-gen
-       chroot "$@" update-locale
-       chroot "$@" useradd -M -p "$$(printf %s\\n '${PASS}' |mkpasswd -m sha-256 -s)" '${USER}'
-       for g in ${GROUPS}; do chroot "$@" adduser '${USER}' "$$g"; done
+       -chroot "$@" locale-gen
+       -chroot "$@" update-locale
+       -chroot "$@" useradd -M -p "$$(printf %s\\n '${PASS}' |mkpasswd -m sha-256 -s)" '${USER}'
+       -for g in ${GROUPS}; do chroot "$@" adduser '${USER}' "$$g"; done
        touch "$@"
 
 stretch_%.squashfs: stretch_%_config/
        rm "$@" || true
        mksquashfs "$<" "$@" -comp xz
+       chmod a+r "$@"
+
+vmlinuz: stretch_*_root/
+       ln -fs '$<$@' ./
+
+initrd.img: stretch_*_root/
+       ln -fs '$<$@' ./
+
+/dev/sd%: partitions .FORCE
+       sfdisk ${@} <partitions
+       dd of=${@} if=/usr/lib/syslinux/mbr/gptmbr.bin
+
+/dev/sd%1: /dev/sd% vmlinuz initrd.img syslinux.cfg syslia32.cfg syslx64.cfg bootmenu.cfg .FORCE
+       mkdir -p mount
+       mkfs.vfat -n SQUASHBOOT ${@}
+       syslinux -i ${@}
+       mount -t vfat ${@} mount
+       mkdir -p $(addprefix mount/, EFI/BOOT efi32 efi64 bios)
+       cp /usr/lib/SYSLINUX.EFI/efi32/syslinux.efi mount/EFI/BOOT/BOOTIA32.EFI
+       cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi mount/EFI/BOOT/BOOTX64.EFI
+       cp $(addprefix /usr/lib/syslinux/modules/efi32/, ldlinux.e32 menu.c32 libutil.c32) mount/efi32/
+       cp $(addprefix /usr/lib/syslinux/modules/efi64/, ldlinux.e64 menu.c32 libutil.c32) mount/efi64/
+       cp $(addprefix /usr/lib/syslinux/modules/bios/, menu.c32 libutil.c32) mount/bios/
+       cp -L vmlinuz initrd.img *.squashfs Makefile partitions mount/
+       cp syslia32.cfg syslx64.cfg syslinux.cfg bootmenu.cfg mount/
+       # Temporary workaround, Uncomment for syslinux 6.04+
+       cp $(addprefix /usr/lib/syslinux/modules/, efi32/ldlinux.e32 efi64/ldlinux.e64) mount/EFI/BOOT/
+       cp syslx64.cfg mount/EFI/BOOT/syslinux.cfg
+       umount mount/
+       sync
+
+/dev/sd%2: /dev/sd% .FORCE
+       mkswap -L SWAP ${@}
+       sync
+
+/dev/sd%3: /dev/sd% .FORCE
+       mkdir -p mount
+       mkfs.btrfs -fL SQUASHCLIENT ${@}
+       mount -t btrfs ${@} mount
+       btrfs subvolume create mount/home
+       chmod 0755 mount/home
+       umount mount/
+       sync
index 657bf2624797b60c5326d3e5e25ee5aa301877fc..6c4d7e81825d86c2140b1a53262611d7cf35ca28 100644 (file)
@@ -1,2 +1,4 @@
 xscreensaver.mode: one
 xscreensaver.selected: 151
+xscreensaver.newLoginCommand: /usr/sbin/lxdm -c USER_SWITCH
+
diff --git a/config_base/etc/apt/preferences b/config_base/etc/apt/preferences
new file mode 100644 (file)
index 0000000..6534992
--- /dev/null
@@ -0,0 +1,3 @@
+Package: *
+Pin: release n=stretch
+Pin-Priority: 900
index 10a702f33167ed7e1ec49301437d0a6f39b97ee6..bd5d70e7d627a914321b3480d25b920e8ec0781d 100644 (file)
@@ -1,2 +1,4 @@
 deb http://deb.debian.org/debian stretch main
 deb http://security.debian.org/ stretch/updates main
+
+deb http://deb.debian.org/debian buster main
index 104920e88729d22efe83f993e82200e6283c6f0b..9327fc4583b2781020369c5aeea0464e4803a95a 100644 (file)
@@ -1 +1 @@
-stretch-i386
+stretch-squash
diff --git a/config_base/etc/hosts b/config_base/etc/hosts
new file mode 100644 (file)
index 0000000..db93d46
--- /dev/null
@@ -0,0 +1,5 @@
+127.0.0.1      localhost stretch-squash
+::1            localhost ip6-localhost ip6-loopback
+ff02::1                ip6-allnodes
+ff02::2                ip6-allrouters
+
diff --git a/config_base/etc/lxdm/lxdm.conf b/config_base/etc/lxdm/lxdm.conf
new file mode 100644 (file)
index 0000000..ceb4ca6
--- /dev/null
@@ -0,0 +1,61 @@
+[base]
+## uncomment and set autologin username to enable autologin
+# autologin=dgod
+
+## uncomment and set timeout to enable timeout autologin,
+## the value should >=5
+# timeout=10
+
+## default session or desktop used when no systemwide config
+session=/usr/bin/startxfce4
+
+## uncomment and set to set numlock on your keyboard
+# numlock=0
+
+## set this if you don't want to put xauth file at ~/.Xauthority
+# xauth_path=/tmp
+
+# not ask password for users who have empty password
+# skip_password=1
+
+## greeter used to welcome the user
+greeter=/usr/lib/lxdm/lxdm-greeter-gtk
+
+[server]
+## arg used to start xserver, not fully function
+# arg=/usr/bin/X -background vt1
+# uncomment this if you really want xserver listen to tcp
+# tcp_listen=1
+
+[display]
+## gtk theme used by greeter
+gtk_theme=Clearlooks
+
+## background of the greeter
+#bg=/usr/share/backgrounds/default.png
+bg=/usr/share/images/desktop-base/login-background.svg
+
+## if show bottom pane
+bottom_pane=1
+
+## if show language select control
+lang=1
+
+## if show keyboard layout select control
+keyboard=0
+
+## the theme of greeter
+theme=Industrial
+
+[input]
+
+[userlist]
+## if disable the user list control at greeter
+disable=0
+
+## whitelist user
+white=
+
+## blacklist user
+black=
+
diff --git a/config_elok/etc/sddm.conf b/config_elok/etc/sddm.conf
deleted file mode 100644 (file)
index 542c329..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[Autologin]
-User=guest
-Session=plasma.desktop
diff --git a/partitions b/partitions
new file mode 100644 (file)
index 0000000..a02f341
--- /dev/null
@@ -0,0 +1,6 @@
+label: gpt
+unit: sectors
+
+: start=2048, size=2G, type=1, attrs="LegacyBIOSBootable"
+: size=3G, type=19
+: type=28
diff --git a/permissions.mk b/permissions.mk
new file mode 100644 (file)
index 0000000..165f3b4
--- /dev/null
@@ -0,0 +1,22 @@
+.PHONY: permissions
+
+permissions: ${CONFIG} .FORCE                                                                                           
+       chown -R root:root config_*/ 
+       chmod 0755 config_*/
+       -chmod -R a+rX config_*/etc/
+       -chmod -R a+rX config_*/var/
+       -chmod -R a+rX config_*/lib/
+       -chmod -R a+rX config_*/usr/
+       -chmod -R a+rX config_*/opt/
+       -chmod 0700 config_*/var/lib/polkit-1/
+       -chgrp -R 107 config_*/var/spool/cron/crontabs/
+       -chmod 1730 config_*/var/spool/cron/crontabs/
+       -chmod 0600 config_*/var/spool/cron/crontabs/*
+       -chmod 0600 config_*/etc/NetworkManager/system-connections/*
+       -chmod 0750 config_*/root/
+       -chmod 0700 config_*/root/.ssh/
+       -chmod 0600 config_*/root/.ssh/authorized_keys
+       -chmod 0750 config_*/home/*/
+       -chmod 0700 config_*/home/*/.ssh/
+       -chmod 0600 config_*/home/*/.ssh/authorized_keys
+       -chown 1014:1014 config_*/home/guest