]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
4 years agofix(dracut.sh): handle symlinks appropriately while using '-i' option
Kairui Song [Fri, 11 Jun 2021 18:25:09 +0000 (02:25 +0800)] 
fix(dracut.sh): handle symlinks appropriately while using '-i' option

[[ -d $symlink ]] will return true if the symlink points to a directory.
So the symlink will not be copied, instead a directory is created with
the symlink name and the content is copied.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agofix(dracut.sh): handle '-i' option to include files beginning with '.'
Hari Bathini [Fri, 11 Jun 2021 09:50:28 +0000 (15:20 +0530)] 
fix(dracut.sh): handle '-i' option to include files beginning with '.'

While including a directory using '--include' option, the file and
subdirectory names that begin with '.' are not included. Also, dracut
throws a warning message when a subdirectory is empty or only has
files or subdirectories that begin with '.'.

For example, while trying to include /tmpdata directory with the
below tree:

  # tree -a /tmpdata
  /tmpdata
  ├── .anothertestdir
  ├── testdir
  │   └── .testsubdir
  └── .testfile

dracut throws the below warning message:

  # dracut --include /tmpdata /root
  cp: cannot stat '/tmpdata/testdir/*': No such file or directory
  #

and this is how the included /tmpdata directory tree looks:

  # tree -a root
  root
  └── testdir

No file or directory beginning with '.' is included & also, copying
/tmpdata/testdir reported "No such file or directory" warning. Using
'.' instead of '*' in the below command will fix the warning whether
the directory being copied is empty or only has files or directories
that begin with dot:

  $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/*

Also, enable 'dotglob' temporarily to include files and directories
beginning with a `.' in the results of pathname expansion of source
directory being included.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
4 years agofix(network-manager): support teaming under NM+systemd
Dusty Mabe [Thu, 24 Jun 2021 18:41:08 +0000 (14:41 -0400)] 
fix(network-manager): support teaming under NM+systemd

Previously when NM was run without dbus then teaming would come
up appropriately [1], but now that dbus exists we also need to
include some supporting infrastructure to allow for it to work
again.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/d689380cfc5734a29b1302d68027190e1a606265

4 years agofix(squash): create relative symlinks
Kairui Song [Thu, 10 Jun 2021 08:45:03 +0000 (16:45 +0800)] 
fix(squash): create relative symlinks

Don't use absolute path, or it may resolve to wrong files after unpack
the initramfs to a sub path on a running system.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agofix(fips): handle s390x OSTree systems
Jonathan Lebon [Thu, 17 Jun 2021 14:47:33 +0000 (10:47 -0400)] 
fix(fips): handle s390x OSTree systems

On s390x, the `BOOT_IMAGE` karg injected by the bootloader is not a path
to the kernel image, but rather an integer describing the index of the
menu entry selected. Because of the way the s390x bootloader works,
there is no information retained about e.g. the path of the kernel that
was loaded.

This causes issues for the FIPS code which assumes that `BOOT_IMAGE` is
a path to the kernel image to derive the HMAC path. In non-OSTree
systems, this ends up working anyway, because the kernel is located at
the root of the boot partition.  In OSTree systems, this is not the
case. However, OSTree systems use BLS configs, and they are named in
reverse order of precedence (i.e. menu ordering). So from the
`BOOT_IMAGE` integer, we can figure out which BLS entry was selected.

Add some code to do just this on s390x. This isn't completely foolproof,
because it presumes that (1) BLS configs were used to populate the
bootloader (and that they were exactly in the same state they currently
are when `zipl` was run), and (2) there are no other menu entries
originating from outside the BLS configs. However, if these assumptions
are wrong we would simply fail the boot, which is currently what is
happening anyway.

See also:
https://github.com/openshift/os/pull/546
https://github.com/ibm-s390-linux/s390-tools/issues/78

Tested-by: Muhammad Adeel <muhammad.adeel@ibm.com>
4 years agofix(multipath): get config. dir from configuration
David Tardon [Tue, 1 Jun 2021 13:06:01 +0000 (15:06 +0200)] 
fix(multipath): get config. dir from configuration

4 years agofix(install): add a missing ret value assignment
Frantisek Sumsal [Fri, 18 Jun 2021 12:35:04 +0000 (14:35 +0200)] 
fix(install): add a missing ret value assignment

Spotted when reconfiguring LGTM for RHEL 9 dracut repo.

4 years agofix(network-manager): pull in network.target in nm-initrd.service
Dusty Mabe [Fri, 25 Jun 2021 19:27:37 +0000 (15:27 -0400)] 
fix(network-manager): pull in network.target in nm-initrd.service

Otherwise units with `After=network.target` won't have any effect.

4 years agofeat(squash): install umount util
Kairui Song [Tue, 22 Jun 2021 13:49:20 +0000 (21:49 +0800)] 
feat(squash): install umount util

Also install umount binary, make it possible to cleanup squash overlay
mounts. This is useful for other tools reusing the dracut initramfs built
with squash module enabled.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agofix(tpm2-tss): typo in depends()
Matthias Berndt [Tue, 1 Jun 2021 17:32:48 +0000 (19:32 +0200)] 
fix(tpm2-tss): typo in depends()

There is no systemd-udev module, only systemd-udevd

4 years agofix(crypt): remove quotes from cryptsetupopts
lapseofreason [Tue, 8 Jun 2021 14:01:58 +0000 (16:01 +0200)] 
fix(crypt): remove quotes from cryptsetupopts

Fixes #1528.

4 years agodocs: update NEWS.md and AUTHORS 055
Harald Hoyer [Thu, 27 May 2021 12:12:40 +0000 (14:12 +0200)] 
docs: update NEWS.md and AUTHORS

4 years agofix(fs-lib): install fsck utilities
Tomasz Paweł Gajc [Sat, 22 May 2021 10:01:19 +0000 (12:01 +0200)] 
fix(fs-lib): install fsck utilities

4 years agofix(integrity): require ALLOW_METADATA_WRITES to come from EVM config file
Stefan Berger [Wed, 12 May 2021 13:26:11 +0000 (09:26 -0400)] 
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>
4 years agofix(install): configure logging earlier
Marcos Mello [Mon, 24 May 2021 19:16:03 +0000 (16:16 -0300)] 
fix(install): configure logging earlier

There are log_error() and log_debug() calls in parse_argv().

4 years agofix(warpclock): minor cleanups
Jóhann B. Guðmundsson [Tue, 18 May 2021 10:34:46 +0000 (10:34 +0000)] 
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

4 years agofix(dash): minor cleanups
Jóhann B. Guðmundsson [Tue, 18 May 2021 13:19:28 +0000 (13:19 +0000)] 
fix(dash): minor cleanups

- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section

4 years agofix(mksh): minor cleanups
Jóhann B. Guðmundsson [Tue, 18 May 2021 14:14:11 +0000 (14:14 +0000)] 
fix(mksh): minor cleanups

- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section

4 years agofeat(install): add default value for --firmwaredirs
Marcos Mello [Mon, 24 May 2021 00:04:20 +0000 (21:04 -0300)] 
feat(install): add default value for --firmwaredirs

If not specified, use /lib/firmware.

4 years agofix(dracut-functions): get_maj_min without get_maj_min_cache_file set
Harald Hoyer [Fri, 21 May 2021 10:19:32 +0000 (12:19 +0200)] 
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.

4 years agofix(dracut): pipe hardlink output to `dinfo`
Harald Hoyer [Fri, 21 May 2021 09:30:47 +0000 (11:30 +0200)] 
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
```

4 years agofix(install): sane default --kerneldir
Marcos Mello [Thu, 20 May 2021 18:41:26 +0000 (15:41 -0300)] 
fix(install): sane default --kerneldir

If --kerneldir is not specified, use /lib/modules/$(uname -r).

Fixes #1505

4 years agofix(bash): minor cleanups
Jóhann B. Guðmundsson [Tue, 18 May 2021 12:39:34 +0000 (12:39 +0000)] 
fix(bash): minor cleanups

- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section

4 years agofix(squash): don't mount the mount points if already mounted
Kairui Song [Tue, 6 Apr 2021 18:11:41 +0000 (02:11 +0800)] 
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>
4 years agoci: add shfmt to Fedora containers
Harald Hoyer [Mon, 17 May 2021 11:07:09 +0000 (13:07 +0200)] 
ci: add shfmt to Fedora containers

4 years agofix(base): add missing `str_replace` to `dracut-dev-lib.sh`
Harald Hoyer [Tue, 18 May 2021 08:13:56 +0000 (10:13 +0200)] 
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
```

4 years agofeat(dracut.sh): detect running in a container
Harald Hoyer [Mon, 17 May 2021 12:22:10 +0000 (14:22 +0200)] 
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.

4 years agofix(base): split out `dracut-dev-lib.sh`
Harald Hoyer [Mon, 17 May 2021 09:00:22 +0000 (11:00 +0200)] 
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.

4 years agofix(dracut-util): print error message with trailing newline
Lars Wendler [Fri, 14 May 2021 14:00:27 +0000 (16:00 +0200)] 
fix(dracut-util): print error message with trailing newline

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
4 years agofix(packit): downstream has renamed the master branch to main
Jóhann B. Guðmundsson [Fri, 14 May 2021 13:46:23 +0000 (13:46 +0000)] 
fix(packit): downstream has renamed the master branch to main

4 years agodocs: update NEWS.md and AUTHORS 054
Harald Hoyer [Fri, 14 May 2021 12:10:36 +0000 (14:10 +0200)] 
docs: update NEWS.md and AUTHORS

4 years agoci: run the integration tests on more distributions
Harald Hoyer [Wed, 12 May 2021 11:40:53 +0000 (13:40 +0200)] 
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.

4 years agoci: create a fedora rawhide container
Harald Hoyer [Fri, 14 May 2021 10:33:41 +0000 (12:33 +0200)] 
ci: create a fedora rawhide container

Remove Fedora 34 for now, as it is fedora:latest

4 years agofeat(systemd-sysext): introducing the systemd-sysext module
Jóhann B. Guðmundsson [Wed, 12 May 2021 10:25:48 +0000 (10:25 +0000)] 
feat(systemd-sysext): introducing the systemd-sysext module

Introducing the systemd-sysext module.

4 years agodocs: document testing with containers
Harald Hoyer [Wed, 12 May 2021 13:09:08 +0000 (15:09 +0200)] 
docs: document testing with containers

4 years agofix(dracut): prevent symbolic links containing `//`
Harald Hoyer [Wed, 12 May 2021 13:09:35 +0000 (15:09 +0200)] 
fix(dracut): prevent symbolic links containing `//`

Results in `usr/lib64 -> ..//usr/lib` for Arch Linux otherwise.

4 years agofix(network-manager): cope with distributions not using `libexec`
Harald Hoyer [Wed, 12 May 2021 13:10:30 +0000 (15:10 +0200)] 
fix(network-manager): cope with distributions not using `libexec`

4 years agofix: cope with distributions with `/usr/etc` files
Harald Hoyer [Wed, 12 May 2021 13:11:55 +0000 (15:11 +0200)] 
fix: cope with distributions with `/usr/etc` files

4 years agofix(nbd): assume nbd version >= 3.8
Harald Hoyer [Wed, 12 May 2021 13:12:54 +0000 (15:12 +0200)] 
fix(nbd): assume nbd version >= 3.8

This reduces the quirks.

4 years agofix(iscsi): replace sed call with bash internals
Harald Hoyer [Wed, 12 May 2021 13:13:52 +0000 (15:13 +0200)] 
fix(iscsi): replace sed call with bash internals

This removes a fork/exec and additionally gives more information in debug logs.

4 years agofix: make testsuite pass on OpenSuse and Arch
Harald Hoyer [Fri, 7 May 2021 07:58:28 +0000 (09:58 +0200)] 
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.

4 years agofix(crypt-gpg): cope with different scdaemon location
Harald Hoyer [Wed, 12 May 2021 14:48:52 +0000 (16:48 +0200)] 
fix(crypt-gpg): cope with different scdaemon location

On Arch things are different for some reason.

4 years agofix(url-lib): fix passing args
Mikhail Novosyolov [Wed, 12 May 2021 15:16:01 +0000 (18:16 +0300)] 
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.

4 years agofix: adding crc32c for ext3
Jóhann B. Guðmundsson [Wed, 12 May 2021 18:49:28 +0000 (18:49 +0000)] 
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.

4 years agoci: ensure pigz is installed in the CI containers
Harald Hoyer [Wed, 12 May 2021 13:46:39 +0000 (15:46 +0200)] 
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.

4 years agoci: add cpio and pigz to arch container
Harald Hoyer [Wed, 12 May 2021 13:24:48 +0000 (15:24 +0200)] 
ci: add cpio and pigz to arch container

4 years agoci: really, really cleanup the arch container
Harald Hoyer [Wed, 12 May 2021 12:43:01 +0000 (14:43 +0200)] 
ci: really, really cleanup the arch container

4 years agoci: cleanup the arch container
Harald Hoyer [Wed, 12 May 2021 12:33:03 +0000 (14:33 +0200)] 
ci: cleanup the arch container

4 years agoci: don't use `rpm` to determine the kernel version
Harald Hoyer [Wed, 12 May 2021 12:19:58 +0000 (14:19 +0200)] 
ci: don't use `rpm` to determine the kernel version

for `/etc/profile.d/dracut-test.sh`

4 years agoci: build container images and push to ghcr.io
Harald Hoyer [Wed, 12 May 2021 08:09:29 +0000 (10:09 +0200)] 
ci: build container images and push to ghcr.io

4 years agofix: deprecate gummiboot
Jóhann B. Guðmundsson [Mon, 10 May 2021 16:45:40 +0000 (16:45 +0000)] 
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.

4 years agofix(install): handle $LIB in ldd output parsing
Jaroslav Jindrak [Fri, 7 May 2021 13:11:55 +0000 (15:11 +0200)] 
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

4 years agofeat(systemd-journald): introducing the systemd-journald module
Jóhann B. Guðmundsson [Thu, 6 May 2021 13:54:04 +0000 (13:54 +0000)] 
feat(systemd-journald): introducing the systemd-journald module

4 years agochore(tree): move html files to the dosc directory
Jóhann B. Guðmundsson [Tue, 4 May 2021 14:14:18 +0000 (14:14 +0000)] 
chore(tree): move html files to the dosc directory

Moving the html files into the docs directory.

4 years agochore(install): move install to src directory
Jóhann B. Guðmundsson [Thu, 6 May 2021 13:29:19 +0000 (13:29 +0000)] 
chore(install): move install to src directory

Moving install to the src directory

4 years agofeat(systemd-rfkill): introducing the systemd-rfkill module
Jóhann B. Guðmundsson [Wed, 5 May 2021 19:00:38 +0000 (19:00 +0000)] 
feat(systemd-rfkill): introducing the systemd-rfkill module

Introducing the systemd-rfkill module

4 years agofeat(systemd-ldconfig): introducing the systemd-ldconfig module
Jóhann B. Guðmundsson [Wed, 5 May 2021 16:06:36 +0000 (16:06 +0000)] 
feat(systemd-ldconfig): introducing the systemd-ldconfig module

Introducing the systemd-ldconfig module

4 years agofix: add a missing tmpfilesconfdir global variable
Jóhann B. Guðmundsson [Wed, 5 May 2021 09:41:02 +0000 (09:41 +0000)] 
fix: add a missing tmpfilesconfdir global variable

Adding a missing tmpfilesconfdir global variable

4 years agofeat(systemd-tmpfiles): introducing the systemd-tmpfiles module
Jóhann B. Guðmundsson [Wed, 5 May 2021 09:26:26 +0000 (09:26 +0000)] 
feat(systemd-tmpfiles): introducing the systemd-tmpfiles module

Introducing the systemd-tmpfiles module

4 years agorefactor(systemd-networkd): cosmetic move to 01
Jóhann B. Guðmundsson [Thu, 6 May 2021 11:49:29 +0000 (11:49 +0000)] 
refactor(systemd-networkd): cosmetic move to 01

Moving systemd-networkd to 01 systemd namespace to keep everything in
order.

4 years agofix(base): suppress calls to getarg in build phase
Harald Hoyer [Thu, 6 May 2021 07:10:54 +0000 (09:10 +0200)] 
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
```

4 years agofix(dracut-functions): implement a cache for get_maj_min
Renaud Métrich [Wed, 5 May 2021 13:46:08 +0000 (15:46 +0200)] 
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>
4 years agofix(fips): add dh and ecdh ciphers
David Tardon [Wed, 5 May 2021 14:05:17 +0000 (16:05 +0200)] 
fix(fips): add dh and ecdh ciphers

4 years agofix: shellcheck 0.7.2
Harald Hoyer [Tue, 4 May 2021 14:36:22 +0000 (16:36 +0200)] 
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.

4 years agodocs: install `which` in Arch container
Harald Hoyer [Tue, 4 May 2021 14:57:35 +0000 (16:57 +0200)] 
docs: install `which` in Arch container

4 years agofeat: support ZSTD-compressed kernel modules
Mikhail Novosyolov [Tue, 4 May 2021 09:28:46 +0000 (12:28 +0300)] 
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.

4 years agodocs: document how to run the test suite in podman on Fedora and Arch
Harald Hoyer [Tue, 4 May 2021 12:44:39 +0000 (14:44 +0200)] 
docs: document how to run the test suite in podman on Fedora and Arch

4 years agostyle: make indent and let shfmt fail again
Harald Hoyer [Tue, 4 May 2021 11:02:09 +0000 (13:02 +0200)] 
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

4 years agochore(tree): move package build files in their own directory
Jóhann B. Guðmundsson [Tue, 4 May 2021 12:22:52 +0000 (12:22 +0000)] 
chore(tree): move package build files in their own directory

Creating pkgbuild directory and move relevant files there.

4 years agotest(NFS): let it run in an Arch container
Harald Hoyer [Tue, 4 May 2021 10:58:34 +0000 (12:58 +0200)] 
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.

4 years agofix: include `modules.builtin.alias` in the initramfs
Harald Hoyer [Tue, 4 May 2021 10:53:42 +0000 (12:53 +0200)] 
fix: include `modules.builtin.alias` in the initramfs

Let's also resolve the compiled in aliases to builtin modules.

4 years agotest(FULL SYSTEMD): try pacman rather than rpm on Arch
Harald Hoyer [Tue, 4 May 2021 09:49:34 +0000 (11:49 +0200)] 
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.

4 years agofix: install all depmod relevant configuration files
Harald Hoyer [Tue, 4 May 2021 09:42:46 +0000 (11:42 +0200)] 
fix: install all depmod relevant configuration files

This is important for running `depmod` in the initrd.

4 years agofix: add `modules.builtin.modinfo` to the initramfs
Harald Hoyer [Tue, 4 May 2021 09:17:55 +0000 (11:17 +0200)] 
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
4 years agofix(crypt): install all crypto modules in the generic initrd
Harald Hoyer [Tue, 4 May 2021 08:40:23 +0000 (10:40 +0200)] 
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.

4 years agofeat: also restore the initramfs from /lib/modules
Harald Hoyer [Tue, 4 May 2021 08:36:44 +0000 (10:36 +0200)] 
feat: also restore the initramfs from /lib/modules

Fallback to /lib/modules/$(uname -r)/initrd, if present and all other
files don't exist.

4 years agochore: skip rpmbuild, if there is no rpmbuild installed
Harald Hoyer [Tue, 4 May 2021 08:23:36 +0000 (10:23 +0200)] 
chore: skip rpmbuild, if there is no rpmbuild installed

On non-rpm distributions this does not make sense.

4 years agochore: fix indent-c path for src directory
Harald Hoyer [Tue, 4 May 2021 08:21:56 +0000 (10:21 +0200)] 
chore: fix indent-c path for src directory

4 years agotest: use `uname -m` to determine qemu-system
Harald Hoyer [Tue, 4 May 2021 07:35:42 +0000 (09:35 +0200)] 
test: use `uname -m` to determine qemu-system

E.g. `uname -i` does not work in Arch Linux containers.

4 years agofix(systemd-sysusers): misc fixes and cleanup
Jóhann B. Guðmundsson [Sat, 1 May 2021 02:41:08 +0000 (02:41 +0000)] 
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

4 years agochore(tree): move src into their own src directory
Jóhann B. Guðmundsson [Mon, 3 May 2021 17:14:26 +0000 (17:14 +0000)] 
chore(tree): move src into their own src directory

Moving sources into their src directory

4 years agochore(tree): move tools into their own directory
Jóhann B. Guðmundsson [Mon, 3 May 2021 15:20:36 +0000 (15:20 +0000)] 
chore(tree): move tools into their own directory

Moving tools into their own directory

4 years agochore(tree): move docs into the docs directory
Jóhann B. Guðmundsson [Mon, 3 May 2021 18:12:50 +0000 (18:12 +0000)] 
chore(tree): move docs into the docs directory

Consolidating all the projects documentation into the docs
directory with the exception of news and readme.

4 years agochore(tree): move kernel install files into its own directory
Jóhann B. Guðmundsson [Mon, 3 May 2021 14:33:10 +0000 (14:33 +0000)] 
chore(tree): move kernel install files into its own directory

Move kernel install files into it's own directory within the tree.

4 years agochore(tree): move man pages into a man directory
Jóhann B. Guðmundsson [Mon, 3 May 2021 13:56:55 +0000 (13:56 +0000)] 
chore(tree): move man pages into a man directory

Moving man pages into it's own man directory within the tree

4 years agochore(tree): move shell completion into a directory
Jóhann B. Guðmundsson [Mon, 3 May 2021 13:25:17 +0000 (13:25 +0000)] 
chore(tree): move shell completion into a directory

Moving shell completion into it's own directory for a more organized and
cleaner tree.

4 years agofix(mdraid): remove dependency statements
Jóhann B. Guðmundsson [Mon, 3 May 2021 10:16:17 +0000 (10:16 +0000)] 
fix(mdraid): remove dependency statements

mdadm 4.1 was released 2 years ago so it's safe to assume
that everyone are on 4.1.X branch now...

4 years agofix(systemd-resolved): remove nss libraries
Jóhann B. Guðmundsson [Sat, 1 May 2021 07:55:28 +0000 (07:55 +0000)] 
fix(systemd-resolved): remove nss libraries

Removing inclution of nss libraries since they are part of
the systemd module now.

4 years agofix(systemd): include all nss libraries
Jóhann B. Guðmundsson [Sat, 1 May 2021 07:58:51 +0000 (07:58 +0000)] 
fix(systemd): include all nss libraries

Include all nss libraries so other modules dont have to.

4 years agofix(systemd-udevd): add udev id program files
Jóhann B. Guðmundsson [Fri, 30 Apr 2021 19:57:15 +0000 (19:57 +0000)] 
fix(systemd-udevd): add udev id program files

Adding missing udev id program files

4 years agofix(integrity): properly set up EVM when using an x509 cert
Stefan Berger [Thu, 29 Apr 2021 22:23:26 +0000 (18:23 -0400)] 
fix(integrity): properly set up EVM when using an x509 cert

The current EVM script does not handle the EVM setup properly when X509
certificates are involved. In this patch we extend the setup and add
the necessary flags for support of EVM activation that include
x509 certificates, possibly in conjunction with an HMAC key. We also
first try activating EVM for x509 certificates using
EVM_ALLOW_METADATA_WRITES for newer kernels, then without it for older
ones that did not support this flag.

We add support for additional EVM activation bits to be set, such
as EVM_SETUP_COMPLETE (0x80000000) via the config file and
EVM_ACTIVATION_BITS variable.

To avoid error messages related to unloading the HMAC key if none is
used, only attempt to unload the HMAC key if one was actually set.

We add documentation about the variables that can be set in the EVM
config file.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Cc: Roberto Sassu <roberto.sassu@huawei.com>
4 years agofix(tpm2-tss): add tpm2 requirement
Jóhann B. Guðmundsson [Fri, 30 Apr 2021 12:43:54 +0000 (12:43 +0000)] 
fix(tpm2-tss): add tpm2 requirement

4 years agofeat(tpm2-tss): introducing the tpm2-tss module
Jóhann B. Guðmundsson [Thu, 29 Apr 2021 12:07:59 +0000 (12:07 +0000)] 
feat(tpm2-tss): introducing the tpm2-tss module

Introducing the tpm2-tss module

4 years agofix(udev-rules): remove sourcing of network link files
Jóhann B. Guðmundsson [Wed, 28 Apr 2021 15:11:46 +0000 (15:11 +0000)] 
fix(udev-rules): remove sourcing of network link files

Removing sourcing of network link files from the udev-rules module.
What always should be included should be placed in the systemd-network
module and other modules that provide/require spesific link files
should add them, themselves via their relevant include section.

4 years agofix(systemd-udev): use global vars instead of fixed path
Jóhann B. Guðmundsson [Thu, 29 Apr 2021 15:28:32 +0000 (15:28 +0000)] 
fix(systemd-udev): use global vars instead of fixed path

4 years agoci: switch to action-sh-checker v0.2.0
Harald Hoyer [Thu, 29 Apr 2021 13:59:13 +0000 (15:59 +0200)] 
ci: switch to action-sh-checker v0.2.0

See also:
https://github.com/luizm/action-sh-checker/pull/40#issuecomment-829260125

4 years agoci: remove label cron job
Harald Hoyer [Thu, 29 Apr 2021 12:52:15 +0000 (14:52 +0200)] 
ci: remove label cron job

With the event called pull_request_target added to GitHub Actions, the
cron job can be removed.

See:
https://www.jclem.net/posts/labeling-prs-on-public-github-repositories

4 years agofix(dracut): adding missing globalvars for udev
Jóhann B. Guðmundsson [Thu, 29 Apr 2021 11:57:12 +0000 (11:57 +0000)] 
fix(dracut): adding missing globalvars for udev

Adding missing global variables for udev
udevconfdir --> /etc/udev
udevrulesdir --> /usr/lib/udev/rules.d
udevrulesconfdir --> /etc/udev/rules.d

4 years agofeat(systemd-udevd): introducing the systemd-udevd module
Jóhann B. Guðmundsson [Wed, 28 Apr 2021 19:36:39 +0000 (19:36 +0000)] 
feat(systemd-udevd): introducing the systemd-udevd module

Introducing the systemd-udevd module

4 years agofix(network): use wicked unit instead of find_binary
Jóhann B. Guðmundsson [Tue, 27 Apr 2021 09:55:12 +0000 (09:55 +0000)] 
fix(network): use wicked unit instead of find_binary

dracut-install triggers "ERROR: installing '/usr/lib/wicked/bin/*'"
when find_binary is being used to determine if wicked is installed
so let's just check for the wicked type service unit instead.