grml-debootstrap.git
4 months agoRelease new version 0.105 v0.105
Michael Prokop [Thu, 7 Dec 2023 17:24:10 +0000 (18:24 +0100)]
Release new version 0.105

4 months agoDon't install busybox any longer by default
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

4 months agoMerge remote-tracking branch 'origin/pr/254'
Michael Prokop [Thu, 7 Dec 2023 15:06:26 +0000 (16:06 +0100)]
Merge remote-tracking branch 'origin/pr/254'

4 months agoMerge remote-tracking branch 'origin/pr/249'
Michael Prokop [Thu, 7 Dec 2023 15:04:28 +0000 (16:04 +0100)]
Merge remote-tracking branch 'origin/pr/249'

4 months agoMerge remote-tracking branch 'origin/pr/251'
Michael Prokop [Thu, 7 Dec 2023 15:03:31 +0000 (16:03 +0100)]
Merge remote-tracking branch 'origin/pr/251'

5 months agoAvoid intermediary installation of initramfs-tools when using INITRD_GENERATOR=dracut.
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

5 months agoci: fix shellcheck for test scripts
Chris Hofstaedtler [Sat, 18 Nov 2023 17:40:37 +0000 (18:40 +0100)]
ci: fix shellcheck for test scripts

5 months agoci: disable progress output from apt-get
Chris Hofstaedtler [Sat, 18 Nov 2023 11:39:08 +0000 (12:39 +0100)]
ci: disable progress output from apt-get

5 months agoMerge remote-tracking branch 'origin/pr/247'
Michael Prokop [Fri, 17 Nov 2023 16:41:18 +0000 (17:41 +0100)]
Merge remote-tracking branch 'origin/pr/247'

5 months agoMerge remote-tracking branch 'origin/pr/246'
Michael Prokop [Fri, 17 Nov 2023 16:40:34 +0000 (17:40 +0100)]
Merge remote-tracking branch 'origin/pr/246'

5 months agoRemove empty shell-based test suite
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.

5 months agoRemove shadowconfig call
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.

5 months agoMerge remote-tracking branch 'origin/pr/239'
Michael Prokop [Fri, 17 Nov 2023 16:07:38 +0000 (17:07 +0100)]
Merge remote-tracking branch 'origin/pr/239'

5 months agoMerge remote-tracking branch 'origin/pr/245'
Michael Prokop [Fri, 17 Nov 2023 15:57:10 +0000 (16:57 +0100)]
Merge remote-tracking branch 'origin/pr/245'

5 months agoMerge remote-tracking branch 'origin/pr/241'
Michael Prokop [Fri, 17 Nov 2023 15:53:33 +0000 (16:53 +0100)]
Merge remote-tracking branch 'origin/pr/241'

5 months agoRemove manual setup of /dev contents
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 ../

5 months agoshellcheck: ignore SC2001,SC2181
Chris Hofstaedtler [Sun, 12 Nov 2023 17:13:26 +0000 (18:13 +0100)]
shellcheck: ignore SC2001,SC2181

5 months agoGitHub Actions: add shellcheck to PR workflow
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.

5 months agoshellcheck: fix some warnings
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.

5 months agoMerge remote-tracking branch 'origin/pr/242'
Michael Prokop [Fri, 17 Nov 2023 15:47:35 +0000 (16:47 +0100)]
Merge remote-tracking branch 'origin/pr/242'

5 months agoMerge remote-tracking branch 'origin/pr/243'
Michael Prokop [Fri, 17 Nov 2023 15:44:35 +0000 (16:44 +0100)]
Merge remote-tracking branch 'origin/pr/243'

5 months agoSkip EFI support check if --vm is given
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.

5 months agoStop using sed when creating CHROOT_VARIABLES
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.

5 months agoDrop support for installing releases before jessie
Chris Hofstaedtler [Mon, 13 Nov 2023 23:02:09 +0000 (00:02 +0100)]
Drop support for installing releases before jessie

5 months agopacker: remove pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:59:41 +0000 (23:59 +0100)]
packer: remove pre-jessie code

5 months agoswraid: remove code for lenny
Chris Hofstaedtler [Mon, 13 Nov 2023 22:59:25 +0000 (23:59 +0100)]
swraid: remove code for lenny

5 months agochrootmirror: remove pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:46:55 +0000 (23:46 +0100)]
chrootmirror: remove pre-jessie code

5 months agod/control: record (actual) minimum debootstrap version
Chris Hofstaedtler [Mon, 13 Nov 2023 22:46:11 +0000 (23:46 +0100)]
d/control: record (actual) minimum debootstrap version

5 months agogrub_install: use same method for checking grub-install and update-grub
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

5 months agogrub_install: remove pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:28:55 +0000 (23:28 +0100)]
grub_install: remove pre-jessie code

5 months agokernel selection: drop 2.6 specific kernel image support
Chris Hofstaedtler [Mon, 13 Nov 2023 22:25:40 +0000 (23:25 +0100)]
kernel selection: drop 2.6 specific kernel image support

5 months agokernel selection: drop pre-jessie code
Chris Hofstaedtler [Mon, 13 Nov 2023 22:23:11 +0000 (23:23 +0100)]
kernel selection: drop pre-jessie code

5 months agoMerge remote-tracking branch 'origin/pr/238'
Michael Prokop [Fri, 17 Nov 2023 15:16:01 +0000 (16:16 +0100)]
Merge remote-tracking branch 'origin/pr/238'

5 months agoREADME: replace build status badge
Chris Hofstaedtler [Sun, 12 Nov 2023 15:38:29 +0000 (16:38 +0100)]
README: replace build status badge

5 months agoGitHub Actions: build and test grml-debootstrap in PRs
Chris Hofstaedtler [Sun, 12 Nov 2023 01:43:28 +0000 (02:43 +0100)]
GitHub Actions: build and test grml-debootstrap in PRs

5 months agogrml-debootstrap: support BOOT_APPEND in --vm mode
Chris Hofstaedtler [Sat, 11 Nov 2023 14:23:46 +0000 (15:23 +0100)]
grml-debootstrap: support BOOT_APPEND in --vm mode

6 months agoMerge remote-tracking branch 'origin/pr/230'
Michael Prokop [Wed, 25 Oct 2023 16:08:42 +0000 (18:08 +0200)]
Merge remote-tracking branch 'origin/pr/230'

6 months agoMerge remote-tracking branch 'origin/pr/227'
Michael Prokop [Wed, 25 Oct 2023 16:06:03 +0000 (18:06 +0200)]
Merge remote-tracking branch 'origin/pr/227'

6 months agocode simplification: drop NOP usage of eend 0
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

6 months agodebian: add dosfstools to Depends for EFI use case
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

6 months agoMerge remote-tracking branch 'origin/pr/214'
Michael Prokop [Wed, 25 Oct 2023 08:06:03 +0000 (10:06 +0200)]
Merge remote-tracking branch 'origin/pr/214'

6 months agoMerge remote-tracking branch 'origin/pr/226'
Michael Prokop [Wed, 25 Oct 2023 08:04:20 +0000 (10:04 +0200)]
Merge remote-tracking branch 'origin/pr/226'

6 months agoimprove error handling
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

6 months agoMerge remote-tracking branch 'origin/pr/223'
Michael Prokop [Mon, 23 Oct 2023 10:59:57 +0000 (12:59 +0200)]
Merge remote-tracking branch 'origin/pr/223'

6 months agoMerge remote-tracking branch 'origin/pr/220'
Michael Prokop [Mon, 23 Oct 2023 10:59:02 +0000 (12:59 +0200)]
Merge remote-tracking branch 'origin/pr/220'

6 months agodisable prompt/wait by tune2fs
Patrick Schleizer [Sat, 21 Oct 2023 12:26:37 +0000 (08:26 -0400)]
disable prompt/wait by tune2fs

By disabling tty when running tune2fs.

6 months agoremove unnecessary unicode from chroot-script
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

6 months agoMerge remote-tracking branch 'origin/pr/218'
Michael Prokop [Thu, 19 Oct 2023 16:21:20 +0000 (18:21 +0200)]
Merge remote-tracking branch 'origin/pr/218'

6 months agoremove unnecessary unicode from config
Patrick Schleizer [Thu, 19 Oct 2023 16:13:53 +0000 (12:13 -0400)]
remove unnecessary unicode from config

6 months agoInitial arm64 support mika/arm64
GavinPacini [Fri, 13 Oct 2023 14:14:37 +0000 (16:14 +0200)]
Initial arm64 support

Closes: https://github.com/grml/grml-debootstrap/issues/169

6 months agoMerge remote-tracking branch 'origin/pr/217'
Michael Prokop [Mon, 16 Oct 2023 13:11:16 +0000 (15:11 +0200)]
Merge remote-tracking branch 'origin/pr/217'

6 months agoadd mmdebstrap as alternative to (c)debootstrap
Patrick Schleizer [Mon, 16 Oct 2023 13:04:12 +0000 (09:04 -0400)]
add mmdebstrap as alternative to (c)debootstrap

6 months agoMerge remote-tracking branch 'origin/pr/216'
Michael Prokop [Mon, 16 Oct 2023 09:33:41 +0000 (11:33 +0200)]
Merge remote-tracking branch 'origin/pr/216'

6 months agoAdd support for legacy BIOS boot to efi VM images
Daniel Winzen [Fri, 13 Oct 2023 10:22:11 +0000 (12:22 +0200)]
Add support for legacy BIOS boot to efi VM images

6 months agoMerge remote-tracking branch 'origin/pr/213'
Michael Prokop [Fri, 13 Oct 2023 10:29:12 +0000 (12:29 +0200)]
Merge remote-tracking branch 'origin/pr/213'

6 months agoAdd EFI support for VMs
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

6 months agopacker: update to Grml 2022.11 ISO
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.

7 months agoRelease new version 0.104 v0.104
Michael Prokop [Fri, 8 Sep 2023 11:14:57 +0000 (13:14 +0200)]
Release new version 0.104

7 months agoMerge remote-tracking branch 'origin/pr/210'
Michael Prokop [Fri, 8 Sep 2023 09:25:46 +0000 (11:25 +0200)]
Merge remote-tracking branch 'origin/pr/210'

7 months agoMerge remote-tracking branch 'origin/pr/207'
Michael Prokop [Fri, 8 Sep 2023 09:04:54 +0000 (11:04 +0200)]
Merge remote-tracking branch 'origin/pr/207'

12 months agoFix for Dockerfile smell DL3059
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>
12 months agoGRUB: use persistent device names under /dev/disk/by-id/ for install_devices mika/grub
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

14 months agoRelease new version 0.103 v0.103
Michael Prokop [Mon, 20 Feb 2023 10:40:45 +0000 (11:40 +0100)]
Release new version 0.103

14 months agoDisable ext4 metadata_csum_seed for Debian releases older than bookworm
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

14 months agoRelease new version 0.102 v0.102
Michael Prokop [Mon, 6 Feb 2023 17:32:51 +0000 (18:32 +0100)]
Release new version 0.102

14 months agoBump Standards-Version to 4.6.2
Michael Prokop [Mon, 6 Feb 2023 17:32:37 +0000 (18:32 +0100)]
Bump Standards-Version to 4.6.2

14 months agodocker: retrieve vimrc + zshrc from github
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

14 months agopacker: clone git repository from github.com
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.

14 months agoUpdate Vcs-* headers + copyright source to use github.com
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.

14 months agoUpdate copyright information
Michael Prokop [Mon, 6 Feb 2023 17:23:27 +0000 (18:23 +0100)]
Update copyright information

14 months agoUse bookworm as new default release + update release list
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.

14 months agoSupport new non-free repository component for Debian bookworm and newer
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).

17 months agoRelease new version 0.101 v0.101
Michael Prokop [Fri, 25 Nov 2022 16:13:12 +0000 (17:13 +0100)]
Release new version 0.101

17 months agoMerge remote-tracking branch 'origin/pr/196'
Michael Prokop [Fri, 25 Nov 2022 13:33:35 +0000 (14:33 +0100)]
Merge remote-tracking branch 'origin/pr/196'

17 months agoMerge remote-tracking branch 'origin/pr/202'
Michael Prokop [Fri, 25 Nov 2022 13:32:00 +0000 (14:32 +0100)]
Merge remote-tracking branch 'origin/pr/202'

17 months agoMerge remote-tracking branch 'origin/pr/201'
Michael Prokop [Fri, 25 Nov 2022 13:31:55 +0000 (14:31 +0100)]
Merge remote-tracking branch 'origin/pr/201'

17 months agoUse "errors=remount-ro" fstab option only within supported filesystems
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

17 months agoEnsure to have filesystem tools installed
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

17 months agopacker: update Grml ISO to 2022.11-rc1
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.

17 months agopacker: add support for Debian/bookworm
Michael Prokop [Tue, 15 Nov 2022 10:18:23 +0000 (11:18 +0100)]
packer: add support for Debian/bookworm

21 months agoMake dracut images reproducible and use long form of --no-hostonly
Daniel Winzen [Sun, 3 Jul 2022 12:08:32 +0000 (14:08 +0200)]
Make dracut images reproducible and use long form of --no-hostonly

21 months agoAdd option to pass extra options to initrd generator
Daniel Winzen [Sun, 3 Jul 2022 12:07:10 +0000 (14:07 +0200)]
Add option to pass extra options to initrd generator

21 months agoAdd dracut support
Daniel Winzen [Fri, 1 Jul 2022 20:05:34 +0000 (22:05 +0200)]
Add dracut support

2 years agoRelease new version 0.100 v0.100
Michael Prokop [Mon, 24 Jan 2022 16:17:53 +0000 (17:17 +0100)]
Release new version 0.100

2 years agoMerge remote-tracking branch 'origin/pr/190'
Michael Prokop [Tue, 7 Dec 2021 07:55:34 +0000 (08:55 +0100)]
Merge remote-tracking branch 'origin/pr/190'

2 years agoVMs: create partition with alignment starting at 4MiB + ending at 100%
Michael Prokop [Mon, 6 Dec 2021 16:19:40 +0000 (17:19 +0100)]
VMs: create partition with alignment starting at 4MiB + ending at 100%

Our partition creation process inside VMs used parted with "mkpart
primary ext4 2M -1", which could end up with unaligned partitions (as
reported in #185):

| (parted) mkpart primary ext4 2M -1
| Warning: The resulting partition is not properly aligned for best performance: 3906s % 4096s != 0s

This depends on the I/O settings of the underlying storage.

The mkpart start at "2M" is interpreted as 2 Megabyte (2000000 bytes or
3906 sectors) from the disk start.  The end "-1" is interpreted as 1
Megabyte (1000000 bytes or 1953 sectors) before the disk end.

On the other hand, "2MiB" is interpreted as 2 Mebibyte (2097152 bytes or
4096 sectors) from the disk start, and "100%" is interpreted as the disk
end.

Quoting from https://www.gnu.org/software/parted/manual/html_node/unit.html:

| Parted will compute sensible ranges for the locations you specify (e.g.,
| a range of +/- 500 MB when you specify the location in “G”, and a range
| of +/- 500 KB when you specify the location in “M”) and will select the
| nearest location in this range from the one you wrote that satisfies
| constraints from both the operation, the filesystem being worked on, the
| disk label, other partitions and so on.
| [...]
| Note that as of parted-2.4, when you specify start and/or end values
| using IEC binary units like “MiB”, “GiB”, “TiB”, etc., parted treats
| those values as exact, and equivalent to the same number specified in
| bytes (i.e., with the “B” suffix), in that it provides no “helpful”
| range of sloppiness. Contrast that with a partition start request of
| “4GB”, which may actually resolve to some sector up to 500MB before or
| after that point. Thus, when creating a partition, you should prefer
| to specify units of bytes (“B”), sectors (“s”), or IEC binary units
| like “MiB”, but not “MB”, “GB”, etc.

Furthermore quoting from https://www.gnu.org/software/parted/manual/html_node/mkpart.html#FOOT2:

| Cheap flash drives will be with us for a long time to come, and, for
| them, 1MiB alignment is not enough. Use at least 4MiB-aligned
| partitions. For details, see Arnd Bergman’s article,
| http://lwn.net/Articles/428584/ and its many comments.

A better default should be usage of an IEC binary unit with a
4MiB-aligned partition, so let's switch to "4MiB 100%".

Thanks: David Gnedt for the bug report and analysis, Darshaka Pathirana and Chris Hofstaedtler for further information and feedback
Closes: grml/grml-debootstrap#185

2 years agoFix Grml repository usage
Michael Prokop [Fri, 3 Dec 2021 12:08:52 +0000 (13:08 +0100)]
Fix Grml repository usage

More recent versions of apt no longer accept unsigned repositories, and fail with:

| The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21E0CA38EA2EA4AB
| Reading package lists... Done
| W: GPG error: http://deb.grml.org grml-stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21E0CA38EA2EA4AB
| E: The repository 'http://deb.grml.org grml-stable InRelease' is not signed.
| N: Updating from such a repository can't be done securely, and is therefore disabled by default.
| N: See apt-secure(8) manpage for repository creation and user configuration details.

By enabling the Acquire::AllowInsecureRepositories=1 option, we can avoid this failure:

| W: GPG error: http://deb.grml.org grml-stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21E0CA38EA2EA4AB
| W: The repository 'http://deb.grml.org grml-stable InRelease' is not signed.
| N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
| N: See apt-secure(8) manpage for repository creation and user configuration details.

While at it:

* simplify code
* don't check for "grml" inside /etc/apt/sources.list.d/grml.list,
  instead assume the file was set up as needed if it exists already
* improve apt pinning configuration:
  - no need to pin Grml *and* Debian repositories, instead let's
    set up only the Grml repository and reduce it to a pinning of 100
  - use /etc/apt/preferences.d/grml.pref instead of /etc/apt/preferences
* drop direct gpg usage, this is error prone (gpg keyservers known to be
  unavailable, we might not have gpg executable available, its code is
  fallback and untested,...)
* set up Grml's apt configuration with usage of
  "signed-by=/usr/share/keyrings/grml-archive-keyring.gpg"

Thanks: Karl Voit for the bug report
Closes: grml/grml-debootstrap#187

2 years agoDrop leftover KEYRING code
Michael Prokop [Fri, 3 Dec 2021 09:38:48 +0000 (10:38 +0100)]
Drop leftover KEYRING code

KEYRING is no longer relevant and a leftover from commit 06fc8bd266ad5.
If someone wants to customize the keyring handling of debootstrap,
this can be achieved via --debopt / DEBOOTSTRAP_OPT.

Closes: grml/grml-debootstrap#184

2 years agoRelease new version 0.99 v0.99
Michael Prokop [Mon, 23 Aug 2021 14:21:47 +0000 (16:21 +0200)]
Release new version 0.99

2 years agoBump Standards-Version to 4.6.0
Michael Prokop [Mon, 23 Aug 2021 14:21:40 +0000 (16:21 +0200)]
Bump Standards-Version to 4.6.0

2 years agoEFI support: fix for grub-install usage with efivarfs
Michael Prokop [Mon, 16 Aug 2021 19:19:20 +0000 (21:19 +0200)]
EFI support: fix for grub-install usage with efivarfs

We had to apply fixes due to efivars vs efivarfs in Debian kernel
versions >=5.10, and addressed them in commit d91d9f3ef.

Those changes were incomplete though: while efibootmgr was invoked in
the according and expected environment, invocation of grub-install
doesn't reliably work (as at that time /sys/firmware/efi/efivars is no
longer accessible).

GRUB installation on EFI systems without /sys/firmware/efi/efivars
present warns with (also see https://sources.debian.org/src/grub2/2.04-20/debian/patches/efi-variable-storage-minimise-writes.patch/?hl=650#L650):

| EFI variables are not supported on this system

But it returns with exit code 0. This leaves us with an incomplete and
therefore not booting GRUB EFI environment. Fix it by unmounting
/sys/firmware/efi/efivars only from within our final stage.

2 years agoInstall dbus by default
Michael Prokop [Mon, 2 Aug 2021 09:48:52 +0000 (11:48 +0200)]
Install dbus by default

Without dbus, several systemd features aren't available (e.g.
systemd-logind and its HandlePowerKey=poweroff doesn't have any effect).
We agreed to ship dbus by default, as people want usable, not minimal
systems most of the time.

Closes: grml/grml-debootstrap#102

2 years agopacker: update VBoxGuestAdditions to v6.1.22 + Grml ISO to latest stable release...
Michael Prokop [Mon, 26 Jul 2021 09:59:00 +0000 (11:59 +0200)]
packer: update VBoxGuestAdditions to v6.1.22 + Grml ISO to latest stable release (2021.07)

2 years agoRelease new version 0.98 v0.98
Michael Prokop [Fri, 9 Jul 2021 07:08:58 +0000 (09:08 +0200)]
Release new version 0.98

2 years agoFix git version detection when executing in foreign git repository
Michael Prokop [Thu, 24 Jun 2021 17:16:51 +0000 (19:16 +0200)]
Fix git version detection when executing in foreign git repository

When the working directory is a foreign git repository (other than
grml-debootstrap.git), and grml-debootstrap is invoked with the full
path pointing towards grml-debootstrap.git, then we're relying on `git
describe` output of the other (foreign) repository, which is failing and
reporting an unknown version.

Demonstration:

| % cd "$(mktemp -d)"
| % git init
| Initialized empty Git repository in /tmp/tmp.2TQO7PZPQX/.git/
| % ~/src/grml/grml-debootstrap/grml-debootstrap --version
| fatal: No names found, cannot describe anything.
|  * grml-debootstrap - version unknown
|  * Report bugs via https://github.com/grml/grml-debootstrap/ or https://grml.org/bugs/

... and also:

| % cd "$(mktemp -d)"
| % git init
| Initialized empty Git repository in /tmp/tmp.Y15j7wMMOn/.git/
| % echo foo > foo
| % git add foo ; git commit -m 'foo'
| [main (root-commit) 5d4357c] foo
|  1 file changed, 1 insertion(+)
|  create mode 100644 foo
| % git tag 0.42
| % ~/src/grml/grml-debootstrap/grml-debootstrap --version
| fatal: No annotated tags can describe '5d4357c0b5bb504e610265904619287be2c6718d'.
| However, there were unannotated tags: try --tags.
|  * grml-debootstrap - version unknown
|  * Report bugs via https://github.com/grml/grml-debootstrap/ or https://grml.org/bugs/

Thanks: Paul Menzel for the bugreport
Closes: grml/grml-debootstrap#183

2 years agoMerge remote-tracking branch 'origin/pr/177'
Michael Prokop [Fri, 4 Jun 2021 08:50:45 +0000 (10:50 +0200)]
Merge remote-tracking branch 'origin/pr/177'

2 years agoMerge remote-tracking branch 'origin/pr/176'
Michael Prokop [Fri, 4 Jun 2021 08:50:43 +0000 (10:50 +0200)]
Merge remote-tracking branch 'origin/pr/176'

2 years agoMerge remote-tracking branch 'origin/pr/175'
Michael Prokop [Fri, 4 Jun 2021 08:50:41 +0000 (10:50 +0200)]
Merge remote-tracking branch 'origin/pr/175'

2 years agoconfig: Replace em dash — by `--` for switch in comment
Paul Menzel [Thu, 3 Jun 2021 14:39:18 +0000 (16:39 +0200)]
config: Replace em dash — by `--` for switch in comment

Fixes: d88d27d7 ("drop enabled config variables from config file and use defaults")

2 years agoRemove *os-prober* from shipped packages list
Paul Menzel [Wed, 2 Jun 2021 15:49:58 +0000 (17:49 +0200)]
Remove *os-prober* from shipped packages list

This follows up on commit 9ae6b12a ("Avoid installation of os-proper in
VM environments"). *os-prober* is recommended by *grub-pc*, so do not
list it explicitly, in case alternatives arise, and the recommended
packages of *grub-pc* are adapted.