Commit Graph

6096 Commits (b2cf61d97ff2de423793bcd187f869c60d74078c)

Author SHA1 Message Date
Harald Hoyer b2cf61d97f ci: run the integration tests on more distributions
Add OpenSuse and Arch Linux to limited tests.

Only run the full tests against the latest stable Fedora version
to reduce the workload.

Also remove the `hung_task_panic=1` on the kernel command line, as qemu
tends to be really slow in non-kvm mode.
2021-05-14 13:08:07 +02:00
Harald Hoyer 12d0213885 ci: create a fedora rawhide container
Remove Fedora 34 for now, as it is fedora:latest
2021-05-14 12:39:40 +02:00
Jóhann B. Guðmundsson fc88af5413 feat(systemd-sysext): introducing the systemd-sysext module
Introducing the systemd-sysext module.
2021-05-14 11:35:34 +02:00
Harald Hoyer 5a04bd2dd3 docs: document testing with containers 2021-05-14 08:35:39 +02:00
Harald Hoyer de0c0872fc fix(dracut): prevent symbolic links containing `//`
Results in `usr/lib64 -> ..//usr/lib` for Arch Linux otherwise.
2021-05-14 08:35:30 +02:00
Harald Hoyer 22d6863ef1 fix(network-manager): cope with distributions not using `libexec` 2021-05-14 08:35:22 +02:00
Harald Hoyer 3ad3b3a40d fix: cope with distributions with `/usr/etc` files 2021-05-14 08:35:09 +02:00
Harald Hoyer 6209edeb5c fix(nbd): assume nbd version >= 3.8
This reduces the quirks.
2021-05-14 08:34:59 +02:00
Harald Hoyer 66b920c651 fix(iscsi): replace sed call with bash internals
This removes a fork/exec and additionally gives more information in debug logs.
2021-05-14 08:34:48 +02:00
Harald Hoyer 8b2afb08ba fix: make testsuite pass on OpenSuse and Arch
This removes some hard assumptions about the file system layout.

It also hardens the tests with network interface renaming rules and
guards.
2021-05-14 08:34:38 +02:00
Harald Hoyer 44fd1c1355 fix(crypt-gpg): cope with different scdaemon location
On Arch things are different for some reason.
2021-05-14 08:34:27 +02:00
Mikhail Novosyolov 5f6be51595 fix(url-lib): fix passing args
Fixes: 8e84fa726 ("fix(url-lib): shellcheck for modules.d/45url-lib")

Behaviour introduced by that commit made the following to be run:
curl "--globoff --location --retry 3 --fail --show-error" http://192.168.1.173:8000/test.ks
instead of:
curl --globoff --location --retry 3 --fail --show-error http://192.168.1.173:8000/test.ks

This broke downloading kickstart file in anaconda-dracut.
2021-05-14 08:33:22 +02:00
Jóhann B. Guðmundsson 61f4564358 fix: adding crc32c for ext3
Noticed that ext3 is still being used in the wild so let's add it to the crc32c list
so downstream does not have to carry a patch for it.
2021-05-14 08:18:40 +02:00
Harald Hoyer 805686930b ci: ensure pigz is installed in the CI containers
pigz speeds up things considerably. Although pigz is already installed
by default, explicitely adding it makes sure, it will not disappear
unnoticed.
2021-05-12 15:48:53 +02:00
Harald Hoyer e0c0791594 ci: add cpio and pigz to arch container 2021-05-12 15:26:07 +02:00
Harald Hoyer d24e67e24d ci: really, really cleanup the arch container 2021-05-12 14:59:42 +02:00
Harald Hoyer 886b04abfe ci: cleanup the arch container 2021-05-12 14:34:31 +02:00
Harald Hoyer c7d8334d26 ci: don't use `rpm` to determine the kernel version
for `/etc/profile.d/dracut-test.sh`
2021-05-12 14:21:00 +02:00
Harald Hoyer 3c67644fe6 ci: build container images and push to ghcr.io 2021-05-12 13:26:06 +02:00
Jóhann B. Guðmundsson 5c94cf41e8 fix: deprecate gummiboot
Gummiboot was merged into systemd and official became systemd-boot in 2015 ( 6 years ago )
and no longer was being maintained as Gummiboot from that point.

It's safe to say distribution should have migrated to sd-boot by now so let's deprecate
it.
2021-05-11 17:13:09 +02:00
Jaroslav Jindrak d1a36d3d80 fix(install): handle $LIB in ldd output parsing
The ldd output can contain the variable $LIB, which is a documented feature of
ldd. In a previous commit [0], dracut-install received support for this
variable, but that was later reverted [1] due to issues [2][3] on Gentoo ARM64.

The part before '=>' does not necessarily refer to an existing file (e.g. due
to the usage of $LIB) and thus [1] could be seen as a regression to anyone
that uses this ldd feature. This PR combines both cases together and whenever
it find a '$' character (i.e. a variable) on the left side of the '=>' symbol,
it uses the right hand path (and thus uses evaluation done by ldd), otherwise
falls back to the behavior set by [1].

Reproducer that was presented to me:

$ grep "ibz.so" /etc/ld.so.preload || cat << EOF >> /etc/ld.so.preload
/\$LIB/libz.so.1.2.11
EOF
$ mkdir -p /var/tmp/dracut.xitk6p/initramfs
$ strace /usr/lib/dracut/dracut-install -D /var/tmp/dracut.xitk6p/initramfs -l /bin/bash 2>&1|grep ibz
$ rm -rf /var/tmp/dracut.xitk6p/

[0] 45404a2
[1] 6d886bb
[2] #471
[3] https://bugs.gentoo.org/667752
2021-05-10 15:55:41 +02:00
Jóhann B. Guðmundsson 3697891b75 feat(systemd-journald): introducing the systemd-journald module 2021-05-06 16:59:38 +02:00
Jóhann B. Guðmundsson 0eca191405 chore(tree): move html files to the dosc directory
Moving the html files into the docs directory.
2021-05-06 16:59:14 +02:00
Jóhann B. Guðmundsson 3420a70dee chore(install): move install to src directory
Moving install to the src directory
2021-05-06 16:25:32 +02:00
Jóhann B. Guðmundsson 215365441e feat(systemd-rfkill): introducing the systemd-rfkill module
Introducing the systemd-rfkill module
2021-05-06 15:50:15 +02:00
Jóhann B. Guðmundsson 563c434ecb feat(systemd-ldconfig): introducing the systemd-ldconfig module
Introducing the systemd-ldconfig module
2021-05-06 15:49:48 +02:00
Jóhann B. Guðmundsson 8849dd8d1a fix: add a missing tmpfilesconfdir global variable
Adding a missing tmpfilesconfdir global variable
2021-05-06 15:49:18 +02:00
Jóhann B. Guðmundsson 2b61be32b8 feat(systemd-tmpfiles): introducing the systemd-tmpfiles module
Introducing the systemd-tmpfiles module
2021-05-06 15:49:18 +02:00
Jóhann B. Guðmundsson 9ffe2e4c4b refactor(systemd-networkd): cosmetic move to 01
Moving systemd-networkd to 01 systemd namespace to keep everything in
order.
2021-05-06 15:48:13 +02:00
Harald Hoyer 6feaaabc22 fix(base): suppress calls to getarg in build phase
Setting `DEBUG_MEM_LEVEL` in the build phase prevents
`setmemdebug()` to call `getargnum`, which would use `dracut-getarg`
in the initrd runtime phase.

No more:

```
modules.d/99base/dracut-lib.sh: line 217: dracut-getarg: command not found
```
2021-05-06 10:39:34 +02:00
Renaud Métrich c3bb9d18dc fix(dracut-functions): implement a cache for get_maj_min
On systems with a large number of devices, usually multipath devices,
dracut can spend a lot of time stat'ing the devices to collect the
major/minor numbers, leading to huge slowness rebuilding the initramfs
when stat'ing devices is slow (seen with oracleasm file systems in
particular).
This commit implements a basic cache stored in a file under
DRACUT_TMPDIR storing the major:minor corresponding to the specified
device.

Reproducer: create N loopback devices used as a LVM extension to volume
group hosting the root file system

  # LVMVG="rhel"
  # NDEVICES=200
  # mkdir devices; for i in $(seq 1 $NDEVICES); do
    truncate -s 10m devices/$i; losetup loop$i devices/$i
  done
  # vgextend $LVMVG $(/bin/ls -1 /dev/loop[0-9]*)

With standard code (tested with RHEL8.3 dracut):

  # dracut -f --debug /tmp/initramfs.img $(uname -r) >/tmp/debug 2>&1
  # grep -c "stat -L -c" /tmp/debug
  2440

With this code:

  # dracut -f --debug /tmp/initramfs.img $(uname -r) >/tmp/debug_optim 2>&1
  # grep -c "stat -L -c" /tmp/debug_optim
  205

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
2021-05-06 09:14:10 +02:00
David Tardon 543b8014fc fix(fips): add dh and ecdh ciphers 2021-05-05 16:24:18 +02:00
Harald Hoyer 909961d048 fix: shellcheck 0.7.2
github action `luizm/action-sh-checker@v0.2.2` uses `shellcheck-0.7.2`,
which detects more non-posix shell code and complains accordingly.
2021-05-05 14:55:30 +02:00
Harald Hoyer 0dc87f7b9e docs: install `which` in Arch container 2021-05-04 18:39:31 +02:00
Mikhail Novosyolov ce9af251af feat: support ZSTD-compressed kernel modules
Modern Linux kernels support zstd-compressed modules, which was added
by commit 73f3d1b48f50 ("lib: Add zstd modules").

Commit c3d7ef377eb ("kbuild: add support for zstd compressed modules")
added support of compressing modules with zstd to kernel Makefiles.

libkmod >= 28 built with libzstd is also required.
2021-05-04 15:55:19 +00:00
Harald Hoyer 4a76c187d0 docs: document how to run the test suite in podman on Fedora and Arch 2021-05-04 16:34:10 +02:00
Harald Hoyer 373eadaa9c style: make indent and let shfmt fail again
The bump of removed the `-d` option for `shfmt`. Readd it until upstream
is fixed.

See also:
https://github.com/luizm/action-sh-checker/issues/44
2021-05-04 15:39:55 +02:00
Jóhann B. Guðmundsson 0620677238 chore(tree): move package build files in their own directory
Creating pkgbuild directory and move relevant files there.
2021-05-04 15:39:34 +02:00
Harald Hoyer 82e780af25 test(NFS): let it run in an Arch container
`dhclient` on Arch does not understand the `--timeout` parameter.

`/etc/virc` does not need to be installed in tests. This is a debugging
leftover.
2021-05-04 13:47:03 +02:00
Harald Hoyer 7f63374713 fix: include `modules.builtin.alias` in the initramfs
Let's also resolve the compiled in aliases to builtin modules.
2021-05-04 13:34:16 +02:00
Harald Hoyer ece67c7e2d test(FULL SYSTEMD): try pacman rather than rpm on Arch
If there is no `rpm`, try `pacman` to get a full list of systemd files
to install into the real test root.
2021-05-04 13:23:56 +02:00
Harald Hoyer 50a01dd4b2 fix: install all depmod relevant configuration files
This is important for running `depmod` in the initrd.
2021-05-04 13:15:49 +02:00
Harald Hoyer 87c4c17850 fix: add `modules.builtin.modinfo` to the initramfs
This solves all issues, where builtin kernel modules are not recognized
as such.

Fixes: https://github.com/dracutdevs/dracut/issues/1146
Fixes: https://github.com/dracutdevs/dracut/issues/1099
2021-05-04 11:45:53 +02:00
Harald Hoyer 10f9e569c5 fix(crypt): install all crypto modules in the generic initrd
Just install all `=crypto` drivers in the generic initramfs, because who
are we to decide which combinations are allowed in current and future
`cryptsetup`. We only could install blacklist filter in the future, if
there are modules, which are definetely not used and are huge in size.
2021-05-04 11:25:55 +02:00
Harald Hoyer 33e27fab59 feat: also restore the initramfs from /lib/modules
Fallback to /lib/modules/$(uname -r)/initrd, if present and all other
files don't exist.
2021-05-04 11:25:32 +02:00
Harald Hoyer 625f11dca7 chore: skip rpmbuild, if there is no rpmbuild installed
On non-rpm distributions this does not make sense.
2021-05-04 10:39:41 +02:00
Harald Hoyer 44ca04c843 chore: fix indent-c path for src directory 2021-05-04 10:39:28 +02:00
Harald Hoyer 060e1f192e test: use `uname -m` to determine qemu-system
E.g. `uname -i` does not work in Arch Linux containers.
2021-05-04 10:14:08 +02:00
Jóhann B. Guðmundsson 7359ba8aca fix(systemd-sysusers): misc fixes and cleanup
- module-setup.sh file permission corrected
- comment section cleaned up
- removal of dependency on systemd module
- added inclution of the unit into the sysinit target
- removal of systemctl enablement of type unit
2021-05-04 10:05:25 +02:00
Jóhann B. Guðmundsson 9f9bf8a178 chore(tree): move src into their own src directory
Moving sources into their src directory
2021-05-04 10:02:04 +02:00