]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
4 years agofix: use find_binary
Zoltán Böszörményi [Sun, 7 Feb 2021 14:01:49 +0000 (15:01 +0100)] 
fix: use find_binary

Use find_binary instead of type -P because the former works if
dracutsysrootdir is set.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agofix(dracut.sh): don't override path with foreign sysroot
Zoltán Böszörményi [Sun, 7 Feb 2021 12:30:53 +0000 (13:30 +0100)] 
fix(dracut.sh): don't override path with foreign sysroot

Don't override PATH with foreign sysroot and
trim the sysroot prefix from NPATH elements.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agofix: quote globbing in module-setup.sh for inst_multiple
Zoltán Böszörményi [Sat, 30 Jan 2021 13:19:44 +0000 (14:19 +0100)] 
fix: quote globbing in module-setup.sh for inst_multiple

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agofix(dracut-install): allow globbing for multiple sources
Zoltán Böszörményi [Tue, 2 Feb 2021 08:42:37 +0000 (09:42 +0100)] 
fix(dracut-install): allow globbing for multiple sources

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agoFix bad ls parsing
foopub [Wed, 3 Feb 2021 17:41:08 +0000 (17:41 +0000)] 
Fix bad ls parsing

This used to cause some echo write/invalid argument errors. Simplest fix is to use readlink with -f for absolute path and -n to remove trailing newline.
See previous discussion here:
https://github.com/void-linux/void-packages/issues/13024

4 years agofix: move ldconfig after library workaround
Alexander Tsoy [Thu, 17 Dec 2020 21:01:32 +0000 (00:01 +0300)] 
fix: move ldconfig after library workaround

Commit de3cb0e3214c moved libpthread workaround after the code that runs
ldconfig. As a result, if installed in a non-default path, libgcc_s.so.1
could not be found by dynamic linker.

4 years agofeat(kernel-modules): add driver memory
Nicolas Chauvet [Wed, 21 Oct 2020 15:01:49 +0000 (17:01 +0200)] 
feat(kernel-modules): add driver memory

External Memory Controller (EMC) drivers can be built as a module.

On Tegra, this allows tegra_drm to load faster and without deferred
probes, instead of waiting for the rootfs for the tegra*_emc dependencies.

Tested on jetson-tk1 and ac100.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
4 years agofeat(systemd-repart): introducing systemd-repart module
Jóhann B. Guðmundsson [Thu, 4 Feb 2021 18:19:02 +0000 (18:19 +0000)] 
feat(systemd-repart): introducing systemd-repart module

This modules introduces systemd-repart which can be used
to generate partition(s), via a simple systemd-repart
drop-in(s), which can be useful in wide varity of usecase.

feat(systemd-repart): adding module to spec file

feat(systemd-repart): removing unessary requirement on type unit

fix: spelling error

4 years agofeat(dbus-daemon): introducing the dbus-daemon module
Jóhann B. Guðmundsson [Wed, 3 Feb 2021 16:00:33 +0000 (16:00 +0000)] 
feat(dbus-daemon): introducing the dbus-daemon module

Introdusing dbus-daemon which is based on but superseeds
the previous 06dbus implementation with various enhancements and fixes.

fix: adding new modules to rpm spec file

fix: missed an echo

4 years agofeat(dbus-broker): introducing the dbus-broker module
Jóhann B. Guðmundsson [Wed, 3 Feb 2021 15:43:47 +0000 (15:43 +0000)] 
feat(dbus-broker): introducing the dbus-broker module

Introducing the dbus-broker module.

4 years agofeat(dbus): introducing a meta module for dbus
Jóhann B. Guðmundsson [Wed, 3 Feb 2021 15:35:03 +0000 (15:35 +0000)] 
feat(dbus): introducing a meta module for dbus

We require a meta module to handle multiple modules

4 years agofix(network-legacy): silent check for leaseinfo
Harald Hoyer [Mon, 8 Feb 2021 15:03:25 +0000 (16:03 +0100)] 
fix(network-legacy): silent check for leaseinfo

Reroute negative checks for leaseinfo to /dev/null to suppress:
```
ls: cannot access '/tmp/leaseinfo.ens2*': No such file or directory
```

4 years agoci: mount host /dev into container
Harald Hoyer [Fri, 5 Feb 2021 16:00:32 +0000 (17:00 +0100)] 
ci: mount host /dev into container

might pickup /dev/kvm if we are lucky?

4 years agoci: remove `--privileged` option from docker containers
Harald Hoyer [Fri, 5 Feb 2021 15:41:00 +0000 (16:41 +0100)] 
ci: remove `--privileged` option from docker containers

This option should not be needed anymore with "mount -o loop" removed.

4 years agoci: get rid of "mount -o loop"
Harald Hoyer [Fri, 5 Feb 2021 15:25:14 +0000 (16:25 +0100)] 
ci: get rid of "mount -o loop"

This finally allows running the test suite completely in a rootless container:
```
❯ podman run \
         --user 0 \
         -v /dev:/dev \
         -v ./:/dracut \
         -it \
         quay.io/haraldh/dracut-fedora:33 \
         bash -c 'cd /dracut; make DRACUT_NO_XATTR=1 check'
```

4 years agoci: disable TEST 99
Harald Hoyer [Fri, 5 Feb 2021 15:51:26 +0000 (16:51 +0100)] 
ci: disable TEST 99

1. people got annoyed by merge conflicts
2. spec file can be update per release
3. uses "mount" preventing container testing

4 years agodocs: remove TODO file
Harald Hoyer [Mon, 8 Feb 2021 12:27:58 +0000 (13:27 +0100)] 
docs: remove TODO file

TODO file copied to https://github.com/dracutdevs/dracut/issues/1068
and also filed as individual issues on
https://github.com/dracutdevs/dracut/issues

4 years ago95nfs: fix rpc.statd installation
Kairui Song [Sun, 7 Feb 2021 09:20:16 +0000 (17:20 +0800)] 
95nfs: fix rpc.statd installation

commit 5840c466d tried to make it create the right directory according
to the directory layout on current host, but added "$initdir" prefix
to the if statement by accident, so the installation code have no
effect now. Just fix it.

4 years agofix: do not set cmdline for uefi images unless asked
Matthew Thode [Fri, 29 Jan 2021 04:40:59 +0000 (22:40 -0600)] 
fix: do not set cmdline for uefi images unless asked

The kernel does not allow the cmdline to be overridden if one is defined
in the uefi image.  This means that bootloaders like systemd-boot or
grub cannot manage boot options (editing at boot for debug being a use
case).  This patchset allows for no cmdline to be set (instead of force
setting one if none is provided).

Fixes: https://github.com/dracutdevs/dracut/issues/1012
Signed-off-by: Matthew Thode <mthode@mthode.org>
4 years agofeat(network-legacy): send dhcp in parallel on all devices
Anjali Kulkarni [Thu, 4 Feb 2021 01:15:15 +0000 (17:15 -0800)] 
feat(network-legacy): send dhcp in parallel on all devices

We can drastically improve boot times on some machines, or BM or VM
shapes, if we send DHCP requests in parallel on all interfaces
Add ip=single-dhcp as a kernel boot parameter, to send DHCP requests in
parallel on all interfaces. Thus, DHCP on each interface is overlapped
thereby reducing boot times for multiple interface machines.
This can help reduce the boot time by 1 minute per interface.
In addition, we may also save another 40 secs delay per interface, if
the link on which we try to send DHCP is in DOWN state. This can be
reduced by giving the following kernel command line parameter while
booting - rd.net.timeout.carrier=<timeout>.
Added manpage for ip=single-dhcp with the caveat that it does not
apply to Network Manager or SUSE wicked.

Signed-off-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
4 years agofix(mdraid): remove offroot
Mariusz Tkaczyk [Thu, 26 Nov 2020 12:04:44 +0000 (13:04 +0100)] 
fix(mdraid): remove offroot

offroot is deprecated and can be safety removed.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
4 years agofix(mdraid): add grow continue service
Mariusz Tkaczyk [Thu, 26 Nov 2020 11:51:47 +0000 (12:51 +0100)] 
fix(mdraid): add grow continue service

During raid assembly mdadm will call mdadm-grow-continue.service if
reshape is in progress.
If service doesn't exist then it is done via fork and systemd will kill
it unconditionally after processing all events.

Add proper service to allow systemd to manage reshape correctly.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
4 years agofix(spec): add new systemd-coredump module to spec
Lukas Nykryn [Thu, 4 Feb 2021 09:54:01 +0000 (10:54 +0100)] 
fix(spec): add new systemd-coredump module to spec

4 years agofix(watchdog): replace return with echo
Peter Levine [Tue, 2 Feb 2021 03:17:06 +0000 (22:17 -0500)] 
fix(watchdog): replace return with echo

4 years agofeat(systemd-coredump): introducing systemd-coredump module
Jóhann B. Guðmundsson [Mon, 1 Feb 2021 11:27:52 +0000 (11:27 +0000)] 
feat(systemd-coredump): introducing systemd-coredump module

This pull request introduces systemd-coredump as a seperated
module and adds the systemdutilconfdir global variable.

4 years agoci: remove Travis and include Fedora-latest
Harald Hoyer [Wed, 27 Jan 2021 08:48:19 +0000 (09:48 +0100)] 
ci: remove Travis and include Fedora-latest

Also remove Fedora 31.

Github CI should suffice. The only missing piece was Fedora-latest.

Signed-off-by: Harald Hoyer <harald@redhat.com>
4 years agotest: incr. disk size for TEST 35 ISCSI-MULTI
Harald Hoyer [Wed, 27 Jan 2021 09:00:10 +0000 (10:00 +0100)] 
test: incr. disk size for TEST 35 ISCSI-MULTI

4 years agofix(skipcpio): edit skipcpio.c: strstr -> memmem
realtime-neil [Mon, 25 Jan 2021 22:44:07 +0000 (22:44 +0000)] 
fix(skipcpio): edit skipcpio.c: strstr -> memmem

because CPIO_END might follow a NULL byte in buf

4 years agofix(1007): adding shared keyring mode to type unit
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 16:16:54 +0000 (16:16 +0000)] 
fix(1007): adding shared keyring mode to type unit

Fixes: https://github.com/dracutdevs/dracut/issues/1007
4 years agoci: use our own version of commisery
Harald Hoyer [Tue, 26 Jan 2021 14:45:40 +0000 (15:45 +0100)] 
ci: use our own version of commisery

This should hopefully fix:
* not checking the PR github title
* not error on the auto merge commit message

4 years agofeat(systemd-sysusers): introducing systemd-sysuser module
Jóhann B. Guðmundsson [Tue, 19 Jan 2021 23:06:56 +0000 (23:06 +0000)] 
feat(systemd-sysusers): introducing systemd-sysuser module

4 years agofeat(systemd-sysusers): introducing systemd-sysuser module
Jóhann B. Guðmundsson [Tue, 19 Jan 2021 23:03:59 +0000 (23:03 +0000)] 
feat(systemd-sysusers): introducing systemd-sysuser module

4 years agofix(1001): use efivars fs over the deprecated sysfs entries
Daniel Molkentin [Tue, 19 Jan 2021 17:46:13 +0000 (18:46 +0100)] 
fix(1001): use efivars fs over the deprecated sysfs entries

sysfs efi vars has been dropped for non-x86 systems since kernel 5.10.

4 years agofix(kernel-network-modules): also install modules from mdio subdirectory
Javier Martinez Canillas [Thu, 21 Jan 2021 11:35:06 +0000 (12:35 +0100)] 
fix(kernel-network-modules): also install modules from mdio subdirectory

A recent change in Linux kernel v5.10 split the MDIO drivers from the PHY
subdirectory into a new MDIO subdirectory [0]. This caused MDIO drivers
to not be included in the initramfs.

Also include the modules of this new subdirectory to prevent this issue.

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9770eac511

Suggested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
4 years agofix(06dbus): do not hardcode path to dbus utils
Alexey Shabalin [Fri, 18 Dec 2020 02:01:39 +0000 (05:01 +0300)] 
fix(06dbus): do not hardcode path to dbus utils

4 years agofix(06dbus): do not hardcode path to systemd unit
Alexey Shabalin [Fri, 18 Dec 2020 01:32:25 +0000 (04:32 +0300)] 
fix(06dbus): do not hardcode path to systemd unit

Use $systemdsystemunitdir instead /usr/lib/systemd/system.

4 years agofix(dracut-init.sh): make inst_libdir_file work with dracutsysrootdir set
Zoltán Böszörményi [Tue, 19 Jan 2021 16:24:06 +0000 (17:24 +0100)] 
fix(dracut-init.sh): make inst_libdir_file work with dracutsysrootdir set

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agofix(99squash): use kernel config instead of modprobe to check modules
Zoltán Böszörményi [Tue, 19 Jan 2021 14:17:05 +0000 (15:17 +0100)] 
fix(99squash): use kernel config instead of modprobe to check modules

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agofix(dracut-functions.sh): check kernel config from $dracutsysrootdir
Zoltán Böszörményi [Tue, 19 Jan 2021 09:39:17 +0000 (10:39 +0100)] 
fix(dracut-functions.sh): check kernel config from $dracutsysrootdir

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
4 years agofix(90kernel-modules): install generic crypto modules with hostonly unset
Ondrej Mosnacek [Fri, 4 Dec 2020 16:21:05 +0000 (17:21 +0100)] 
fix(90kernel-modules): install generic crypto modules with hostonly unset

Otherwise e.g. the xts(aes) implementation provided by the vmx_crypto
module (which does usually get included on ppc64le) fails to initialize
when xts is built as a module (CONFIG_CRYPTO_XTS=m), because it can't
instantiate the fallback generic xts(aes) implementation (needs the
generic xts module).

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
4 years agofeat: add addional global variables
Jóhann B. Guðmundsson [Tue, 19 Jan 2021 22:50:36 +0000 (22:50 +0000)] 
feat: add addional global variables

4 years agofeat: add addional global variables
Jóhann B. Guðmundsson [Tue, 19 Jan 2021 22:36:37 +0000 (22:36 +0000)] 
feat: add addional global variables

4 years agofix: add a missing efi support
Jóhann B. Guðmundsson [Sat, 16 Jan 2021 17:44:00 +0000 (17:44 +0000)] 
fix: add a missing efi support

4 years agochore(removal): eliminate bootchart module
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 11:33:42 +0000 (11:33 +0000)] 
chore(removal): eliminate bootchart module

4 years agochore(removal): eliminate bootchart module
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 11:30:34 +0000 (11:30 +0000)] 
chore(removal): eliminate bootchart module

4 years agochore(removal): eliminate bootchart module
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 11:28:06 +0000 (11:28 +0000)] 
chore(removal): eliminate bootchart module

4 years agofeat: add addional global variables
Jóhann B. Guðmundsson [Sun, 17 Jan 2021 22:44:17 +0000 (22:44 +0000)] 
feat: add addional global variables

4 years agofeat(cli): add --no-uefi option
Vladius25 [Wed, 13 Jan 2021 11:32:13 +0000 (16:32 +0500)] 
feat(cli): add --no-uefi option

To be able to turn off UEFI mode, when it's enabled in config.

4 years agochore(github): add CODEOWNERS file
Harald Hoyer [Thu, 14 Jan 2021 09:56:23 +0000 (10:56 +0100)] 
chore(github): add CODEOWNERS file

All CODEOWNERS are automatically added as reviewers.

4 years agochore(cleanup): remove logrotate file
Jóhann B. Guðmundsson [Thu, 14 Jan 2021 11:49:19 +0000 (11:49 +0000)] 
chore(cleanup): remove logrotate file

4 years agofix(35network-manager): avoid restarting NetworkManager
Yang Liu [Mon, 11 Jan 2021 08:50:45 +0000 (03:50 -0500)] 
fix(35network-manager): avoid restarting NetworkManager

On EL8.3 the NetworkManager keep restarting even if it exits successfully while waiting for Clevis to unlock. This patch ensures NetworkManager runs only once in initrd.

4 years agochore: Add configuration for vim
Jóhann B. Guðmundsson [Fri, 25 Dec 2020 16:48:16 +0000 (16:48 +0000)] 
chore: Add configuration for vim

4 years agochore: Add editorconfig
Jóhann B. Guðmundsson [Fri, 25 Dec 2020 16:47:49 +0000 (16:47 +0000)] 
chore: Add editorconfig

4 years agochore: Editors
Jóhann B. Guðmundsson [Fri, 25 Dec 2020 16:46:53 +0000 (16:46 +0000)] 
chore: Editors

4 years agoci: add testing with Fedora 33
Harald Hoyer [Tue, 15 Dec 2020 13:36:11 +0000 (14:36 +0100)] 
ci: add testing with Fedora 33

To test a more recent version of Fedora, add Fedora 33.

4 years agotest(conventional): add Conventional Commits PR github action
Harald Hoyer [Mon, 14 Dec 2020 15:18:02 +0000 (16:18 +0100)] 
test(conventional): add Conventional Commits PR github action

To ease the creation of the release notes, enforce some style on the git
commit message titles with `Commisery`.

https://github.com/marketplace/actions/commisery

Using https://github.com/clog-tool/clog-cli later on these commits will
generate a pretty nice base for the release notes.

4 years agodocs(development): add HACKING.md
Harald Hoyer [Mon, 14 Dec 2020 15:21:30 +0000 (16:21 +0100)] 
docs(development): add HACKING.md

Merge HACKING, README.modules, README.testsuite into HACKING.md.

Provide a new paragraph about git commit messages.

4 years agoUpdate AUTHORS, NEWS 051
Daniel Molkentin [Wed, 5 Aug 2020 15:27:16 +0000 (17:27 +0200)] 
Update AUTHORS, NEWS

4 years agoDrop 51-dracut-rescue-postinst.sh entirely
Adam Williamson [Thu, 26 Nov 2020 19:29:45 +0000 (11:29 -0800)] 
Drop 51-dracut-rescue-postinst.sh entirely

It is only installed on RHEL 8+, but as noted in the first commit
that tried to do this - 0bb9a683 - we already have branches for
all RHEL releases, so there's no point keeping such a conditional
on the master branch. After 0bb9a683, 51-dracut-rescue-postinst.sh
was re-added because Fedora 30 needed it, with a FIXME saying to
remove it after F30 was released. But instead of that happening, it
got changed to a conditional to install it on Fedora <= 30 or RHEL
<= 8 in 9e68789d and the FIXME was removed, then in 9eb1d1ed that
conditional was simplified to only refer to RHEL, so we wound up
with this situation.

Note the last two commits were never ported to the RHEL-8 branch,
so it's broken, I will send a separate PR for that.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
4 years agoRevert "Retrieve service, rpc and protcol entries via getent in hostonly mode"
Daniel Molkentin [Mon, 14 Dec 2020 11:05:06 +0000 (12:05 +0100)] 
Revert "Retrieve service, rpc and protcol entries via getent in hostonly mode"

The underlying issues this was trying to solve is to get a cheap
workaround for the fact that (open)SUSE with atomic support moved
/etc stock files to /usr/etc in order to improve compatibility. But
now that even nsswitch.conf moved, this is no longer enough. And it
might be more trouble to support once it's in an official release.

So let's rather drop it now.

This reverts commit e0524af2bf83184e18d068bea4356a719d2385c2.

4 years agoAdding stalebot file
Jóhann B. Guðmundsson [Mon, 14 Dec 2020 00:04:06 +0000 (00:04 +0000)] 
Adding stalebot file

4 years agoRevert "Add --uefi-output for custom output filename"
Daniel Molkentin [Tue, 1 Dec 2020 23:18:37 +0000 (00:18 +0100)] 
Revert "Add --uefi-output for custom output filename"

This reverts commit f8f3b0f3588273e69b345d6d0602d6d2a1c5a819.

4 years agoImprove documentation of iso-scan/filename feature
Jiri Konecny [Fri, 27 Nov 2020 17:50:35 +0000 (18:50 +0100)] 
Improve documentation of iso-scan/filename feature

From the current man page it's really hard to tell what will be output of this
command.

4 years agomultipathd: fix the comparison
Lukas Nykryn [Fri, 27 Nov 2020 08:32:20 +0000 (09:32 +0100)] 
multipathd: fix the comparison

From shellcheck:
/usr/lib/dracut/modules.d/90multipath/multipathd.sh:3:32: warning[SC2039]: In POSIX sh, == in place of = is undefined.
/usr/lib/dracut/modules.d/90multipath/multipathd.sh:3:32: warning[SC2193]: The arguments to this comparison can never be equal.

4 years ago06dbus: consider dbus-broker
Daniel Molkentin [Tue, 24 Nov 2020 19:46:47 +0000 (20:46 +0100)] 
06dbus: consider dbus-broker

4 years ago06dbus: Add busctl as a more useful tool
Daniel Molkentin [Tue, 24 Nov 2020 19:01:07 +0000 (20:01 +0100)] 
06dbus: Add busctl as a more useful tool

4 years ago06dbus: Include dbus or messagebus group and user, depending on distro
Daniel Molkentin [Tue, 24 Nov 2020 18:59:29 +0000 (19:59 +0100)] 
06dbus: Include dbus or messagebus group and user, depending on distro

4 years ago35network-wicked: openSUSE Factory has reintroduced libexec
Daniel Molkentin [Tue, 24 Nov 2020 18:54:10 +0000 (19:54 +0100)] 
35network-wicked: openSUSE Factory has reintroduced libexec

4 years ago35network-wicked: install ip utility anyway
Daniel Molkentin [Tue, 24 Nov 2020 18:53:36 +0000 (19:53 +0100)] 
35network-wicked: install ip utility anyway

4 years ago35network-wicked: Run wicked early enough to unlock block devices
Daniel Molkentin [Tue, 24 Nov 2020 18:52:23 +0000 (19:52 +0100)] 
35network-wicked: Run wicked early enough to unlock block devices

4 years ago06dbus: Do not install superfluous services
Daniel Molkentin [Tue, 24 Nov 2020 18:42:55 +0000 (19:42 +0100)] 
06dbus: Do not install superfluous services

4 years ago40network: introduce wicked option
Daniel Molkentin [Fri, 21 Aug 2020 16:04:11 +0000 (18:04 +0200)] 
40network: introduce wicked option

4 years ago35network-wicked: introduce wicked support module
Daniel Molkentin [Fri, 21 Aug 2020 16:03:42 +0000 (18:03 +0200)] 
35network-wicked: introduce wicked support module

4 years ago06dbus: introduce dbus support
Daniel Molkentin [Fri, 21 Aug 2020 16:03:09 +0000 (18:03 +0200)] 
06dbus: introduce dbus support

4 years agoAdd --uefi-output for custom output filename
leo-lb [Tue, 8 Sep 2020 11:05:05 +0000 (13:05 +0200)] 
Add --uefi-output for custom output filename

Closes #921

4 years ago95fcoe: don't install if there is no FCoE hostonly devices
Kairui Song [Fri, 13 Nov 2020 10:08:47 +0000 (18:08 +0800)] 
95fcoe: don't install if there is no FCoE hostonly devices

When in hostonly mode, 95fcoe module will still be installed even there
is no FCoE hostonly device. So use the new block_is_fcoe helper to check
for hostonly device in hostonly mode, avoid installing unneccessary module.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago95fcoe: ensure needed modules are installed
Kairui Song [Mon, 16 Nov 2020 07:24:14 +0000 (15:24 +0800)] 
95fcoe: ensure needed modules are installed

If fcoe module is loaded, the initramfs will always try load libfcoe
and bnx2fc, so also ensure they are installed if needed.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agodracut-install: Globbing support for resolving "firmware:"
Daniel Molkentin [Mon, 6 Jul 2020 12:43:34 +0000 (14:43 +0200)] 
dracut-install: Globbing support for resolving "firmware:"

Implements #849

4 years agodracut-bash-completion.sh: add positional argument completion
Gaël PORTAY [Tue, 14 Jul 2020 15:29:53 +0000 (11:29 -0400)] 
dracut-bash-completion.sh: add positional argument completion

4 years agoPrevent creating unexpected files on the host when running dracut
Petr Pavlu [Thu, 17 Sep 2020 14:18:44 +0000 (16:18 +0200)] 
Prevent creating unexpected files on the host when running dracut

Library file modules.d/99base/dracut-lib.sh contains initialization code
that makes sure certain directories and links are created when a system
runs from the produced initramfs. This file is normally sourced only
from initramfs scripts. However, modules.d/99base/module-setup.sh
includes it also when an initramfs image is being created to gain access
to some of the functions in this library. This can result in creating
unexpected directories and links on the current root file system when
the dracut command is executed.

For instance, during a system installation when dracut is invoked to
create an initial initramfs, the target sysroot might not contain
directory /run/initramfs but have /var/log. This situation results in
the code in modules.d/99base/dracut-lib.sh creating an unexpected link
/var/log/log that points to /run/initramfs/log. This link is then also
present on the installed system.

The patch fixes the problem by skipping the described logic in
modules.d/99base/dracut-lib.sh when the PREFIX variable is non-empty
which indicates that a target initramfs is being prepared. The variable
is set by modules.d/99base/module-setup.sh prior to including
dracut-lib.sh.

4 years agoconfigure: Find FTS library with --as-needed
A. Wilcox [Sun, 5 Apr 2020 09:52:19 +0000 (04:52 -0500)] 
configure: Find FTS library with --as-needed

When LDFLAGS contains ``-Wl,--as-needed``, the FTS library will be
ignored if it is specified before the .c source.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Fixes: 62f27ee6f145 ("configure: find cflags and libs for fts on musl")
4 years agoDon't print when a module is explicitly omitted (by default)
Colin Walters [Fri, 16 Oct 2020 21:04:45 +0000 (21:04 +0000)] 
Don't print when a module is explicitly omitted (by default)

dracut builds today are fairly verbose to start, but on top of
that many of the messages tend to liberally use the
exclamation point `!` which calls attention to them.

I see these a lot when looking at rpm-ostree build logs
and it'd be nicer if we were quiet when there wasn't
an actual problem.

In this specific case, if the builder is explicitly adding
`--omit=foo`, there's no reason for us to say:

`dracut: dracut module 'foo' will not be installed, because it's in the list to be omitted!`

We already print the command line to start, so the information
is there.

Demote this message to debug.

4 years ago95nfs: /var/lib/nfs/statd/sm is /var/lib/nfs/sm on SUSE
Daniel Molkentin [Sat, 14 Nov 2020 15:10:55 +0000 (16:10 +0100)] 
95nfs: /var/lib/nfs/statd/sm is /var/lib/nfs/sm on SUSE

Reference: boo#1177462

4 years agoRetrieve service, rpc and protcol entries via getent in hostonly mode
Daniel Molkentin [Fri, 27 Mar 2020 13:22:37 +0000 (14:22 +0100)] 
Retrieve service, rpc and protcol entries via getent in hostonly mode

Sometimes, systems have more elaborate backends in nsswitch.conf,
the complexity of which we do not want in the initrd. SUSE systems
with atomic for instance, where those files may also reside in /usr/etc.

With this change, the unavaiable nsswitch.conf backends will be silently
ignored, and we still end up with all the information we need.

Reference: boo#1165366

4 years agoRemove uses of bash (and bash specific syntax) in runtime scripts
Daniel Molkentin [Mon, 19 Oct 2020 14:23:51 +0000 (16:23 +0200)] 
Remove uses of bash (and bash specific syntax) in runtime scripts

dracutinstall picks up interpreters and includes bash despite
the users' wishes or expectations, as modules should not require
bashisms at runtime.

Fixes #951

4 years ago90crypt: pull in remote-cryptsetup.target enablement
Jonathan Lebon [Thu, 12 Nov 2020 16:27:39 +0000 (11:27 -0500)] 
90crypt: pull in remote-cryptsetup.target enablement

This should've been part of #964. As mentioned there, the
`initrd-cryptsetup.target` approach was reverted in the end, and we went
back to relying in `remote-cryptsetup.target`:

https://github.com/systemd/systemd/pull/17467

So we do need to ship the enablement symlink for it.

4 years ago90multipath: install kpartx's 11-dm-parts.rules
David Tardon [Fri, 13 Nov 2020 09:45:59 +0000 (10:45 +0100)] 
90multipath: install kpartx's 11-dm-parts.rules

This makes /dev/disk/by-uuid links point to the right device.

5 years agoRevert "90crypt: ship initrd-cryptsetup.target"
Jonathan Lebon [Wed, 28 Oct 2020 13:13:34 +0000 (09:13 -0400)] 
Revert "90crypt: ship initrd-cryptsetup.target"

This reverts commit 8f56daa8c3c75b167823286553f223e5b46cd6ab.

The addition of `initrd-cryptsetup.target` was reverted in systemd:
https://github.com/systemd/systemd/pull/17467

5 years ago90qemu-net: install less module for strict hostonly mode
Kairui Song [Tue, 20 Oct 2020 09:52:03 +0000 (17:52 +0800)] 
90qemu-net: install less module for strict hostonly mode

5 years ago90qemu-net: in hostonly mode, only install if network is needed
Kairui Song [Tue, 20 Oct 2020 08:47:41 +0000 (16:47 +0800)] 
90qemu-net: in hostonly mode, only install if network is needed

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago95nfs: Install less module if hostonly mode is strict
Kairui Song [Mon, 19 Oct 2020 14:11:23 +0000 (22:11 +0800)] 
95nfs: Install less module if hostonly mode is strict

For strict hostonly mode, only install currently loaded modules instead
of a bunch of driver that may not be needed.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago90kernel-modules: Install less modules for hostonly mode
Kairui Song [Tue, 20 Oct 2020 09:30:03 +0000 (17:30 +0800)] 
90kernel-modules: Install less modules for hostonly mode

Rearrange some module installation mode, install less modules for
hostonly mode.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago90kernel-modules: install block drivers more strictly
Kairui Song [Tue, 20 Oct 2020 08:44:40 +0000 (16:44 +0800)] 
90kernel-modules: install block drivers more strictly

For strict hostonly mode, only install block drivers needed for hostonly
devices.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago04watchdog-modules: Simplify install_kernel using new added helper
Kairui Song [Mon, 12 Oct 2020 07:28:40 +0000 (15:28 +0800)] 
04watchdog-modules: Simplify install_kernel using new added helper

The new added get_dev_modules helper can help simplify the driver
detection code by a lot.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agodracut-init.sh: Add a helper for detect device kernel modules
Kairui Song [Mon, 12 Oct 2020 07:18:45 +0000 (15:18 +0800)] 
dracut-init.sh: Add a helper for detect device kernel modules

Use udevadm to detect the required kernel modules to load a given
device. udevadm will follow the device chain, help detect all required
parent device drivers as well.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agodracut-functions.sh: Fix check_block_and_slaves_all
Kairui Song [Tue, 13 Oct 2020 08:17:11 +0000 (16:17 +0800)] 
dracut-functions.sh: Fix check_block_and_slaves_all

check_block_and_slaves_all $func $dev should return 0, if $func return 0
for any checked device. Currently if any device don't have any sub
device, 1 is returned instead.

So remove the sub device checking statement. Also remove the same
statement in check_block_and_slaves, the "[[ -f $_x/dev ]]" in the for
loop is enought to ensure sub device exists.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago90kernel-network-modules: Don't install iscsi related module
Kairui Song [Tue, 20 Oct 2020 09:33:08 +0000 (17:33 +0800)] 
90kernel-network-modules: Don't install iscsi related module

These modules are installed in 95iscsi, no need to repeat here.

5 years agoAdd a --hostonly-nics option
Kairui Song [Wed, 21 Oct 2020 08:18:07 +0000 (16:18 +0800)] 
Add a --hostonly-nics option

Currently when network is enabled, dracut will install all network
drivers that are currently loaded, but some time only one NIC is needed
for the initramfs.

So for strict hostonly mode, add a --hostonly-nics option, user can
provide a list of NICs to be enabled, and only needed drivers for
specifed NICs will be installed so save space.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agoConfigure the runner for team interfaces
Rumbaut Thomas [Fri, 23 Oct 2020 10:38:04 +0000 (12:38 +0200)] 
Configure the runner for team interfaces

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

5 years ago99squash: Check require module earlier, and properly
Kairui Song [Mon, 12 Oct 2020 07:23:30 +0000 (15:23 +0800)] 
99squash: Check require module earlier, and properly

Let 99squash fail earlier if required modules are not enabled or
missing, using the new added helper.

Signed-off-by: Kairui Song <kasong@redhat.com>