]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
3 years agodocs: update NEWS.md and AUTHORS 057
Jóhann B. Guðmundsson [Sun, 19 Jun 2022 22:35:37 +0000 (22:35 +0000)] 
docs: update NEWS.md and AUTHORS

3 years agofeat(dracut): support parallel execution with --parallel
Martin Wilck [Thu, 9 Jun 2022 11:32:17 +0000 (13:32 +0200)] 
feat(dracut): support parallel execution with --parallel

Add an option --parallel which can currently be used with
--regenerate-all. With --regenerate-all --parallel, dracut will be
run in parallel for all kernels found.

Also introduce a config file equivalent setting: parallel="yes".
Making this work requires moving the code block that handles --regenerate-all
behind the code block for reading the config files.

Signed-off-by: Martin Wilck <mwilck@suse.com>
3 years agofeat(lvm): add new module lvmthinpool-monitor
Tao Liu [Fri, 10 Jun 2022 08:39:31 +0000 (16:39 +0800)] 
feat(lvm): add new module lvmthinpool-monitor

Previously dracut didn't support the feature of lvm thinpool autoextend.

The feature is useful to cases such as kdump, when vmcore to be saved to a
lvm thin volume. The thinpool should be able to autoextend, otherwise an
IO error will be caused and leaves an incomplete vmcore.

There is lvm2-monitor.service and dmeventd avaliable, however
considering [1], it is not suitable for kdump and memory limited cases.

This patch achieves the same by parallel looping a shell function in the
background, which calls lvextend periodically. If thredshold reaches,
autoextend it, if not then nothing happens.

[1]: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/message/YF254ZO3PJ3U56P4OKHV3JNYP2PJUMYX/

Signed-off-by: Tao Liu <ltao@redhat.com>
3 years agofix(bluetooth): accept compressed firmwares in inst_multiple
наб [Tue, 26 Apr 2022 15:41:40 +0000 (17:41 +0200)] 
fix(bluetooth): accept compressed firmwares in inst_multiple

3 years agofeat(dracut-install): support ZSTD-compressed firmware with .zst suffix
наб [Tue, 26 Apr 2022 15:32:32 +0000 (17:32 +0200)] 
feat(dracut-install): support ZSTD-compressed firmware with .zst suffix

Coming in 5.19:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=driver-core-next&id=23cfbc6ec44e5e80d5522976ff45ffcdcddfb230

3 years agofix(dracut): default to correct firmware search paths
наб [Tue, 26 Apr 2022 14:42:55 +0000 (16:42 +0200)] 
fix(dracut): default to correct firmware search paths

1. /sys/module/firmware_class/parameters/path (fw_path_para), if any
2. /lib/firmware/updates/$(uname -r)
3. /lib/firmware/updates
4. /lib/firmware/$(uname -r)
5. /lib/firmware

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/firmware_loader/main.c?h=v5.17#n406

3 years agotest: list only the required modules explicitly
Laszlo Gombos [Tue, 22 Feb 2022 14:25:44 +0000 (09:25 -0500)] 
test: list only the required modules explicitly

Test for module dependencies and increase test coverage.

3 years agofix(test): dmsquash-live test without an iso
Laszlo Gombos [Sun, 8 May 2022 04:46:15 +0000 (04:46 +0000)] 
fix(test): dmsquash-live test without an iso

Remove fedore specific parts and use squash filesystem as live root.

3 years agofix(Makefile): use of potentially unset variable
Conrad Hoffmann [Thu, 2 Jun 2022 08:31:50 +0000 (10:31 +0200)] 
fix(Makefile): use of potentially unset variable

`CWD` is not a Make variable. This may have worked accidentally for some
people if their shell happend to provide `CWD` and Make picked it up.

As is, this tends to pick up git versions of unrelated parent
directories, e.g. when packaging for distributions.

3 years agodocs(dracut.cmdline): add missing rd.nonvmf option
Antonio Alvarez Feijoo [Thu, 2 Jun 2022 07:07:34 +0000 (09:07 +0200)] 
docs(dracut.cmdline): add missing rd.nonvmf option

This is a specific option of the nvmf module.

3 years agofix(nvmf): deprecate old nvmf cmdline options
Antonio Alvarez Feijoo [Thu, 2 Jun 2022 06:59:21 +0000 (08:59 +0200)] 
fix(nvmf): deprecate old nvmf cmdline options

Fixes issue #1831

3 years agofix(integrity): do not display any error if there is no IMA certificate
Antonio Alvarez Feijoo [Tue, 24 May 2022 14:34:04 +0000 (16:34 +0200)] 
fix(integrity): do not display any error if there is no IMA certificate

IMA appraisal can be used without digital signatures, just by storing hash
digests instead.

3 years agodocs(dracut.cmdline): add missing evmx509 option
Antonio Alvarez Feijoo [Tue, 24 May 2022 10:28:58 +0000 (12:28 +0200)] 
docs(dracut.cmdline): add missing evmx509 option

This is a specific option of the integrity module.

3 years agofeat(gensplash): remove module
Laszlo Gombos [Mon, 9 May 2022 14:32:19 +0000 (14:32 +0000)] 
feat(gensplash): remove module

splashutils Gentoo package (a dependency for the gensplash dracut module)
is non existent in the official Gentoo repositories.

3 years agodocs(dracut.conf): regenerate_all not supported
Antonio Alvarez Feijoo [Thu, 12 May 2022 13:04:37 +0000 (15:04 +0200)] 
docs(dracut.conf): regenerate_all not supported

The regenerate_all option is used before sourcing the configuration files.

3 years agofix(dracut.sh): format usage and add missing options
Antonio Alvarez Feijoo [Mon, 9 May 2022 10:50:26 +0000 (12:50 +0200)] 
fix(dracut.sh): format usage and add missing options

Set common format to each option and add missing options:
    --no-machineid

3 years agodocs(dracut): format and add missing options
Antonio Alvarez Feijoo [Mon, 9 May 2022 10:41:39 +0000 (12:41 +0200)] 
docs(dracut): format and add missing options

Set common format to each option, correct default compression options and add
missing options:
    --rebuild
    --aggresive-strip
    --hostonly-mode
    --hostonly-nics
    --noimageifnotneeded

3 years agodocs(dracut.conf): format and add missing options
Antonio Alvarez Feijoo [Mon, 9 May 2022 10:30:55 +0000 (12:30 +0200)] 
docs(dracut.conf): format and add missing options

Set common format to each option, add/correct default values and add missing
options:
    force_add_dracutmodules
    libdirs
    squash_compress
    aggresive_strip
    do_hardlink
    prefix
    hostonly_mode
    hostonly_nics
    sshkey
    regenerate_all
    noimageifnotneeded
    uefi
    machine_id
    enhanced_cpio

3 years agofix(shell-completion): add missing options
Antonio Alvarez Feijoo [Mon, 9 May 2022 09:49:39 +0000 (11:49 +0200)] 
fix(shell-completion): add missing options

3 years agoci(integration): maintain only Fedora latest
Laszlo Gombos [Fri, 6 May 2022 11:55:10 +0000 (11:55 +0000)] 
ci(integration): maintain only Fedora latest

Alphabetically ordering the distributions in the container section

3 years agoci(virtiofs): add virtiofs label
German Maglione [Thu, 21 Apr 2022 11:04:10 +0000 (13:04 +0200)] 
ci(virtiofs): add virtiofs label

Add the label virtiofs to the label trigger file.

Signed-off-by: German Maglione <gmaglione@redhat.com>
3 years agofeat(virtiofs): virtiofs root filesystem support
German Maglione [Wed, 20 Apr 2022 16:15:23 +0000 (18:15 +0200)] 
feat(virtiofs): virtiofs root filesystem support

Currently dracut can't mount virtiofs as root filesystem.
Make possible to boot virtual machines off virtiofs,
passing "root=virtiofs:<mtag>", using the mount tag <mtag>
as root filesystem. Alternatively this module also supports
"rootfstype=virtiofs root=<mtag>"

Signed-off-by: German Maglione <gmaglione@redhat.com>
3 years agofix(iscsi): do not exit in handle_netroot() if discovery failed
Wenchao Hao [Fri, 29 Apr 2022 06:09:02 +0000 (14:09 +0800)] 
fix(iscsi): do not exit in handle_netroot() if discovery failed

User may specify multiple netroot in cmdline, failed to connect one netroot
do not mean all netroot are not accessible. So if one netroot failed, do
not exit the discovery and login flow.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
3 years agofix(test): remove stale comments
Laszlo Gombos [Wed, 4 May 2022 11:54:46 +0000 (11:54 +0000)] 
fix(test): remove stale comments

3 years agofix(test): add support for dpkg to pass the test on debian
Laszlo Gombos [Wed, 4 May 2022 02:11:59 +0000 (02:11 +0000)] 
fix(test): add support for dpkg to pass the test on debian

3 years agofix(lsinitrd.sh): always check that MACHINE_ID is not empty
Antonio Alvarez Feijoo [Tue, 3 May 2022 13:37:42 +0000 (15:37 +0200)] 
fix(lsinitrd.sh): always check that MACHINE_ID is not empty

3 years agofix(dracut.sh): always check that MACHINE_ID is not empty
Antonio Alvarez Feijoo [Tue, 3 May 2022 13:26:53 +0000 (15:26 +0200)] 
fix(dracut.sh): always check that MACHINE_ID is not empty

On new installations, /etc/machine-id may exist and be empty, and
also /efi or /boot/efi may be a mount point, leading to an invalid
initramfs output file.

3 years agoci: on debian, default shell is not bash
Laszlo Gombos [Tue, 3 May 2022 20:02:37 +0000 (20:02 +0000)] 
ci: on debian, default shell is not bash

3 years agoci: install sudo for the debian container 1744/head
Laszlo Gombos [Mon, 2 May 2022 01:22:55 +0000 (01:22 +0000)] 
ci: install sudo for the debian container

3 years agodocs(dracut.usage): fix dracut.cmdline reference from section 5 to 7
Morten Linderud [Mon, 14 Mar 2022 09:02:15 +0000 (10:02 +0100)] 
docs(dracut.usage): fix dracut.cmdline reference from section 5 to 7

Signed-off-by: Morten Linderud <morten@linderud.pw>
3 years agofix(dmsquash-live): mount live device with the correct type
Laszlo Gombos [Sat, 12 Mar 2022 18:01:49 +0000 (18:01 +0000)] 
fix(dmsquash-live): mount live device with the correct type

fstype is not the correct type for the live device.

3 years agoci: add Debian Linux to limited tests
Laszlo Gombos [Sat, 12 Mar 2022 15:06:45 +0000 (15:06 +0000)] 
ci: add Debian Linux to limited tests

3 years agofix(dracut.sh): avoid calling dfatal before dracut-logger is sourced
Antonio Alvarez Feijoo [Wed, 30 Mar 2022 07:27:17 +0000 (09:27 +0200)] 
fix(dracut.sh): avoid calling dfatal before dracut-logger is sourced

dracut-logger is sourced in dracut-init, so any earlier calls to logger
functions before dracut-init is sourced fail.

Fix issue #1758

3 years agofix(dracut.spec): add connman module
Jóhann B. Guðmundsson [Tue, 26 Apr 2022 06:58:04 +0000 (06:58 +0000)] 
fix(dracut.spec): add connman module

Add the connman module to the spec file

3 years agofeat(dracut-systemd): use Documentation= to point to man page
David Tardon [Mon, 25 Apr 2022 14:45:20 +0000 (16:45 +0200)] 
feat(dracut-systemd): use Documentation= to point to man page

3 years agofix(dracut-systemd): drop misleading man page reference
David Tardon [Mon, 25 Apr 2022 14:52:26 +0000 (16:52 +0200)] 
fix(dracut-systemd): drop misleading man page reference

dracut-shutdown.service is not a part of the boot process, therefore the
reference to dracut.bootup(7) is misleading.

3 years agofix(fedora.conf): vi binary is missing
Masahiro Matsuya [Tue, 15 Feb 2022 09:09:43 +0000 (18:09 +0900)] 
fix(fedora.conf): vi binary is missing

/usr/bin/vi is just a wrapper shell script to run /usr/libexec/vi which is the vi binary.
/usr/bin/vi is available in initrd.img, but /usr/libexec/vi is missing.
As as result, vi command never works.
This PR is to add /usr/libexec/vi.

3 years agofix(man): add missing default paths
Antonio Alvarez Feijoo [Fri, 22 Apr 2022 16:23:01 +0000 (18:23 +0200)] 
fix(man): add missing default paths

3 years agofix(lsinitrd.sh): add missing default paths
Antonio Alvarez Feijoo [Fri, 22 Apr 2022 16:22:25 +0000 (18:22 +0200)] 
fix(lsinitrd.sh): add missing default paths

3 years agofix(dracut.sh): add missing default output file paths
Antonio Alvarez Feijoo [Fri, 22 Apr 2022 16:21:45 +0000 (18:21 +0200)] 
fix(dracut.sh): add missing default output file paths

3 years agofix(kernel-network-modules): allow specifying empty --hostonly-nics
Coiby Xu [Sun, 24 Apr 2022 02:52:33 +0000 (10:52 +0800)] 
fix(kernel-network-modules): allow specifying empty --hostonly-nics

Commit 1e92f728 ("Add a --hostonly-nics option") allows only installing
the network drivers for specified NICs. But it doesn't allow an emtpy
--hostonly-nics. Specifying empty hostonly-nics is needed to address the
following use cases,
 - drivers/s390/net is installed regardless of --hostonly-nics. There is
   no need to repeat it.
 - get_dev_module couldn't find the driver for a bond or a bridge
   network interface so it's better for a module to install a bond
   or bridge driver itself
 - dracut kdump module wants to install the needed network drivers by
   itself because it can't add the --hostonly-nics option to dracut when
   itself is a dracut module

This patch distinguishes between an empty --hostonly-nics and --hostonly-nics
not added so a user can pass an empty --hostonly-nics option.

3 years agofix(nfs): give /run/rpcbind ownership to rpc user
Antonio Alvarez Feijoo [Wed, 20 Apr 2022 13:33:51 +0000 (15:33 +0200)] 
fix(nfs): give /run/rpcbind ownership to rpc user

Avoid errors when rpcbind tries to write to the /run/rpcbind directory.

3 years agofix(nfs): require and install needed binaries
Antonio Alvarez Feijoo [Wed, 20 Apr 2022 13:32:54 +0000 (15:32 +0200)] 
fix(nfs): require and install needed binaries

parse-nfsroot.sh requires sed, chmod and chown.

3 years agofix(lvm): add missing grep requirement
Antonio Alvarez Feijoo [Mon, 11 Apr 2022 06:33:17 +0000 (08:33 +0200)] 
fix(lvm): add missing grep requirement

Since commit https://github.com/dracutdevs/dracut/commit/7ffc5e38
lvm_scan.sh needs grep.

3 years agofix(resume): correct call to block_is_netdevice function
Antonio Alvarez Feijoo [Fri, 1 Apr 2022 08:04:30 +0000 (10:04 +0200)] 
fix(resume): correct call to block_is_netdevice function

The block_is_netdevice function requires the device in <maj:min>
format, but the swap_devs array is populated with the content of
/proc/swaps, which prints the devices using their paths from /dev.

This causes the check method to never detect if swap is mounted on a
network device.

3 years agofix(dracut-functions.sh): correct wrong comment
Antonio Alvarez Feijoo [Fri, 1 Apr 2022 07:28:16 +0000 (09:28 +0200)] 
fix(dracut-functions.sh): correct wrong comment

3 years agofix(dracut.cmdline.7): {=> must} also be specified
наб [Mon, 4 Apr 2022 15:44:46 +0000 (17:44 +0200)] 
fix(dracut.cmdline.7): {=> must} also be specified

3 years agofix(ifcfg): avoid calling unavailable dracut-logger functions
Antonio Alvarez Feijoo [Wed, 6 Apr 2022 08:25:23 +0000 (10:25 +0200)] 
fix(ifcfg): avoid calling unavailable dracut-logger functions

The dracut-logger functions are only available during the initrd
generation. For internal initrd scripts that run at boot,
dracut-lib provides warn() and info().

3 years agofix(network-manager): avoid calling unavailable dracut-logger functions
Antonio Alvarez Feijoo [Wed, 6 Apr 2022 08:23:53 +0000 (10:23 +0200)] 
fix(network-manager): avoid calling unavailable dracut-logger functions

The dracut-logger functions are only available during the initrd
generation. For internal initrd scripts that run at boot,
dracut-lib provides warn() and info().

3 years agofeat(man): add documentation for rd.luks.key.tout
Nicolas Porcel [Mon, 28 Feb 2022 19:31:56 +0000 (19:31 +0000)] 
feat(man): add documentation for rd.luks.key.tout

3 years agofix(crypt): add missing is_keysource parameter to cryptroot-ask
Nicolas Porcel [Mon, 28 Feb 2022 18:48:04 +0000 (18:48 +0000)] 
fix(crypt): add missing is_keysource parameter to cryptroot-ask

Without this change, rd.luks.key.tout is used, which is the number of
times cryptroot tries to find the key.

3 years agofix(man): add missing --libdirs section
Antonio Alvarez Feijoo [Mon, 4 Apr 2022 16:01:05 +0000 (18:01 +0200)] 
fix(man): add missing --libdirs section

3 years agofix(dracut.sh): add missing --libdirs usage
Antonio Alvarez Feijoo [Mon, 4 Apr 2022 15:50:23 +0000 (17:50 +0200)] 
fix(dracut.sh): add missing --libdirs usage

3 years agofix(nvmf): set executable bit on nvmf-autoconnect.sh
Benjamin Gilbert [Thu, 7 Apr 2022 22:10:35 +0000 (18:10 -0400)] 
fix(nvmf): set executable bit on nvmf-autoconnect.sh

It's installed in /sbin, and run via initqueue in the special case of FC
transport without a discovery.conf and without kernel arguments.  If the
executable bit is not set, initqueue fails with "Invalid command".

Caught by CI checking for non-executable files in binary directories.

3 years agofeat(url-lib.sh): add --retry-connrefused to default curl arguments
James Morris [Thu, 7 Apr 2022 16:57:48 +0000 (17:57 +0100)] 
feat(url-lib.sh): add --retry-connrefused to default curl arguments

Trigger the existing retry condition on connection refused
to mitigate transient connectivity issues.

3 years agofix(dracut-install): copy files preserving ownership attributes
Antonio Alvarez Feijoo [Mon, 4 Apr 2022 09:55:59 +0000 (11:55 +0200)] 
fix(dracut-install): copy files preserving ownership attributes

While the "clone copy" operation changes the ownership of the cloned
files, the "normal copy" using cp does not preserve it.

3 years agodocs: do not mention nullglob in cases where it's not needed
Pavel Valena [Fri, 25 Mar 2022 16:39:04 +0000 (17:39 +0100)] 
docs: do not mention nullglob in cases where it's not needed

3 years agofix(10i18n): stop leaking shell options
Pavel Valena [Fri, 25 Mar 2022 16:26:19 +0000 (17:26 +0100)] 
fix(10i18n): stop leaking shell options

Avoid using shell options in findkeymap, instead of using a wrapper[*]
to restore the previous options. Using mapfile and find to generate the list
of files also has the benefit of being more readable in this case.

[*] Reverted commit 35064768ebf14d3ec6bf3f7df52580fb4920ea3d
Original issue description from Michal Hecko <mhecko@redhat.com>:

The findkeymap function manipulates the shell options and relies on
restoring them using the trap. However, as the function might be called
recursively, each recursive invocation changes the signal handler to its
own. As the recursion is entered with shell options already modified,
the changed trap handler is replaced with restoration to the modified
shell options, not the original ones.

3 years agorevert(10i18n): stop leaking shell options
Pavel Valena [Fri, 25 Mar 2022 16:00:53 +0000 (17:00 +0100)] 
revert(10i18n): stop leaking shell options

This reverts commit 35064768ebf14d3ec6bf3f7df52580fb4920ea3d, to replace
the implementation.

3 years agofix(test): nullglob should not be needed
Pavel Valena [Fri, 25 Mar 2022 15:57:28 +0000 (16:57 +0100)] 
fix(test): nullglob should not be needed

3 years agofix(dracut-install): do not fail when SOURCE is optional and missing
Pavel Valena [Fri, 25 Mar 2022 15:20:16 +0000 (16:20 +0100)] 
fix(dracut-install): do not fail when SOURCE is optional and missing

When running dracut-install with '-o' (optional source), and nullglob
at the same time, when all of the arguments evaluate <null>, dracut-install
should not fail even when the source is not specified.

3 years agofix(bluetooth): nullglob should not be needed
Pavel Valena [Fri, 25 Mar 2022 15:39:55 +0000 (16:39 +0100)] 
fix(bluetooth): nullglob should not be needed

3 years agoci: obsolete Dockerfile with Fedora 33
Pavel Valena [Mon, 4 Apr 2022 04:40:26 +0000 (06:40 +0200)] 
ci: obsolete Dockerfile with Fedora 33

3 years agoci: add Dockerfile for Fedora 35
Pavel Valena [Mon, 4 Apr 2022 04:40:08 +0000 (06:40 +0200)] 
ci: add Dockerfile for Fedora 35

3 years agofix(dracut-initramfs-restore.sh): unpack uncompressed initrd as last option
Antonio Alvarez Feijoo [Fri, 18 Mar 2022 14:42:42 +0000 (15:42 +0100)] 
fix(dracut-initramfs-restore.sh): unpack uncompressed initrd as last option

Attempting to unpack the initrd assuming it is uncompressed when
it is delays the shutdown process by several seconds. This must
be the last check.

3 years agofix(configure): check for SYS-gettid during configure
Shreenidhi Shedi [Tue, 15 Mar 2022 11:30:14 +0000 (17:00 +0530)] 
fix(configure): check for SYS-gettid during configure

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
3 years agofix(lvm): ignore expected error message from lvm config
David Teigland [Mon, 28 Mar 2022 14:35:11 +0000 (09:35 -0500)] 
fix(lvm): ignore expected error message from lvm config

The "lvm config" commands that check the filter settings will
often find nothing set and report an error message:
"Configuration node devices/filter not found"
Direct these messages to /dev/null so they do not appear as
noise in system logs.

3 years agofix(connman): copy netroot.sh from the network module and install it
Zoltán Böszörményi [Sat, 26 Mar 2022 11:36:05 +0000 (12:36 +0100)] 
fix(connman): copy netroot.sh from the network module and install it

As requested by johannbg.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
3 years agofeat(connman): introduce connman support module
Zoltán Böszörményi [Thu, 24 Mar 2022 09:48:00 +0000 (10:48 +0100)] 
feat(connman): introduce connman support module

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
3 years agofix(plymouth): hide dpkg-architecture stderr messages
Antonio Alvarez Feijoo [Wed, 16 Mar 2022 16:01:37 +0000 (17:01 +0100)] 
fix(plymouth): hide dpkg-architecture stderr messages

dpkg-architecture prints warnings and errors to stderr. If the system does
not have gcc installed, it issues a warning:

dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)

This fix checks only the value of the queried variable.

3 years agostyle: remove accidental whitespace in front of comment line
nkraetzschmar [Wed, 23 Mar 2022 08:44:45 +0000 (09:44 +0100)] 
style: remove accidental whitespace in front of comment line

3 years agofeat: add aarch64 uefi support
nkraetzschmar [Tue, 22 Mar 2022 19:52:46 +0000 (20:52 +0100)] 
feat: add aarch64 uefi support

3 years agofix(udev-rules): add cdrom udev rules by default
Laszlo Gombos [Mon, 14 Mar 2022 16:56:04 +0000 (16:56 +0000)] 
fix(udev-rules): add cdrom udev rules by default

Include cdrom udev rules by default, even if
systemd-udevd or dmsquash-live dracut modules
are not installed.

3 years agofix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set
David Tardon [Fri, 11 Mar 2022 13:04:16 +0000 (14:04 +0100)] 
fix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set

It can happen that SELINUXTYPE is not set, e.g., in Fedora/RHEL
installation images /etc/selinux/config is an empty file. That means
that setfiles fails, which makes dracut-initramfs-restore fail too
because it uses "set -x", which means that dracut-shutdown.service
fails. But, after commit 7ab1d00227cad6f1b86ba01fdc766769faebb031, a
failure of dracut-shutdown.service means that the final switch back into
initrd is skipped. Let's just add an additional sanity check to
workaround that.

3 years agofix(bluetooth): make $dbussystem/bluetooth.conf optional
Antonio Alvarez Feijoo [Wed, 16 Mar 2022 08:08:34 +0000 (09:08 +0100)] 
fix(bluetooth): make $dbussystem/bluetooth.conf optional

Do not display an error message if $dbussystem/bluetooth.conf file don't exist.

3 years agofix(dracut-systemd): correct service dependencies
David Tardon [Mon, 14 Mar 2022 09:48:44 +0000 (10:48 +0100)] 
fix(dracut-systemd): correct service dependencies

dracut-systemd.service is not an early boot service, therefore it should
not use DefaultDependencies=no. This also fixes the service's ordering
dependencies, as in its current state it is missing
Before=shutdown.target umount.target

3 years agofix(10i18n): stop leaking shell options
Michal Hecko [Mon, 21 Feb 2022 09:59:27 +0000 (10:59 +0100)] 
fix(10i18n): stop leaking shell options

The findkeymap function manipulates the shell options and relies on
restoring them using the trap. However, as the function might be called
recursively, each recursive invocation changes the signal handler to its
own. As the recursion is entered with shell options already modified,
the changed trap handler is replaced with restoration to the modified
shell options, not the original ones. This patch wraps the findkeymap
function so that the shellopts are manipulated and restored outside the
recursion.

3 years agofix(dracut.sh): drop restorecon call
David Tardon [Thu, 3 Mar 2022 09:47:46 +0000 (10:47 +0100)] 
fix(dracut.sh): drop restorecon call

AFAICT there is no need for it. cp already applies appropriate label on
the target file (unless --preserve=context is used).

3 years agofix(dmsquash-live): permanent overlay on the same drive as LiveCD .iso
Laszlo Gombos [Fri, 18 Feb 2022 01:49:31 +0000 (20:49 -0500)] 
fix(dmsquash-live): permanent overlay on the same drive as LiveCD .iso

An example kernel command line arguments for this configuration
iso-scan/filename=distro.iso root=live:CDLABEL=ISO
rd.live.image rd.live.overlay=/dev/sda:/overlay.img

iso-scan would mount /dev/sda first and keep it mounted. The change
allows detecting if the permanent overlay drive is already mounted.
It also ensures that the mount is writable, as permanent overlay
requires writable storage.

3 years agofix(install): restore musl support
Laszlo Gombos [Mon, 21 Feb 2022 03:23:49 +0000 (22:23 -0500)] 
fix(install): restore musl support

__GLIBC_PREREQ is only defined in glibc.

3 years agofix(github): remove packit
Jóhann B. Guðmundsson [Sat, 19 Feb 2022 16:53:48 +0000 (16:53 +0000)] 
fix(github): remove packit

It's been a year since I initially made the PR to include packit.

Having it has resulted in increasing the project's cost of development
( CoD ) thus defeating the initial purpose of including it, which was an attempt
to do the opposite as in to reduce it, thus removing it.

My take on this after a year in use is that the concept is flawed,
limited to a single distribution and cannot work in practice without
adding to upstreams and it's contributors CoD but other projects milage
may vary.

3 years agofeat(dracut): add zfs detection
Savyasachee Jha [Thu, 17 Feb 2022 19:26:03 +0000 (00:56 +0530)] 
feat(dracut): add zfs detection

zfs detection is currently done by the zfs dracut module installed by
downstream, resulting in a lot of duplicated code. This commit puts zfs
detection into the core dracut logic, allowing for detection of zfs
partitions to be done at the same time as all others. It also allows for
dracut to correctly create a `root=` cmdline parameter for zfs.

Signed-off-by: Savyasachee Jha <hi@savyasacheejha.com>
3 years agofix(dracut.sh): error exporting sysctl variables
Antonio Alvarez Feijoo [Thu, 24 Feb 2022 08:36:02 +0000 (09:36 +0100)] 
fix(dracut.sh): error exporting sysctl variables

- Typo assigning depmodd and depmodconfdir.
- Typo exporting a variable called sysctl instead of sysctld.

3 years agofix(iscsi): remove unneeded iscsi NOP-disable code
Lee Duncan [Thu, 24 Feb 2022 17:22:23 +0000 (09:22 -0800)] 
fix(iscsi): remove unneeded iscsi NOP-disable code

Commit 7374943ae3d06 ("fix(iscsi): add support for the new iscsiadm
"no-wait" (-W) command") added some code to try to disable iscsi's
NOPs, since they are considered "bad" for an iscsi root disc,
but that code doesn't work because the session is already established
at this point. Open-iscsi will change so that it automatically
disables NOPs for the root disc, so this code can just go away.

3 years agofix(systemd-journald): remove duplicate entry in inst_multiple
Antonio Alvarez Feijoo [Mon, 21 Feb 2022 14:15:54 +0000 (15:15 +0100)] 
fix(systemd-journald): remove duplicate entry in inst_multiple

3 years agofix(systemd-timesyncd): add systemd-sysusers dependency
Antonio Alvarez Feijoo [Tue, 22 Feb 2022 14:53:09 +0000 (15:53 +0100)] 
fix(systemd-timesyncd): add systemd-sysusers dependency

This systemd-timesyncd module depends on systemd-sysusers after the split of
systemd sysuser configs (https://github.com/dracutdevs/dracut/commit/fec93bb22181f80056b40231fca36c422248ade0).

3 years agofix(systemd-coredump): add systemd-sysusers dependency
Antonio Alvarez Feijoo [Tue, 22 Feb 2022 14:46:25 +0000 (15:46 +0100)] 
fix(systemd-coredump): add systemd-sysusers dependency

The systemd-coredump module depends on systemd-sysusers after the split of
systemd sysuser configs (https://github.com/dracutdevs/dracut/commit/fec93bb22181f80056b40231fca36c422248ade0).

3 years agofeat(squash): add shell completion for --squash-compressor option
Tao Liu [Mon, 14 Feb 2022 07:13:27 +0000 (15:13 +0800)] 
feat(squash): add shell completion for --squash-compressor option

Signed-off-by: Tao Liu <ltao@redhat.com>
3 years agofeat(squash): update the manual page for --squash-compressor
Tao Liu [Mon, 14 Feb 2022 07:12:47 +0000 (15:12 +0800)] 
feat(squash): update the manual page for --squash-compressor

Signed-off-by: Tao Liu <ltao@redhat.com>
3 years agofeat(squash): decouple the compressor for dracut and dracut-squash
Tao Liu [Mon, 14 Feb 2022 07:11:35 +0000 (15:11 +0800)] 
feat(squash): decouple the compressor for dracut and dracut-squash

Previously dracut-squash module inherits the compressor
name from dracut, but actually the compressors are totally
different. For dracut, the compressor is zstd/gzip/lzop
cmdline tools, for dracut-squash, the compressor is the
libzstd/libz/liblzo libraries integrated by mksquashfs.

However mksquashfs support less compressors than dracut,
such as bzip2, which is not supported by mksquashfs, so
compressor decoupling seems to be a good idea to handle this.

This patch introduces a new dracut cmdline argument
--squash-compressor, by which the compressor and compressor
specific options can be passed to mksquashfs as
--squash-compressor "lzo -Xalgorithm lzo1x_1_15".

Signed-off-by: Tao Liu <ltao@redhat.com>
3 years agodocs: update NEWS.md and AUTHORS 056
Harald Hoyer [Fri, 18 Feb 2022 11:32:53 +0000 (12:32 +0100)] 
docs: update NEWS.md and AUTHORS

Signed-off-by: Harald Hoyer <harald@profian.com>
3 years agofix(cpio): correct dev_t -> rmajor/rminor mapping
David Disseldorp [Thu, 10 Feb 2022 19:08:11 +0000 (20:08 +0100)] 
fix(cpio): correct dev_t -> rmajor/rminor mapping

dev_t -> major/minor number mapping is more complicated than the
incorrect major=(dev_t >> 8) minor=(dev_t & 0xff) mapping that we
currently perform. Fix mapping to match Linux / glibc behaviour.

Fixes: https://github.com/dracutdevs/dracut/issues/1695
Reported-by: Ethan Wu <ethanwu10@gmail.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
3 years agoci(cpio): add test_archive_dev_maj_min
David Disseldorp [Thu, 10 Feb 2022 17:05:21 +0000 (18:05 +0100)] 
ci(cpio): add test_archive_dev_maj_min

This tests dracut-cpio's handling of rmajor / rminor values compared to
GNU cpio. The test requires root, due to mknod invocation for block
device node creation.

Signed-off-by: David Disseldorp <ddiss@suse.de>
3 years agoci(cpio): add TempWorkDir.create_tmp_mknod helper
David Disseldorp [Mon, 7 Feb 2022 22:04:29 +0000 (23:04 +0100)] 
ci(cpio): add TempWorkDir.create_tmp_mknod helper

This will be used for future device major/minor testing. Convert the
current fifo test to use it.

Signed-off-by: David Disseldorp <ddiss@suse.de>
3 years agofix(dasd_rules): correct udev dasd rules parsing
Thomas Blume [Mon, 7 Feb 2022 08:56:42 +0000 (09:56 +0100)] 
fix(dasd_rules): correct udev dasd rules parsing

3 years agofix(zfcp_rules): correct udev zfcp rules parsing
Thomas Blume [Mon, 7 Feb 2022 08:58:32 +0000 (09:58 +0100)] 
fix(zfcp_rules): correct udev zfcp rules parsing

3 years agofeat(pcsc): introducing the pcsc module
Jóhann B. Guðmundsson [Sat, 1 Jan 2022 03:00:15 +0000 (03:00 +0000)] 
feat(pcsc): introducing the pcsc module

3 years agofix(bluetooth): make hostonly configuration files optional
Antonio Alvarez Feijoo [Mon, 31 Jan 2022 11:09:02 +0000 (12:09 +0100)] 
fix(bluetooth): make hostonly configuration files optional

Do not fail if any of the expected configuration files don't exist.

3 years agofix(bluetooth): dbus configuration path fixes
Jóhann B. Guðmundsson [Sat, 11 Dec 2021 22:28:45 +0000 (22:28 +0000)] 
fix(bluetooth): dbus configuration path fixes

Add a missing /usr/share path ( fixes #1627 )
Use variable instead of hard path

3 years agofix(img-lib): install rmdir
Henrik Gombos [Thu, 25 Nov 2021 23:08:57 +0000 (18:08 -0500)] 
fix(img-lib): install rmdir

rmdir is used in img-lib module.