Commit Graph

5653 Commits (b56448ba09ab971a8ee698da41e9002b6a5cc72a)

Author SHA1 Message Date
Harald Hoyer b56448ba09 docs: fix CI badges in README 2021-02-10 14:39:11 +01:00
Harald Hoyer 1ebf454884 fix: correct the squash quirk
Previously with `no_kernel` the `for` loop errored on the modules
wildcard. By checking, if the file exists, this is mitigated.

"mv" asked interactively, if aliased in the user session, so a "--force"
was added.
2021-02-10 14:14:39 +01:00
Jóhann B. Guðmundsson fdbe7f9fbf feat(systemd-modules-load): introducing systemd-modules-load module
Introducing systemd-modules-load which is an early boot service
that loads kernel modules from a static list, which is required for
kernel modules that do for example not support automatic module loading
( like key type parsers ).
2021-02-10 13:13:18 +00:00
Petr Pavlu 38ef319390 fix(shutdown): add timeout to umount calls
When terminating a system, the shutdown module attempts to unmount all
file systems from under /oldroot. This reaps remaining file systems that
systemd cannot unmount and detaches /oldroot itself.

In case that running umount for some file system repeatedly fails, the
module reports this error and continues the processing in order to
shutdown the system. This handles a condition when the umount command
actually terminates but it can happen in some cases that it waits
indefinitely.

An example with NFS mounts:
# mount -t nfs 192.168.0.1:/srv/nfs/dir /mnt/nfs
# mkdir /mnt/nfs/dir2
# mount -t nfs 192.168.0.1:/srv/nfs/dir2 /mnt/nfs/dir2
# touch /mnt/nfs/dir2/file
# systemd-run -pKillMode=none -pSendSIGKILL=no tail -f /mnt/nfs/dir2/file
Running as unit: run-r367825c967ca4d88a793ae4793c02f8b.service
# systemctl poweroff

The invoked tail command escapes normal termination by systemd and
prevents stopping mnt-nfs.mount and mnt-nfs-dir2.mount as it makes the
mounts busy. Systemd then again attempts to unmount these file systems
in systemd-shutdown but this fails as well. The utility tries to unmount
/mnt/nfs/dir2 but the kernel waits indefinitely doing a path lookup for
/mnt/nfs because network is no longer available at that point. The
systemd-shutdown gives up after 90 seconds. Finally, the control is
transferred to dracut which tries to unmount the file systems in the
same way and ends up indefinitely waiting on umount to finish.

This situation causes that the system hangs during shutdown. The patch
improves the shutdown module to add a timeout of 90 seconds for the
umount operation and continue with the shutdown if it gets reached,
similarly to what systemd-shutdown does.
2021-02-10 14:06:37 +01:00
Harald Hoyer 45907c1d4d ci: disable tests with NFS kernel crashes
Tests 50, 51, 60, 61 all suffer from kernel crashes in the kernel nfsd.

Until this is resolved, disable these tests.
2021-02-10 13:56:40 +01:00
Harald Hoyer 35bd0b4ac1 ci: only bind /dev/kvm into the container
dracut is only interested to use `/dev/kvm` if available.
2021-02-10 13:56:40 +01:00
Harald Hoyer a6faf453a8 ci: reduce CI workload
Only run `fedora-latest` and `fedora-32` on actual merge.
2021-02-10 13:56:40 +01:00
Harald Hoyer 16efdfa25c fix: revise all module checks
1. no module checks for modules which are in depends()
2. no `derror` for optional (255) modules checking for dependencies
3. fix dbus meta module
2021-02-10 13:29:17 +01:00
Harald Hoyer 1914a2eba1 fix: add missing line continuation 2021-02-10 12:05:24 +01:00
Daniel Molkentin 786ca932e8 fix: BuildRequiring git-core is enough in dracut.spec 2021-02-10 11:12:02 +01:00
Nicolas Saenz Julienne b28e4b20f0 fix(kernel-modules): add reset controllers for arm
Reset controllers might be needed by some of the devices used in the
initrd. Particularly on the Raspberry Pi 4, 'xhci-pci' depends on a
platform specific reset controller.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
2021-02-09 20:35:11 +00:00
David Tardon c46ed697a2 35network-legacy: discard pointless RTNETLINK message
This command prints

    RTNETLINK answers: Network is unreachable

to stderr if IP is not assigned yet, but that's the thing we are
checking for, so there's no point in showing the message.
2021-02-09 21:04:23 +01:00
Zoltán Böszörményi fa06924239 fix(plymouth): install binaries with dependencies
If plymouth is used then its own installation script is preferred.
While plymouth's own variant of inst_binary resolves the library
dependencies properly, its inst_library shell function doesn't
actually install them in some cases properly.

Make sure to install both the required binaries and their
dependencies. In the worst case, it's a NOP.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 18:17:12 +01:00
Harald Hoyer d1c8083b3a fix: correct the line continuation
Comments will break bash line continuation.
Also added some missing line continuation here and there.
2021-02-09 15:33:34 +01:00
Zoltán Böszörményi 702e7e83ed fix(dbus-daemon): use uid/gid from sysroot is dracutsysrootdir is set
Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi 767fbf81b6 fix(network-manager): allow override network manager version
With dracutsysrootdir set and foreign binaries in sysroot,
running NetworkManager --version is not possible and it may be
different than the one installed on the host.
NM_VERSION can be used to override it.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi 18d36fabf5 feat(dracut.sh): allow overriding the systemctl command for sysroot
Allow overriding the systemctl command for sysroot with $SYSTEMCTL
Modified every modules' module-setup.sh to use the envvar instead
of the hardcoded command name.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi 433a9ec014 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>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi bbe1434fca 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>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi 03d132a76c fix: quote globbing in module-setup.sh for inst_multiple
Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi ddcdee9147 fix(dracut-install): allow globbing for multiple sources
Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
foopub c409108b04 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
2021-02-08 23:12:15 +01:00
Alexander Tsoy 6eff0ebcf8 fix: move ldconfig after library workaround
Commit de3cb0e321 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.
2021-02-08 22:44:32 +01:00
Nicolas Chauvet 07c671cc51 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>
2021-02-08 21:15:48 +00:00
Jóhann B. Guðmundsson c3446a7ce0 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
2021-02-08 20:32:16 +00:00
Jóhann B. Guðmundsson 7135c81931 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
2021-02-08 20:18:25 +01:00
Jóhann B. Guðmundsson 38cd8125f6 feat(dbus-broker): introducing the dbus-broker module
Introducing the dbus-broker module.
2021-02-08 20:18:25 +01:00
Jóhann B. Guðmundsson 791f392ca6 feat(dbus): introducing a meta module for dbus
We require a meta module to handle multiple modules
2021-02-08 20:18:25 +01:00
Harald Hoyer 6032ade3cc 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
```
2021-02-08 17:18:02 +01:00
Harald Hoyer 0ce79d4c72 ci: mount host /dev into container
might pickup /dev/kvm if we are lucky?
2021-02-08 16:07:37 +01:00
Harald Hoyer 860b64b92d ci: remove `--privileged` option from docker containers
This option should not be needed anymore with "mount -o loop" removed.
2021-02-08 16:07:37 +01:00
Harald Hoyer 0f62da0405 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'
```
2021-02-08 16:07:37 +01:00
Harald Hoyer 1211d6a3fb 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
2021-02-08 16:07:37 +01:00
Harald Hoyer 457e7b7a4a 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
2021-02-08 14:17:13 +01:00
Kairui Song e918f337b6 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.
2021-02-08 12:20:48 +01:00
Matthew Thode 8a2edb1e4d 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>
2021-02-08 10:37:22 +01:00
Anjali Kulkarni 4026cd3b01 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>
2021-02-05 11:11:22 +01:00
Mariusz Tkaczyk 30e49d5175 fix(mdraid): remove offroot
offroot is deprecated and can be safety removed.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
2021-02-05 10:59:50 +01:00
Mariusz Tkaczyk 29e269a522 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>
2021-02-05 10:59:50 +01:00
Lukas Nykryn 62d52ad2be fix(spec): add new systemd-coredump module to spec 2021-02-04 13:19:09 +01:00
Peter Levine c35cbd2e56 fix(watchdog): replace return with echo 2021-02-03 12:23:57 +00:00
Jóhann B. Guðmundsson 939b7e11d5 feat(systemd-coredump): introducing systemd-coredump module
This pull request introduces systemd-coredump as a seperated
module and adds the systemdutilconfdir global variable.
2021-02-02 18:01:06 +00:00
Harald Hoyer 9553a679f6 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>
2021-01-27 16:58:58 +01:00
Harald Hoyer 1149ed2a3e test: incr. disk size for TEST 35 ISCSI-MULTI 2021-01-27 13:15:37 +01:00
realtime-neil 68dd8af21d fix(skipcpio): edit skipcpio.c: strstr -> memmem
because CPIO_END might follow a NULL byte in buf
2021-01-26 21:06:15 +00:00
Jóhann B. Guðmundsson bf1a2262ea fix(1007): adding shared keyring mode to type unit
Fixes: https://github.com/dracutdevs/dracut/issues/1007
2021-01-26 18:05:18 +00:00
Harald Hoyer be30c816d4 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
2021-01-26 17:57:25 +01:00
Jóhann B. Guðmundsson a2472e6e60 feat(systemd-sysusers): introducing systemd-sysuser module 2021-01-26 00:00:28 +00:00
Jóhann B. Guðmundsson 24ea839079 feat(systemd-sysusers): introducing systemd-sysuser module 2021-01-26 00:00:28 +00:00
Daniel Molkentin f824f52675 fix(1001): use efivars fs over the deprecated sysfs entries
sysfs efi vars has been dropped for non-x86 systems since kernel 5.10.
2021-01-25 14:58:11 +00:00