From: Chris Hofstaedtler Date: Mon, 13 Nov 2023 21:47:38 +0000 (+0100) Subject: Remove manual setup of /dev contents X-Git-Tag: v0.105~9^2 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=8671b4a91638554a9559965915f03cba85c76af8 Remove manual setup of /dev contents debootstrap already creates the minimally needed set of device nodes, and everything else will come from udev. Booting systems without udev is not supported in Debian TTBOMK, so we also do not need to try supporting that. Here is the contents of /dev with this patch applied, for a bookworm install: /dev: total 4 drwxr-xr-x 4 root root 182 Nov 13 22:50 ./ drwxr-xr-x 17 root root 4096 Nov 13 22:51 ../ crw-rw-rw- 1 root root 5, 1 Nov 13 22:50 console lrwxrwxrwx 1 root root 13 Nov 13 22:50 fd -> /proc/self/fd/ crw-rw-rw- 1 root root 1, 7 Nov 13 22:50 full crw-rw-rw- 1 root root 1, 3 Nov 13 22:50 null crw-rw-rw- 1 root root 5, 2 Nov 13 22:50 ptmx drwxr-xr-x 2 root root 6 Nov 13 22:50 pts/ crw-rw-rw- 1 root root 1, 8 Nov 13 22:50 random drwxr-xr-x 2 root root 6 Nov 13 22:50 shm/ lrwxrwxrwx 1 root root 15 Nov 13 22:50 stderr -> /proc/self/fd/2 lrwxrwxrwx 1 root root 15 Nov 13 22:50 stdin -> /proc/self/fd/0 lrwxrwxrwx 1 root root 15 Nov 13 22:50 stdout -> /proc/self/fd/1 crw-rw-rw- 1 root root 5, 0 Nov 13 22:50 tty crw-rw-rw- 1 root root 1, 9 Nov 13 22:50 urandom crw-rw-rw- 1 root root 1, 5 Nov 13 22:50 zero /dev/pts: total 0 drwxr-xr-x 2 root root 6 Nov 13 22:50 ./ drwxr-xr-x 4 root root 182 Nov 13 22:50 ../ /dev/shm: total 0 drwxr-xr-x 2 root root 6 Nov 13 22:50 ./ drwxr-xr-x 4 root root 182 Nov 13 22:50 ../ --- diff --git a/Makefile b/Makefile index 8108abb..20e533b 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,6 @@ install: mkdir -p $(DESTDIR)/usr/sbin/ mkdir -p $(DESTDIR)/usr/share/zsh/vendor-completions install -m 644 config $(DESTDIR)/etc/debootstrap/ - install -m 644 devices.tar.gz $(DESTDIR)/etc/debootstrap/ install -m 644 locale.gen $(DESTDIR)/etc/debootstrap/ install -m 644 packages $(DESTDIR)/etc/debootstrap/ install -m 644 packages-arm64 $(DESTDIR)/etc/debootstrap/ diff --git a/debian/grml-debootstrap.maintscript b/debian/grml-debootstrap.maintscript index a60be94..936057b 100644 --- a/debian/grml-debootstrap.maintscript +++ b/debian/grml-debootstrap.maintscript @@ -1 +1,2 @@ +rm_conffile /etc/debootstrap/devices.tar.gz 0.105~ rm_conffile /etc/zsh/completion.d/_grml-debootstrap 0.86~ diff --git a/devices.tar.gz b/devices.tar.gz deleted file mode 100644 index 0d02e40..0000000 Binary files a/devices.tar.gz and /dev/null differ diff --git a/grml-debootstrap b/grml-debootstrap index 00ce363..2706313 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1908,9 +1908,6 @@ preparechroot() { # setup default locales [ -n "$LOCALES" ] && cp $VERBOSE "${CONFFILES}"/locale.gen "${MNTPOINT}"/etc/locale.gen - # MAKEDEV is just a forking bomb crap, let's do it on our own instead :) - ( cd "${MNTPOINT}"/dev && tar zxf /etc/debootstrap/devices.tar.gz ) - # copy any existing files to chroot [ -d "${CONFFILES}"/bin ] && cp $VERBOSE -a -L "${CONFFILES}"/bin/* "${MNTPOINT}"/bin/ [ -d "${CONFFILES}"/boot ] && cp $VERBOSE -a -L "${CONFFILES}"/boot/* "${MNTPOINT}"/boot/