]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
3 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.

3 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

3 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.

3 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

3 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

3 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

3 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.

3 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.

3 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

3 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.

3 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...

3 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.

3 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.

3 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

3 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>
3 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

3 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

3 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.

3 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

3 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

3 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

3 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

3 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

3 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.

3 years agofix(multipath): stop multipath before udev db cleanup
Harald Hoyer [Fri, 23 Apr 2021 09:11:27 +0000 (11:11 +0200)] 
fix(multipath): stop multipath before udev db cleanup

All device-mapper based devices, including device-mapper-multipath,
do reuse the udev db from the initramfs after switching to the root fs.

Therefore device-mapper devices have to be correctly initialized before
the udev daemon is stopped, to have the correct entries in the udev db.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1949076

3 years agofix(network-legacy): add missing options to dhclient.conf
Jóhann B. Guðmundsson [Tue, 27 Apr 2021 14:16:42 +0000 (14:16 +0000)] 
fix(network-legacy): add missing options to dhclient.conf

Adding the following commonly used options to dhclient.conf
- netbios-name-servers
- netbios-scope
- ntp-servers
- dhcp6.domain-search
- dhcp6.fqdn
- dhcp6.name-servers
- dhcp6.sntp-servers

3 years agofix(systemd-verity): incorrect reference to cryptsetup target
Jóhann B. Guðmundsson [Tue, 27 Apr 2021 10:37:20 +0000 (10:37 +0000)] 
fix(systemd-verity): incorrect reference to cryptsetup target

Incorrect include of remote-cryptsetup.target in hostonly.
Corrected to point to remote-veritysetup.target

3 years agofix(systemd-verity): re-naming module to veritysetup
Jóhann B. Guðmundsson [Tue, 27 Apr 2021 10:33:32 +0000 (10:33 +0000)] 
fix(systemd-verity): re-naming module to veritysetup

Renaming the module from systemd-verity to systemd-veritysetup to be inline
with the systemd-cryptsetup module.

3 years agofeat(systemd-verity): introducing the systemd-verity module
Jóhann B. Guðmundsson [Fri, 23 Apr 2021 16:23:39 +0000 (16:23 +0000)] 
feat(systemd-verity): introducing the systemd-verity module

Introducing the systemd-verity module.

3 years agoci: reorder the tests
Harald Hoyer [Mon, 26 Apr 2021 11:14:17 +0000 (13:14 +0200)] 
ci: reorder the tests

3 years agofix(iscsi): add iscsid.service requirements
Harald Hoyer [Mon, 26 Apr 2021 12:10:37 +0000 (14:10 +0200)] 
fix(iscsi): add iscsid.service requirements

Since Fedora 34, iscsid.service requires:
- iscsi-init.service
- iscsi-shutdown.service
- a non-empty /var/lib/iscsi/nodes/.dracut

3 years agotest(ISCSI): fix the watchdog loop
Harald Hoyer [Mon, 26 Apr 2021 09:06:41 +0000 (11:06 +0200)] 
test(ISCSI): fix the watchdog loop

Test for `pidof tgtd` and not the shell background jobs.

3 years agofix: search for btrfs devices from actual mount poiont
Kairui Song [Thu, 22 Apr 2021 14:04:37 +0000 (22:04 +0800)] 
fix: search for btrfs devices from actual mount poiont

Currently when dracut search for btrfs device used for initramfs, it
assumes the mount points passed in with "--mount" are all mounted with
given mount path. If user want the device to be mounted to a different
location in initramfs, this will not be true.

eg. with "--mount '/dev/mapper/vol /sysroot btrfs rw,relatime,subvolid=256,subvol=/root'"
and having '/dev/mapper/vol' currently mounted on '/', will raise an
error:
    ERROR: cannot access '/sysroot': No such file or directory

So search for actual mount point of given device.

Signed-off-by: Kairui Song <kasong@redhat.com>
3 years agotest: don't fail on modprobe btrfs in create-root.sh
Harald Hoyer [Mon, 26 Apr 2021 10:40:52 +0000 (12:40 +0200)] 
test: don't fail on modprobe btrfs in create-root.sh

3 years agoci: run all Fedora CI in a matrix
Harald Hoyer [Mon, 26 Apr 2021 09:31:20 +0000 (11:31 +0200)] 
ci: run all Fedora CI in a matrix

Also automatically cancel it, if the PR is updated

3 years agofix(iscsi): only rely on socket activiation
Harald Hoyer [Mon, 26 Apr 2021 08:05:06 +0000 (10:05 +0200)] 
fix(iscsi): only rely on socket activiation

Only rely on socket activation. This speeds up in case iscsi isn't used
and also prevents failures, where iscsiuio stopping somehow disables
iscsi.

3 years agofeat(systemd-initrd): add initrd-usr-fs.target
Jóhann B. Guðmundsson [Thu, 15 Apr 2021 07:49:48 +0000 (07:49 +0000)] 
feat(systemd-initrd): add initrd-usr-fs.target

Adding a new systemd initrd-usr-fs.target to the systemd-initrd module

3 years agofix: quotes in systemd modules
Jóhann B. Guðmundsson [Thu, 22 Apr 2021 20:20:15 +0000 (20:20 +0000)] 
fix: quotes in systemd modules

Fixing quotes around *.conf in systemd modules

3 years agorefactor: check() in systemd modules
Jóhann B. Guðmundsson [Thu, 22 Apr 2021 19:29:13 +0000 (19:29 +0000)] 
refactor: check() in systemd modules

Refactoring require_binaries in check() for systemd modules

3 years agofix(network-manager): set timeout via command line option
Harald Hoyer [Thu, 22 Apr 2021 08:21:18 +0000 (10:21 +0200)] 
fix(network-manager): set timeout via command line option

With Fedora 32, only the command line option works for `nm-online`.

3 years agofeat(systemd-network-management): introducing systemd-network-management module
Jóhann B. Guðmundsson [Thu, 22 Apr 2021 11:04:24 +0000 (11:04 +0000)] 
feat(systemd-network-management): introducing systemd-network-management module

Introducing the systemd-network-management meta module which will
allow distribution users and vendors to easily include
systemd + systemd's network management modules by simply include this
module instead of systemd network modules individually.

Obviously if the intent is to glue together somekind of network stack
out of random existing modules such as NetworkManager and or Wicked,
this meta module should not be enabled.

3 years agofix(network): user variable for sdnetworkd instead of path
Jóhann B. Guðmundsson [Thu, 22 Apr 2021 13:22:42 +0000 (13:22 +0000)] 
fix(network): user variable for sdnetworkd instead of path

Use globalvariable for systemd networkd instead of path

3 years agofix(systemd-hostnamed): extra quote
Jóhann B. Guðmundsson [Thu, 22 Apr 2021 12:19:42 +0000 (12:19 +0000)] 
fix(systemd-hostnamed): extra quote

3 years agofix(systemd-networkd): make systemd-networkd a proper network provider
Jóhann B. Guðmundsson [Wed, 14 Apr 2021 14:06:27 +0000 (14:06 +0000)] 
fix(systemd-networkd): make systemd-networkd a proper network provider

Make systemd-networkd a proper network service provider. Fixes #737

3 years agofeat(systemd-timedated): add systemd-timedated module to the spec file
Jóhann B. Guðmundsson [Wed, 14 Apr 2021 18:17:03 +0000 (18:17 +0000)] 
feat(systemd-timedated): add systemd-timedated module to the spec file

3 years agofeat(systemd-timedated): introducing the systemd-timedated module
Jóhann B. Guðmundsson [Wed, 14 Apr 2021 18:08:53 +0000 (18:08 +0000)] 
feat(systemd-timedated): introducing the systemd-timedated module

Introducing the systemd-timedated module

3 years agofix(network-manager): run after dracut-cmdline
Harald Hoyer [Thu, 22 Apr 2021 08:31:34 +0000 (10:31 +0200)] 
fix(network-manager): run after dracut-cmdline

dracut-cmdline runs `nm-config.sh`, which generates the configurations.

Also remove the now unused `nm-run.service`.

3 years agofix(img-lib): ignored null byte in input
Lev Veyde [Wed, 21 Apr 2021 22:11:55 +0000 (01:11 +0300)] 
fix(img-lib): ignored null byte in input

The system currently throws numerous nasty warning messages during
the boot, about ignored null bytes in input.

This patch adds a filter to the dd command, to filter these null
bytes out, and thus to prevent these warning messages.

Signed-off-by: Lev Veyde <lveyde@redhat.com>
3 years agofix(systemd-modules-load): misc repairs
Jóhann B. Guðmundsson [Tue, 20 Apr 2021 14:45:48 +0000 (14:45 +0000)] 
fix(systemd-modules-load): misc repairs

- Removing dependency on the systemd meta module since it causes circular dependency,
  prevents the existance of multiple systemd based meta modules and is redunant.

- Removing directory creation for modules-load since it should not be
  necessary and if it turns out that it is, it will be re-introduced in the
  form of a systemd tmpfile instead of inst_dir.

- Add a missing inclusion of configuration files placed in /usr/lib/modules-load.d
  and /etc/modules-load.d ( hostonly ) directories.

- Fix a spelling error in the systemd type unit file conf directory overwrite
  in the hostonly section.

3 years agofeat(systemd-resolved): introducing the systemd-resolved module
Jóhann B. Guðmundsson [Fri, 16 Apr 2021 22:24:57 +0000 (22:24 +0000)] 
feat(systemd-resolved): introducing the systemd-resolved module

Introducing the systemd-resolved module

3 years agofeat(systemd-hostnamed): introducing the systemd-hostnamed module
Jóhann B. Guðmundsson [Thu, 15 Apr 2021 21:22:16 +0000 (21:22 +0000)] 
feat(systemd-hostnamed): introducing the systemd-hostnamed module

Introducing the systemd-hostnamed module.

3 years agofeat(systemd-ac-power): introducing the systemd-ac-power module
Jóhann B. Guðmundsson [Sun, 18 Apr 2021 06:47:15 +0000 (06:47 +0000)] 
feat(systemd-ac-power): introducing the systemd-ac-power module

Introducing the systemd-ac-power module

3 years agofix(systemd-modules): remove dependency on systemd meta module
Jóhann B. Guðmundsson [Tue, 20 Apr 2021 15:05:53 +0000 (15:05 +0000)] 
fix(systemd-modules): remove dependency on systemd meta module

Depending on systemd meta module causes circular dependency,
prevents the existance of multiple systemd based meta modules
and is redunant.

3 years agofeat(systemd-timesyncd): introducing the systemd-timesyncd module
Jóhann B. Guðmundsson [Wed, 21 Apr 2021 22:34:49 +0000 (22:34 +0000)] 
feat(systemd-timesyncd): introducing the systemd-timesyncd module

Introducing the systemd-timesyncd module

3 years agofix(network-manager): create /run directories
Harald Hoyer [Thu, 22 Apr 2021 07:06:23 +0000 (09:06 +0200)] 
fix(network-manager): create /run directories

Create the `/run/NetworkManager/initrd` directory before creating
`/run/NetworkManager/initrd/neednet`. Somehow on Fedora 32 this
directory is missing, when the script is running.

This fixes all NetworkManager tests for Fedora 32.

3 years agoci: use /dev/disk/by-id
Harald Hoyer [Tue, 20 Apr 2021 14:16:14 +0000 (16:16 +0200)] 
ci: use /dev/disk/by-id

Due to parallel probing of the linux kernel `/dev/sd*` can't be used to
reliably address a hard disk. This can be seen by the many spurious
failures of the dracut CI, where `mdadm` failed with error 524 or tests
failed due to the success marker message written to the wrong disk.

* don't rely on `/dev/sd*` but use disk ids and `/dev/disk/by-id/ata-disk_<name>`

* specify the exact qemu machine architecture `-M q35` needed for the
  disk ids. A later patch will move this to `run-qemu`, when all tests are converted

* due to `-M q35` the interface names have changed from
  `ens2` -> `enp0s1` and `ens3` -> `enp0s2`

3 years agofix(systemd): include hosts and nsswitch.conf in hostonly mode
Jóhann B. Guðmundsson [Wed, 21 Apr 2021 11:57:32 +0000 (11:57 +0000)] 
fix(systemd): include hosts and nsswitch.conf in hostonly mode

Adding /etc/hosts and /etc/nsswitch.conf to the hostonly install section.

3 years agofix(90kernel-modules): add watchdog drivers for generic initrd
Peter Robinson [Wed, 21 Apr 2021 11:50:41 +0000 (12:50 +0100)] 
fix(90kernel-modules): add watchdog drivers for generic initrd

The watchdog module pulls in the device specific watchdog if that
module is enabled, but in the case where we need a generic initrd
we don't get all watchdog drivers which means if we have a watchdog
enabled for that usecase it may get kicked too late in the boot
process so we need the drivers in the initrd for the generic case too.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
3 years agofix(examples): remove the examples directory and reference to it
Jóhann B. Guðmundsson [Tue, 20 Apr 2021 04:54:45 +0000 (04:54 +0000)] 
fix(examples): remove the examples directory and reference to it

Let's leave it up to the yocto community to keep and maintain their own
examples.

3 years agofix(dracut.sh): add global vars for modules-load
Jóhann B. Guðmundsson [Tue, 20 Apr 2021 13:56:48 +0000 (13:56 +0000)] 
fix(dracut.sh): add global vars for modules-load

Adding modulesload modulesloadconfdir global variables

3 years agofix(systemd-sysctl): sysctl global variables
Jóhann B. Guðmundsson [Tue, 20 Apr 2021 05:57:59 +0000 (05:57 +0000)] 
fix(systemd-sysctl): sysctl global variables

3 years agofix(dracut): sysctl global variables
Jóhann B. Guðmundsson [Tue, 20 Apr 2021 05:46:50 +0000 (05:46 +0000)] 
fix(dracut): sysctl global variables

3 years agofix(nbd): remove old udev version requirements
Jóhann B. Guðmundsson [Mon, 19 Apr 2021 19:37:44 +0000 (19:37 +0000)] 
fix(nbd): remove old udev version requirements

3 years agofix(fips): remove old udev version requirements
Jóhann B. Guðmundsson [Mon, 19 Apr 2021 19:34:24 +0000 (19:34 +0000)] 
fix(fips): remove old udev version requirements

3 years agofix(systemd): remove old systemd version requirements
Jóhann B. Guðmundsson [Mon, 19 Apr 2021 19:19:39 +0000 (19:19 +0000)] 
fix(systemd): remove old systemd version requirements

3 years agofix(nbd): make nbd work again with systemd
Harald Hoyer [Wed, 31 Mar 2021 14:29:31 +0000 (16:29 +0200)] 
fix(nbd): make nbd work again with systemd

* Correct the systemd generated sysroot.mount unit with the options
received by the DHCP request and do a `daemon-reload`.

* Inject the `nbd-client -check /dev/nbd0` in the finished initqueue.

* Reactivate the NBD tests and prepare them for NetworkManager tests.

3 years agoci: use disk ids for TEST 35 ISCSI MULTI
Harald Hoyer [Mon, 19 Apr 2021 14:34:05 +0000 (16:34 +0200)] 
ci: use disk ids for TEST 35 ISCSI MULTI

Due to parallel probing of the linux kernel `/dev/sd*` can't be used to
reliably address a hard disk. This can be seen by the many spurious
failures of the dracut CI, where `mdadm` failed with error 524 or tests
failed due to the success marker message written to the wrong disk.

* don't rely on `/dev/sd*` but use disk ids and `/dev/disk/by-id/ata-disk_<name>`

* specify the exact qemu machine architecture `-M q35` needed for the
  disk ids. A later patch will move this to `run-qemu`, when all tests are converted

* due to `-M q35` the interface names have changed from
  `ens2` -> `enp0s1` and `ens3` -> `enp0s2`

3 years agoci: add function to generate qemu disk arguments
Harald Hoyer [Mon, 19 Apr 2021 14:30:50 +0000 (16:30 +0200)] 
ci: add function to generate qemu disk arguments

`qemu_add_drive_args` can be used to generate arguments to specify disks
for a qemu machine (`-M q35`).

This is mostly useful to address those raw disks via `/dev/disk/by-id`,
because due to parallel probing in the kernel `/dev/sd*` can point to
anything.

3 years agofix(bluetooth): shellcheck and hostonly corrections
Harald Hoyer [Sat, 17 Apr 2021 11:23:22 +0000 (13:23 +0200)] 
fix(bluetooth): shellcheck and hostonly corrections

Don't install files from `/var` in the non-hostonly case.

Use fileglobs, instead of `find`.

3 years agofix(dbus-daemon): only error out in install()
Harald Hoyer [Sat, 17 Apr 2021 11:20:56 +0000 (13:20 +0200)] 
fix(dbus-daemon): only error out in install()

Don't hard exit in `check()`. The transaction logic only checks if it
should/can include the module. Just return `255` and the `dbus` meta
module will pick its dependency.

3 years agofeat(bluetooth): implement bluetooth support in initrd
Adam Alves [Fri, 22 Feb 2019 02:35:39 +0000 (23:35 -0300)] 
feat(bluetooth): implement bluetooth support in initrd

- Included a bluetooth module that installs modules, firmware, udev rules and bluetoothd.
- systemd and dbus are required by bluetoothd
- Include bluetooth by default if BT keyboard or combo found

3 years agofix(TEST ISCSI): try to debug md error 524
Harald Hoyer [Mon, 12 Apr 2021 09:13:21 +0000 (11:13 +0200)] 
fix(TEST ISCSI): try to debug md error 524

While creating the striped md raid0 sometimes this error occures:

```
mdadm: Defaulting to version 1.2 metadata
mdadm: RUN_ARRAY failed: Unknown error 524
  Failed to clear hint file.
  Device /dev/md0 not found.
Powering off.
```

Add debug output with the size of the disks.

Also create disks with multiple of 4096.

3 years agoci: remove packit config causing errors
Harald Hoyer [Fri, 16 Apr 2021 14:17:01 +0000 (16:17 +0200)] 
ci: remove packit config causing errors

remove the offending parameters, which cause errors described in
https://github.com/dracutdevs/dracut/issues/1346

until we found the correct config to be used.

3 years agofeat(network-manager): run as daemon with D-Bus
Beniamino Galvani [Fri, 26 Mar 2021 10:31:03 +0000 (11:31 +0100)] 
feat(network-manager): run as daemon with D-Bus

This commit changes how NM is started inside the initrd. Instead of running NM
in the special --configure-and-quit=initrd mode, which sets up network and
quits, start it as a daemon.

This has multiple advantages. First, we no longer need to run NM in a special
mode that requires additional code and maintenance. NetworkManager works
exactly as in the real root.

One problem of the current configure-and-quit approach is that once NM has
quit, dynamic addresses can expire if the initrd setup takes longer than the
DHCP lease interval or than the IPv6 address lifetime. Running NM as a service
solves this problem.

Now NM runs with D-Bus support and therefore its API can be used by other
modules. This open the possibility, for example, to integrate nm-cloud-setup to
automatically configure networking based on cloud metadata.

Use the NetworkManager-wait-online.service, ordered before
dracut-initqueue.service, to delay the initqueue until NM has terminated its
configuration.

3 years agofix(network-manager): use /run/NetworkManager/initrd/neednet in initqueue
Dusty Mabe [Tue, 13 Apr 2021 15:45:35 +0000 (11:45 -0400)] 
fix(network-manager): use /run/NetworkManager/initrd/neednet in initqueue

We don't want to start NetworkManager if networking is not needed.
Right now nm-config.sh lays down /usr/lib/dracut/hooks/initqueue/finished/nm.sh
which will cause the initqueue to run. If nothing exists in
/usr/lib/dracut/hooks/initqueue/finished/ then it will short circuit and
the initqueue won't run anything. But what if something else needed
something to run in the initqueue? nm-run.sh would still get started,
even though /usr/lib/dracut/hooks/initqueue/finished/nm.sh didn't exist.
In this case let's just trigger off of /run/NetworkManager/initrd/neednet
like we are doing in the systemd unit (nm-run.service).

3 years agofix(network-manager): only run NetworkManager if rd.neednet=1
Dusty Mabe [Tue, 13 Apr 2021 15:36:21 +0000 (11:36 -0400)] 
fix(network-manager): only run NetworkManager if rd.neednet=1

Don't run the new systemd unit (nm-run.service) if rd.neednet=1
isn't set. nm-initrd-generator will generate configuration even
without rd.neednet=1 so determining if we should start based on
just if connection profiles exist isn't enough. We need some other
indicator. In this case we lay down a /run/NetworkManager/initrd/neednet
if rd.neednet=1, which is used by nm-run.service to determine the
need to run.

3 years agofix(network-manager): nm-run.service: don't kill forked processes
Dusty Mabe [Wed, 14 Apr 2021 14:46:12 +0000 (10:46 -0400)] 
fix(network-manager): nm-run.service: don't kill forked processes

If teaming is set up via NetworkManager we don't want systemd to take
down the userspace teamd process when NetworkManager quits. `KillMode=process`
will allow it to leave those processes behind.

This is fallout from the change to run NetworkManager via systemd (c17c5b7).

With `KillMode=process` we get something like:

```
sh-5.1# journalctl -u nm-run -o cat | tail
<info>  [1618411262.7030] quitting now that startup is complete
<info>  [1618411262.7030] device (team0): carrier: link connected
<info>  [1618411262.7033] device (team0): team port ens2 was released
<info>  [1618411262.7033] device (team0): team port ens3 was released
<info>  [1618411262.7033] manager: NetworkManager state is now CONNECTED_SITE
<info>  [1618411262.7034] exiting (success)
nm-run.service: Deactivated successfully.
nm-run.service: Unit process 476 (teamd) remains running after unit stopped.
Finished nm-run.service.
```

3 years agofix(dracut-logger.sh): double dash trigger unknown logger warnings during run
Dusty Mabe [Wed, 14 Apr 2021 20:23:29 +0000 (16:23 -0400)] 
fix(dracut-logger.sh): double dash trigger unknown logger warnings during run

There are a bunch of `logger: unknown facility name: --user` errors
during a run. This is because logger is getting passed something like:

```
logger -p --user.info
```

Where it should be something like:

```
logger -p user.info
```

3 years agofix(i18n): skip if data is missing
Đoàn Trần Công Danh [Mon, 12 Apr 2021 15:23:02 +0000 (22:23 +0700)] 
fix(i18n): skip if data is missing

On system that doesn't have either consolefonts, consoletrans, keymaps,
or unimaps, "kbddir" is empty, thus the followed installation will
broken with errors like:

cp: cannot stat '/consolefonts/*': No such file or directory

Let's report the checks as failure if "kbddir" is empty.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
3 years agofix(dracut.sh): omission is an addition to other omissions in conf files
Jóhann B. Guðmundsson [Wed, 31 Mar 2021 19:17:43 +0000 (19:17 +0000)] 
fix(dracut.sh): omission is an addition to other omissions in conf files

When omitting a module from the command line via -o or --omit
it's expected that it behaves in the same manner as adding a module from the
command line as in it does not overwrite existing omissions of other modules in
configuration file(s).

3 years agofix(dracut-functions): word splitting issue for sed in get_ucode_file
Kairui Song [Fri, 9 Apr 2021 16:57:32 +0000 (00:57 +0800)] 
fix(dracut-functions): word splitting issue for sed in get_ucode_file

This unquated regex could be splitted into two arguments and sed will
not work. I've see giving error of wrong arguments being used on my
desktop.

Signed-off-by: Kairui Song <kasong@redhat.com>
3 years agofix(nbd): shellcheck regression
Harald Hoyer [Wed, 31 Mar 2021 09:15:46 +0000 (11:15 +0200)] 
fix(nbd): shellcheck regression

`$opts`, `$preopts` and `$nbdport` shouldn't have been quoted as they
can expand to multiple options.

Fixes: https://github.com/dracutdevs/dracut/issues/1270
3 years agodocs: clarify `netroot=dhcp`
Harald Hoyer [Wed, 31 Mar 2021 14:09:55 +0000 (16:09 +0200)] 
docs: clarify `netroot=dhcp`

`root=dhcp` does not work with systemd, so `netroot=dhcp` should be
used.

3 years agofix(dracut-systemd): regression on root=block:
Harald Hoyer [Wed, 31 Mar 2021 14:14:02 +0000 (16:14 +0200)] 
fix(dracut-systemd): regression on root=block:

Commit 3532978de04c7 introduced a regression, where the `root` could be
`root=block:block:/dev/foo`.

3 years agofix(base): source hooks without exec
Harald Hoyer [Wed, 31 Mar 2021 14:16:52 +0000 (16:16 +0200)] 
fix(base): source hooks without exec

Patch 2fabaaa62dcfd31e593ca changed the behaviour for `dash`
under the assumption, that dash does not take parameters for `.` aka
`source`. Although this is true, the original positional parameters of
the `source_all` function are still in place, so everything is
fine with the old way of sourcing.

3 years agofix(network): correct regression in iface_has_carrier
Harald Hoyer [Wed, 31 Mar 2021 14:21:44 +0000 (16:21 +0200)] 
fix(network): correct regression in iface_has_carrier

Commit e25c536c70bab4a4d6 introduced a regression in iface_has_carrier
due to unclear variable naming.

3 years agofix(network-manager): no default deps for nm-run.service
Harald Hoyer [Wed, 31 Mar 2021 14:11:41 +0000 (16:11 +0200)] 
fix(network-manager): no default deps for nm-run.service

Otherwise nm-run.service will run only in basic.target, which is too
late in the initramfs.

3 years agofix(lunmask): shellcheck regression
Harald Hoyer [Wed, 31 Mar 2021 09:11:00 +0000 (11:11 +0200)] 
fix(lunmask): shellcheck regression

`parse-lunmask.sh` is not a bash script
and dash doesn't understand `read -a`.

Revert to the initial code.

Fixes: https://github.com/dracutdevs/dracut/issues/1271
3 years agofix(lvmmerge): depend on bash
Harald Hoyer [Wed, 31 Mar 2021 07:01:58 +0000 (09:01 +0200)] 
fix(lvmmerge): depend on bash

3 years agofix(livenet): fetch-liveupdate.sh does not require bash
Harald Hoyer [Wed, 31 Mar 2021 07:09:52 +0000 (09:09 +0200)] 
fix(livenet): fetch-liveupdate.sh does not require bash

3 years agofix(cms): require bash
Harald Hoyer [Wed, 31 Mar 2021 07:12:19 +0000 (09:12 +0200)] 
fix(cms): require bash

3 years agofix(network-manager): nm-lib.sh does not require bash
Harald Hoyer [Wed, 31 Mar 2021 07:14:44 +0000 (09:14 +0200)] 
fix(network-manager): nm-lib.sh does not require bash

3 years agofix(zipl): don't depend on grub2
Harald Hoyer [Wed, 31 Mar 2021 07:21:49 +0000 (09:21 +0200)] 
fix(zipl): don't depend on grub2

There is no grub2 dracut module.

3 years agoci: enable shellcheck for everything
Harald Hoyer [Wed, 31 Mar 2021 07:35:08 +0000 (09:35 +0200)] 
ci: enable shellcheck for everything

3 years agofix(kernel-modules): shellcheck regression
Harald Hoyer [Wed, 31 Mar 2021 08:01:18 +0000 (10:01 +0200)] 
fix(kernel-modules): shellcheck regression

`$_hostonly_drvs` contained multiple arguments and was quoted.

This patch converts `_hostonly_drvs` into an associative array, which
enables easy deduplication and proper quoting in bash.

Fixes: https://github.com/dracutdevs/dracut/issues/1276
3 years agofix(multipath): revise multipathd-stop
Harald Hoyer [Wed, 31 Mar 2021 08:18:27 +0000 (10:18 +0200)] 
fix(multipath): revise multipathd-stop

A shellcheck regression quoted `HARD` in
```shell
    kill "$HARD" "$pid" > /dev/null 2>&1
```

which would error on an empty "HARD".

Instead of fixing this, use `pkill` instead and also add it to the
non-optional list of binaries to install, which was revised also.

Fixes: https://github.com/dracutdevs/dracut/issues/1275
3 years agofix(multipath): shellcheck regression
Harald Hoyer [Wed, 31 Mar 2021 08:41:00 +0000 (10:41 +0200)] 
fix(multipath): shellcheck regression

`$_allow` should not have been quoted, because it can be multiple options.

Instead of unquoting it, convert it to an associative array with easy
deduplication and prefix every device with the `--allow` option.

Fixes: https://github.com/dracutdevs/dracut/issues/1274
3 years agofix(nvdimm): shellcheck regression
Harald Hoyer [Wed, 31 Mar 2021 08:59:19 +0000 (10:59 +0200)] 
fix(nvdimm): shellcheck regression

`_provider_dirs` should not have been quoted, because it should expand
to multiple arguments.

Just remove the whole variable and add those arguments.

Fixes: https://github.com/dracutdevs/dracut/issues/1273
3 years agofix(convertfs): require bash
Harald Hoyer [Wed, 31 Mar 2021 07:16:53 +0000 (09:16 +0200)] 
fix(convertfs): require bash

3 years agofix(caps): require bash
Harald Hoyer [Wed, 31 Mar 2021 07:18:28 +0000 (09:18 +0200)] 
fix(caps): require bash