Darshaka Pathirana [Fri, 2 Feb 2024 14:11:20 +0000 (15:11 +0100)]
Move try_umount above cleanup()
try_umount() replaced all umount calls in PR #264.
Unfortunately, the function is defined too late for a few of functions,
especially for cleanup(), which fails with:
-> Failed (rc=1)
/sbin/grml-debootstrap: line 260: try_umount: command not found
Unexpected non-zero exit code 127 in /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap at line 260 329 1107 1179 0 detected!
last bash command: try_umount 3 "${MNTPOINT}"/boot/efi
-> Failed (rc=1)
/sbin/grml-debootstrap: line 260: try_umount: command not found
Moved the try_umount above cleanup().
Closes: #271
Michael Prokop [Fri, 2 Feb 2024 11:31:57 +0000 (12:31 +0100)]
Release new version 0.107
Michael Prokop [Fri, 26 Jan 2024 15:09:37 +0000 (16:09 +0100)]
Merge remote-tracking branch 'origin/pr/269'
Antoine Beaupré [Tue, 23 Jan 2024 13:50:17 +0000 (08:50 -0500)]
fix debootstrap error handler
We were using the old-style "RC" error checking. Now that has all been
moved to a global error handler, so we need to move log parsing there
as well.
Fixes: 9706bd9 (improved error handling, removed RC=$? noops, 2023-12-22)
Closes: #268
Michael Prokop [Sat, 23 Dec 2023 19:52:01 +0000 (20:52 +0100)]
Release new version 0.106
Michael Prokop [Sat, 23 Dec 2023 15:54:59 +0000 (16:54 +0100)]
Merge remote-tracking branch 'origin/pr/265'
Michael Prokop [Sat, 23 Dec 2023 15:50:33 +0000 (16:50 +0100)]
Merge remote-tracking branch 'origin/pr/264'
Michael Prokop [Sat, 23 Dec 2023 15:48:44 +0000 (16:48 +0100)]
Merge remote-tracking branch 'origin/pr/262'
Michael Prokop [Sat, 23 Dec 2023 15:47:22 +0000 (16:47 +0100)]
Merge remote-tracking branch 'origin/pr/261'
Chris Hofstaedtler [Sat, 23 Dec 2023 15:25:43 +0000 (16:25 +0100)]
ci: enable test-build on pushes to branches and periodic
Chris Hofstaedtler [Sat, 23 Dec 2023 15:21:23 +0000 (16:21 +0100)]
Merge pull request #261 from grml/mika/stretch
Install busybox On Debian/stretch as it's required for initramfs
Patrick Schleizer [Fri, 22 Dec 2023 21:48:33 +0000 (16:48 -0500)]
consistently use same code path for umounting
fixes https://github.com/grml/grml-debootstrap/issues/263
Patrick Schleizer [Fri, 22 Dec 2023 21:28:19 +0000 (16:28 -0500)]
remove noops "eend $RC"
Patrick Schleizer [Fri, 22 Dec 2023 21:20:05 +0000 (16:20 -0500)]
improved error handling, removed RC=$? noops
Michael Prokop [Fri, 22 Dec 2023 16:21:28 +0000 (17:21 +0100)]
Install busybox On Debian/stretch as it's required for initramfs
Followup fix for
2708f441697d1b9
Thanks: Patrick Schleizer <adrelanos@whonix.org> for spotting and reporting
Closes: https://github.com/grml/grml-debootstrap/issues/256
Michael Prokop [Fri, 22 Dec 2023 16:14:59 +0000 (17:14 +0100)]
Merge remote-tracking branch 'origin/pr/259'
Michael Prokop [Fri, 22 Dec 2023 16:13:02 +0000 (17:13 +0100)]
coding style: use '[' instead of 'test'
Michael Prokop [Fri, 22 Dec 2023 16:05:28 +0000 (17:05 +0100)]
Merge remote-tracking branch 'origin/pr/255'
Patrick Schleizer [Tue, 12 Dec 2023 16:23:45 +0000 (11:23 -0500)]
consistently use ESP label for the EFI system partition
change from EFI to ESP for arm64 builds
Patrick Schleizer [Mon, 11 Dec 2023 16:39:38 +0000 (11:39 -0500)]
fix error handling for unmounting on the arm64 architecture
Patrick Schleizer [Mon, 11 Dec 2023 16:23:12 +0000 (11:23 -0500)]
style fix: always use "${MNTPOINT}"/boot/efi
instead of sometimes mixed with "${MNTPOINT}/boot/efi"
Patrick Schleizer [Wed, 22 Nov 2023 05:54:15 +0000 (00:54 -0500)]
not enabling stretch security repository
because no longer provided by Debian
Patrick Schleizer [Sun, 19 Nov 2023 06:35:54 +0000 (01:35 -0500)]
improve error handling for EFI uuid
Patrick Schleizer [Thu, 7 Dec 2023 18:02:42 +0000 (13:02 -0500)]
ignore exit code of blkid as it might fail on some file systems
Patrick Schleizer [Sat, 18 Nov 2023 05:59:03 +0000 (00:59 -0500)]
ci: enable `--debug`
Patrick Schleizer [Sat, 18 Nov 2023 04:51:49 +0000 (23:51 -0500)]
ignore non-zero exist codes of `modprobe loop` and `modprobe dm-mod`
to work around an issue by github actions
drop `-q` from modprobe for better debug output
Patrick Schleizer [Thu, 7 Dec 2023 18:52:36 +0000 (13:52 -0500)]
the first `rmdir "$MNTPOINT"` needs `|| true`
because it will not always work
will not work in cases where /dev etc is still mounted inside the chroot
Patrick Schleizer [Thu, 26 Oct 2023 17:42:08 +0000 (13:42 -0400)]
ignore exit codes of umount during cleanup function
because the cleanup function gets run by the error handler and should
not be nested
Patrick Schleizer [Sat, 18 Nov 2023 04:22:52 +0000 (23:22 -0500)]
syntax check before parsing config files
Patrick Schleizer [Wed, 25 Oct 2023 17:15:14 +0000 (13:15 -0400)]
adjust use of `dialog` for new error handling method
Patrick Schleizer [Wed, 25 Oct 2023 17:14:04 +0000 (13:14 -0400)]
adjust options parsing for new error handling method
Patrick Schleizer [Wed, 25 Oct 2023 16:49:08 +0000 (12:49 -0400)]
chroot-script: properly quote stage execution code
Patrick Schleizer [Wed, 25 Oct 2023 16:48:00 +0000 (12:48 -0400)]
trigger error handler as soon as possible
https://github.com/grml/grml-debootstrap/issues/224#issuecomment-
1779673194
Patrick Schleizer [Wed, 25 Oct 2023 16:40:53 +0000 (12:40 -0400)]
code simplification of stages executing
Patrick Schleizer [Wed, 25 Oct 2023 16:40:03 +0000 (12:40 -0400)]
adjust stages executing for new error handling method
Patrick Schleizer [Wed, 25 Oct 2023 16:32:47 +0000 (12:32 -0400)]
remove obsolete `|| return 1`
because these are now covered by the new error handling method
Patrick Schleizer [Wed, 25 Oct 2023 16:26:53 +0000 (12:26 -0400)]
adjust use of `dialog` for new error handling method
Patrick Schleizer [Wed, 25 Oct 2023 16:06:15 +0000 (12:06 -0400)]
fix use of `eend` in `cleanup` function
Patrick Schleizer [Thu, 7 Dec 2023 18:51:43 +0000 (13:51 -0500)]
don't suppress stderr of rmdir "$MNTPOINT"
Patrick Schleizer [Wed, 25 Oct 2023 16:02:14 +0000 (12:02 -0400)]
fix `cleanup` function
only delete `$MNTPOINT` if such a folder actually exists
Patrick Schleizer [Wed, 25 Oct 2023 15:57:27 +0000 (11:57 -0400)]
fix `cleanup` function
only delete `$MNTPOINT` if such a folder actually exists
Patrick Schleizer [Wed, 25 Oct 2023 15:54:19 +0000 (11:54 -0400)]
code simplification
No need to use both, `eend 1` and `bailout 1`.
In these cases, only `bailout 1` is sufficient.
Patrick Schleizer [Sat, 18 Nov 2023 04:13:35 +0000 (23:13 -0500)]
remove obsolete uses of `eend $?`
because these are now covered by the error_handler
Patrick Schleizer [Wed, 25 Oct 2023 15:20:46 +0000 (11:20 -0400)]
use `|| eend $?` consistently in `cleanup` function
Patrick Schleizer [Wed, 25 Oct 2023 15:16:55 +0000 (11:16 -0400)]
enable error handler by default
Michael Prokop [Thu, 7 Dec 2023 17:24:10 +0000 (18:24 +0100)]
Release new version 0.105
Michael Prokop [Thu, 7 Dec 2023 15:44:33 +0000 (16:44 +0100)]
Don't install busybox any longer by default
busybox is useful for debugging initramfs issues, though it's not
necessary by default. Also tools like cryptsetup which rely on busybox
in initramfs stage have busybox as dependency anyways.
Thanks: Patrick Schleizer + Chris Hofstaedtler
Closes: https://github.com/grml/grml-debootstrap/issues/240
Michael Prokop [Thu, 7 Dec 2023 15:06:26 +0000 (16:06 +0100)]
Merge remote-tracking branch 'origin/pr/254'
Michael Prokop [Thu, 7 Dec 2023 15:04:28 +0000 (16:04 +0100)]
Merge remote-tracking branch 'origin/pr/249'
Michael Prokop [Thu, 7 Dec 2023 15:03:31 +0000 (16:03 +0100)]
Merge remote-tracking branch 'origin/pr/251'
Patrick Schleizer [Wed, 22 Nov 2023 05:16:37 +0000 (00:16 -0500)]
Avoid intermediary installation of initramfs-tools when using INITRD_GENERATOR=dracut.
fixes https://github.com/grml/grml-debootstrap/issues/235
Chris Hofstaedtler [Sat, 18 Nov 2023 17:40:37 +0000 (18:40 +0100)]
ci: fix shellcheck for test scripts
Chris Hofstaedtler [Sat, 18 Nov 2023 11:39:08 +0000 (12:39 +0100)]
ci: disable progress output from apt-get
Michael Prokop [Fri, 17 Nov 2023 16:41:18 +0000 (17:41 +0100)]
Merge remote-tracking branch 'origin/pr/247'
Michael Prokop [Fri, 17 Nov 2023 16:40:34 +0000 (17:40 +0100)]
Merge remote-tracking branch 'origin/pr/246'
Chris Hofstaedtler [Fri, 17 Nov 2023 16:23:09 +0000 (17:23 +0100)]
Remove empty shell-based test suite
Since commit
a8eeda3e2d78607046e63866197995fc5ea4bd14 this seems obsolete.
Chris Hofstaedtler [Fri, 17 Nov 2023 16:21:33 +0000 (17:21 +0100)]
Remove shadowconfig call
passwd.postinst enables shadow passwords for the last 16 years. Add a test
instead.
Michael Prokop [Fri, 17 Nov 2023 16:07:38 +0000 (17:07 +0100)]
Merge remote-tracking branch 'origin/pr/239'
Michael Prokop [Fri, 17 Nov 2023 15:57:10 +0000 (16:57 +0100)]
Merge remote-tracking branch 'origin/pr/245'
Michael Prokop [Fri, 17 Nov 2023 15:53:33 +0000 (16:53 +0100)]
Merge remote-tracking branch 'origin/pr/241'
Chris Hofstaedtler [Mon, 13 Nov 2023 21:47:38 +0000 (22:47 +0100)]
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 ../
Chris Hofstaedtler [Sun, 12 Nov 2023 17:13:26 +0000 (18:13 +0100)]
shellcheck: ignore SC2001,SC2181
Chris Hofstaedtler [Sun, 12 Nov 2023 01:43:28 +0000 (02:43 +0100)]
GitHub Actions: add shellcheck to PR workflow
This reports shellcheck output for *changed* lines. Preexisting problems are
not reported.
Chris Hofstaedtler [Sat, 11 Nov 2023 11:19:32 +0000 (12:19 +0100)]
shellcheck: fix some warnings
Catch up with shellcheck 0.9.0.
To improve shellcheck usage in chroot-script, add a stub file defining ARCH.
This commit is very minimal. In particular it avoids moving/deduplicating code
and/or any style changes.
Michael Prokop [Fri, 17 Nov 2023 15:47:35 +0000 (16:47 +0100)]
Merge remote-tracking branch 'origin/pr/242'
Michael Prokop [Fri, 17 Nov 2023 15:44:35 +0000 (16:44 +0100)]
Merge remote-tracking branch 'origin/pr/243'
Chris Hofstaedtler [Sun, 12 Nov 2023 19:29:39 +0000 (20:29 +0100)]
Skip EFI support check if --vm is given
Hosts EFI support is unlikely to be related to the VMs EFI support, so this
check often only adds noise.
Chris Hofstaedtler [Mon, 13 Nov 2023 22:11:29 +0000 (23:11 +0100)]
Stop using sed when creating CHROOT_VARIABLES
This breaks compatibility with running on a wheezy host, but bash in
Debian >= jessie is already fixed.
Chris Hofstaedtler [Mon, 13 Nov 2023 23:02:09 +0000 (00:02 +0100)]
Drop support for installing releases before jessie
Chris Hofstaedtler [Mon, 13 Nov 2023 22:59:41 +0000 (23:59 +0100)]
packer: remove pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:59:25 +0000 (23:59 +0100)]
swraid: remove code for lenny
Chris Hofstaedtler [Mon, 13 Nov 2023 22:46:55 +0000 (23:46 +0100)]
chrootmirror: remove pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:46:11 +0000 (23:46 +0100)]
d/control: record (actual) minimum debootstrap version
Chris Hofstaedtler [Mon, 13 Nov 2023 22:30:33 +0000 (23:30 +0100)]
grub_install: use same method for checking grub-install and update-grub
Chris Hofstaedtler [Mon, 13 Nov 2023 22:28:55 +0000 (23:28 +0100)]
grub_install: remove pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:25:40 +0000 (23:25 +0100)]
kernel selection: drop 2.6 specific kernel image support
Chris Hofstaedtler [Mon, 13 Nov 2023 22:23:11 +0000 (23:23 +0100)]
kernel selection: drop pre-jessie code
Michael Prokop [Fri, 17 Nov 2023 15:16:01 +0000 (16:16 +0100)]
Merge remote-tracking branch 'origin/pr/238'
Chris Hofstaedtler [Sun, 12 Nov 2023 15:38:29 +0000 (16:38 +0100)]
README: replace build status badge
Chris Hofstaedtler [Sun, 12 Nov 2023 01:43:28 +0000 (02:43 +0100)]
GitHub Actions: build and test grml-debootstrap in PRs
Chris Hofstaedtler [Sat, 11 Nov 2023 14:23:46 +0000 (15:23 +0100)]
grml-debootstrap: support BOOT_APPEND in --vm mode
Michael Prokop [Wed, 25 Oct 2023 16:08:42 +0000 (18:08 +0200)]
Merge remote-tracking branch 'origin/pr/230'
Michael Prokop [Wed, 25 Oct 2023 16:06:03 +0000 (18:06 +0200)]
Merge remote-tracking branch 'origin/pr/227'
Patrick Schleizer [Mon, 23 Oct 2023 12:55:09 +0000 (08:55 -0400)]
code simplification: drop NOP usage of eend 0
Remove unnecessary use of `eend 0`, which does effectively nothing.
Leftover from git rev
c87dc4ae where we moved from grml-etc-core's
lsb-functions functions to a simplified version of them.
Closes: https://github.com/grml/grml-debootstrap/issues/229
Patrick Schleizer [Mon, 23 Oct 2023 11:52:08 +0000 (07:52 -0400)]
debian: add dosfstools to Depends for EFI use case
It's required for builds with `--vmefi` and `--efi`, since those depend on mkfs.fat.
Closes: https://github.com/grml/grml-debootstrap/issues/225
Michael Prokop [Wed, 25 Oct 2023 08:06:03 +0000 (10:06 +0200)]
Merge remote-tracking branch 'origin/pr/214'
Michael Prokop [Wed, 25 Oct 2023 08:04:20 +0000 (10:04 +0200)]
Merge remote-tracking branch 'origin/pr/226'
Patrick Schleizer [Sat, 21 Oct 2023 18:44:02 +0000 (14:44 -0400)]
improve error handling
Enable `set -e` if environment variables `REPORT_TRAP_ERR`
or `FAIL_TRAP_ERR` are set to `yes`.
related to https://github.com/grml/grml-debootstrap/issues/224
Michael Prokop [Mon, 23 Oct 2023 10:59:57 +0000 (12:59 +0200)]
Merge remote-tracking branch 'origin/pr/223'
Michael Prokop [Mon, 23 Oct 2023 10:59:02 +0000 (12:59 +0200)]
Merge remote-tracking branch 'origin/pr/220'
Patrick Schleizer [Sat, 21 Oct 2023 12:26:37 +0000 (08:26 -0400)]
disable prompt/wait by tune2fs
By disabling tty when running tune2fs.
Patrick Schleizer [Thu, 19 Oct 2023 16:56:56 +0000 (12:56 -0400)]
remove unnecessary unicode from chroot-script
https://github.com/grml/grml-debootstrap/issues/219
Michael Prokop [Thu, 19 Oct 2023 16:21:20 +0000 (18:21 +0200)]
Merge remote-tracking branch 'origin/pr/218'
Patrick Schleizer [Thu, 19 Oct 2023 16:13:53 +0000 (12:13 -0400)]
remove unnecessary unicode from config
GavinPacini [Fri, 13 Oct 2023 14:14:37 +0000 (16:14 +0200)]
Initial arm64 support
Closes: https://github.com/grml/grml-debootstrap/issues/169
Michael Prokop [Mon, 16 Oct 2023 13:11:16 +0000 (15:11 +0200)]
Merge remote-tracking branch 'origin/pr/217'
Patrick Schleizer [Mon, 16 Oct 2023 13:04:12 +0000 (09:04 -0400)]
add mmdebstrap as alternative to (c)debootstrap
Michael Prokop [Mon, 16 Oct 2023 09:33:41 +0000 (11:33 +0200)]
Merge remote-tracking branch 'origin/pr/216'
Daniel Winzen [Fri, 13 Oct 2023 10:22:11 +0000 (12:22 +0200)]
Add support for legacy BIOS boot to efi VM images
Michael Prokop [Fri, 13 Oct 2023 10:29:12 +0000 (12:29 +0200)]
Merge remote-tracking branch 'origin/pr/213'