]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
16 months agochore!: drop support for ifcfg
Laszlo Gombos [Sat, 20 Jul 2024 00:40:13 +0000 (20:40 -0400)] 
chore!: drop support for ifcfg

Skip test 60 if ifcfg can not be installed as test 60 still
needs ifcfg dracut module.

16 months agotest(SYSTEMD): let dracut figure out to include systemd for this test
Jo Zzsi [Sat, 24 Aug 2024 00:35:55 +0000 (20:35 -0400)] 
test(SYSTEMD): let dracut figure out to include systemd for this test

16 months agotest(SYSTEMD-INITRD): call test_dracut instead of repeating it
Jo Zzsi [Wed, 21 Aug 2024 23:11:26 +0000 (19:11 -0400)] 
test(SYSTEMD-INITRD): call test_dracut instead of repeating it

16 months agofix(udev-rules): move *-persistent-storage.rules to rootfs-block
Jo Zzsi [Wed, 21 Aug 2024 15:03:41 +0000 (11:03 -0400)] 
fix(udev-rules): move *-persistent-storage.rules to rootfs-block

16 months agofix(systemd-initrd): add base as dependency
Dorina Kovacs [Thu, 8 Aug 2024 15:00:43 +0000 (17:00 +0200)] 
fix(systemd-initrd): add base as dependency

For systemd to run properly inside initramfs, /etc/initrd-release is required to exist. [1]
/etc/initrd-release is only written in the base module.

[1]: https://systemd.io/INITRD_INTERFACE/#using-systemd-inside-an-initrd

16 months agofix(systemd): remove duplicate systemd cryptsetup targets
Jo Zzsi [Mon, 19 Aug 2024 20:07:38 +0000 (16:07 -0400)] 
fix(systemd): remove duplicate systemd cryptsetup targets

These targets are installed in the systemd-cryptsetup dracut module.

16 months agofix(udev-rules): install dropins for udev.conf
Jo Zzsi [Sun, 18 Aug 2024 19:03:57 +0000 (15:03 -0400)] 
fix(udev-rules): install dropins for udev.conf

16 months agotest(FULL-SYSTEM): simplify and make it easier to maintain
Jo Zzsi [Sat, 17 Aug 2024 11:41:50 +0000 (07:41 -0400)] 
test(FULL-SYSTEM): simplify and make it easier to maintain

Remove packaging and distribution specific systemd service files.

No need to explicitly check if /usr is mounted as
without it Switch Root service would fail with the following
error:

'Failed to start initrd-switch-root.service - Switch Root.'

16 months agoci(alpine): install dracut to enable native dracut configuration
Jo Zzsi [Sat, 17 Aug 2024 17:29:54 +0000 (13:29 -0400)] 
ci(alpine): install dracut to enable native dracut configuration

Similarly to Fedora, this PR enables hostonly by default for Alpine
Linux CI container.

This PR installs additional packages to the
Alpine container that other Linux test containers already have.

This PR removed extra post steps from the container that are
not necessary.

16 months agofix(dracut-install): resolve -Wextra warnings
Jo Zzsi [Sat, 17 Aug 2024 11:12:46 +0000 (07:12 -0400)] 
fix(dracut-install): resolve -Wextra warnings

Explicitly convert from int type to size_t type to resolve
'comparison of integer expressions of different signedness'
warning.

16 months agochore: treat compilation warning as errors
Jo Zzsi [Sat, 17 Aug 2024 11:03:46 +0000 (07:03 -0400)] 
chore: treat compilation warning as errors

The intention of this PR is to enforce that on all CI containers
C code builds without any warnings.

This PR intentionally does not enforce the same for normal builds.

16 months agotest(ISMS): only include mdraid into the initrd under test
Jo Zzsi [Sat, 17 Aug 2024 12:22:33 +0000 (08:22 -0400)] 
test(ISMS): only include mdraid into the initrd under test

This test is testing mdraid, do not include dmraid into
the same initrd that is being tested as it is unnecessary.

16 months agofix(crypt): install dm_crypt module in non-hostonly mode as well
Jo Zzsi [Sat, 17 Aug 2024 00:58:31 +0000 (20:58 -0400)] 
fix(crypt): install dm_crypt module in non-hostonly mode as well

Without dm_crypt Linux module, the dracut module will not be fully
functional.

16 months agofeat(systemd*): include systemd config files from /usr/lib/systemd
Pavel Valena [Wed, 12 Jun 2024 04:06:32 +0000 (06:06 +0200)] 
feat(systemd*): include systemd config files from /usr/lib/systemd

and also use proper variables for the paths.

--

The new systemd reads from both /etc and /usr/, so to accomodate this,
I've added new paths to install configs from (I probably haven't covered
all). This changes only hostonly behaviour; uses global variables:

systemdutilconfdir: "/etc/systemd"
systemdutildir: "/lib/systemd:/lib/systemd/systemd-udevd" "/usr/lib/systemd:/usr/lib/systemd/systemd-udevd"

Ref: https://issues.redhat.com/browse/RHEL-32506

16 months agofix(squash-erofs): properly exclude $squashdir
Philipp Rudo [Wed, 14 Aug 2024 14:33:23 +0000 (16:33 +0200)] 
fix(squash-erofs): properly exclude $squashdir

Option --exclude-path from mkfs.erofs requires a path relative to the
source of the image. Otherwise the path won't be excluded resulting in a
slightly larger (~1M) initrd.

Fixes: ebc9e84d ("feat(squash): add module 95squash-erofs")
Signed-off-by: Philipp Rudo <prudo@redhat.com>
16 months agofix(nfs): include also entries from /usr/lib/{passwd,group}
Pavel Valena [Wed, 7 Aug 2024 22:55:03 +0000 (00:55 +0200)] 
fix(nfs): include also entries from /usr/lib/{passwd,group}

as those paths are used by bootc instead of the /etc ones.

16 months agofix(test): always install kernel modules
Jo Zzsi [Fri, 2 Aug 2024 15:39:23 +0000 (11:39 -0400)] 
fix(test): always install kernel modules

Always install Linux kernel modules regardless of the value of hostonly.

16 months agofix(systemd): make nologin optional
Jochen Sprickerhof [Wed, 14 Aug 2024 05:13:39 +0000 (07:13 +0200)] 
fix(systemd): make nologin optional

16 months agofix(rngd): install system service file
Pavel Valena [Sun, 23 Jul 2023 17:44:17 +0000 (19:44 +0200)] 
fix(rngd): install system service file

as there's no reason to keep a copy; there shouldn't be any modifications.

In case there are args stored in a separate file (Fedora and alike),
it needs to be supplied too, but without the option to change the user.

This avoids shipping and maintaining the service file.

https://bugzilla.redhat.com/show_bug.cgi?id=2181540

16 months agofix(dracut-install): refuse empty DRACUT_LDD environment variable
Marcos Mello [Thu, 8 Aug 2024 16:40:58 +0000 (13:40 -0300)] 
fix(dracut-install): refuse empty DRACUT_LDD environment variable

With DRACUT_LDD='', let's fallback to default ldd. Better safe than sorry.

16 months agofix(dracut.sh): use only compressor that kernel supports
Andrew Ammerlaan [Sun, 4 Aug 2024 12:22:38 +0000 (14:22 +0200)] 
fix(dracut.sh): use only compressor that kernel supports

Follows up on:
- https://github.com/dracut-ng/dracut-ng/pull/520
- https://github.com/dracut-ng/dracut-ng/pull/541

And fixes:
- https://github.com/dracut-ng/dracut-ng/issues/378

Note #520 contains a fix for the check_kernel_config function and should be
merged first.

Closes: https://github.com/dracut-ng/dracut-ng/issues/378
16 months agofeat(dracut): detect kernel initrd support
Matteo Croce [Thu, 1 Aug 2024 23:35:08 +0000 (01:35 +0200)] 
feat(dracut): detect kernel initrd support

If the installed kernel has no initrd support, skip the image creation.

16 months agofeat(dracut-functions): check more paths
Matteo Croce [Sat, 20 Jul 2024 12:04:14 +0000 (14:04 +0200)] 
feat(dracut-functions): check more paths

Check more paths for config file. Refactor check_kernel_config
with stylistics improvements.

16 months agofix(dracut-fuctions.sh): avoid reading the wrong kconfig
Matteo Croce [Fri, 2 Aug 2024 10:00:18 +0000 (12:00 +0200)] 
fix(dracut-fuctions.sh): avoid reading the wrong kconfig

If $no_kernel is set, $kernel will point to the running kernel,
avoid reading the current kernel config in this case.

16 months agofix(dracut): ldd output borked with `--sysroot`
Antonio Alvarez Feijoo [Tue, 6 Aug 2024 12:58:58 +0000 (14:58 +0200)] 
fix(dracut): ldd output borked with `--sysroot`

dracut-install calls ldd to resolve dependencies, but when the `--sysroot`
option is used, ldd is not performing the search within the sysroot directory.
To fix this issue, the `LD_LIBRARY_PATH` variable needs to be properly set to
the directories containing shared libraries within the specified sysroot
directory.

E.g., running dracut with `--sysroot` produces an initrd without the required
systemd shared libraries when the version between the host system and the
sysroot directory differs:

```
localhost:~ # ldd /.snapshots/9/snapshot/usr/lib/systemd/systemd | grep libsystemd
    libsystemd-core-256.so => not found
    libsystemd-shared-256.so => not found
localhost:~ # export LD_LIBRARY_PATH=/.snapshots/9/snapshot/usr/lib64/systemd
localhost:~ # ldd /.snapshots/9/snapshot/usr/lib/systemd/systemd | grep libsystemd
    libsystemd-core-256.so => /.snapshots/9/snapshot/usr/lib64/systemd/libsystemd-core-256.so (0x00007f817b600000)
    libsystemd-shared-256.so => /.snapshots/9/snapshot/usr/lib64/systemd/libsystemd-shared-256.so (0x00007f817b000000)
```

16 months agofix(dracut-functions.sh): only return block devices from get_persistent_dev
Fabian Vogt [Mon, 5 Aug 2024 09:28:32 +0000 (11:28 +0200)] 
fix(dracut-functions.sh): only return block devices from get_persistent_dev

With udev 256, there are now directories such as
/dev/disk/by-path/pci-0000:02:00.0-nvme-1-part/ which match here.

In case a nonexisting file/device was passed to get_persistent_dev, it
returned the first directory it looked at because both have maj:min 0:0.
This accidental conversion from garbage to a sensible looking path leads
to weird behaviour later.

Instead of filtering out directories explicitly switch the check to only
return block devices, which also takes care of the character special
/dev/mapper/control.

17 months agofix(dracut.sh): account for the kernel being named kernel
Andrew Ammerlaan [Mon, 5 Aug 2024 07:25:04 +0000 (09:25 +0200)] 
fix(dracut.sh): account for the kernel being named kernel

kernel is also a name accepted by grub-mkconfig.

On Gentoo the kernel is named this way if systemd's kernel-install is used.

17 months agoci: drop privileged container flag to run tests sandboxed
Laszlo Gombos [Sat, 27 Jul 2024 18:27:31 +0000 (14:27 -0400)] 
ci: drop privileged container flag to run tests sandboxed

Only map /dev/kvm into the container to be able to use kvm when
when running VMs with qemu.

17 months agofix(squash): use 99busybox instead of installing it manually
Philipp Rudo [Tue, 30 Jul 2024 11:44:32 +0000 (13:44 +0200)] 
fix(squash): use 99busybox instead of installing it manually

Make use of 99busybox in 99squash rather than installing it manually.
This not only removes duplicate code but allows mixing of busybox with
tools from coreutils. This requires a small change in 99busybox to
remove the hard coded use of $initdir.

Suggested-by: Laszlo Gombos <laszlo.gombos@gmail.com>
Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofix(squash): explicitly create required directories
Philipp Rudo [Tue, 30 Jul 2024 11:35:17 +0000 (13:35 +0200)] 
fix(squash): explicitly create required directories

At the moment 99squash relies on dracut-install to create the required
directories it later links to. This approach is error prone and will
cause problems when switching to use 99busybox later on, which tries to
add a link to /usr/sbin that hasn't been created. Thus explicitly
create the expected directories before installing the minimal initrd.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofeat(dracut-initramfs-restore): unpack erofs images
Philipp Rudo [Tue, 30 Jul 2024 15:24:28 +0000 (17:24 +0200)] 
feat(dracut-initramfs-restore): unpack erofs images

Follow the example for squashfs images and also unpack erofs images in
dracut-initramfs-restore.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofeat(lsinitrd): add support for erofs images
Philipp Rudo [Tue, 23 Jul 2024 16:33:37 +0000 (18:33 +0200)] 
feat(lsinitrd): add support for erofs images

Add support to handle erofs images in lsinitrd. Unfortunately the erofs
tooling is missing some functionality of unsquashfs, esp. the ability to
extract single files and list the content of the image. Work around this
deficiency by always extracting the full image and emulate the missing
functionality as close as possible.

While at it also handle the rename of the squashfs image to
squashfs-root.img.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofeat(squash): add module 95squash-erofs
Philipp Rudo [Tue, 23 Jul 2024 15:42:33 +0000 (17:42 +0200)] 
feat(squash): add module 95squash-erofs

Allow squashing the image in 99squash using erofs. Keep squashfs as
default to not change existing systems. I.e. only use erofs if the user
explicitly include 95squash-erofs or when the prereqs for squashfs are
missing.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofeat(squash): split 95squash-squashfs from 99squash
Philipp Rudo [Tue, 23 Jul 2024 14:39:13 +0000 (16:39 +0200)] 
feat(squash): split 95squash-squashfs from 99squash

99squash only allows squashing the files using squashfs. In order to
make the implementation for different filesystems easier split out the
squashfs specific parts into 95squash-squashfs.

While at it rename the root image contained in the initrd to
squashfs-root.img. This allows tools like lsinitrd to detect the
filesystem used later on.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofeat(squash): move mksquashfs to 99squash/modules-setup
Philipp Rudo [Mon, 22 Jul 2024 14:30:50 +0000 (16:30 +0200)] 
feat(squash): move mksquashfs to 99squash/modules-setup

When using 99squash dracut actually builds two separat initrds. The
"normal" one, that gets squashed into a squashfs image, and a
"minimalistic" one, whose only task is to mount and switch_root to the
squashfs image.

For that 99squash currently requires a lot of special handling in
dracut.sh. Move most of this special handling into 99squash itself. This
requires a new approach when building the "minimalistic" initrd. The new
approach works the following way

1. During the installation phase install the "normal" initrd into
   $initdir and the "minimalistic" initrd into $squashdir.
2. Strip the binaries in $initdir.
3. Trigger a special postinstall hook in 99squash that squashes the
   content of $initdir (excluding $squashdir) into the squashfs image,
   removes the content of $intidir (excluding $suqashdir) and, moves the
   content of $squashdir into $initdir.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofix(dracut-init.sh): add module to mods_to_load before checking dependencies
Philipp Rudo [Thu, 25 Jul 2024 10:47:00 +0000 (12:47 +0200)] 
fix(dracut-init.sh): add module to mods_to_load before checking dependencies

When implementing erofs support for 99squash we end up with three
modules 99squash, 95squash-squashfs and 95squash-erofs. Where 99squash
contains the common code for filesystem images and
95squash-{squashfs,erofs} the special handing depending on the
filesystem used. This leads to a dependency cycle as we want to allow
users both to choose 99squash, when the exact filesystem doesn't matter,
as well as 95squash-{squashfs,erofs} when a specific filesystem is
required.

But when 99squash is added as a dependency calling
dracut_module_included fails in its depends() function. This lead to
cases where both handlers, 95squash-squashfs and 95squash-erofs, were
added to the initrd.

Reason for the failure is that a module only is marked to be loaded
after all it's dependencies have been checked as well. Thus a child
module cannot detect which parent module wants it to be included. Fix
this by marking modules to be loaded before checking its dependencies in
check_module. Do the same change in check_mount for consistency.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agofeat(dracut-init.sh): allow changing the destination directory for inst et al
Philipp Rudo [Mon, 22 Jul 2024 14:46:47 +0000 (16:46 +0200)] 
feat(dracut-init.sh): allow changing the destination directory for inst et al

When using 99squash dracut actually builds two separate initrds. The
"normal" one, that gets squashed into a squashfs image, and a
"minimalistic" one, whose only task is to mount and switch_root to the
squashfs image.

This is currently done the following way:
1. Skipp install() for 99squash during the "normal" installation phase.
2. Trigger a special postinstall hook in 99squash that moves the content
   of $initdir to $squashdir and installs the "minimalistic" initrd to
   $initdir.
3. Strip the binaries in $initdir (of which $squashdir is a sub
   directory of).
4. Squash the content of $squashdir into the squashfs image and remove
   $squashdir.

The problem with this approach is that the steps 2 and 4 specific to
99squash but need to be done in dracut.sh. Thus a lot of special
handling for 99squash is needed in dracut.sh. This will get even more
complex once support for different filesystem images, e.g. erofs, are
implemented.

In order to be able to move most of the functionality into 99squash
itself a new approach will be chosen, i.e.
1. During the installation phase install the "normal" initrd into
   $initdir and the "minimalistic" initrd into $squashdir.
2. Strip the binaries in $initdir.
3. Trigger a special postinstall hook in 99squash that squashes the
   content of $initdir (excluding $squashdir) into the squashfs image,
   removes the content of $intidir (excluding $suqashdir) and, moves the
   content of $squashdir into $initdir.

With that the only special handling remaining in dracut.sh is triggering
the postinstall hook.

However, in inst et al. the destination directory is hard coded to
$initdir. Thus allow setting a different destination directory in inst
et al. to get the new approach to work. For the time being only do that
for the functions required by 99squash.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
17 months agotest(UEFI): second initrd would just overwrite the first
Laszlo Gombos [Sat, 27 Jul 2024 04:58:02 +0000 (00:58 -0400)] 
test(UEFI): second initrd would just overwrite the first

Now that we have hostonly and no-hostonly CI containers, no need
to run the same test twice in the same container.

Also, the current approach did not actually work as the second
initrd would just overwrite the first one without testing the boot.

17 months agoci: improve test LVM, IMSM and LVM-THIN to work in hostonly mode
Laszlo Gombos [Sat, 27 Jul 2024 04:32:04 +0000 (00:32 -0400)] 
ci: improve test LVM, IMSM and LVM-THIN to work in hostonly mode

Adding modules explicitly is required in hostonly mode as the
actual CI continaer host is not using these modules to boot.

17 months agoci: mark tests no-hostonly that are failing in hostonly mode
Laszlo Gombos [Sat, 27 Jul 2024 00:23:13 +0000 (20:23 -0400)] 
ci: mark tests no-hostonly that are failing in hostonly mode

17 months agoci: remove dracut native config that is not compatible with upstream ci
Laszlo Gombos [Thu, 25 Jul 2024 21:09:49 +0000 (17:09 -0400)] 
ci: remove dracut native config that is not compatible with upstream ci

17 months agotest: grab the distro configuration from the host and make it available
Laszlo Gombos [Thu, 25 Jul 2024 19:46:16 +0000 (15:46 -0400)] 
test: grab the distro configuration from the host and make it available

Fix failing test cases by enforcing no-hostonly for those tests cases
that need it.

17 months agotest: do not force no-hostonly for all test runs
Laszlo Gombos [Thu, 25 Jul 2024 19:00:43 +0000 (15:00 -0400)] 
test: do not force no-hostonly for all test runs

Different distributions and containers might prefer different
defaults.

The motivation of this work is to increase test coverage and
to run the tests in the same configurations as dracut is used.

17 months agofix(man): update description of the --gzip option
Mike Gilbert [Wed, 24 Jul 2024 15:49:01 +0000 (11:49 -0400)] 
fix(man): update description of the --gzip option

dracut no longer defaults to gzip. There is a list of compressors and
the first available is used. See 9663307c and 693b7a32.

Add a warning about kernel support for gzip decompression, similar to
all of the other compressor options.

17 months agoci: do not remove native dracut installation from the test containers
Laszlo Gombos [Thu, 25 Jul 2024 15:34:03 +0000 (11:34 -0400)] 
ci: do not remove native dracut installation from the test containers

The change allows the CI to pick up distribution config from the dracut
package.

CI should be able to run not only in pristine default configuration,
but also in the configuration that the distribution set as the default.

As an example Fedora CI should run tests in hostonly mode (unless
specified otherwise).

Without this change some containers (e.g. Void, Ubunut, Arch) has the
native dracut package installed and some do not (e.g. Fedora).

17 months agoci: install systemd-experimental into openSUSE container
Laszlo Gombos [Wed, 24 Jul 2024 16:39:40 +0000 (12:39 -0400)] 
ci: install systemd-experimental  into openSUSE container

This PR is now required to run FULL-SYSTEMD on OpenSUSE.

17 months agochore(deps): bump softprops/action-gh-release from 2.0.6 to 2.0.8
dependabot[bot] [Tue, 23 Jul 2024 20:08:57 +0000 (20:08 +0000)] 
chore(deps): bump softprops/action-gh-release from 2.0.6 to 2.0.8

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.6 to 2.0.8.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.0.6...v2.0.8)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
17 months agochore(busybox): remove empty check function
Laszlo Gombos [Mon, 22 Jul 2024 12:58:52 +0000 (08:58 -0400)] 
chore(busybox): remove empty check function

Follow-up to 9f365cb02b6331c9a7ef0bdd796edc84127c8e64 .

17 months agofix(busybox): install busybox symlinks later in the generation process
Laszlo Gombos [Mon, 22 Jul 2024 12:51:09 +0000 (08:51 -0400)] 
fix(busybox): install busybox symlinks later in the generation process

17 months agofix(busybox): install busybox symlinks manually
Laszlo Gombos [Mon, 22 Jul 2024 11:50:34 +0000 (07:50 -0400)] 
fix(busybox): install busybox symlinks manually

Do not depend on CONFIG_FEATURE_INSTALLER.
Do not remove existing destination files.

17 months agofix(lsinitrd): check skipcpio file directly
Pavel Valena [Wed, 17 Jul 2024 14:04:37 +0000 (16:04 +0200)] 
fix(lsinitrd): check skipcpio file directly

as the folder in /usr/lib/dracut/src might just exist; but the file might not.

17 months agotest: make sure test marker is reset properly
Laszlo Gombos [Sun, 21 Jul 2024 20:15:12 +0000 (16:15 -0400)] 
test: make sure test marker is reset properly

sync explicitly to flush cashes.

17 months agotest: mount rootfs read-only to avoid subtests to interfere
Laszlo Gombos [Sun, 21 Jul 2024 19:41:21 +0000 (15:41 -0400)] 
test: mount rootfs read-only to avoid subtests to interfere

17 months agoci: remove duplicated dracut module dependencies
Laszlo Gombos [Sun, 21 Jul 2024 18:26:15 +0000 (14:26 -0400)] 
ci: remove duplicated dracut module dependencies

rootfs-block kernel-modules are already included with each
test-makeroot dracut module.

17 months agoci: only install required dracut modules for test-makeroot
Laszlo Gombos [Sun, 21 Jul 2024 18:18:29 +0000 (14:18 -0400)] 
ci: only install required dracut modules for test-makeroot

Use '-m' instead of '-a' to run tests faster and more reliably.

Restores earlier ci functionality and now that dracut regressions
are resolved ci can revert 51d06540d.

17 months agochore(mksh)!: remove mksh dracut module
Laszlo Gombos [Sun, 21 Jul 2024 13:11:25 +0000 (09:11 -0400)] 
chore(mksh)!: remove mksh dracut module

BREAKING CHANGE: the mksh dracut module no longer maintained
due to lack of interest.

17 months agorevert(crypt): do not unlock encrypted devices by default during boot
Laszlo Gombos [Sun, 21 Jul 2024 13:04:13 +0000 (09:04 -0400)] 
revert(crypt): do not unlock encrypted devices by default during boot

This reverts commit 2339acfaeee60d6bb26a1103db2e53bc8f9cb2d1.

This change needs more test cases and more granular conditionals.

17 months agofeat(busybox): use busybox --install to install itself
Laszlo Gombos [Sun, 21 Jul 2024 00:24:13 +0000 (20:24 -0400)] 
feat(busybox): use busybox --install to install itself

Previous commits in this PR exposed a bug whereby some utilities
(e.g. dd) had both a busybox applet version and a coreutils version.

The busybox dracut module should not enforce taking always the
busybox version. The `busybox --install` command is safer option
that does not overwrite an existing binary of already exists.

17 months agotest(RAID-DEG): bash is not a requirement for this test
Laszlo Gombos [Sat, 20 Jul 2024 22:53:51 +0000 (18:53 -0400)] 
test(RAID-DEG): bash is not a requirement for this test

Increase tests coverage by letting the sh meta package pick a
shell.

17 months agotest: do not force include dash, let sh module make a selection
Laszlo Gombos [Sat, 20 Jul 2024 22:49:38 +0000 (18:49 -0400)] 
test: do not force include dash, let sh module make a selection

This is important for alpine, so that it does not install both
dash and busybox dracut modules that are potentially conflicting.

17 months agofeat(shell-interpreter): meta package for improved shell selection
Laszlo Gombos [Sat, 20 Jul 2024 22:40:43 +0000 (18:40 -0400)] 
feat(shell-interpreter): meta package for improved shell selection

17 months agofeat(pcmcia): only include when another module requires it
Laszlo Gombos [Sat, 20 Jul 2024 11:48:31 +0000 (07:48 -0400)] 
feat(pcmcia): only include when another module requires it

While the module itself is relativly new the technology is rarely
used any more as part of the boot process.

17 months agochore!: drop support for prepare_udev_rules
Laszlo Gombos [Sat, 20 Jul 2024 03:03:50 +0000 (23:03 -0400)] 
chore!: drop support for prepare_udev_rules

Follow-up to c95075e2c792cdb0e18aac6300ae8dc0dd6a6c1b.

17 months agofix(Makefile): install dracut config examples under /usr
Laszlo Gombos [Sat, 20 Jul 2024 18:09:44 +0000 (14:09 -0400)] 
fix(Makefile): install dracut config examples under /usr

17 months agofeat: add common config when networking is not desired
Laszlo Gombos [Sat, 20 Jul 2024 17:55:03 +0000 (13:55 -0400)] 
feat: add common config when networking is not desired

This is especially useful for distributions like Arch or Gentoo
that do not package networking dracut modules into its own
package.

17 months agofix(watchdog): change the priority of watchdog kernel modules
Laszlo Gombos [Sat, 20 Jul 2024 17:14:09 +0000 (13:14 -0400)] 
fix(watchdog): change the priority of watchdog kernel modules

i6300esb should be prioritized over ib700wdt.

Follow-up to f0a7fc5b4 .

17 months agotest(RAID-DEG): make it not flaky
Laszlo Gombos [Sat, 20 Jul 2024 16:57:24 +0000 (12:57 -0400)] 
test(RAID-DEG): make it not flaky

130f4dfce48b187944be9a0cacca794dd32428ad inadvertently made this
test flaky by including additional dracut modules not required
to pass the test.

17 months agotest: check for kernel module support from within the VM
Laszlo Gombos [Sat, 20 Jul 2024 12:10:46 +0000 (08:10 -0400)] 
test: check for kernel module support from within the VM

Testing kernel module support only works reliably form a VM
that is booted from the given Linux kernel version.

17 months agochore: remove empty check functions
Antonio Alvarez Feijoo [Thu, 18 Jul 2024 07:30:27 +0000 (09:30 +0200)] 
chore: remove empty check functions

17 months agochore: remove support for old mdadm versions
Antonio Alvarez Feijoo [Wed, 17 Jul 2024 07:45:04 +0000 (09:45 +0200)] 
chore: remove support for old mdadm versions

17 months agochore(github): use committer team for code owners
Neal Gompa [Thu, 18 Jul 2024 22:22:15 +0000 (18:22 -0400)] 
chore(github): use committer team for code owners

By using a GitHub team for the CODEOWNERS file, we can
easily add and remove people through the interface for
global committers and avoid unnecessary churn.

17 months agotest(DMSQUASH): no need to partition root_erofs disk
Laszlo Gombos [Sun, 14 Jul 2024 02:35:23 +0000 (22:35 -0400)] 
test(DMSQUASH): no need to partition root_erofs disk

17 months agofix(release): improve commit message
Laszlo Gombos [Sun, 14 Jul 2024 02:10:11 +0000 (22:10 -0400)] 
fix(release): improve commit message

Add new version commit number to the commit message.
Lock clog version to a version that is working well.
Allow clog to be installed in the user home as well.

17 months agofix(dracut): re-enable extended attributes in containers
Laszlo Gombos [Tue, 2 Jul 2024 19:50:37 +0000 (15:50 -0400)] 
fix(dracut): re-enable extended attributes in containers

add common config to make it easier to discable xattr.

Running inside a container is not a good proxy for making decisions
about filesystem properties.

17 months agofix(multipath): include module with "find_multipaths strict"
Martin Wilck [Tue, 16 Jul 2024 14:55:03 +0000 (16:55 +0200)] 
fix(multipath): include module with "find_multipaths strict"

The previous commits 377d52c and 4957ffa excluded the multipath module in
non-hostonly mode, with the purpose of avoiding to start multipath in the
initramfs on systems that don't use multipath. This is against the idea of
non-hostonly, which is to build an initramfs with all kernel modules and tools
that may be necessary to bring up the system.

This patch takes a different approach. In non-hostonly mode, if there are no
multipath devices and no multipath.conf, include the multipath module, but
require "find_multipaths strict" policy. This will ensure that users that don't
use dm-multipath won't be surprised by finding their root device under
multipath control. But the multipath tools will still be included in the
initramfs, allowing users to set up multipathing e.g. on the emergency shell if
necessary. Also, if /etc/multipath/wwids exists, it will be included in the
initramfs and will cause the WWIDs listed in that file to be multipathed.

Note that in multipath-tools upstream and many Linux distributions,
"find_multipaths strict" is the default anyway. Users of distributions with
different defaults (e.g. openSUSE) would just need to create
/etc/multipath.conf (possibly with empty contents) to override this behavior if
they intend to activate multipath in the initramfs.

Fixes: 377d52c ("fix(multipath): omit module if included with no multipath devices")
Fixes: 4957ffa ("fix(multipath): omit module if included with no multipath devices")
17 months agofix(systemd): move installation of libkmod to udev-rules module
Alexander Tsoy [Tue, 16 Jul 2024 05:48:54 +0000 (08:48 +0300)] 
fix(systemd): move installation of libkmod to udev-rules module

libkmod library should be installed even if systemd module is
omitted, so move its installation to udev-rules module.

17 months agodocs: update NEWS.md and AUTHORS for release 103 103
dracutng[bot] [Sat, 13 Jul 2024 13:34:31 +0000 (13:34 +0000)] 
docs: update NEWS.md and AUTHORS for release 103

17 months agotest(DMSQUASH): add test for part of erofs support
Brian C. Lane [Fri, 12 Jul 2024 22:43:12 +0000 (15:43 -0700)] 
test(DMSQUASH): add test for part of erofs support

This adds a test for using erofs on a bare partition by
creating a new disk image, root_erofs, and writing the erofs compressed
/source directory directly to partition 1 and then booting the image
with root=live:/dev/disk/by-label/dracut_erofs

This doesn't quite test the anaconda-dracut use case of calling
dmsquash-live-root with the path of an erofs compressed file, but it is
close enough for now.

17 months agofix(dmsquash-live): make sure erofs module is installed
Brian C. Lane [Fri, 12 Jul 2024 22:41:11 +0000 (15:41 -0700)] 
fix(dmsquash-live): make sure erofs module is installed

17 months agofeat(test): add erofs-utils to the containers
Brian C. Lane [Fri, 12 Jul 2024 14:43:57 +0000 (07:43 -0700)] 
feat(test): add erofs-utils to the containers

17 months agofeat(dmdquash-live): add support for using erofs
Brian C. Lane [Wed, 10 Jul 2024 23:30:09 +0000 (16:30 -0700)] 
feat(dmdquash-live): add support for using erofs

This adds support for rootfs compressed with erofs. Either as a plain
erofs image or a LiveOS/rootfs.img ext4 filesystem compressed with
erofs.

This patch does not make any attempt to change the squashfs directory
naming (or variable names) in order to make these changes as small as
possible and easy to review. It also does not make any attempt to
support the multitude of available options other than what is needed by
anaconda-dracut calling this script to setup the boot.iso root
filesystem.

(which isn't to say it doesn't work, it just hasn't been tested and is
outside the scope of this change).

17 months agofix(test): run test 14 with systemd again
Benjamin Drung [Fri, 12 Jul 2024 08:57:02 +0000 (10:57 +0200)] 
fix(test): run test 14 with systemd again

Commit 061a1068ba4c872e48605b9b0ecd282f4630ea8f ("test: avoid writing to
rootfs as it might be read-only") fixes the test failure with systemd
256. So revert the changes to `test/TEST-14-IMSM` from commit
130f4dfce48b187944be9a0cacca794dd32428ad.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
17 months agoci: run extended tests on openSUSE as well
Laszlo Gombos [Wed, 10 Jul 2024 15:21:51 +0000 (11:21 -0400)] 
ci: run extended tests on openSUSE as well

17 months agotest(FULL-SYSTEM): make sure systemd-pcrphase can be installed
Laszlo Gombos [Tue, 9 Jul 2024 13:34:45 +0000 (09:34 -0400)] 
test(FULL-SYSTEM): make sure systemd-pcrphase can be installed

17 months agotest(FULL-SYSTEMD): remove workaround for multipath
Laszlo Gombos [Wed, 10 Jul 2024 15:20:02 +0000 (11:20 -0400)] 
test(FULL-SYSTEMD): remove workaround for multipath

17 months agofix(multipath): omit module if included with no multipath devices
Laszlo Gombos [Wed, 10 Jul 2024 12:43:31 +0000 (08:43 -0400)] 
fix(multipath): omit module if included with no multipath devices

Follow-up to 4957ffa935. return 255 instead of 1 and change the order
of checks.

17 months agofeat(kernel-modules): install platform/chrome modules on ARM/RISC-V
Alper Nebi Yasak [Tue, 9 Jul 2024 21:21:18 +0000 (00:21 +0300)] 
feat(kernel-modules): install platform/chrome modules on ARM/RISC-V

Most ARM Chromebooks need the ChromiumOS Embedded Controller drivers
located under kernel/drivers/platform/chrome for essential functionality
like keyboard, USB, and display backlight. Add them to the non-hostonly
initramfs by adding them to the ARM/RISC-V-specific instmods call.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
17 months agofix(dracut-install): copy xattr when use clone ioctl
Huaxin Lu [Thu, 20 Jun 2024 05:38:26 +0000 (13:38 +0800)] 
fix(dracut-install): copy xattr when use clone ioctl

When use clone ioctl to copy a file, the extended attributes of files are
missing, which is inconsistent with the result by using the cp command.
This commit add the process to copy extended attributes after clone_file().

Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
17 months agofix(Dockerfile-Gentoo): add requirements for systemd-pcrphase
Andrew Ammerlaan [Tue, 9 Jul 2024 06:49:19 +0000 (08:49 +0200)] 
fix(Dockerfile-Gentoo): add requirements for systemd-pcrphase

Closes: https://github.com/dracut-ng/dracut-ng/issues/481
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
17 months agotest(FULL-SYSTEMD): add test with rd.luks.name
Laszlo Gombos [Mon, 8 Jul 2024 13:11:47 +0000 (09:11 -0400)] 
test(FULL-SYSTEMD): add test with rd.luks.name

Arch wiki recommends this configuration and last release regressed
this configuration.

17 months agotest(FULL-SYSTEMD): do not disable kernel loglevel
Laszlo Gombos [Sun, 7 Jul 2024 23:39:49 +0000 (19:39 -0400)] 
test(FULL-SYSTEMD): do not disable kernel loglevel

No other tests sets it to zero by default.

17 months agotest(FULL-SYSTEMD): add tests for volatile mode
Laszlo Gombos [Sun, 7 Jul 2024 23:36:27 +0000 (19:36 -0400)] 
test(FULL-SYSTEMD): add tests for volatile mode

17 months agotest(FULL-SYSTEMD): remove managing drivers manually
Laszlo Gombos [Sun, 7 Jul 2024 23:23:34 +0000 (19:23 -0400)] 
test(FULL-SYSTEMD): remove managing drivers manually

Let the btrfs module manage the btrfs driver.

17 months agotest(FULL-SYSTEMD): align with other tests
Laszlo Gombos [Sun, 7 Jul 2024 20:48:42 +0000 (16:48 -0400)] 
test(FULL-SYSTEMD): align with other tests

17 months agotest(FULL-SYSTEMD): control decryption from command line
Laszlo Gombos [Sun, 7 Jul 2024 20:09:22 +0000 (16:09 -0400)] 
test(FULL-SYSTEMD): control decryption from command line

17 months agotest(FULL-SYSTEMD): no need for explicit bash dependency
Laszlo Gombos [Sun, 7 Jul 2024 20:01:22 +0000 (16:01 -0400)] 
test(FULL-SYSTEMD): no need for explicit bash dependency

17 months agotest(FULL-SYSTEMD): avoid hostonly files for a generic testcase
Laszlo Gombos [Sun, 7 Jul 2024 19:32:16 +0000 (15:32 -0400)] 
test(FULL-SYSTEMD): avoid hostonly files for a generic testcase

17 months agotest(FULL-SYSTEMD): add systemd-coredump for testing
Laszlo Gombos [Sun, 7 Jul 2024 19:19:15 +0000 (15:19 -0400)] 
test(FULL-SYSTEMD): add systemd-coredump for testing

17 months agotest: move /failed to /run/failed as rootfs might be read-only
Laszlo Gombos [Sun, 7 Jul 2024 19:10:43 +0000 (15:10 -0400)] 
test: move /failed to /run/failed as rootfs might be read-only

17 months agofix(dracut-init.sh): clarify the error message
Laszlo Gombos [Sat, 6 Jul 2024 12:29:57 +0000 (08:29 -0400)] 
fix(dracut-init.sh): clarify the error message

Clarify that dracut module is missing and not Linux command or package.