From 02dec613593d9f053e67d5c10e5db60dca07c984 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Dec 04 2018 10:22:13 +0000 Subject: dracut - 049-25.git20181204 - git snapshot --- diff --git a/0003.patch b/0003.patch index 348735a..c5cad1c 100644 --- a/0003.patch +++ b/0003.patch @@ -21,3 +21,4 @@ index e683a9bc..fb50cfda 100755 fi # Now we are done with lazy resolving, always install dependencies + diff --git a/0010.patch b/0010.patch index abb96eb..75fd1f7 100644 --- a/0010.patch +++ b/0010.patch @@ -38,3 +38,4 @@ index 80623437..503d069f 100644 syncheck: @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ [ "$${i##*/}" = "module-setup.sh" ] && continue; \ + diff --git a/0011.patch b/0011.patch new file mode 100644 index 0000000..e39d8f4 --- /dev/null +++ b/0011.patch @@ -0,0 +1,43 @@ +From 48c283a29638e2c1e24cf282e673ddf8525b4199 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 25 Oct 2018 15:30:36 +0200 +Subject: [PATCH] dracut.install: call dracut with --force + +The kernel-install is called even if you run make install. +Since we don't call dracut with -f a second make install will fail +because initrd with same version is already there. +This makes kernel developers feel miserable. + +https://bugzilla.redhat.com/show_bug.cgi?id=1642402 +--- + 50-dracut.install | 2 +- + 51-dracut-rescue.install | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/50-dracut.install b/50-dracut.install +index 64e3549f..bbb73442 100755 +--- a/50-dracut.install ++++ b/50-dracut.install +@@ -49,7 +49,7 @@ case "$COMMAND" in + break + fi + done +- dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION" ++ dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION" + ret=$? + ;; + remove) +diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install +index 6ddafdb6..ef8afac1 100755 +--- a/51-dracut-rescue.install ++++ b/51-dracut-rescue.install +@@ -98,7 +98,7 @@ case "$COMMAND" in + fi + + if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then +- dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION" ++ dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION" + ((ret+=$?)) + fi + + diff --git a/0012.patch b/0012.patch new file mode 100644 index 0000000..9e6a091 --- /dev/null +++ b/0012.patch @@ -0,0 +1,156 @@ +From f18d069d4664c148df8563139b358806ecfe6799 Mon Sep 17 00:00:00 2001 +From: Pedro Monreal +Date: Thu, 8 Nov 2018 14:15:38 +0100 +Subject: [PATCH] Fixed some SUSE specific typos and outputs + +--- + dracut.conf.5.asc | 2 +- + dracut.conf.d/suse.conf.example | 4 ++-- + dracut.sh | 4 ++-- + dracut.usage.asc | 6 +++--- + mkinitrd-suse.sh | 4 ++-- + modules.d/98dracut-systemd/dracut-shutdown.service.8.asc | 2 +- + modules.d/98syslog/README | 2 +- + modules.d/99base/dracut-lib.sh | 2 +- + 8 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc +index 1dfa28f6..081ed70c 100644 +--- a/dracut.conf.5.asc ++++ b/dracut.conf.5.asc +@@ -157,7 +157,7 @@ provide a valid _/etc/fstab_. + archive. This cpio archive gets glued (concatenated, uncompressed one + must be the first one) to the compressed cpio archive. The first, + uncompressed cpio archive is for data which the kernel must be able +- to access very early (and cannot make use of uncompress alogrithms yet) ++ to access very early (and cannot make use of uncompress algorithms yet) + like microcode or ACPI tables (default=no). + + *acpi_table_dir=*"____":: +diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example +index 37ffd72b..b5d962db 100644 +--- a/dracut.conf.d/suse.conf.example ++++ b/dracut.conf.d/suse.conf.example +@@ -1,6 +1,6 @@ +-# SUSE specifc dracut settings ++# SUSE specific dracut settings + # +-# SUSE by default always builds a as small as possible initrd for performance ++# SUSE by default always builds as small as possible initrd for performance + # and resource reasons. + # If you like to build a generic initrd which works on other platforms than + # on the one dracut/mkinitrd got called comment out below setting(s). +diff --git a/dracut.sh b/dracut.sh +index fb50cfda..e706714e 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1690,7 +1690,7 @@ if [[ $early_microcode = yes ]]; then + for _fwdir in $fw_dir; do + if [[ -d $_fwdir && -d $_fwdir/$_fw ]]; then + _src="*" +- dinfo "*** Constructing ${ucode_dest[$idx]} ****" ++ dinfo "*** Constructing ${ucode_dest[$idx]} ***" + if [[ $hostonly ]]; then + _src=$(get_ucode_file) + [[ $_src ]] || break +@@ -1790,7 +1790,7 @@ if dracut_module_included "squash"; then + + # Move some files out side of the squash image, including: + # - Files required to boot and mount the squashfs image +- # - Files need to be accessable without mounting the squash image ++ # - Files need to be accessible without mounting the squash image + required_in_root() { + local file=$1 + local _sqsh_file=$squash_dir/$file +diff --git a/dracut.usage.asc b/dracut.usage.asc +index 2b598ee6..0f219fc9 100644 +--- a/dracut.usage.asc ++++ b/dracut.usage.asc +@@ -83,7 +83,7 @@ on the command line: + === Adding Kernel Modules + If you need a special kernel module in the initramfs, which is not + automatically picked up by dracut, you have the use the --add-drivers option +-on the command line or the drivers vaiable in the _/etc/dracut.conf_ ++on the command line or the drivers variable in the _/etc/dracut.conf_ + or _/etc/dracut.conf.d/myconf.conf_ configuration file (see *dracut.conf*(5)): + ---- + # dracut --add-drivers mymod initramfs-with-mymod.img +@@ -94,7 +94,7 @@ An initramfs generated without the "hostonly" mode, does not contain any system + configuration files (except for some special exceptions), so the configuration + has to be done on the kernel command line. With this flexibility, you can easily + boot from a changed root partition, without the need to recompile the initramfs +-image. So, you could completly change your root partition (move it inside a md ++image. So, you could completely change your root partition (move it inside a md + raid with encryption and LVM on top), as long as you specify the correct + filesystem LABEL or UUID on the kernel command line for your root device, dracut + will find it and boot from it. +@@ -185,7 +185,7 @@ This turns off every automatic assembly of LVM, MD raids, DM raids and + crypto LUKS. + + Of course, you could also omit the dracut modules in the initramfs creation +-process, but then you would lose the posibility to turn it on on demand. ++process, but then you would lose the possibility to turn it on on demand. + + + [[Injecting]] +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index 20d85da1..b6af2b19 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -1,6 +1,6 @@ + #!/bin/bash --norc + # +-# mkinitrd compability wrapper for SUSE. ++# mkinitrd compatibility wrapper for SUSE. + # + # Copyright (c) 2013 SUSE Linux Products GmbH. All rights reserved. + # +@@ -62,7 +62,7 @@ usage () { + $cmd " /etc/sysconfig/kernel." + $cmd " -d root_device Root device. Defaults to the device from" + $cmd " which / is mounted. Overrides the rootdev" +- $cmd " enviroment variable if set." ++ $cmd " environment variable if set." + $cmd " -j device Journal device" + $cmd " -D interface Run dhcp on the specified interface." + $cmd " -I interface Configure the specified interface statically." +diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc +index f4fbb618..ba80b187 100644 +--- a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc ++++ b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc +@@ -15,7 +15,7 @@ dracut-shutdown.service + DESCRIPTION + ----------- + This service unpacks the initramfs image to /run/initramfs. +-systemd pivots into /run/initramfs at shutdown, so the root filesytem ++systemd pivots into /run/initramfs at shutdown, so the root filesystem + can be safely unmounted. + + The following steps are executed during a shutdown: +diff --git a/modules.d/98syslog/README b/modules.d/98syslog/README +index 30a819c0..9eb5adee 100644 +--- a/modules.d/98syslog/README ++++ b/modules.d/98syslog/README +@@ -11,7 +11,7 @@ Then if syslog is configured it is started and will forward all + kernel messages to the given syslog server. + + The syslog implementation is detected automatically by finding the +-apropriate binary with the following order: ++appropriate binary with the following order: + rsyslogd + syslogd + syslog-ng +diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh +index ab348855..3eb255e6 100755 +--- a/modules.d/99base/dracut-lib.sh ++++ b/modules.d/99base/dracut-lib.sh +@@ -620,7 +620,7 @@ nfsroot_to_var() { + # prints: + # ENV{ID_FS_LABEL}="boot" + # +-# TOOD: symlinks ++# TODO: symlinks + udevmatch() { + case "$1" in + UUID=????????-????-????-????-????????????|LABEL=*|PARTLABEL=*|PARTUUID=????????-????-????-????-????????????) + diff --git a/0013.patch b/0013.patch new file mode 100644 index 0000000..2351c78 --- /dev/null +++ b/0013.patch @@ -0,0 +1,72 @@ +From a60af534132828fd46fa017291f7ed7cfeab1dc3 Mon Sep 17 00:00:00 2001 +From: Kairui Song +Date: Fri, 9 Nov 2018 10:48:28 +0800 +Subject: [PATCH] squash: unsquash the root image instead of mounting it on + shutdown + +When building squash image, squash module forgot to install the new +shutdown.sh, and the shutdown hooks are always skipped on ordinary +shutdown if squash module is enabled. + +The new shutdown.sh will remount the squash image and then everything +will just work, but currently re-mounting the squash image on shutdown +may have selinux problem and make the system hang, and there is no +easy way to fix it. + +So skip fixing the shutdown.sh not being install problem, instead +just drop the new shutdown.sh, and unsquash the image on ordinary +shutdown, which is safer and should always work. + +Signed-off-by: Kairui Song +--- + dracut-initramfs-restore.sh | 9 +++++++++ + dracut.sh | 2 -- + modules.d/99squash/shutdown.sh | 7 ------- + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index 94794804..67fc88fa 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -40,4 +40,13 @@ else + exit 1 + fi + ++if [[ -d squash ]]; then ++ unsquashfs -no-xattrs -f -d . squash/root.img >/dev/null ++ if [ $? -ne 0 ]; then ++ echo "Squash module is enabled for this initramfs but failed to unpack squash/root.img" >&2 ++ rm -f -- /run/initramfs/shutdown ++ exit 1 ++ fi ++fi ++ + exit 0 +diff --git a/dracut.sh b/dracut.sh +index e706714e..3dc2adc0 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1849,9 +1849,7 @@ if dracut_module_included "squash"; then + done + + mv $initdir/init $initdir/init.stock +- mv $initdir/shutdown $initdir/shutdown.stock + ln -s squash/init.sh $initdir/init +- ln -s squash/shutdown.sh $initdir/shutdown + + mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null + +diff --git a/modules.d/99squash/shutdown.sh b/modules.d/99squash/shutdown.sh +deleted file mode 100755 +index 535779f4..00000000 +--- a/modules.d/99squash/shutdown.sh ++++ /dev/null +@@ -1,7 +0,0 @@ +-#!/bin/sh +-/squash/setup-squash.sh +- +-exec /shutdown.stock +- +-echo "Something went wrong when trying to start original shutdown executable!" +-exit 1 + diff --git a/0014.patch b/0014.patch new file mode 100644 index 0000000..0826cd3 --- /dev/null +++ b/0014.patch @@ -0,0 +1,36 @@ +From 05dc158e3c632cfd5c7fa20aee6e8373191b45fc Mon Sep 17 00:00:00 2001 +From: masem +Date: Wed, 14 Nov 2018 00:48:39 +0100 +Subject: [PATCH] Delay argument "-d" requires number + +Arguments "-f -d -n" fails with "invalid number -n", because -d delay expects number of seconds. +--- + modules.d/99shutdown/shutdown.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh +index f21cc811..e3884a88 100755 +--- a/modules.d/99shutdown/shutdown.sh ++++ b/modules.d/99shutdown/shutdown.sh +@@ -112,17 +112,17 @@ getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before + + case "$ACTION" in + reboot|poweroff|halt) +- $ACTION -f -d -n ++ $ACTION -f -n + warn "$ACTION failed!" + ;; + kexec) + kexec -e + warn "$ACTION failed!" +- reboot -f -d -n ++ reboot -f -n + ;; + *) + warn "Shutdown called with argument '$ACTION'. Rebooting!" +- reboot -f -d -n ++ reboot -f -n + ;; + esac + + diff --git a/0015.patch b/0015.patch new file mode 100644 index 0000000..91bdf42 --- /dev/null +++ b/0015.patch @@ -0,0 +1,37 @@ +From 01ffcf342ae65984c655f10a2fd35019a492ee5c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Renaud=20M=C3=A9trich?= +Date: Wed, 14 Nov 2018 13:19:27 +0100 +Subject: [PATCH] fips: removed false-positive 'FATAL: Module xxx not found' + error message when kernel provides a generic algo for module +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Renaud Métrich +--- + modules.d/01fips/fips.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 9bc089f2..c6c986cf 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -84,7 +84,7 @@ do_fips() + mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak + for _module in $FIPSMODULES; do + if [ "$_module" != "tcrypt" ]; then +- if ! modprobe "${_module}"; then ++ if ! modprobe "${_module}" 2>/tmp/fips.modprobe_err; then + # check if kernel provides generic algo + _found=0 + while read _k _s _v || [ -n "$_k" ]; do +@@ -93,7 +93,7 @@ do_fips() + _found=1 + break + done &2 && return 1 + fi + fi + done + diff --git a/0016.patch b/0016.patch new file mode 100644 index 0000000..5e5f9c0 --- /dev/null +++ b/0016.patch @@ -0,0 +1,24 @@ +From 76522d58c337e695cbffdc10afb04344f16f81b0 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 27 Nov 2018 15:27:53 +0100 +Subject: [PATCH] dracut-initramfs-restore: set selinux labels + +--- + dracut-initramfs-restore.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh +index 67fc88fa..18469772 100644 +--- a/dracut-initramfs-restore.sh ++++ b/dracut-initramfs-restore.sh +@@ -49,4 +49,9 @@ if [[ -d squash ]]; then + fi + fi + ++if [ -e /etc/selinux/config -a -x /usr/sbin/setfiles ] ; then ++ . /etc/selinux/config ++ /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts /run/initramfs > /dev/null ++fi ++ + exit 0 + diff --git a/0017.patch b/0017.patch new file mode 100644 index 0000000..b197ac7 --- /dev/null +++ b/0017.patch @@ -0,0 +1,29 @@ +From 79a17b0112995eb60c85c64d15070c52f213b28d Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 27 Nov 2018 15:30:48 +0100 +Subject: [PATCH] network-manager: call the online hook for connected devices + +Look for "connection-uuid" instead of "managed" to determine the devices +that are actually activated with a connection and call the online hook. + +This fixes the anaconda-net root mount, which utilizes the online hook. +--- + modules.d/35network-manager/nm-run.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index f6defa99..0f943631 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -9,8 +9,9 @@ fi + for _i in /sys/class/net/*/ + do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) +- grep -q managed=true $state 2>/dev/null || continue ++ grep -q connection-uuid= $state 2>/dev/null || continue + ifname=$(basename $_i) + sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts ++ source_hook initqueue/online $ifname + /sbin/netroot $ifname + done + diff --git a/0018.patch b/0018.patch new file mode 100644 index 0000000..a3e1c7a --- /dev/null +++ b/0018.patch @@ -0,0 +1,25 @@ +From a6bc200c28ac841edd12211c96dad8516095a68d Mon Sep 17 00:00:00 2001 +From: Thierry Vignaud +Date: Fri, 30 Nov 2018 15:41:05 +0100 +Subject: [PATCH] kill bogus comment + +should have been killed in commit 4a855e6bebed956c108865823bcc131ebea2841a +--- + modules.d/05busybox/module-setup.sh | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh +index 14d401c2..ecbd6a13 100755 +--- a/modules.d/05busybox/module-setup.sh ++++ b/modules.d/05busybox/module-setup.sh +@@ -22,9 +22,6 @@ install() { + _progs="$_progs $_i" + done + +- # FIXME: switch_root should be in the above list, but busybox version hangs +- # (using busybox-1.15.1-7.fc14.i686 at the time of writing) +- + for _i in $_progs; do + _path=$(find_binary "$_i") + [ -z "$_path" ] && continue + diff --git a/0019.patch b/0019.patch new file mode 100644 index 0000000..2e9ddf6 --- /dev/null +++ b/0019.patch @@ -0,0 +1,26 @@ +From fb280834d77a17a508d2bb22f5196de9ffd4fee7 Mon Sep 17 00:00:00 2001 +From: "Bruno E. O. Meneguele" +Date: Fri, 30 Nov 2018 13:01:21 -0200 +Subject: [PATCH] dracut.modules.7.asc: typo correction + +Correct simple typo in .7 manpage for dracut. + +Signed-off-by: Bruno E. O. Meneguele +--- + dracut.modules.7.asc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.modules.7.asc b/dracut.modules.7.asc +index c34d005d..387f6da0 100644 +--- a/dracut.modules.7.asc ++++ b/dracut.modules.7.asc +@@ -266,7 +266,7 @@ installs an executable/script in the dracut hook with priority + + ==== inst_rules [ ...] + +-installs one ore more udev rules. Non-existant udev rules are reported, but do ++installs one or more udev rules. Non-existant udev rules are reported, but do + not let dracut fail. + + ==== instmods [ ... ] + diff --git a/0020.patch b/0020.patch new file mode 100644 index 0000000..4ba7280 --- /dev/null +++ b/0020.patch @@ -0,0 +1,46 @@ +From f6e3b59e5ea6f52a25631557badc7f4dfabbd7ee Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 21 Aug 2018 13:14:44 +0200 +Subject: [PATCH] network: skip already enslaved interfaces + +--- + modules.d/35network-legacy/ifup.sh | 6 +++++- + modules.d/40network/net-lib.sh | 7 +++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh +index ea2a67ff..b4f5bf10 100755 +--- a/modules.d/35network-legacy/ifup.sh ++++ b/modules.d/35network-legacy/ifup.sh +@@ -408,7 +408,11 @@ for p in $(getargs ip=); do + esac + + # If this option isn't directed at our interface, skip it +- [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue ++ if [ -n "$dev" ]; then ++ [ "$dev" != "$netif" ] && continue ++ else ++ iface_is_enslaved "$netif" && continue ++ fi + + # Store config for later use + for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 1e7f1b33..964ed3ab 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -745,6 +745,13 @@ iface_has_link() { + iface_has_carrier "$@" + } + ++iface_is_enslaved() { ++ local _li ++ _li=$(ip -o link show dev $1) ++ strstr "$li" " master " || return 1 ++ return 0 ++} ++ + find_iface_with_link() { + local iface_path="" iface="" + for iface_path in /sys/class/net/*; do + diff --git a/0021.patch b/0021.patch new file mode 100644 index 0000000..c50f389 --- /dev/null +++ b/0021.patch @@ -0,0 +1,76 @@ +From c38f9e980c1ee03151dd1c6602907c6228b78d30 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 4 Dec 2018 10:02:45 +0100 +Subject: [PATCH] install/dracut-install.c: install module dependencies of + dependencies + +--- + install/dracut-install.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index 5f352b36..d64de545 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -84,6 +84,11 @@ static bool arg_mod_filter_noname = false; + static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst); + + ++static inline void kmod_module_unrefp(struct kmod_module **p) { ++ if (*p) ++ kmod_module_unref(*p); ++} ++#define _cleanup_kmod_module_unref_ _cleanup_(kmod_module_unrefp) + + static inline void kmod_module_unref_listp(struct kmod_list **p) { + if (*p) +@@ -1230,28 +1235,45 @@ static bool check_module_path(const char *path) + static int install_dependent_modules(struct kmod_list *modlist) + { + struct kmod_list *itr; +- struct kmod_module *mod; + const char *path = NULL; + const char *name = NULL; + int ret = 0; + + kmod_list_foreach(itr, modlist) { ++ _cleanup_kmod_module_unref_ struct kmod_module *mod = NULL; + mod = kmod_module_get_module(itr); + path = kmod_module_get_path(mod); + ++ if (check_hashmap(items_failed, path)) ++ return -1; ++ ++ if (check_hashmap(items, path)) { ++ continue; ++ } ++ + name = kmod_module_get_name(mod); ++ + if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) { +- kmod_module_unref(mod); + continue; + } ++ + ret = dracut_install(path, &path[kerneldirlen], false, false, true); + if (ret == 0) { ++ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; ++ _cleanup_kmod_module_unref_list_ struct kmod_list *modpre = NULL; ++ _cleanup_kmod_module_unref_list_ struct kmod_list *modpost = NULL; + log_debug("dracut_install '%s' '%s' OK", path, &path[kerneldirlen]); + install_firmware(mod); ++ modlist = kmod_module_get_dependencies(mod); ++ ret = install_dependent_modules(modlist); ++ if (ret == 0) { ++ ret = kmod_module_get_softdeps(mod, &modpre, &modpost); ++ if (ret == 0) ++ ret = install_dependent_modules(modpre); ++ } + } else { + log_error("dracut_install '%s' '%s' ERROR", path, &path[kerneldirlen]); + } +- kmod_module_unref(mod); + } + + return ret; + diff --git a/0022.patch b/0022.patch new file mode 100644 index 0000000..540a881 --- /dev/null +++ b/0022.patch @@ -0,0 +1,23 @@ +From 712f471ebfae70fd71c0c740e9a3e120464ca7e7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 4 Dec 2018 10:06:12 +0100 +Subject: [PATCH] test/test-functions: correctly move server.log + +--- + test/test-functions | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-functions b/test/test-functions +index a6254ec7..51b3df80 100644 +--- a/test/test-functions ++++ b/test/test-functions +@@ -80,7 +80,7 @@ while (($# > 0)); do + ret=$? + test_cleanup + if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then +- mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log ++ mv "$TESTDIR"/server.log ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log + fi + rm -fr -- "$TESTDIR" + rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID} + diff --git a/0023.patch b/0023.patch new file mode 100644 index 0000000..6110f1d --- /dev/null +++ b/0023.patch @@ -0,0 +1,22 @@ +From b8a8d7a64e146e452608b1f4bea1580a7b9449f6 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 4 Dec 2018 10:22:28 +0100 +Subject: [PATCH] fedora-test.sh: install tcpdump + +--- + fedora-test.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/fedora-test.sh b/fedora-test.sh +index 87023a84..e897c325 100755 +--- a/fedora-test.sh ++++ b/fedora-test.sh +@@ -39,6 +39,7 @@ dnf -y install --best --allowerasing \ + /usr/bin/qemu-kvm \ + /usr/bin/qemu-system-$(uname -i) \ + e2fsprogs \ ++ tcpdump \ + $NULL &>/dev/null + + ./configure + diff --git a/0024.patch b/0024.patch new file mode 100644 index 0000000..14f7077 --- /dev/null +++ b/0024.patch @@ -0,0 +1,31 @@ +From ebe1821635dd99f07c817179ee5358d27aab53c5 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 4 Dec 2018 10:27:17 +0100 +Subject: [PATCH] 95iscsi/module-setup.sh: do not require 'hostname' anymore + +--- + modules.d/95iscsi/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh +index 3c791001..36cd64a6 100755 +--- a/modules.d/95iscsi/module-setup.sh ++++ b/modules.d/95iscsi/module-setup.sh +@@ -4,7 +4,7 @@ + check() { + local _rootdev + # If our prerequisites are not met, fail anyways. +- require_binaries hostname iscsi-iname iscsiadm iscsid || return 1 ++ require_binaries iscsi-iname iscsiadm iscsid || return 1 + + # If hostonly was requested, fail the check if we are not actually + # booting from root. +@@ -206,7 +206,7 @@ cmdline() { + install() { + inst_multiple -o iscsiuio + inst_libdir_file 'libgcc_s.so*' +- inst_multiple umount hostname iscsi-iname iscsiadm iscsid ++ inst_multiple umount iscsi-iname iscsiadm iscsid + + inst_multiple -o \ + $systemdsystemunitdir/iscsid.socket \ diff --git a/dracut.spec b/dracut.spec index b36312e..82422bd 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 11.git20181024 +%define dist_free_release 25.git20181204 Name: dracut Version: 049 @@ -38,6 +38,20 @@ Patch7: 0007.patch Patch8: 0008.patch Patch9: 0009.patch Patch10: 0010.patch +Patch11: 0011.patch +Patch12: 0012.patch +Patch13: 0013.patch +Patch14: 0014.patch +Patch15: 0015.patch +Patch16: 0016.patch +Patch17: 0017.patch +Patch18: 0018.patch +Patch19: 0019.patch +Patch20: 0020.patch +Patch21: 0021.patch +Patch22: 0022.patch +Patch23: 0023.patch +Patch24: 0024.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -483,6 +497,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* Tue Dec 04 2018 Harald Hoyer - 049-25.git20181204 +- git snapshot + * Wed Oct 24 2018 Harald Hoyer - 049-11.git20181024 - git snapshot