From 87cf605e9af2205825cf77eedec8e0664f6c6a74 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Aug 24 2017 09:19:33 +0000 Subject: dracut - 046-7 - git snapshot --- diff --git a/0001.patch b/0001.patch index da514eb..26baaaf 100644 --- a/0001.patch +++ b/0001.patch @@ -73,3 +73,4 @@ index 4b03a95c..0c5f3b9e 100755 } elsif ((/^Source0:/) || (/^Source:/)) { print $_; + diff --git a/0002.patch b/0002.patch new file mode 100644 index 0000000..9092e2e --- /dev/null +++ b/0002.patch @@ -0,0 +1,24 @@ +From 00f3525a300c5a09d9b379832c17457be2e2d0f4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Aug 2017 09:45:31 +0200 +Subject: [PATCH] lvmmerge: depend on systemd + +Fixes https://github.com/dracutdevs/dracut/issues/267 +--- + modules.d/80lvmmerge/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/80lvmmerge/module-setup.sh b/modules.d/80lvmmerge/module-setup.sh +index dddb6ec1..89c93f31 100755 +--- a/modules.d/80lvmmerge/module-setup.sh ++++ b/modules.d/80lvmmerge/module-setup.sh +@@ -10,7 +10,7 @@ check() { + + # called by dracut + depends() { +- echo lvm ++ echo lvm dracut-systemd systemd + return 0 + } + + diff --git a/0003.patch b/0003.patch new file mode 100644 index 0000000..db7a6aa --- /dev/null +++ b/0003.patch @@ -0,0 +1,24 @@ +From 3bd3ef5819141b06eb4d5c9e139e047efccb6d1f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 14 Aug 2017 14:58:47 +0200 +Subject: [PATCH] kernel-modules: don't call instmods with empty arguments + +otherwise it will try to read from stdin and stall +--- + modules.d/90kernel-modules/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh +index 462b5417..c6405e95 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -57,7 +57,7 @@ installkernel() { + if [[ -z $filesystems ]]; then + dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs' + fi +- else ++ elif [[ "${host_fs_types[*]}" ]]; then + hostonly='' instmods "${host_fs_types[@]}" + fi + fi + diff --git a/0004.patch b/0004.patch new file mode 100644 index 0000000..118eac3 --- /dev/null +++ b/0004.patch @@ -0,0 +1,32 @@ +From e5d60187837a0a6d80f719fd6e9238adcc3ebbb9 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 16 Aug 2017 10:16:55 +0200 +Subject: [PATCH] Merge pull request #268 from danimo/ssh_include_nss + +ssh-client: Include nss_ libraries +--- + modules.d/95ssh-client/module-setup.sh | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh +index 2a7e0ee3..672de502 100755 +--- a/modules.d/95ssh-client/module-setup.sh ++++ b/modules.d/95ssh-client/module-setup.sh +@@ -63,7 +63,16 @@ inst_sshenv() + + # called by dracut + install() { ++ local _nsslibs ++ + inst_multiple ssh scp + inst_sshenv ++ ++ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \ ++ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|') ++ _nsslibs=${_nsslibs#|} ++ _nsslibs=${_nsslibs%|} ++ ++ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' + } + + diff --git a/0005.patch b/0005.patch new file mode 100644 index 0000000..d80f8aa --- /dev/null +++ b/0005.patch @@ -0,0 +1,95 @@ +From 721bec3f143141fe3243e9f9dda9931f99b6b085 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 18 Aug 2017 09:33:10 +0200 +Subject: [PATCH] Merge pull request #269 from xlpang/master + +introduce new "--no-hostonly-default-device" argument +--- + dracut.8.asc | 4 ++++ + dracut.sh | 11 +++++++++-- + modules.d/95rootfs-block/module-setup.sh | 6 ++++++ + 3 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/dracut.8.asc b/dracut.8.asc +index ca169189..23c53cc4 100644 +--- a/dracut.8.asc ++++ b/dracut.8.asc +@@ -323,6 +323,10 @@ provide a valid _/etc/fstab_. + **--no-hostonly-cmdline**: + Do not store kernel command line arguments needed in the initramfs + ++**--no-hostonly-default-device**: ++ Do not generate implicit host devices like root, swap, fstab, etc. ++ Use "--mount" or "--add-device" to explicitly add devices as needed. ++ + **--hostonly-i18n**: + Install only needed keyboard and font files according to the host configuration (default). + +diff --git a/dracut.sh b/dracut.sh +index 3a136d46..681a6b7a 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -151,6 +151,10 @@ Creates initial ramdisk images for preloading modules + in the initramfs + --no-hostonly-cmdline Do not store kernel command line arguments needed + in the initramfs ++ --no-hostonly-default-device ++ Do not generate implicit host devices like root, ++ swap, fstab, etc. Use "--mount" or "--add-device" ++ to explicitly add devices as needed. + --hostonly-i18n Install only needed keyboard and font files according + to the host configuration (default). + --no-hostonly-i18n Install all keyboard and font files available. +@@ -345,6 +349,7 @@ rearrange_params() + --long no-host-only \ + --long hostonly-cmdline \ + --long no-hostonly-cmdline \ ++ --long no-hostonly-default-device \ + --long persistent-policy: \ + --long fstab \ + --long help \ +@@ -539,6 +544,8 @@ while :; do + i18n_install_all_l="yes" ;; + --no-hostonly-cmdline) + hostonly_cmdline_l="no" ;; ++ --no-hostonly-default-device) ++ hostonly_default_device="no" ;; + --persistent-policy) + persistent_policy_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; + --fstab) use_fstab_l="yes" ;; +@@ -1133,7 +1140,7 @@ if (( ${#add_device_l[@]} )); then + push_host_devs "${add_device_l[@]}" + fi + +-if [[ $hostonly ]]; then ++if [[ $hostonly ]] && [[ "$hostonly_default_device" != "no" ]]; then + # in hostonly mode, determine all devices, which have to be accessed + # and examine them for filesystem types + +@@ -1300,7 +1307,7 @@ export initdir dracutbasedir \ + dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \ + mods_to_load \ + fw_dir drivers_dir debug no_kernel kernel_only \ +- omit_drivers mdadmconf lvmconf root_dev \ ++ omit_drivers mdadmconf lvmconf root_devs \ + use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ + stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ + debug host_fs_types host_devs swap_devs sshkey add_fstab \ +diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh +index 2b06bac2..987373b4 100755 +--- a/modules.d/95rootfs-block/module-setup.sh ++++ b/modules.d/95rootfs-block/module-setup.sh +@@ -32,6 +32,12 @@ cmdline_journal() { + cmdline_rootfs() { + local _dev=/dev/block/$(find_root_block_device) + local _fstype _flags _subvol ++ ++ # "--no-hostonly-default-device" can result in empty root_devs ++ if [ "${#root_devs[@]}" -eq 0 ]; then ++ return ++ fi ++ + if [ -e $_dev ]; then + printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")" + _fstype="$(find_mp_fstype /)" + diff --git a/0006.patch b/0006.patch new file mode 100644 index 0000000..aea9717 --- /dev/null +++ b/0006.patch @@ -0,0 +1,23 @@ +From 15d00459c3ec0fe665037e3b7f5834ca8ef35cfe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 23 Aug 2017 09:31:53 +0200 +Subject: [PATCH] Merge pull request #272 from yzygitzh/no-lsinitrd-if-quiet + +dracut.sh: disable lsinitrd logging when quiet +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 681a6b7a..06127ca4 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1759,7 +1759,7 @@ if ! ( + exit 1 + fi + +-if (( maxloglvl >= 5 )); then ++if (( maxloglvl >= 5 )) && (( verbosity_mod_l >= 0 )); then + if [[ $allowlocal ]]; then + "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img"| ddebug + else diff --git a/dracut.spec b/dracut.spec index 8b8ed7d..3c3c281 100644 --- a/dracut.spec +++ b/dracut.spec @@ -14,7 +14,7 @@ %define with_nbd 0 %endif -%define dist_free_release 2.git20170811 +%define dist_free_release 7.git20170824 Name: dracut Version: 046 @@ -38,6 +38,11 @@ URL: https://dracut.wiki.kernel.org/ # http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz Patch1: 0001.patch +Patch2: 0002.patch +Patch3: 0003.patch +Patch4: 0004.patch +Patch5: 0005.patch +Patch6: 0006.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -517,6 +522,9 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Thu Aug 24 2017 Harald Hoyer - 046-7 +- git snapshot + * Fri Aug 11 2017 Harald Hoyer - 046-2 - add support for dist-tag less build