summaryrefslogtreecommitdiff
path: root/sys-kernel/dracut
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-kernel/dracut
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r--sys-kernel/dracut/Manifest6
-rw-r--r--sys-kernel/dracut/dracut-050-r2.ebuild171
-rw-r--r--sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch30
-rw-r--r--sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch111
-rw-r--r--sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch26
-rw-r--r--sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch48
-rw-r--r--sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch241
7 files changed, 633 insertions, 0 deletions
diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest
index e3034aa88faf..4e8cec5f1107 100644
--- a/sys-kernel/dracut/Manifest
+++ b/sys-kernel/dracut/Manifest
@@ -15,15 +15,21 @@ AUX 049-remove-bashism-in-various-boot-scripts.patch 3423 BLAKE2B a2a5946b53eee6
AUX 049-rngd-new-module-running-early-during-boot-to-help-ge.patch 3009 BLAKE2B 4a259a7f742574e02322bbd78337657daea8fe5c19e63331867c1e4b48bf68890860c1b91e420fa3b13412cad7eee64dcc69cb52ad93d28320cbf988726f22ed SHA512 8652310eaa1294f819e3d1c6dc9b2ae332652586462b044088167eb3a7af9d1303c2a667b75045d9b04deb4a9e1cdfd55aec85cf5f66b36412bfbe3b67bbaae5
AUX 050-Makefile-fix-VERSION-again.patch 1057 BLAKE2B 8373a43030c02bc0273aacb3f0f286d4f98812039c459ec16607e3e5b9bd83c367420c6b67d7cc8d2f6d9469bca2e5e5770f20390348e50abdbec7f12c4f36a3 SHA512 89e5ae4cf88d65ec5f31384c334b46f8e6e74a31e0225a62523524f87f35ead8cae221d3a0f8e5f837a1e22b51833db75b2d3f3b07fa3ac4ded5dac9012a8027
AUX 050-Makefile-merge-main-version-and-git-version-earlier.patch 3071 BLAKE2B 0d20b6ca7bb92aca21b3afaaee6fffb94c23de806ebe46383074979e0afedc893aec478122391d7c6015882b7882dd3f6e4124fa1f6fa1dc0bb48beae50d4d9d SHA512 ad9219c66b0a921b2fcb9dc325d1afd4c17d447228ee3b95b7a7e799acdc9d48d1d963842643d6ee6e90f8891d5c924c707331041cde53701261cb670adbcd33
+AUX 050-btrfs-force-preload-btrfs-module.patch 960 BLAKE2B 9837361b8f3559d87dc39374ca9cd8e2717f257dbb428d542e356672623c6b02d2a8aea5c0cbd2c64b01564a1ec08fc7288b993f46c7043327300ca684469168 SHA512 8fcd5579486ce2afc3164970bcd2eb23306d00bef3ce1458fd6f41664299a16c5772ed3f0d823861b698b01cf7a495412afb7f3a200e4c07e96ca3b617d8d6bf
AUX 050-busybox-module-fix.patch 3468 BLAKE2B a5292669c358f46ededf184e654213298e1e2a193e27b90cdb3913149cae40c2bfb70a8a211515ea7d3109fe87676ad71f93166dce793b7033ecfc05691e822c SHA512 a85d8f157d466e642c53436276777e6caf42aa3280cfa2d635c1541919484c50cccc232802131ce6776b1059151bdcfabdd3e4f69d697012d2e4d24a4793794b
+AUX 050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch 3655 BLAKE2B dc48d86fa1d78622bf0a7e5714de23d046515d3ad866f321769b0c56c243bdc6d6b45c69eb09e02477a79d90a546bdfcd767551b838f647f07179c9174ff46f7 SHA512 774602605b552343b0f26bcc7311c118bbb816bae9a1d798e650b72105c7a44ada8bfe238a66619ef6ee345534ef6a6d3c6449eaad51ba0ecf483fcc4aac1fb8
AUX 050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch 2779 BLAKE2B edb10ef79fd22863aef5184ca0d7abc88602cf3e8a3cfd198047e0970d10e9aa56e1222dc44a089afb3a0f15caa87e4e3233b32980b5fd56e9975196350000f4 SHA512 a31cfceb9ab53e53ce3f69ed6388bf7cfcf40ad7b036197194f34cd973a74e28ac8bfb7bf7d79068b48fc8c5feaf26540948b8008c1fdab997587bf4b31f8b71
AUX 050-gentoo-ldconfig-paths.patch 1420 BLAKE2B 3ff093e1d244288585c369f0e3c1bc346abe1ee2ce8ee399098559765fa4e3a96611269de5f4edebe435e5a71fa1bb99eb650fcb221fad188e019837261645f4 SHA512 aa99bb08dbc8e38ee1794b7d77e5e6656afa7f6c67684d1b3fb6368861630ea7c7711d84cc48c2c5cf3b1fd98aa2673f816e4f5ebf651b63a07ded93b00d371a
+AUX 050-lvm-fix-removal-of-pvscan-from-udev-rules.patch 1270 BLAKE2B ac4b93d0ed469ca9d2ba2ad9ca83b1f0efce590758bdd824278e9409fd4706e975d3fa9a10733775cc5b0a3a4665260d8869291de5a1f89c810c01a7cf0889e4 SHA512 7466c66f570c9a097b701a91d2735469187e879d2dec2ff2d10322ad39c86f3a5c70fc778d13b42014ba9754a6d1bea6d37f3ee456cbe4ec075dd676cf09093d
+AUX 050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch 1627 BLAKE2B c45b8efef1612ede5021be1bfe2135586286b4ac8d501ce6cde518eefb699c143fec1ec858e4320ba473feb06e88896ab0f4b2f738c6a5a98c20a161d11f508a SHA512 e070f24f0d0e95a14ee503e0cbc62d87b32ad678c12a8054c1a0c505d9ae833cd37052d51fe8d1a2a608fd06a8894d06ea4da626aadf5e9e4dd39b2ea883aaae
+AUX 050-systemd-remove-obsolete-syslog-parameter.patch 8176 BLAKE2B abf1619f4010cd38d98814f8827d592394a7ed7acc4c19392751adea4a98ce4acfce12bae1c2d264c392c73081ae04a205cfccd3591de651b87301352bbbe68c SHA512 3609ea93b85f79d3451fc810164c1be61def3f8e016a1fc0963088f2a690c56680d0c49bad5f8398af80150bd07bf953de50fe8832a5b88da5c01eead5fdbe7f
DIST dracut-048.tar.xz 308484 BLAKE2B b19c8122034a8b40cbc9d09245730900b59691c336f1d231e768786ad64068e0a8daf57ae9a4182ab50d9e1c683c9b7dcac354eb26d8a60f061db78121bc11c7 SHA512 97fcfd5d314ef40687c245d95d2f1d0f3f9ff0472e66b6e6324bf9bd6b98186104f9d71fd9af344126d6ea9fa47b744d52831a374225633225f6f17fb15c04e0
DIST dracut-049.tar.gz 376857 BLAKE2B e50084164e26aae6de812345cc76782435ec84951b44eea454355d0c65fe84fdd0858733de534bdf018bdfd92922f0be30b74d74be329a918e55d96c5e4d4fb6 SHA512 51489570856538588868a66c7bcc8a3728574592529905484526c523398dc1b8f1416e6b264780303acd08d818417a9668b76f1d64d3194432b5af79dc15c9f7
DIST dracut-050.tar.xz 333592 BLAKE2B cb0bfa5a8e7547260b8a80a3606eb284182c062926269c85b09e07d26ad177df0eeaa64b17005bff9290611f1c83fc8cd8e2216cfe14b5e66ec7f659d4c2fa7b SHA512 eba046cf1c8013369a398e585e0bff233daa8595d469ce9acc8bbc6a32d55c6a5429d4219db19abbf6001104be05b357f0961f9e66b7f926039a5d3ee7c2b850
EBUILD dracut-048-r1.ebuild 4554 BLAKE2B 54bd6d89cc5085dfe7d6fa510651fdefb04e25b9ac05627646e9374d8ed6c0f2db184d1e9d948cbcd7ccca5c34f84c5a71de41c6af1d6b1962992ef04b369f45 SHA512 37cd893b1832e8c1fe2b54491372277978f68f3e21b763c9b8d70ba2507733d779fd40d748f08cb35015e0ef235dd8d3077202c9e8e286d6741da783d28c2e7c
EBUILD dracut-049-r3.ebuild 5702 BLAKE2B 2fbeb9e53586918a0b08d8c2a2c49971e822d7e81e7de0d2ff0988fd579dd45fadcc7e2af83502f7b6c07c7cfe3d05f97b92a1ea3dfd0dedaa843512c71e1ab3 SHA512 845b57da9622b554a8201f339b14718f86812e7e38a8d574df06a8ffc7c90dc1d521a33ef372e7c3119900c58e1db2602f70800cef8868a14aca4408b80f98bc
EBUILD dracut-050-r1.ebuild 4961 BLAKE2B 32cb56f32adcedc50eb40d7180f2694d8c38d324f4f80e8e8b4354cec1b788eda48ecb0a5f26ba0e1a0f3433a9cab98e14eb85d0c4a5f47d182906c8193b9a6d SHA512 f67020302c3749a50b997391e096b1d50e19fdee4fa8356f27ba065d89d03e2c8da927cd76b304e7e7a424b056efa270de4a25cc2ad332e301eb26c4a825a0aa
+EBUILD dracut-050-r2.ebuild 5308 BLAKE2B d187aa943373ec52f32275984384c334b87d6197bd311cfaa860804bb15a0b972b0aeab7fed7ea13e387905ae79b8abfc9aaf4a621d4a12c065f2bed55d65abe SHA512 13021f7d5cbd7cb026a0156fab55bddd5c1a55c8191f79a11ebeb1c6dfc26a4a5aff73ef27f458beb468f72a4188b05ba6079bb0be66279ae8af6644dd733949
EBUILD dracut-050.ebuild 4917 BLAKE2B 663b729efc3876fc84b172b78893eb196e74ab8333c597de73ec8ab508a6227b1da928c96bcfd0450ffe09923f0f6e5263b6210279f6b1344e8e16d166e77695 SHA512 ccc4c12698444667c87b78e2b202bca9aec59f67e71a1360e8a202a5dca55ff9901aa963337e78f8e639e80412a065b203c13444c2089ee007a5f8c8a75c3114
EBUILD dracut-9999.ebuild 4710 BLAKE2B e41d6ccd4d446f5a79dffbb874f26e1bd316b358de09d79a4893d72da7f237ddf9b62a267b2b35844f0ac8391597072ce739899d1aed1b04164e23df95688e55 SHA512 72a8360ab329bfb29100a8ea2cb9cc57d30594c0f8b7f5ea0e7ac310277be61f215fa378edadf5c8b77d55c51357893d8be409c6dd09024bf3d6ee6031a6879d
MISC metadata.xml 725 BLAKE2B 475d51f4e2bebf318ef94ea1fec40a34bcf04b4f0c69e051c8840e0965a92fd9861c5aa8acfb2ccb5a4cf354665ab3efc6adfdf7d0191325c1f798ea5e49594e SHA512 b708d0eb6a792d5ba3495f321af5e10672af3354f1f42c60b175b7fb48ae836e24db7768511c44cbb0a949c1cca75948890d3b32904bbe47e50d9c43d71787fb
diff --git a/sys-kernel/dracut/dracut-050-r2.ebuild b/sys-kernel/dracut/dracut-050-r2.ebuild
new file mode 100644
index 000000000000..db03491b7c27
--- /dev/null
+++ b/sys-kernel/dracut/dracut-050-r2.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 eutils linux-info systemd toolchain-funcs
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz"
+fi
+
+DESCRIPTION="Generic initramfs generation tool"
+HOMEPAGE="https://dracut.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="selinux"
+
+# Tests need root privileges, bug #298014
+RESTRICT="test"
+
+RDEPEND="
+ app-arch/cpio
+ >=app-shells/bash-4.0:0
+ sys-apps/coreutils[xattr(-)]
+ >=sys-apps/kmod-23[tools]
+ || (
+ >=sys-apps/sysvinit-2.87-r3
+ sys-apps/openrc[sysv-utils(-),selinux?]
+ sys-apps/systemd[sysv-utils]
+ )
+ >=sys-apps/util-linux-2.21
+ virtual/pkgconfig
+ virtual/udev
+
+ elibc_musl? ( sys-libs/fts-standalone )
+ selinux? (
+ sec-policy/selinux-dracut
+ sys-libs/libselinux
+ sys-libs/libsepol
+ )
+"
+DEPEND="
+ >=sys-apps/kmod-23
+ elibc_musl? ( sys-libs/fts-standalone )
+"
+
+BDEPEND="
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ >=app-text/docbook-xsl-stylesheets-1.75.2
+ >=dev-libs/libxslt-1.1.26
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules
+ README.testsuite TODO )
+
+QA_MULTILIB_PATHS="usr/lib/dracut/.*"
+
+PATCHES=(
+ "${FILESDIR}"/050-Makefile-merge-main-version-and-git-version-earlier.patch
+ "${FILESDIR}"/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch
+ "${FILESDIR}"/050-Makefile-fix-VERSION-again.patch
+ "${FILESDIR}"/050-btrfs-force-preload-btrfs-module.patch
+ "${FILESDIR}"/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch
+ "${FILESDIR}"/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch
+ "${FILESDIR}"/050-busybox-module-fix.patch
+ "${FILESDIR}"/050-systemd-remove-obsolete-syslog-parameter.patch
+ "${FILESDIR}"/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch
+ "${FILESDIR}"/050-gentoo-ldconfig-paths.patch
+)
+
+src_configure() {
+ local myconf=(
+ --prefix="${EPREFIX}/usr"
+ --sysconfdir="${EPREFIX}/etc"
+ --bashcompletiondir="$(get_bashcompdir)"
+ --systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ tc-export CC PKG_CONFIG
+
+ echo ./configure "${myconf[@]}"
+ ./configure "${myconf[@]}" || die
+
+ if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
+ # Source tarball from github doesn't include this file
+ echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
+ fi
+}
+
+src_install() {
+ default
+
+ insinto /etc/logrotate.d
+ newins dracut.logrotate dracut
+
+ docinto html
+ dodoc dracut.html
+}
+
+pkg_postinst() {
+ if linux-info_get_any_version && linux_config_exists; then
+ ewarn ""
+ ewarn "If the following test report contains a missing kernel"
+ ewarn "configuration option, you should reconfigure and rebuild your"
+ ewarn "kernel before booting image generated with this Dracut version."
+ ewarn ""
+
+ local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
+
+ # Kernel configuration options descriptions:
+ local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
+ ERROR_DEVTMPFS+='is missing and REQUIRED'
+ local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
+ ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
+
+ check_extra_config
+ echo
+ else
+ ewarn ""
+ ewarn "Your kernel configuration couldn't be checked."
+ ewarn "Please check manually if following options are enabled:"
+ ewarn ""
+ ewarn " CONFIG_BLK_DEV_INITRD"
+ ewarn " CONFIG_DEVTMPFS"
+ ewarn ""
+ fi
+
+ elog "To get additional features, a number of optional runtime"
+ elog "dependencies may be installed:"
+ elog ""
+ optfeature "Networking support" net-misc/networkmanager
+ optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
+ sys-apps/iproute2 "net-misc/iputils[arping]"
+ optfeature \
+ "Measure performance of the boot process for later visualisation" \
+ app-benchmarks/bootchart2 app-admin/killproc sys-process/acct
+ optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
+ optfeature "Load kernel modules and drop this privilege for real init" \
+ sys-libs/libcap
+ optfeature "Support CIFS" net-fs/cifs-utils
+ optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
+ "sys-fs/cryptsetup[-static-libs]"
+ optfeature "Support for GPG-encrypted keys for crypt module" \
+ app-crypt/gnupg
+ optfeature \
+ "Allows use of dash instead of default bash (on your own risk)" \
+ app-shells/dash
+ optfeature "Support iSCSI" sys-block/open-iscsi
+ optfeature "Support Logical Volume Manager" sys-fs/lvm2
+ optfeature "Support MD devices, also known as software RAID devices" \
+ sys-fs/mdadm
+ optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
+ optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
+ optfeature "Support network block devices" sys-block/nbd
+ optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
+ optfeature \
+ "Install ssh and scp along with config files and specified keys" \
+ net-misc/openssh
+ optfeature "Enable logging with rsyslog" app-admin/rsyslog
+ optfeature \
+ "Enable rngd service to help generating entropy early during boot" \
+ sys-apps/rng-tools
+}
diff --git a/sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch b/sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch
new file mode 100644
index 000000000000..386722c2ae82
--- /dev/null
+++ b/sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch
@@ -0,0 +1,30 @@
+From 0402b3777b1c64bd716f588ff7457b905e98489d Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald@redhat.com>
+Date: Wed, 11 Mar 2020 12:56:52 +0100
+Subject: [PATCH] btrfs: force preload btrfs module
+
+fixes https://github.com/dracutdevs/dracut/issues/658
+
+raid6_pq and xor takes time doing benchmarking
+
+[ 3.983009] request_module fs-btrfs succeeded, but still no fs?
+---
+ modules.d/90btrfs/module-setup.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
+index b0d0058b..66a254e1 100755
+--- a/modules.d/90btrfs/module-setup.sh
++++ b/modules.d/90btrfs/module-setup.sh
+@@ -48,5 +48,7 @@ install() {
+
+ inst_multiple -o btrfsck btrfs-zero-log
+ inst $(command -v btrfs) /sbin/btrfs
++ # Hack for slow machines
++ # see https://github.com/dracutdevs/dracut/issues/658
++ echo "rd.driver.pre=btrfs" > ${initdir}/etc/cmdline.d/00-btrfs.conf
+ }
+-
+--
+2.26.2
+
diff --git a/sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch b/sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch
new file mode 100644
index 000000000000..11ca7add6d6f
--- /dev/null
+++ b/sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch
@@ -0,0 +1,111 @@
+From 8e1a4dc5f8a777fc718db490414ffdc9dc755f66 Mon Sep 17 00:00:00 2001
+From: Jonas Witschel <diabonas@archlinux.org>
+Date: Sat, 18 Apr 2020 14:55:41 +0200
+Subject: [PATCH] dracut-lib.sh: quote variables in parameter expansion
+ patterns
+
+According to POSIX.1-2017, 2.6.2 Parameter Expansion:
+
+${parameter%[word]} [...] The word shall be expanded to produce a
+pattern.
+
+This means if word contains variables that itself contain special
+characters like asterisks or backslashes, these are treated as pattern
+characters unless the variable is quoted. Try e.g. the following example
+in bash, dash or (busybox) ash:
+
+i='a\c'; j='\'; echo "${i%$j*}"
+
+This prints "a\c" because "$j*" is expanded to "\*", escaping the
+asterisk. In contrast,
+
+i='a\c'; j='\'; echo "${i%"$j"*}"
+
+produces the expected result "a" because the backslash is not specially
+treated any more after quoting.
+
+The quotes that this commit adds have been previously removed in commit
+f9c96cf56fed390841eac05c43826e62014c9188, citing issues with busybox
+hush without further specifying the actual error. I tested a recent
+busybox build (upstream commit 9aa751b08ab03d6396f86c3df77937a19687981b)
+and couldn't find any problems. Note that the above example always
+produces "a\c" in hush regardless of quoting $j, making hush unsuitable
+for use with dracut, but using quotes in parameter expansions generally
+works.
+
+The unquoted variables break the "rd.luks.uuid/name" kernel command line
+options in dracut 050 because
+
+str_replace "$luksname" '\' '\\'
+
+in modules.d/90crypt/parse-crypt.sh is not able to escape the
+backslashes any more, see GH-723, GH-727: backslashes in the
+systemd-cryptsetup@.service unit name stay unescaped for use in udev
+(cf. commit 0f6d93eb9d63695a64002ec8b0421fbc9fc8a7a3), leading to
+failures in starting the unit.
+
+This partially reverts commit f9c96cf56fed390841eac05c43826e62014c9188.
+---
+ modules.d/99base/dracut-lib.sh | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
+index c53cd13b..c57523d3 100755
+--- a/modules.d/99base/dracut-lib.sh
++++ b/modules.d/99base/dracut-lib.sh
+@@ -24,7 +24,7 @@ debug_on() {
+
+ # returns OK if $1 contains literal string $2 (and isn't empty)
+ strstr() {
+- [ "${1##*$2*}" != "$1" ]
++ [ "${1##*"$2"*}" != "$1" ]
+ }
+
+ # returns OK if $1 matches (completely) glob pattern $2
+@@ -43,18 +43,18 @@ strglobin() {
+
+ # returns OK if $1 contains literal string $2 at the beginning, and isn't empty
+ str_starts() {
+- [ "${1#$2*}" != "$1" ]
++ [ "${1#"$2"*}" != "$1" ]
+ }
+
+ # returns OK if $1 contains literal string $2 at the end, and isn't empty
+ str_ends() {
+- [ "${1%*$2}" != "$1" ]
++ [ "${1%*"$2"}" != "$1" ]
+ }
+
+ trim() {
+ local var="$*"
+- var="${var#${var%%[![:space:]]*}}" # remove leading whitespace characters
+- var="${var%${var##*[![:space:]]}}" # remove trailing whitespace characters
++ var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
++ var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
+ printf "%s" "$var"
+ }
+
+@@ -108,9 +108,9 @@ str_replace() {
+ local out=''
+
+ while strstr "${in}" "$s"; do
+- chop="${in%%$s*}"
++ chop="${in%%"$s"*}"
+ out="${out}${chop}$r"
+- in="${in#*$s}"
++ in="${in#*"$s"}"
+ done
+ echo "${out}${in}"
+ }
+@@ -396,7 +396,7 @@ splitsep() {
+ while [ -n "$str" -a "$#" -gt 1 ]; do
+ tmp="${str%%$sep*}"
+ eval "$1='${tmp}'"
+- str="${str#$tmp}"
++ str="${str#"$tmp"}"
+ str="${str#$sep}"
+ shift
+ done
+--
+2.26.2
+
diff --git a/sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch b/sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch
new file mode 100644
index 000000000000..8b93afc358ea
--- /dev/null
+++ b/sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch
@@ -0,0 +1,26 @@
+From 07417b7fc5cb261187519c916e4735189f20f4c6 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Sat, 23 May 2020 18:03:47 +0300
+Subject: [PATCH] lvm: fix removal of pvscan from udev rules
+
+udev rules provided by lvm 2.02.128 and newer uses '+=' instead of '='.
+---
+ modules.d/90lvm/module-setup.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
+index d6d2c185..52c803f7 100755
+--- a/modules.d/90lvm/module-setup.sh
++++ b/modules.d/90lvm/module-setup.sh
+@@ -101,7 +101,7 @@ install() {
+ sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
+ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
++ sed -i -e 's/^ENV{SYSTEMD_WANTS}+\?=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+ else
+ sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
+ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
+--
+2.26.2
+
diff --git a/sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch b/sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch
new file mode 100644
index 000000000000..d97193c9b13d
--- /dev/null
+++ b/sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch
@@ -0,0 +1,48 @@
+From 3dcaa97ca4dcfa8092252a22df62c60941e59ce3 Mon Sep 17 00:00:00 2001
+From: Beniamino Galvani <bgalvani@redhat.com>
+Date: Wed, 11 Mar 2020 09:40:50 +0100
+Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when
+ needed
+
+The network-manager command line hook must install a
+initqueue/finished hook to ensure that nm-run.sh is executed when
+there are network connections to activate.
+
+Fixes: #694
+---
+ modules.d/35network-manager/nm-config.sh | 11 +++++++++++
+ modules.d/35network-manager/nm-run.sh | 2 ++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
+index 1efa737c..39a1c8bd 100755
+--- a/modules.d/35network-manager/nm-config.sh
++++ b/modules.d/35network-manager/nm-config.sh
+@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
+ fi
+
+ /usr/libexec/nm-initrd-generator -- $(getcmdline)
++
++if getargbool 0 rd.neednet; then
++ for i in /usr/lib/NetworkManager/system-connections/* \
++ /run/NetworkManager/system-connections/* \
++ /etc/NetworkManager/system-connections/* \
++ /etc/sysconfig/network-scripts/ifcfg-*; do
++ [ -f "$i" ] || continue
++ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh
++ break
++ done
++fi
+diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
+index 4079b735..fc5280a1 100755
+--- a/modules.d/35network-manager/nm-run.sh
++++ b/modules.d/35network-manager/nm-run.sh
+@@ -22,3 +22,5 @@ do
+ source_hook initqueue/online $ifname
+ /sbin/netroot $ifname
+ done
++
++> /tmp/nm.done
+--
+2.26.2
+
diff --git a/sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch b/sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch
new file mode 100644
index 000000000000..f24cf11b37b3
--- /dev/null
+++ b/sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch
@@ -0,0 +1,241 @@
+From 265f696b532f63f0ac1f9f341e0469a6eafe2fdd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:26:00 +0000
+Subject: [PATCH 01/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/90stratis/stratisd-init.service | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/modules.d/90stratis/stratisd-init.service b/modules.d/90stratis/stratisd-init.service
+index 318e8c27..1be2e33b 100644
+--- a/modules.d/90stratis/stratisd-init.service
++++ b/modules.d/90stratis/stratisd-init.service
+@@ -8,8 +8,6 @@ DefaultDependencies=no
+ Type=simple
+ ExecStart=/sbin/stratisd-init --debug
+ KillSignal=SIGINT
+-StandardOutput=syslog
+-StandardError=syslog
+
+ [Install]
+ WantedBy=sysinit.target
+--
+2.26.2
+
+From 38ba90bf88b38228e128c65be40a2da287c0b1ed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:29:34 +0000
+Subject: [PATCH 02/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/99squash/squash-mnt-clear.service | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
+index 84441f60..9d94c524 100644
+--- a/modules.d/99squash/squash-mnt-clear.service
++++ b/modules.d/99squash/squash-mnt-clear.service
+@@ -12,6 +12,6 @@ ConditionPathExists=/squash/root
+ Type=oneshot
+ RemainAfterExit=no
+ StandardInput=null
+-StandardOutput=syslog+console
+-StandardError=syslog+console
++StandardOutput=journal+console
++StandardError=journal+console
+ ExecStart=/squash/clear-squash.sh
+--
+2.26.2
+
+From 5cb2a4004d18e4b96ddc18f221fae922350a9000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:31:17 +0000
+Subject: [PATCH 03/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-pre-trigger.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.service b/modules.d/98dracut-systemd/dracut-pre-trigger.service
+index 7bf16167..6f1ba521 100644
+--- a/modules.d/98dracut-systemd/dracut-pre-trigger.service
++++ b/modules.d/98dracut-systemd/dracut-pre-trigger.service
+@@ -20,8 +20,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-pre-trigger
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+
+From 317d841c788e841d3533515ceda5597a099eb64e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:31:59 +0000
+Subject: [PATCH 04/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-initqueue.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-initqueue.service b/modules.d/98dracut-systemd/dracut-initqueue.service
+index 207d545d..3a8679a5 100644
+--- a/modules.d/98dracut-systemd/dracut-initqueue.service
++++ b/modules.d/98dracut-systemd/dracut-initqueue.service
+@@ -21,8 +21,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-initqueue
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+
+From 0c1bd016ecfb9c6d194c4356199b509d90db4071 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:32:44 +0000
+Subject: [PATCH 05/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-pre-pivot.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.service b/modules.d/98dracut-systemd/dracut-pre-pivot.service
+index 9a1f0854..e893d1dd 100644
+--- a/modules.d/98dracut-systemd/dracut-pre-pivot.service
++++ b/modules.d/98dracut-systemd/dracut-pre-pivot.service
+@@ -27,8 +27,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-pre-pivot
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+
+From e1130a83405648777210fdc99f7eee087eebaadc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:33:33 +0000
+Subject: [PATCH 06/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-pre-udev.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-pre-udev.service b/modules.d/98dracut-systemd/dracut-pre-udev.service
+index 570ec02d..e4092e35 100644
+--- a/modules.d/98dracut-systemd/dracut-pre-udev.service
++++ b/modules.d/98dracut-systemd/dracut-pre-udev.service
+@@ -24,8 +24,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-pre-udev
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+
+From c437933cb0490e800e776cb7695d2ea0e95056a2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:34:17 +0000
+Subject: [PATCH 07/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-pre-mount.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.service b/modules.d/98dracut-systemd/dracut-pre-mount.service
+index d3909689..18c9730c 100644
+--- a/modules.d/98dracut-systemd/dracut-pre-mount.service
++++ b/modules.d/98dracut-systemd/dracut-pre-mount.service
+@@ -19,8 +19,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-pre-mount
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+
+From d9149c6ca7c52c204c1b346e9b6a32bbadd0b2ff Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:35:02 +0000
+Subject: [PATCH 08/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-cmdline.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-cmdline.service b/modules.d/98dracut-systemd/dracut-cmdline.service
+index e577ec88..a8078bd2 100644
+--- a/modules.d/98dracut-systemd/dracut-cmdline.service
++++ b/modules.d/98dracut-systemd/dracut-cmdline.service
+@@ -23,8 +23,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-cmdline
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+
+From 8cb5ac1b30be458df9497911ba601d90e68f4d5b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
+Date: Wed, 15 Jul 2020 14:35:38 +0000
+Subject: [PATCH 09/10] As of v246 of systemd "syslog" and "syslog-console"
+ switches have been deprecated
+
+---
+ modules.d/98dracut-systemd/dracut-mount.service | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service
+index 77d34f62..c88e6d84 100644
+--- a/modules.d/98dracut-systemd/dracut-mount.service
++++ b/modules.d/98dracut-systemd/dracut-mount.service
+@@ -19,8 +19,7 @@ Environment=NEWROOT=/sysroot
+ Type=oneshot
+ ExecStart=-/bin/dracut-mount
+ StandardInput=null
+-StandardOutput=syslog
+-StandardError=syslog+console
++StandardError=journal+console
+ KillMode=process
+ RemainAfterExit=yes
+
+--
+2.26.2
+