Commit Graph

6116 Commits (055)

Author SHA1 Message Date
Harald Hoyer 86bf2533d7 docs: update NEWS.md and AUTHORS 2021-05-27 14:34:19 +02:00
Tomasz Paweł Gajc 12beeac741 fix(fs-lib): install fsck utilities 2021-05-27 09:13:04 +02:00
Stefan Berger b12d91c431 fix(integrity): require ALLOW_METADATA_WRITES to come from EVM config file
Upcoming versions of EVM will not require the ALLOW_METADATA_WRITES anymore,
therefore we remove it from the script and require it to be set in the EVM
config file variable EVM_ACTIVATION_BITS for those versions that need it.

Patch 9 in this patch set deprecates the EVM_ALLOW_METADATA_WRITES flag:
https://lore.kernel.org/linux-integrity/20210514152753.982958-1-roberto.sassu@huawei.com/

Suggested-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-05-26 17:11:07 +02:00
Marcos Mello 5eb24aa21d fix(install): configure logging earlier
There are log_error() and log_debug() calls in parse_argv().
2021-05-26 09:22:09 +02:00
Jóhann B. Guðmundsson 7d205598c6 fix(warpclock): minor cleanups
- Removing shell mode lines
- Remove uncessary file requirements
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 14:00:52 +02:00
Jóhann B. Guðmundsson f4ea5f8734 fix(dash): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 11:59:08 +00:00
Jóhann B. Guðmundsson 6c673298f3 fix(mksh): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 11:58:43 +00:00
Marcos Mello 4cb086fa29 feat(install): add default value for --firmwaredirs
If not specified, use /lib/firmware.
2021-05-25 11:48:59 +02:00
Harald Hoyer a277a5fc7a fix(dracut-functions): get_maj_min without get_maj_min_cache_file set
If `get_maj_min_cache_file` is unset `get_maj_min()` would error out.

Fix it to work without a cache file set.
2021-05-21 14:17:07 +02:00
Harald Hoyer 0a6007bf4f fix(dracut): pipe hardlink output to `dinfo`
Otherwise the output is cluttered with:
```
Mode:           real
Files:          1364
Linked:         5 files
Compared:       0 xattrs
Compared:       384 files
Saved:          12.84 KiB
Duration:       0.052674 seconds
```
2021-05-21 14:16:43 +02:00
Marcos Mello c1ab36139d fix(install): sane default --kerneldir
If --kerneldir is not specified, use /lib/modules/$(uname -r).

Fixes #1505
2021-05-20 23:56:40 +00:00
Jóhann B. Guðmundsson 9355cb8ea5 fix(bash): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-19 10:29:34 +00:00
Kairui Song 636d6df313 fix(squash): don't mount the mount points if already mounted
It is possible that user setup some early mount in the rootfs even
earlier, so just be more robust and cover that case too.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-05-19 08:46:34 +00:00
Harald Hoyer fa63c9be13 ci: add shfmt to Fedora containers 2021-05-18 11:33:27 +02:00
Harald Hoyer 148e420be5 fix(base): add missing `str_replace` to `dracut-dev-lib.sh`
```
dracut-dev-lib.sh: line 92: str_replace: command not found
dracut-dev-lib.sh: line 98: /var/tmp/dracut.sabKZg/initramfs/initqueue/finished/devexists-.sh: No such file or directory
dracut-dev-lib.sh: line 83: /var/tmp/dracut.sabKZg/initramfs/emergency/80-.sh: No such file or directory
```
2021-05-18 11:31:16 +02:00
Harald Hoyer 7275c6f6a0 feat(dracut.sh): detect running in a container
Don't try to `mknod` by setting DRACUT_NO_MKNOD.
Don't try to `cp` extended attributrs by setting DRACUT_NO_XATTR.
2021-05-17 16:23:00 +02:00
Harald Hoyer c08bc8109d fix(base): split out `dracut-dev-lib.sh`
To share the `wait_for_dev` function and use it without side effects on
install time, split out the needed functions in an extra library.
2021-05-17 16:22:49 +02:00
Lars Wendler b9b6f0ee5b fix(dracut-util): print error message with trailing newline
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2021-05-14 15:48:32 +00:00
Jóhann B. Guðmundsson f634448b29 fix(packit): downstream has renamed the master branch to main 2021-05-14 15:50:38 +02:00
Harald Hoyer 53337dfdc3 docs: update NEWS.md and AUTHORS 2021-05-14 15:21:11 +02:00
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