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'
Daniel Winzen [Wed, 11 Oct 2023 17:36:26 +0000 (19:36 +0200)]
Add EFI support for VMs
This commit introduces a new option --vmefi that will change the VM image
to use GPT instead of MBR and adds an ESP partition. Further it will install
grub in EFI mode with secure boot support.
Closes: https://github.com/grml/grml-debootstrap/issues/134
Michael Prokop [Fri, 13 Oct 2023 08:46:31 +0000 (10:46 +0200)]
packer: update to Grml 2022.11 ISO
While refreshing base boxes for Vagrant, let's update Grml ISO
from 2022.11-rc1 to stable release 2022.11.
Michael Prokop [Fri, 8 Sep 2023 11:14:57 +0000 (13:14 +0200)]
Release new version 0.104
Michael Prokop [Fri, 8 Sep 2023 09:25:46 +0000 (11:25 +0200)]
Merge remote-tracking branch 'origin/pr/210'
Michael Prokop [Fri, 8 Sep 2023 09:04:54 +0000 (11:04 +0200)]
Merge remote-tracking branch 'origin/pr/207'
Giovanni Rosa [Fri, 14 Apr 2023 13:32:06 +0000 (15:32 +0200)]
Fix for Dockerfile smell DL3059
Signed-off-by: Giovanni Rosa <g.rosa1@studenti.unimol.it>
Michael Prokop [Fri, 31 Mar 2023 10:14:09 +0000 (12:14 +0200)]
GRUB: use persistent device names under /dev/disk/by-id/ for install_devices
We pass the requested --grub … device argument to the GRUB package
configuration, like:
| # debconf-show grub-pc | grep grub-pc/install_devices:
| * grub-pc/install_devices: /dev/sda
But the GRUB package tries to use /dev/disk/by-id/... for
install_devices setting (since 2010 and Debian/squeeze AFAICS), as can
be observed by reconfiguring the GRUB package (which then automatically
converts the /dev/sdX to the proper /dev/disk/by-id/... device when
being asked in the debconf prompt):
| # dpkg-reconfigure grub-pc
| grub-pc: Running grub-install ...
| [...]
| # debconf-show grub-pc | grep grub-pc/install_devices:
| * grub-pc/install_devices: /dev/disk/by-id/ata-VBOX_HARDDISK_VBf4f4391c-
6316fa69
The available_ids() and device_to_id() helper functions are based on
code by Colin Watson <cjwatson@debian.org> in GRUB's postinst script
of the Debian package, see git commits
4830efd9e +
ce2a43c85 at
https://salsa.debian.org/grub-team/grub.git.
Closes: https://github.com/grml/grml-debootstrap/issues/206
Michael Prokop [Mon, 20 Feb 2023 10:40:45 +0000 (11:40 +0100)]
Release new version 0.103
Michael Prokop [Mon, 20 Feb 2023 08:06:43 +0000 (09:06 +0100)]
Disable ext4 metadata_csum_seed for Debian releases older than bookworm
As of e2fsprogs v1.43 and Linux kernel v4.4 the ext4 file system supports
the new metadata_csum_seed feature (which allows the file system UUID to
be modified without needing to update all of the file system metadata).
Also see https://bugs.debian.org/1031325
Starting with e2fsprogs v1.47 this new metadata_csum_seed feature gets
enabled by default. When installing an older Debian release this might
cause problems because it's not fully supported yet, see e.g. the GRUB
failure documented as #866603.
To keep the behavior identical to Debian, we do not enable the
metadata_csum_seed feature for Debian releases before bookworm. This is
relevant for us, as grml-debootstrap might be running from a more recent
Debian release (like a Debian testing/unstable based Grml live system).
We check for the e2fsprogs version as versions before 1.43 didn't support
the metadata_csum_seed option yet.
Closes: #1031416
Closes: https://github.com/grml/grml-debootstrap/issues/204
Michael Prokop [Mon, 6 Feb 2023 17:32:51 +0000 (18:32 +0100)]
Release new version 0.102
Michael Prokop [Mon, 6 Feb 2023 17:32:37 +0000 (18:32 +0100)]
Bump Standards-Version to 4.6.2
Michael Prokop [Mon, 6 Feb 2023 17:30:00 +0000 (18:30 +0100)]
docker: retrieve vimrc + zshrc from github
Avoid depending on git.grml.org service which we might deprecate
Michael Prokop [Mon, 6 Feb 2023 17:28:26 +0000 (18:28 +0100)]
packer: clone git repository from github.com
The git protocol is discouraged and insecure.
Michael Prokop [Mon, 6 Feb 2023 17:25:56 +0000 (18:25 +0100)]
Update Vcs-* headers + copyright source to use github.com
We consider deprecating our git.grml.org service and
also the git protocol is insecure and should be avoided,
update debian/control + debian/copyright accordingly.
Michael Prokop [Mon, 6 Feb 2023 17:23:27 +0000 (18:23 +0100)]
Update copyright information
Michael Prokop [Mon, 6 Feb 2023 15:43:51 +0000 (16:43 +0100)]
Use bookworm as new default release + update release list
There's no point in suggesting EOL releases in the dialog(1) dialog any
longer, so let's drop lenny, squeeze, wheezy, jessie + stretch there.
While at it switch from X.Y to X version schema as we always install
the latest Debian (point) release and not the displayed X.0 one.
Use bookworm as the new default release so we get grml-debootstrap
accordingly into the bookworm freeze (see
https://release.debian.org/testing/freeze_policy.html for details).
Update the docs regarding support releases.
Michael Prokop [Mon, 6 Feb 2023 15:43:40 +0000 (16:43 +0100)]
Support new non-free repository component for Debian bookworm and newer
If the --non-free option gets enabled packages like 'firmware-linux',
'firmware-linux-nonfree', 'firmware-misc-nonfree' should be available.
Starting with Debian/bookworm the firmware related packages got moved
from "non-free" to the new "non-free-firmware" component/repository though
(related to https://www.debian.org/vote/2022/vote_003).
Michael Prokop [Fri, 25 Nov 2022 16:13:12 +0000 (17:13 +0100)]
Release new version 0.101
Michael Prokop [Fri, 25 Nov 2022 13:33:35 +0000 (14:33 +0100)]
Merge remote-tracking branch 'origin/pr/196'
Michael Prokop [Fri, 25 Nov 2022 13:32:00 +0000 (14:32 +0100)]
Merge remote-tracking branch 'origin/pr/202'
Michael Prokop [Fri, 25 Nov 2022 13:31:55 +0000 (14:31 +0100)]
Merge remote-tracking branch 'origin/pr/201'
Michael Prokop [Fri, 25 Nov 2022 08:04:31 +0000 (09:04 +0100)]
Use "errors=remount-ro" fstab option only within supported filesystems
Also XFS doesn't support the errors=remount-ro option, but instead of
disabling the option for file systems that don't support it, let's
only enable it for the once that support it (according to linux's
source).
Thanks: Chris Hofstaedtler for the bug report
Closes: https://github.com/grml/grml-debootstrap/issues/199
Michael Prokop [Fri, 25 Nov 2022 10:48:06 +0000 (11:48 +0100)]
Ensure to have filesystem tools installed
When installing to an XFS root partition, update-initramfs complains:
| update-initramfs: Generating /boot/initrd.img-5.10.0-19-amd64
| W: /sbin/fsck.xfs doesn't exist, can't install to initramfs
Let's make sure to have the according filesystem package available.
FTR, no need for handling ext* + e2fsprogs, as this is available anyways
due to `Priority: required`.
Also, the "--filesystem jfs" isn't supported by default (as mkfs.jfs
expects user input unless invoked with -q, something we might wanna
automate in the future?), but someone can prepare it manually and
install it to the mounted file system, so let's also handle this.
Thanks: Chris Hofstaedtler for the bug report
Closes: https://github.com/grml/grml-debootstrap/issues/200
Michael Prokop [Tue, 15 Nov 2022 10:18:33 +0000 (11:18 +0100)]
packer: update Grml ISO to 2022.11-rc1
FTR, grml_iso_checksum = sha1sum and we need to use
http://download.grml.org/devel/ as download directory,
as 2022.11-rc1 is not yet a stable release.
Michael Prokop [Tue, 15 Nov 2022 10:18:23 +0000 (11:18 +0100)]
packer: add support for Debian/bookworm
Daniel Winzen [Sun, 3 Jul 2022 12:08:32 +0000 (14:08 +0200)]
Make dracut images reproducible and use long form of --no-hostonly