From 5af34233777c3189c24d2f8f25059296e90c5d70 Mon Sep 17 00:00:00 2001 From: Margarita Manterola Date: Thu, 25 Mar 2021 10:45:23 +0000 Subject: [PATCH] Update dracut to the portage-stable version We need to customize dracut. Currently the version in portage-stable is picked because it's newer than the one in coreos-overlay. This commit updates coreos-overlay to the same versions available in portage-stable. --- .../coreos-overlay/sys-kernel/dracut/Manifest | 5 +- .../sys-kernel/dracut/dracut-044-r1.ebuild | 259 ------------------ .../sys-kernel/dracut/dracut-044-r3.ebuild | 246 ----------------- .../sys-kernel/dracut/dracut-045-r2.ebuild | 164 ----------- .../sys-kernel/dracut/dracut-046-r1.ebuild | 165 ----------- .../sys-kernel/dracut/dracut-048-r1.ebuild | 6 +- .../sys-kernel/dracut/dracut-048.ebuild | 148 ---------- ...cut-047-r1.ebuild => dracut-049-r3.ebuild} | 86 +++--- ...cut-049-r2.ebuild => dracut-050-r1.ebuild} | 33 ++- ...dracut-049.ebuild => dracut-050-r2.ebuild} | 61 +++-- ...dracut-049-r1.ebuild => dracut-050.ebuild} | 31 ++- .../sys-kernel/dracut/dracut-9999.ebuild | 26 +- ...sh-dev_unit_name-guard-against-dev-b.patch | 32 --- ...initrd-add-initrd-root-device.target.patch | 24 -- ...-dracut.install-use-bin-bash-shebang.patch | 23 -- .../dracut/files/045-systemdutildir.patch | 45 --- .../dracut/files/046-amd-microcode.patch | 30 -- ...7-all-fix-issues-found-by-shellcheck.patch | 77 ------ ...-fix-detection-of-plymouth-directory.patch | 31 --- ...find-cflags-and-libs-for-fts-on-musl.patch | 97 +++++++ ...ate-locking-directory-run-cryptsetup.patch | 32 +++ ...upport-the-compressed-firmware-files.patch | 63 +++++ .../049-dracut.sh-Fix-udevdir-detection.patch | 38 +++ .../files/049-fs-lib-drop-a-bashism.patch | 99 +++++++ ...nstall.c-install-module-dependencies.patch | 79 ++++++ ...ash_func-should-not-be-fed-with-NULL.patch | 38 +++ ...-systemdutildir-variable-before-it-s.patch | 55 ++++ ...call-the-online-hook-for-connected-d.patch | 32 +++ ...fix-getting-of-ifname-from-the-sysfs.patch | 37 +++ ...nager-remove-useless-use-of-basename.patch | 26 ++ ...running-early-during-boot-to-help-ge.patch | 88 ++++++ .../050-Makefile-fix-VERSION-again.patch | 34 +++ ...main-version-and-git-version-earlier.patch | 78 ++++++ ...050-btrfs-force-preload-btrfs-module.patch | 30 ++ .../dracut/files/050-busybox-module-fix.patch | 102 +++++++ ...ote-variables-in-parameter-expansion.patch | 111 ++++++++ ...call-fsfreeze-on-subvol-of-root-file.patch | 75 +++++ .../files/050-gentoo-ldconfig-paths.patch | 39 +++ ...ix-removal-of-pvscan-from-udev-rules.patch | 26 ++ ...ensure-that-nm-run.sh-is-executed-wh.patch | 48 ++++ ...emd-remove-obsolete-syslog-parameter.patch | 241 ++++++++++++++++ .../dracut/files/dracut-044-bash-4.4.patch | 80 ------ ...cut-044-preserve-xattrs-when-copying.patch | 51 ---- .../sys-kernel/dracut/metadata.xml | 4 - 44 files changed, 1621 insertions(+), 1474 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r1.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r3.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-045-r2.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-046-r1.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048.ebuild rename sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/{dracut-047-r1.ebuild => dracut-049-r3.ebuild} (62%) rename sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/{dracut-049-r2.ebuild => dracut-050-r1.ebuild} (82%) rename sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/{dracut-049.ebuild => dracut-050-r2.ebuild} (70%) rename sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/{dracut-049-r1.ebuild => dracut-050.ebuild} (82%) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0001-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0002-systemd-initrd-add-initrd-root-device.target.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0003-50-dracut.install-use-bin-bash-shebang.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/045-systemdutildir.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/046-amd-microcode.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-all-fix-issues-found-by-shellcheck.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-plymouth-fix-detection-of-plymouth-directory.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-configure-find-cflags-and-libs-for-fts-on-musl.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-crypt-create-locking-directory-run-cryptsetup.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut-install-Support-the-compressed-firmware-files.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut.sh-Fix-udevdir-detection.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-fs-lib-drop-a-bashism.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-dracut-install.c-install-module-dependencies.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-string_hash_func-should-not-be-fed-with-NULL.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-move-setting-the-systemdutildir-variable-before-it-s.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-call-the-online-hook-for-connected-d.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-fix-getting-of-ifname-from-the-sysfs.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-remove-useless-use-of-basename.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-rngd-new-module-running-early-during-boot-to-help-ge.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-merge-main-version-and-git-version-earlier.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-busybox-module-fix.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-gentoo-ldconfig-paths.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-bash-4.4.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-preserve-xattrs-when-copying.patch diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/Manifest index 7b97320d25..2435b6db97 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/Manifest @@ -1,6 +1,3 @@ -DIST dracut-044.tar.xz 280004 BLAKE2B 5b9603eb769b542e2d56fae4d0f0fe250e7e60eb9c85f9c7b7a472b9d889a9f323b3ba1cbbeb1d5de10507498542275cd4430695cc8b48426b42c03d0672ea87 SHA512 bc788076e425b223d98cf0e0b15ff57d75d423991d7a67fb564a2857c38d5c3a21d846d2ca4523f9d4b0128bb981d09b5c26031435c5fc5e30f53080bca19b3d -DIST dracut-045.tar.xz 292652 BLAKE2B 0e7c57ddca6757d59823afdc4ff23dcb06cc9cec317ece8cca14c5b6dfd2a7984fb8e857f5f48ad61922ba11b4b68944b366bddb02552efb52375f6e12802de7 SHA512 b57aab1f6fbdd5ad52a13a0eb99937b1abcd11507a2a3e6ec9bcb94e578cc32edc01a814ea2cef93158c27c17e3e40bcdd32a66457a20363f8136b8b546bbb4a -DIST dracut-046.tar.xz 299520 BLAKE2B 1e2d848aa0db0e90734d8c60610a60b1f0ff67f8c4d4f9933bec0bc1290071b1b1ee3cdb6c3da5b82d8f6d4cc7561ee17d38685659a4a6ee48a9085e388dfced SHA512 75cefc184960024ef32f7bb5a0fe060e9c7d82dbfd0fe247d54b585e2ebbf0f8af5d5dc1be7e5e8cf2c3bc27b3293842c6361ae62d047289d0c59d7d40b09122 -DIST dracut-047.tar.xz 305836 BLAKE2B 18333ae1e24cfbbb6a152bf9ba2c48884821f6a506344259ba56c581a9f3efac7b4c88e8ca149ef1f83347a5e4d59acba61e42b8e0ab3a9e9beb8684d5db28b0 SHA512 03369726b6c2b682d0c9dead7b7dbd1c3989aaf2b4a561015634d33a94e5230d03cb634c3890191b19dd8c1c83389533ae1a46d45d2024ba885e0d2d46c5d035 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 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r1.ebuild deleted file mode 100644 index 546c11bb37..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r1.ebuild +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit bash-completion-r1 eutils linux-info multilib systemd - -DESCRIPTION="Generic initramfs generation tool" -HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ~arm ia64 ppc ~ppc64 sparc x86" -IUSE="debug selinux systemd" - -RESTRICT="test" - -CDEPEND="virtual/udev - systemd? ( >=sys-apps/systemd-199 ) - " -RDEPEND="${CDEPEND} - app-arch/cpio - >=app-shells/bash-4.0 - >sys-apps/kmod-5[tools] - || ( - >=sys-apps/sysvinit-2.87-r3 - sys-apps/systemd[sysv-utils] - ) - >=sys-apps/util-linux-2.21 - - debug? ( dev-util/strace ) - selinux? ( - sys-libs/libselinux - sys-libs/libsepol - sec-policy/selinux-dracut - ) - !>=app-shells/bash-4.4" -DEPEND="${CDEPEND} - app-text/asciidoc - >=dev-libs/libxslt-1.1.26 - app-text/docbook-xml-dtd:4.5 - >=app-text/docbook-xsl-stylesheets-1.75.2 - virtual/pkgconfig - " - -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules - README.testsuite TODO ) -MY_LIBDIR=/usr/lib -QA_MULTILIB_PATHS=" - usr/lib/dracut/dracut-install - usr/lib/dracut/skipcpio - " - -PATCHES=( - "${FILESDIR}"/044-0001-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch - "${FILESDIR}"/044-0002-systemd-initrd-add-initrd-root-device.target.patch - "${FILESDIR}"/044-0003-50-dracut.install-use-bin-bash-shebang.patch -) - -# -# Helper functions -# - -# Removes module from modules.d. -# $1 = module name -# Module name can be specified without number prefix. -rm_module() { - local force m - [[ $1 = -f ]] && force=-f - - for m in $@; do - if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then - rm ${force} --interactive=never -r "${modules_dir}"/$m - else - rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m - fi - done -} - -src_prepare() { - local libdirs="/$(get_libdir) /usr/$(get_libdir)" - if [[ ${SYMLINK_LIB} = yes ]]; then - # Preserve lib -> lib64 symlinks in initramfs - [[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" - fi - einfo "Setting libdirs to \"${libdirs}\" ..." - sed -e "3alibdirs=\"${libdirs}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - - local udevdir="$("$(tc-getPKG_CONFIG)" udev --variable=udevdir)" - einfo "Setting udevdir to ${udevdir}..." - sed -r -e "s|^(udevdir=).*$|\1${udevdir}|" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - - if use systemd; then - local systemdutildir="$(systemd_get_utildir)" - local systemdsystemunitdir="$(systemd_get_unitdir)" - local systemdsystemconfdir="$("$(tc-getPKG_CONFIG)" systemd \ - --variable=systemdsystemconfdir)" - [[ ${systemdsystemconfdir} ]] \ - || systemdsystemconfdir=/etc/systemd/system - einfo "Setting systemdutildir to ${systemdutildir} and ..." - sed -e "5asystemdutildir=\"${systemdutildir}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir} and..." - sed -e "6asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - einfo "Setting systemdsystemconfdir to ${systemdsystemconfdir}..." - sed -e "7asystemdsystemconfdir=\"${systemdsystemconfdir}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - else - local systemdutildir="/lib/systemd" - einfo "Setting systemdutildir for standalone udev to" \ - "${systemdutildir}..." - sed -e "5asystemdutildir=\"${systemdutildir}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - fi - - epatch "${PATCHES[@]}" - - epatch_user -} - -src_configure() { - local myconf=( - --libdir="${MY_LIBDIR}" - --bashcompletiondir="$(get_bashcompdir)" - ) - - if use systemd; then - myconf+=( --systemdsystemunitdir="$(systemd_get_unitdir)" ) - fi - - econf "${myconf[@]}" -} - -src_compile() { - tc-export CC - emake doc install/dracut-install skipcpio/skipcpio -} - -src_install() { - default - - local my_libdir="${MY_LIBDIR}" - local dracutlibdir="${my_libdir#/}/dracut" - - echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh" - - insinto "${dracutlibdir}/dracut.conf.d/" - newins dracut.conf.d/gentoo.conf.example gentoo.conf - - insinto /etc/logrotate.d - newins dracut.logrotate dracut - - dodir /var/lib/dracut/overlay - - dohtml dracut.html - - if ! use systemd; then - # Scripts in kernel/install.d are systemd-specific - rm -r "${D%/}/${my_libdir}/kernel" || die - fi - - # - # Modules - # - local module - modules_dir="${D%/}/${dracutlibdir}/modules.d" - - use debug || rm_module 95debug - use selinux || rm_module 98selinux - - if use systemd; then - # With systemd following modules do not make sense - rm_module 96securityfs 97masterkey 98integrity - else - rm_module 00systemd 98dracut-systemd - # Without systemd following modules do not make sense - rm_module 00systemd-bootchart 01systemd-initrd 02systemd-networkd - fi - - # Remove modules which won't work for sure - rm_module 95fcoe # no tools - # fips module depends on masked app-crypt/hmaccalc - rm_module 01fips 02fips-aesni -} - -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 desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" - local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ -"(initramfs/initrd) support" - - local opt desc - - # Generate ERROR_* variables for check_extra_config. - for opt in ${CONFIG_CHECK}; do - opt=${opt#\~} - desc=desc_${opt} - eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ - "is missing and REQUIRED'" - done - - check_extra_config - echo - else - ewarn "" - ewarn "Your kernel configuration couldn't be checked. Do you have" - ewarn "/usr/src/linux/.config file there? Please check manually if" - ewarn "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/curl "net-misc/dhcp[client]" \ - sys-apps/iproute2 - 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 syslog-ng or rsyslog" app-admin/syslog-ng \ - app-admin/rsyslog -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r3.ebuild deleted file mode 100644 index 282b0fb417..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-044-r3.ebuild +++ /dev/null @@ -1,246 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit bash-completion-r1 eutils linux-info toolchain-funcs systemd - -DESCRIPTION="Generic initramfs generation tool" -HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="debug selinux systemd" - -RESTRICT="test" - -CDEPEND="virtual/udev - systemd? ( - >=sys-apps/systemd-199 - virtual/pkgconfig - ) - " -RDEPEND="${CDEPEND} - app-arch/cpio - >=app-shells/bash-4.0 - >sys-apps/kmod-5[tools] - || ( - >=sys-apps/sysvinit-2.87-r3 - sys-apps/systemd[sysv-utils] - ) - >=sys-apps/util-linux-2.21 - - debug? ( dev-util/strace ) - selinux? ( - sys-libs/libselinux - sys-libs/libsepol - sec-policy/selinux-dracut - ) - " -DEPEND="${CDEPEND} - app-text/asciidoc - >=dev-libs/libxslt-1.1.26 - app-text/docbook-xml-dtd:4.5 - >=app-text/docbook-xsl-stylesheets-1.75.2 - virtual/pkgconfig - " - -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules - README.testsuite TODO ) -MY_LIBDIR=/usr/lib -QA_MULTILIB_PATHS=" - usr/lib/dracut/dracut-install - usr/lib/dracut/skipcpio - " - -PATCHES=( - "${FILESDIR}"/044-0001-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch - "${FILESDIR}"/044-0002-systemd-initrd-add-initrd-root-device.target.patch - "${FILESDIR}"/044-0003-50-dracut.install-use-bin-bash-shebang.patch - "${FILESDIR}"/dracut-044-bash-4.4.patch - "${FILESDIR}"/dracut-044-preserve-xattrs-when-copying.patch -) - -# -# Helper functions -# - -# Removes module from modules.d. -# $1 = module name -# Module name can be specified without number prefix. -rm_module() { - local force m - [[ $1 = -f ]] && force=-f - - for m in $@; do - if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then - rm ${force} --interactive=never -r "${modules_dir}"/$m - else - rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m - fi - done -} - -src_prepare() { - local libdirs="/$(get_libdir) /usr/$(get_libdir)" - if [[ ${SYMLINK_LIB} = yes ]]; then - # Preserve lib -> lib64 symlinks in initramfs - [[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" - fi - einfo "Setting libdirs to \"${libdirs}\" ..." - sed -e "3alibdirs=\"${libdirs}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - - local udevdir="$("$(tc-getPKG_CONFIG)" udev --variable=udevdir)" - einfo "Setting udevdir to ${udevdir}..." - sed -r -e "s|^(udevdir=).*$|\1${udevdir}|" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - - if ! use systemd; then - local systemdutildir="/lib/systemd" - einfo "Setting systemdutildir for standalone udev to" \ - "${systemdutildir}..." - sed -e "5asystemdutildir=\"${systemdutildir}\"" \ - -i "${S}/dracut.conf.d/gentoo.conf.example" || die - fi - - default -} - -src_configure() { - local myconf=( - --libdir="${MY_LIBDIR}" - --bashcompletiondir="$(get_bashcompdir)" - ) - - if use systemd; then - myconf+=( --systemdsystemunitdir="$(systemd_get_systemunitdir)" ) - fi - - econf "${myconf[@]}" -} - -src_compile() { - tc-export CC - emake doc install/dracut-install skipcpio/skipcpio -} - -src_install() { - default - - local my_libdir="${MY_LIBDIR}" - local dracutlibdir="${my_libdir#/}/dracut" - - echo "DRACUT_VERSION=$PVR" > "${D%/}/${dracutlibdir}/dracut-version.sh" - - insinto "${dracutlibdir}/dracut.conf.d/" - newins dracut.conf.d/gentoo.conf.example gentoo.conf - - insinto /etc/logrotate.d - newins dracut.logrotate dracut - - dodir /var/lib/dracut/overlay - - dodoc dracut.html - - if ! use systemd; then - # Scripts in kernel/install.d are systemd-specific - rm -r "${D%/}/${my_libdir}/kernel" || die - fi - - # - # Modules - # - local module - modules_dir="${D%/}/${dracutlibdir}/modules.d" - - use debug || rm_module 95debug - use selinux || rm_module 98selinux - - if use systemd; then - # With systemd following modules do not make sense - rm_module 96securityfs 97masterkey 98integrity - else - rm_module 00systemd 98dracut-systemd - # Without systemd following modules do not make sense - rm_module 00systemd-bootchart 01systemd-initrd 02systemd-networkd - fi - - # Remove modules which won't work for sure - rm_module 95fcoe # no tools - # fips module depends on masked app-crypt/hmaccalc - rm_module 01fips 02fips-aesni -} - -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 desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" - local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ -"(initramfs/initrd) support" - - local opt desc - - # Generate ERROR_* variables for check_extra_config. - for opt in ${CONFIG_CHECK}; do - opt=${opt#\~} - desc=desc_${opt} - eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ - "is missing and REQUIRED'" - done - - check_extra_config - echo - else - ewarn "" - ewarn "Your kernel configuration couldn't be checked. Do you have" - ewarn "/usr/src/linux/.config file there? Please check manually if" - ewarn "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/curl "net-misc/dhcp[client]" \ - sys-apps/iproute2 - 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 syslog-ng or rsyslog" app-admin/syslog-ng \ - app-admin/rsyslog -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-045-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-045-r2.ebuild deleted file mode 100644 index 533d3bd53c..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-045-r2.ebuild +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit bash-completion-r1 eutils linux-info toolchain-funcs systemd - -DESCRIPTION="Generic initramfs generation tool" -HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ~arm ia64 ~mips ppc ~ppc64 sparc x86" -IUSE="debug selinux" - -RESTRICT="test" - -CDEPEND="virtual/udev - virtual/pkgconfig - >=sys-apps/kmod-15[tools] - " -RDEPEND="${CDEPEND} - app-arch/cpio - >=app-shells/bash-4.0:0 - || ( - >=sys-apps/sysvinit-2.87-r3 - sys-apps/systemd[sysv-utils] - ) - sys-apps/coreutils[xattr(-)] - >=sys-apps/util-linux-2.21 - - debug? ( dev-util/strace ) - selinux? ( - sys-libs/libselinux - sys-libs/libsepol - sec-policy/selinux-dracut - ) - !net-analyzer/arping - " -DEPEND="${CDEPEND} - app-text/asciidoc - >=dev-libs/libxslt-1.1.26 - app-text/docbook-xml-dtd:4.5 - >=app-text/docbook-xsl-stylesheets-1.75.2 - " - -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules - README.testsuite TODO ) - -QA_MULTILIB_PATHS="usr/lib/dracut/.*" - -PATCHES=( - "${FILESDIR}/045-systemdutildir.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 -} - -src_install() { - default - - local dracutlibdir="usr/lib/dracut" - - local libdirs="/$(get_libdir) /usr/$(get_libdir)" - if [[ ${SYMLINK_LIB} = yes ]]; then - # Preserve lib -> lib64 symlinks in initramfs - [[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" - fi - - einfo "Setting libdirs to \"${libdirs}\" ..." - echo "libdirs=\"${libdirs}\"" > "${T}/gentoo.conf" - insinto "${dracutlibdir}/dracut.conf.d" - doins "${T}/gentoo.conf" - - insinto /etc/logrotate.d - newins dracut.logrotate dracut - - dodir /var/lib/dracut/overlay - - 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 desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" - local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ -"(initramfs/initrd) support" - - local opt desc - - # Generate ERROR_* variables for check_extra_config. - for opt in ${CONFIG_CHECK}; do - opt=${opt#\~} - desc=desc_${opt} - eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ - "is missing and REQUIRED'" - done - - check_extra_config - echo - else - ewarn "" - ewarn "Your kernel configuration couldn't be checked. Do you have" - ewarn "/usr/src/linux/.config file there? Please check manually if" - ewarn "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/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 syslog-ng or rsyslog" app-admin/syslog-ng \ - app-admin/rsyslog -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-046-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-046-r1.ebuild deleted file mode 100644 index 735b72f53c..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-046-r1.ebuild +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit bash-completion-r1 eutils linux-info toolchain-funcs systemd - -DESCRIPTION="Generic initramfs generation tool" -HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ~arm ia64 ~mips ppc ~ppc64 sparc x86" -IUSE="debug selinux" - -RESTRICT="test" - -CDEPEND="virtual/udev - virtual/pkgconfig - >=sys-apps/kmod-15[tools] - " -RDEPEND="${CDEPEND} - app-arch/cpio - >=app-shells/bash-4.0:0 - || ( - >=sys-apps/sysvinit-2.87-r3 - sys-apps/systemd[sysv-utils] - ) - sys-apps/coreutils[xattr(-)] - >=sys-apps/util-linux-2.21 - - debug? ( dev-util/strace ) - selinux? ( - sys-libs/libselinux - sys-libs/libsepol - sec-policy/selinux-dracut - ) - !net-analyzer/arping - " -DEPEND="${CDEPEND} - app-text/asciidoc - >=dev-libs/libxslt-1.1.26 - app-text/docbook-xml-dtd:4.5 - >=app-text/docbook-xsl-stylesheets-1.75.2 - " - -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules - README.testsuite TODO ) - -QA_MULTILIB_PATHS="usr/lib/dracut/.*" - -PATCHES=( - "${FILESDIR}/045-systemdutildir.patch" - "${FILESDIR}/046-amd-microcode.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 -} - -src_install() { - default - - local dracutlibdir="usr/lib/dracut" - - local libdirs="/$(get_libdir) /usr/$(get_libdir)" - if [[ ${SYMLINK_LIB} = yes ]]; then - # Preserve lib -> lib64 symlinks in initramfs - [[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" - fi - - einfo "Setting libdirs to \"${libdirs}\" ..." - echo "libdirs=\"${libdirs}\"" > "${T}/gentoo.conf" - insinto "${dracutlibdir}/dracut.conf.d" - doins "${T}/gentoo.conf" - - insinto /etc/logrotate.d - newins dracut.logrotate dracut - - dodir /var/lib/dracut/overlay - - 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 desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev" - local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\ -"(initramfs/initrd) support" - - local opt desc - - # Generate ERROR_* variables for check_extra_config. - for opt in ${CONFIG_CHECK}; do - opt=${opt#\~} - desc=desc_${opt} - eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \ - "is missing and REQUIRED'" - done - - check_extra_config - echo - else - ewarn "" - ewarn "Your kernel configuration couldn't be checked. Do you have" - ewarn "/usr/src/linux/.config file there? Please check manually if" - ewarn "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/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 syslog-ng or rsyslog" app-admin/syslog-ng \ - app-admin/rsyslog -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048-r1.ebuild index 31e2211b52..937662bdf2 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit bash-completion-r1 eutils linux-info systemd toolchain-funcs +inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs DESCRIPTION="Generic initramfs generation tool" HOMEPAGE="https://dracut.wiki.kernel.org" @@ -11,7 +11,7 @@ SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 ~arm ia64 ~mips ppc ~ppc64 sparc x86" +KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ~ppc64 sparc x86" IUSE="debug selinux" # Tests need root privileges, bug #298014 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048.ebuild deleted file mode 100644 index 85f233b9f5..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-048.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit bash-completion-r1 eutils linux-info systemd toolchain-funcs - -DESCRIPTION="Generic initramfs generation tool" -HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="debug selinux" - -# Tests need root privileges, bug #298014 -RESTRICT="test" - -COMMON_DEPEND=">=sys-apps/kmod-23[tools] - virtual/pkgconfig - virtual/udev - " -RDEPEND="${COMMON_DEPEND} - app-arch/cpio - >=app-shells/bash-4.0:0 - sys-apps/coreutils[xattr(-)] - || ( - >=sys-apps/sysvinit-2.87-r3 - sys-apps/systemd[sysv-utils] - ) - >=sys-apps/util-linux-2.21 - - debug? ( dev-util/strace ) - selinux? ( - sec-policy/selinux-dracut - sys-libs/libselinux - sys-libs/libsepol - ) - " -DEPEND="${COMMON_DEPEND} - app-text/asciidoc - app-text/docbook-xml-dtd:4.5 - >=app-text/docbook-xsl-stylesheets-1.75.2 - >=dev-libs/libxslt-1.1.26 - " - -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules - README.testsuite TODO ) - -QA_MULTILIB_PATHS="usr/lib/dracut/.*" - -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 -} - -src_install() { - default - - local libdirs=( /$(get_libdir) /usr/$(get_libdir) ) - if [[ ${SYMLINK_LIB} = yes && $(get_libdir) != lib ]]; then - # Preserve lib -> lib64 symlinks in initramfs - libdirs+=( /lib /usr/lib ) - fi - - einfo "Setting libdirs to \"${libdirs[*]}\" ..." - echo "libdirs=\"${libdirs[*]}\"" > "${T}/gentoo.conf" || die - insinto "/usr/lib/dracut/dracut.conf.d" - doins "${T}/gentoo.conf" - - 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/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 syslog-ng or rsyslog" app-admin/syslog-ng \ - app-admin/rsyslog -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-047-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r3.ebuild similarity index 62% rename from sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-047-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r3.ebuild index ffbb944a4c..97d2e729b3 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-047-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r3.ebuild @@ -1,49 +1,62 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit bash-completion-r1 eutils linux-info systemd toolchain-funcs +inherit bash-completion-r1 linux-info optfeature 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://github.com/dracutdevs/dracut/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi DESCRIPTION="Generic initramfs generation tool" HOMEPAGE="https://dracut.wiki.kernel.org" -SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="debug selinux" +IUSE="selinux" # Tests need root privileges, bug #298014 RESTRICT="test" -COMMON_DEPEND=">=sys-apps/kmod-23[tools] - virtual/pkgconfig - virtual/udev - " -RDEPEND="${COMMON_DEPEND} +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 - debug? ( dev-util/strace ) + elibc_musl? ( sys-libs/fts-standalone ) selinux? ( sec-policy/selinux-dracut sys-libs/libselinux sys-libs/libsepol ) - " -DEPEND="${COMMON_DEPEND} +" +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 README.generic README.kernel README.modules README.testsuite TODO ) @@ -51,9 +64,21 @@ DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( - "${FILESDIR}/045-systemdutildir.patch" - "${FILESDIR}/047-all-fix-issues-found-by-shellcheck.patch" - "${FILESDIR}/047-plymouth-fix-detection-of-plymouth-directory.patch" + "${FILESDIR}"/048-dracut-install-simplify-ldd-parsing-logic.patch + "${FILESDIR}"/049-40network-Don-t-include-40network-by-default.patch + "${FILESDIR}"/049-remove-bashism-in-various-boot-scripts.patch + "${FILESDIR}"/049-network-manager-call-the-online-hook-for-connected-d.patch + "${FILESDIR}"/049-install-dracut-install.c-install-module-dependencies.patch + "${FILESDIR}"/049-install-string_hash_func-should-not-be-fed-with-NULL.patch + "${FILESDIR}"/049-dracut.sh-Fix-udevdir-detection.patch + "${FILESDIR}"/049-rngd-new-module-running-early-during-boot-to-help-ge.patch + "${FILESDIR}"/049-fs-lib-drop-a-bashism.patch + "${FILESDIR}"/049-network-manager-remove-useless-use-of-basename.patch + "${FILESDIR}"/049-move-setting-the-systemdutildir-variable-before-it-s.patch + "${FILESDIR}"/049-dracut-install-Support-the-compressed-firmware-files.patch + "${FILESDIR}"/049-crypt-create-locking-directory-run-cryptsetup.patch + "${FILESDIR}"/049-network-manager-fix-getting-of-ifname-from-the-sysfs.patch + "${FILESDIR}"/049-configure-find-cflags-and-libs-for-fts-on-musl.patch ) src_configure() { @@ -68,22 +93,16 @@ src_configure() { echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die + + if [[ ${PV} != 9999 ]] ; then + # Source tarball from github doesn't include this file + echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die + fi } src_install() { default - local libdirs=( /$(get_libdir) /usr/$(get_libdir) ) - if [[ ${SYMLINK_LIB} = yes && $(get_libdir) != lib ]]; then - # Preserve lib -> lib64 symlinks in initramfs - libdirs+=( /lib /usr/lib ) - fi - - einfo "Setting libdirs to \"${libdirs[*]}\" ..." - echo "libdirs=\"${libdirs[*]}\"" > "${T}/gentoo.conf" || die - insinto "/usr/lib/dracut/dracut.conf.d" - doins "${T}/gentoo.conf" - insinto /etc/logrotate.d newins dracut.logrotate dracut @@ -122,7 +141,8 @@ pkg_postinst() { elog "To get additional features, a number of optional runtime" elog "dependencies may be installed:" elog "" - optfeature "Networking support" net-misc/curl "net-misc/dhcp[client]" \ + 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" \ @@ -149,6 +169,8 @@ pkg_postinst() { optfeature \ "Install ssh and scp along with config files and specified keys" \ net-misc/openssh - optfeature "Enable logging with syslog-ng or rsyslog" app-admin/syslog-ng \ - app-admin/rsyslog + 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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050-r1.ebuild similarity index 82% rename from sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050-r1.ebuild index 872f2ff3a2..50c43bc6a8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# 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 +inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs if [[ ${PV} == 9999 ]] ; then inherit git-r3 @@ -11,7 +11,7 @@ if [[ ${PV} == 9999 ]] ; then else [[ "${PV}" = *_rc* ]] || \ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" - SRC_URI="https://github.com/dracutdevs/dracut/archive/${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" fi DESCRIPTION="Generic initramfs generation tool" @@ -31,20 +31,24 @@ RDEPEND=" >=sys-apps/kmod-23[tools] || ( >=sys-apps/sysvinit-2.87-r3 - sys-apps/openrc[sysv-utils,selinux?] + 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" +" +DEPEND=" + >=sys-apps/kmod-23 + elibc_musl? ( sys-libs/fts-standalone ) +" BDEPEND=" app-text/asciidoc @@ -52,17 +56,19 @@ BDEPEND=" >=app-text/docbook-xsl-stylesheets-1.75.2 >=dev-libs/libxslt-1.1.26 virtual/pkgconfig - " +" -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules +DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules README.testsuite TODO ) QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( - "${FILESDIR}"/048-dracut-install-simplify-ldd-parsing-logic.patch - "${FILESDIR}"/049-40network-Don-t-include-40network-by-default.patch - "${FILESDIR}"/049-remove-bashism-in-various-boot-scripts.patch + "${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-busybox-module-fix.patch + "${FILESDIR}"/050-gentoo-ldconfig-paths.patch ) src_configure() { @@ -78,7 +84,7 @@ src_configure() { echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die - if [[ ${PV} != 9999 ]] ; then + 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 @@ -154,4 +160,7 @@ pkg_postinst() { "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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050-r2.ebuild similarity index 70% rename from sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050-r2.ebuild index dda60561bf..c5676baf30 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050-r2.ebuild @@ -1,17 +1,24 @@ -# Copyright 1999-2019 Gentoo Authors +# 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 +inherit bash-completion-r1 linux-info optfeature 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" -SRC_URI="https://github.com/dracutdevs/dracut/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" IUSE="selinux" # Tests need root privileges, bug #298014 @@ -24,19 +31,24 @@ RDEPEND=" >=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" +" +DEPEND=" + >=sys-apps/kmod-23 + elibc_musl? ( sys-libs/fts-standalone ) +" BDEPEND=" app-text/asciidoc @@ -44,17 +56,24 @@ BDEPEND=" >=app-text/docbook-xsl-stylesheets-1.75.2 >=dev-libs/libxslt-1.1.26 virtual/pkgconfig - " +" -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules +DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules README.testsuite TODO ) QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( - "${FILESDIR}"/048-dracut-install-simplify-ldd-parsing-logic.patch - "${FILESDIR}"/049-40network-Don-t-include-40network-by-default.patch - "${FILESDIR}"/049-remove-bashism-in-various-boot-scripts.patch + "${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() { @@ -70,24 +89,15 @@ src_configure() { echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die - # Source tarball from github doesn't include this file - echo "DRACUT_VERSION=${PV}" > dracut-version.sh || 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 - local libdirs=( /$(get_libdir) /usr/$(get_libdir) ) - if [[ ${SYMLINK_LIB} = yes && $(get_libdir) != lib ]]; then - # Preserve lib -> lib64 symlinks in initramfs - libdirs+=( /lib /usr/lib ) - fi - - einfo "Setting libdirs to \"${libdirs[*]}\" ..." - echo "libdirs=\"${libdirs[*]}\"" > "${T}/gentoo.conf" || die - insinto "/usr/lib/dracut/dracut.conf.d" - doins "${T}/gentoo.conf" - insinto /etc/logrotate.d newins dracut.logrotate dracut @@ -155,4 +165,7 @@ pkg_postinst() { "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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050.ebuild similarity index 82% rename from sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050.ebuild index 05dd8d5ad4..4c140a6278 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-049-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-050.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# 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 +inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs if [[ ${PV} == 9999 ]] ; then inherit git-r3 @@ -11,7 +11,7 @@ if [[ ${PV} == 9999 ]] ; then else [[ "${PV}" = *_rc* ]] || \ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" - SRC_URI="https://github.com/dracutdevs/dracut/archive/${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" fi DESCRIPTION="Generic initramfs generation tool" @@ -31,19 +31,24 @@ RDEPEND=" >=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" +" +DEPEND=" + >=sys-apps/kmod-23 + elibc_musl? ( sys-libs/fts-standalone ) +" BDEPEND=" app-text/asciidoc @@ -51,17 +56,18 @@ BDEPEND=" >=app-text/docbook-xsl-stylesheets-1.75.2 >=dev-libs/libxslt-1.1.26 virtual/pkgconfig - " +" -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules +DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules README.testsuite TODO ) QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( - "${FILESDIR}"/048-dracut-install-simplify-ldd-parsing-logic.patch - "${FILESDIR}"/049-40network-Don-t-include-40network-by-default.patch - "${FILESDIR}"/049-remove-bashism-in-various-boot-scripts.patch + "${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-gentoo-ldconfig-paths.patch ) src_configure() { @@ -77,7 +83,7 @@ src_configure() { echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die - if [[ ${PV} != 9999 ]] ; then + 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 @@ -153,4 +159,7 @@ pkg_postinst() { "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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-9999.ebuild index 8cd9765609..62193b227a 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/dracut-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# 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 +inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs if [[ ${PV} == 9999 ]] ; then inherit git-r3 @@ -11,7 +11,7 @@ if [[ ${PV} == 9999 ]] ; then else [[ "${PV}" = *_rc* ]] || \ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" - SRC_URI="https://github.com/dracutdevs/dracut/archive/${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://www.kernel.org/pub/linux/utils/boot/${PN}/${P}.tar.xz" fi DESCRIPTION="Generic initramfs generation tool" @@ -31,20 +31,24 @@ RDEPEND=" >=sys-apps/kmod-23[tools] || ( >=sys-apps/sysvinit-2.87-r3 - sys-apps/openrc[sysv-utils,selinux?] + 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" +" +DEPEND=" + >=sys-apps/kmod-23 + elibc_musl? ( sys-libs/fts-standalone ) +" BDEPEND=" app-text/asciidoc @@ -52,14 +56,15 @@ BDEPEND=" >=app-text/docbook-xsl-stylesheets-1.75.2 >=dev-libs/libxslt-1.1.26 virtual/pkgconfig - " +" -DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules +DOCS=( AUTHORS HACKING NEWS README.md README.generic README.kernel README.modules README.testsuite TODO ) QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( + "${FILESDIR}"/050-gentoo-ldconfig-paths.patch ) src_configure() { @@ -75,7 +80,7 @@ src_configure() { echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die - if [[ ${PV} != 9999 ]] ; then + 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 @@ -151,4 +156,7 @@ pkg_postinst() { "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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0001-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0001-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch deleted file mode 100644 index fd6f118594..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0001-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c41df7e1db1adc51399ab2c22f251b15eb2065b1 Mon Sep 17 00:00:00 2001 -From: Alexander Tsoy -Date: Tue, 5 Jan 2016 22:11:57 +0300 -Subject: [PATCH] base/dracut-lib.sh:dev_unit_name() guard against $dev - beginning with "-" - -crypt/parse-crypt.sh generate initqueue job which always call -dev_unit_name() with an argument beginning with "-". This results -in the following error: - -dracut-initqueue[307]: + systemd-escape -p -cfb4aa43-2f02-4c6b-a313-60ea99288087 -dracut-initqueue[307]: systemd-escape: invalid option -- 'c' ---- - modules.d/99base/dracut-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index ad03394..0a0b1b9 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -874,7 +874,7 @@ dev_unit_name() - local dev="$1" - - if command -v systemd-escape >/dev/null; then -- systemd-escape -p "$dev" -+ systemd-escape -p -- "$dev" - return - fi - --- -2.10.2 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0002-systemd-initrd-add-initrd-root-device.target.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0002-systemd-initrd-add-initrd-root-device.target.patch deleted file mode 100644 index 21cb6792ac..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0002-systemd-initrd-add-initrd-root-device.target.patch +++ /dev/null @@ -1,24 +0,0 @@ -From d4efc0aeeecc470d9a267b7f3c130f472488905c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 May 2016 15:06:29 +0200 -Subject: [PATCH] systemd-initrd: add initrd-root-device.target - ---- - modules.d/01systemd-initrd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/01systemd-initrd/module-setup.sh b/modules.d/01systemd-initrd/module-setup.sh -index fb6a9ea..c1ccd2a 100755 ---- a/modules.d/01systemd-initrd/module-setup.sh -+++ b/modules.d/01systemd-initrd/module-setup.sh -@@ -28,6 +28,7 @@ install() { - inst_multiple -o \ - $systemdsystemunitdir/initrd.target \ - $systemdsystemunitdir/initrd-fs.target \ -+ $systemdsystemunitdir/initrd-root-device.target \ - $systemdsystemunitdir/initrd-root-fs.target \ - $systemdsystemunitdir/initrd-switch-root.target \ - $systemdsystemunitdir/initrd-switch-root.service \ --- -2.10.2 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0003-50-dracut.install-use-bin-bash-shebang.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0003-50-dracut.install-use-bin-bash-shebang.patch deleted file mode 100644 index 85ebc7e638..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/044-0003-50-dracut.install-use-bin-bash-shebang.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 69395a528aed99ec04b16c14ebacf4c2e10afd26 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Fri, 4 Nov 2016 13:09:28 -0400 -Subject: [PATCH] 50-dracut.install: use /bin/bash shebang - -This script utilizes several bash-specific constructs. ---- - 50-dracut.install | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/50-dracut.install b/50-dracut.install -index 7d081d5..54c71d4 100755 ---- a/50-dracut.install -+++ b/50-dracut.install -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - COMMAND="$1" - KERNEL_VERSION="$2" --- -2.10.2 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/045-systemdutildir.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/045-systemdutildir.patch deleted file mode 100644 index e56abba354..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/045-systemdutildir.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ed5cc98864c28eab2c4cb45ec0f67450699aaaa8 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Mon, 3 Jul 2017 22:39:42 -0400 -Subject: [PATCH] dracut.sh: improve udevdir and systemdutildir fallback logic - -Check for a common binary in systemdutildir. This resolves an issue on -split-usr systems, where it is common to have both /lib/systemd[/system] -and /usr/lib/systemd[/user] present. - -Check for systemd-udevd specifically, since some distros (Gentoo) allow -udev to be installed without the rest of the systemd stack. - -Similar logic is applied to udevdir simply for consistency. ---- - dracut.sh | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 64d94201..67c12a72 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1266,16 +1266,16 @@ done - [[ -d $udevdir ]] \ - || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)" - if ! [[ -d "$udevdir" ]]; then -- [[ ! -h /lib ]] && [[ -d /lib/udev ]] && udevdir=/lib/udev -- [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev -+ [[ -e /lib/udev/collect ]] && udevdir=/lib/udev -+ [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev - fi - - [[ -d $systemdutildir ]] \ - || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null) - - if ! [[ -d "$systemdutildir" ]]; then -- [[ ! -h /lib ]] && [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd -- [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd -+ [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd -+ [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd - fi - - [[ -d $systemdsystemunitdir ]] \ --- -2.13.2 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/046-amd-microcode.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/046-amd-microcode.patch deleted file mode 100644 index c351275dbe..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/046-amd-microcode.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a1250a704e33c59f2395aaad054db1c745a5c98a Mon Sep 17 00:00:00 2001 -From: Daniel Molkentin -Date: Tue, 12 Dec 2017 17:48:36 +0100 -Subject: [PATCH] Simplify microcode lookup for for AMD CPUs - ---- - dracut-functions.sh | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 112b2434..d7fc5303 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -661,11 +661,8 @@ get_ucode_file () - local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //` - - if [[ "$(get_cpu_vendor)" == "AMD" ]]; then -- # If family greater than or equal to 0x16 -- if [[ $family -ge 22 ]]; then -- printf "microcode_amd_fam16h.bin" -- elif [[ $family -eq 21 ]]; then -- printf "microcode_amd_fam15h.bin" -+ if [[ $family -ge 21 ]]; then -+ printf "microcode_amd_fam%xh.bin" $family - else - printf "microcode_amd.bin" - fi --- -2.16.0.rc0 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-all-fix-issues-found-by-shellcheck.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-all-fix-issues-found-by-shellcheck.patch deleted file mode 100644 index d5cbe042b6..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-all-fix-issues-found-by-shellcheck.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 3aa37cafde734719f2377600a17459fad30edfbc Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Fri, 2 Mar 2018 12:29:46 +0100 -Subject: [PATCH 06/14] all: fix issues found by shellcheck -To: - -Error: SHELLCHECK_WARNING: -/usr/lib/dracut/dracut-init.sh:939:20: error: Argument to implicit -n is always true due to literal strings. [SC2157] - 937| dracut_kernel_post() { - 938| for _f in modules.builtin.bin modules.builtin modules.order; do - 939|-> [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" - 940| done - 941| - -Error: SHELLCHECK_WARNING: -/usr/lib/dracut/modules.d/98syslog/parse-syslog-opts.sh:18:12: error: This expression is constant. Did you forget a $ somewhere? [SC2078] - 16| elif [ -e /sbin/syslogd ]; then - 17| syslogtype="syslogd" - 18|-> elif [ /sbin/syslog-ng ]; then - 19| syslogtype="syslog-ng" - 20| else - -Error: SHELLCHECK_WARNING: -/usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:15:29: error: Since you double quoted this, it will not word split, and the loop will only run once. [SC2066] - 13| strstr "$d" "${luks##luks-}" && return 0 - 14| if [ -n "$dev" ]; then - 15|-> for _dev in "$(devnames $d)"; do - 16| [ "$dev" -ef "$_dev" ] && return 0 - 17| done ---- - dracut-init.sh | 2 +- - modules.d/90crypt/crypt-lib.sh | 2 +- - modules.d/98syslog/parse-syslog-opts.sh | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index 53e6f13a..1278c638 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -942,7 +942,7 @@ for_each_kmod_dep() { - - dracut_kernel_post() { - for _f in modules.builtin.bin modules.builtin modules.order; do -- [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" -+ [[ -e $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" - done - - # generate module dependencies for the initrd -diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh -index 532b9a71..bbf485e0 100755 ---- a/modules.d/90crypt/crypt-lib.sh -+++ b/modules.d/90crypt/crypt-lib.sh -@@ -12,7 +12,7 @@ crypttab_contains() { - strstr "${l##luks-}" "${luks##luks-}" && return 0 - strstr "$d" "${luks##luks-}" && return 0 - if [ -n "$dev" ]; then -- for _dev in "$(devnames $d)"; do -+ for _dev in $(devnames $d); do - [ "$dev" -ef "$_dev" ] && return 0 - done - fi -diff --git a/modules.d/98syslog/parse-syslog-opts.sh b/modules.d/98syslog/parse-syslog-opts.sh -index 50ec2759..9ec6ad47 100755 ---- a/modules.d/98syslog/parse-syslog-opts.sh -+++ b/modules.d/98syslog/parse-syslog-opts.sh -@@ -15,7 +15,7 @@ detect_syslog() { - syslogtype="rsyslogd" - elif [ -e /sbin/syslogd ]; then - syslogtype="syslogd" -- elif [ /sbin/syslog-ng ]; then -+ elif [ -e /sbin/syslog-ng ]; then - syslogtype="syslog-ng" - else - warn "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check." --- -2.16.1 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-plymouth-fix-detection-of-plymouth-directory.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-plymouth-fix-detection-of-plymouth-directory.patch deleted file mode 100644 index 42f877292a..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/047-plymouth-fix-detection-of-plymouth-directory.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fe6c7e0f06cde65effb3503a47c31ac39aceefb6 Mon Sep 17 00:00:00 2001 -From: Alexander Tsoy -Date: Fri, 23 Mar 2018 11:52:27 +0300 -Subject: [PATCH 14/14] plymouth: fix detection of plymouth directory -To: - -Some distros have both /usr/lib/plymouth and /usr/libexec/plymouth -directorirs, so we should check the existance of plymouth-populate-initrd -script. - -Fixes: 421b46f8ae89cfe2b62e880a8a5079ee8c1b3aae ---- - modules.d/50plymouth/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh -index 5fbca8b0..b51913e8 100755 ---- a/modules.d/50plymouth/module-setup.sh -+++ b/modules.d/50plymouth/module-setup.sh -@@ -6,7 +6,7 @@ pkglib_dir() { - _dirs+=" /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth" - fi - for _dir in $_dirs; do -- if [ -d $_dir ]; then -+ if [ -x $_dir/plymouth-populate-initrd ]; then - echo $_dir - return - fi --- -2.16.1 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-configure-find-cflags-and-libs-for-fts-on-musl.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-configure-find-cflags-and-libs-for-fts-on-musl.patch new file mode 100644 index 0000000000..cd74564adb --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-configure-find-cflags-and-libs-for-fts-on-musl.patch @@ -0,0 +1,97 @@ +From 62f27ee6f145b5f8ca571887602cd9b0715b9e9d Mon Sep 17 00:00:00 2001 +From: Doan Tran Cong Danh +Date: Wed, 6 Nov 2019 18:35:12 +0700 +Subject: [PATCH] configure: find cflags and libs for fts on musl +To: + +Signed-off-by: Doan Tran Cong Danh +--- + Makefile | 2 +- + configure | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 45 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 31545899..f9b42b96 100644 +--- a/Makefile ++++ b/Makefile +@@ -62,7 +62,7 @@ install/util.o: install/util.c install/util.h install/macro.h install/log.h + install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h + + install/dracut-install: $(DRACUT_INSTALL_OBJECTS) +- $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) ++ $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(FTS_LIBS) $(KMOD_LIBS) + + logtee: logtee.c + $(CC) $(LDFLAGS) -o $@ $< +diff --git a/configure b/configure +index b55fb609..3f724ef2 100755 +--- a/configure ++++ b/configure +@@ -7,6 +7,7 @@ prefix=/usr + + enable_documentation=yes + ++CC="${CC:-cc}" + PKG_CONFIG="${PKG_CONFIG:-pkg-config}" + + # Little helper function for reading args from the commandline. +@@ -57,6 +58,48 @@ if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 23 "; then + exit 1 + fi + ++cat <conftest.c ++#include ++int main() { ++ return 0; ++} ++EOF ++ ++${CC} $CFLAGS $LDFLAGS conftest.c >/dev/null 2>&1 ++ret=$? ++rm -f conftest.c a.out ++ ++# musl doesn't have fts.h included ++if test $ret -ne 0; then ++ echo "dracut needs fts development files." >&2 ++ exit 1 ++fi ++ ++cat <conftest.c ++#include ++int main(void) { ++ fts_open(0, 0, 0); ++ return 0; ++} ++EOF ++ ++found=no ++for lib in "-lc" "-lfts"; do ++ ${CC} $CFLAGS -Wl,$lib $LDFLAGS conftest.c >/dev/null 2>&1 ++ ret=$? ++ if test $ret -eq 0; then ++ FTS_LIBS="$lib" ++ found=yes ++ break; ++ fi ++done ++rm -f conftest.c a.out ++ ++if test $found = no; then ++ echo "dracut couldn't find usable fts library" >&2 ++ exit 1 ++fi ++ + cat > Makefile.inc.$$ <= 23 ") + KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ") ++FTS_LIBS ?= ${FTS_LIBS} + EOF + + { +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-crypt-create-locking-directory-run-cryptsetup.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-crypt-create-locking-directory-run-cryptsetup.patch new file mode 100644 index 0000000000..be964c0374 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-crypt-create-locking-directory-run-cryptsetup.patch @@ -0,0 +1,32 @@ +From f39aa529c59c533ce5e75e31be1b0cce4513b3d7 Mon Sep 17 00:00:00 2001 +From: Jonas Witschel +Date: Sat, 31 Aug 2019 17:45:11 +0200 +Subject: [PATCH] crypt: create locking directory /run/cryptsetup +To: + +For LUKS2 partitions cryptsetup needs a locking directory. If it does +not exist, cryptsetup will create it, but produce a warning + +WARNING: Locking directory /run/cryptsetup is missing! + +in the process that we do not want to see in the dracut output. +--- + modules.d/90crypt/cryptroot-ask.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh +index 33a823c7..e1f17975 100755 +--- a/modules.d/90crypt/cryptroot-ask.sh ++++ b/modules.d/90crypt/cryptroot-ask.sh +@@ -8,6 +8,8 @@ NEWROOT=${NEWROOT:-"/sysroot"} + + . /lib/dracut-lib.sh + ++mkdir -m 0700 /run/cryptsetup ++ + # if device name is /dev/dm-X, convert to /dev/mapper/name + if [ "${1##/dev/dm-}" != "$1" ]; then + device="/dev/mapper/$(dmsetup info -c --noheadings -o name "$1")" +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut-install-Support-the-compressed-firmware-files.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut-install-Support-the-compressed-firmware-files.patch new file mode 100644 index 0000000000..85c0ea0997 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut-install-Support-the-compressed-firmware-files.patch @@ -0,0 +1,63 @@ +From 999cfa84582ab4ce4cc602242cb71d0af0b7d4ac Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 22 Aug 2019 12:37:56 +0200 +Subject: [PATCH] dracut-install: Support the compressed firmware files + correctly +To: + +The compressed firmware support was supposed to be already +implemented, but it didn't work as expected in the end, because dracut +moved to use dracut-install binary. This patch adds the support of +XZ-compressed firmware installation to dracut-install for fixing the +missing piece. + +At best the firmware files should be uncompressed in initrd, but this +patch simply copies the compressed file as-is, as a quick workaround. + +BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1146769 +Signed-off-by: Takashi Iwai +--- + install/dracut-install.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index 9e415b5e..7cda499d 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -1151,6 +1151,8 @@ static int install_firmware(struct kmod_module *mod) + ret = -1; + STRV_FOREACH(q, firmwaredirs) { + _cleanup_free_ char *fwpath = NULL; ++ _cleanup_free_ char *fwpath_xz = NULL; ++ const char *fw; + struct stat sb; + int r; + +@@ -1160,12 +1162,21 @@ static int install_firmware(struct kmod_module *mod) + exit(EXIT_FAILURE); + } + ++ fw = fwpath; + if (stat(fwpath, &sb) != 0) { +- log_debug("stat(%s) != 0", fwpath); +- continue; ++ r = asprintf(&fwpath_xz, "%s.xz", fwpath); ++ if (r < 0) { ++ log_error("Out of memory!"); ++ exit(EXIT_FAILURE); ++ } ++ if (stat(fwpath_xz, &sb) != 0) { ++ log_debug("stat(%s) != 0", fwpath); ++ continue; ++ } ++ fw = fwpath_xz; + } + +- ret = dracut_install(fwpath, fwpath, false, false, true); ++ ret = dracut_install(fw, fw, false, false, true); + if (ret == 0) + log_debug("dracut_install '%s' OK", fwpath); + } +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut.sh-Fix-udevdir-detection.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut.sh-Fix-udevdir-detection.patch new file mode 100644 index 0000000000..ec7d480237 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-dracut.sh-Fix-udevdir-detection.patch @@ -0,0 +1,38 @@ +From dddcb809459b7a75906d4b90cf7a5ac291dc74c1 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 3 Apr 2019 15:24:47 +0800 +Subject: [PATCH] dracut.sh: Fix udevdir detection +To: + +In commit [9d1b81c dracut.sh: improve udevdir and systemdutildir +fallback logic] , it checked a common binary `collect' to location +udevdir. + +But upstream systemd drop binary `collect' since systemd v240 +[https://github.com/systemd/systemd/commit/a168792c2d95695fd30c0371d4b3890a9df1eafb] + +So check binary `ata_id' to instead. + +Signed-off-by: Hongxu Jia +--- + dracut.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 9098571d..fd9903b6 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1311,8 +1311,8 @@ done + [[ -d $udevdir ]] \ + || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)" + if ! [[ -d "$udevdir" ]]; then +- [[ -e /lib/udev/collect ]] && udevdir=/lib/udev +- [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev ++ [[ -e /lib/udev/ata_id ]] && udevdir=/lib/udev ++ [[ -e /usr/lib/udev/ata_id ]] && udevdir=/usr/lib/udev + fi + + [[ -d $systemdutildir ]] \ +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-fs-lib-drop-a-bashism.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-fs-lib-drop-a-bashism.patch new file mode 100644 index 0000000000..a44b8f3165 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-fs-lib-drop-a-bashism.patch @@ -0,0 +1,99 @@ +From 43c8c4ce0471abbb8c0fc4b8be2515cebc636030 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 21 Jun 2019 18:39:48 +0200 +Subject: [PATCH] fs-lib: drop a bashism +To: + +Bash 5 apparently longer propagates variable assignments to local variables +in front of function calls when in POSIX mode: + + [lkundrak@demiurge ~]$ cat feh.sh + print_VAR () { + echo "$VAR"; + } + + testfunc () { + local VAR="OLD" + VAR=NEW print_VAR + } + + testfunc + [lkundrak@demiurge ~]$ bash4 --posix feh.sh + NEW + [lkundrak@demiurge ~]$ bash5 --posix feh.sh + OLD + [lkundrak@demiurge ~]$ bash5 feh.sh + NEW + [lkundrak@demiurge ~]$ + +It works the way it did in Bash 4 in non-POSIX mode, for external programs, +or for non-local variables. Don't ask me why -- it's probably some +compatibility thing for some sad old people. + +However, this precisely happens when fsck_single() is calling into the +fsck_drv_com(), assigned to _drv by fsck_able(). That ruins the +TEST-70-BONDBRIDGETEAMVLAN test's server and probably more. + +Let's pass the fsck driver binary via the function argument instead. It's +less messy anyway. +--- + modules.d/99fs-lib/fs-lib.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh +index d39ca1b7..11e795d9 100755 +--- a/modules.d/99fs-lib/fs-lib.sh ++++ b/modules.d/99fs-lib/fs-lib.sh +@@ -44,22 +44,22 @@ fsck_able() { + ;; + ext?) + type e2fsck >/dev/null 2>&1 && +- _drv="_drv=e2fsck fsck_drv_com" && ++ _drv="fsck_drv_com e2fsck" && + return 0 + ;; + f2fs) + type fsck.f2fs >/dev/null 2>&1 && +- _drv="_drv=fsck.f2fs fsck_drv_com" && ++ _drv="fsck_drv_com fsck.f2fs" && + return 0 + ;; + jfs) + type jfs_fsck >/dev/null 2>&1 && +- _drv="_drv=jfs_fsck fsck_drv_com" && ++ _drv="fsck_drv_com jfs_fsck" && + return 0 + ;; + reiserfs) + type reiserfsck >/dev/null 2>&1 && +- _drv="_drv=reiserfsck fsck_drv_com" && ++ _drv="fsck_drv_com reiserfsck" && + return 0 + ;; + btrfs) +@@ -70,12 +70,12 @@ fsck_able() { + ;; + nfs*) + # nfs can be a nop, returning success +- _drv="_drv=none :" && ++ _drv=":" && + return 0 + ;; + *) + type fsck >/dev/null 2>&1 && +- _drv="_drv=fsck fsck_drv_std" && ++ _drv="fsck_drv_std fsck" && + return 0 + ;; + esac +@@ -97,6 +97,7 @@ fsck_drv_btrfs() { + + # common code for checkers that follow usual subset of options and return codes + fsck_drv_com() { ++ local _drv="$1" + local _ret + local _out + +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-dracut-install.c-install-module-dependencies.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-dracut-install.c-install-module-dependencies.patch new file mode 100644 index 0000000000..ec3e903765 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-dracut-install.c-install-module-dependencies.patch @@ -0,0 +1,79 @@ +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 +To: + +--- + 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; +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-string_hash_func-should-not-be-fed-with-NULL.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-string_hash_func-should-not-be-fed-with-NULL.patch new file mode 100644 index 0000000000..80f0c2b018 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-install-string_hash_func-should-not-be-fed-with-NULL.patch @@ -0,0 +1,38 @@ +From fc141f22869bad2e5409d1cc555c1a42ea738343 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 14 Feb 2019 20:18:04 +0100 +Subject: [PATCH] install: string_hash_func should not be fed with NULL +To: + +If kmod_module_get_path returns NULL, we should skip that entry, +the hash function does not like NULL pointers. +--- + install/dracut-install.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index d64de545..9e415b5e 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -1244,6 +1244,9 @@ static int install_dependent_modules(struct kmod_list *modlist) + mod = kmod_module_get_module(itr); + path = kmod_module_get_path(mod); + ++ if (path == NULL) ++ continue; ++ + if (check_hashmap(items_failed, path)) + return -1; + +@@ -1253,7 +1256,7 @@ static int install_dependent_modules(struct kmod_list *modlist) + + name = kmod_module_get_name(mod); + +- if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) { ++ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) { + continue; + } + +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-move-setting-the-systemdutildir-variable-before-it-s.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-move-setting-the-systemdutildir-variable-before-it-s.patch new file mode 100644 index 0000000000..585f47add0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-move-setting-the-systemdutildir-variable-before-it-s.patch @@ -0,0 +1,55 @@ +From c8b35bf96af1859c0c254db34a16b9cc5a2aa46b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= + =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= + +Date: Mon, 27 May 2019 18:22:14 +0200 +Subject: [PATCH] move setting the "systemdutildir" variable before it's used +To: + +on line 1086 it's used to check for the uefi_stub: +"${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" + +so it needs to be defined before that +--- + dracut.sh | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 183b892f..a3618f89 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1009,6 +1009,16 @@ esac + + abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" + ++ ++[[ -d $systemdutildir ]] \ ++ || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null) ++ ++if ! [[ -d "$systemdutildir" ]]; then ++ [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd ++ [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd ++fi ++ ++ + if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then + if ! [[ -f $srcmods/modules.dep ]]; then + if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then +@@ -1325,14 +1335,6 @@ if ! [[ -d "$udevdir" ]]; then + [[ -e /usr/lib/udev/ata_id ]] && udevdir=/usr/lib/udev + fi + +-[[ -d $systemdutildir ]] \ +- || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null) +- +-if ! [[ -d "$systemdutildir" ]]; then +- [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd +- [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd +-fi +- + [[ -d $systemdsystemunitdir ]] \ + || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null) + +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-call-the-online-hook-for-connected-d.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-call-the-online-hook-for-connected-d.patch new file mode 100644 index 0000000000..7f5fc6a038 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-call-the-online-hook-for-connected-d.patch @@ -0,0 +1,32 @@ +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 +To: + +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 +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-fix-getting-of-ifname-from-the-sysfs.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-fix-getting-of-ifname-from-the-sysfs.patch new file mode 100644 index 0000000000..430b93f93d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-fix-getting-of-ifname-from-the-sysfs.patch @@ -0,0 +1,37 @@ +From 687e17aa7f2f40d21717be9a04302c749e139d4a Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 30 Oct 2019 19:25:51 +0100 +Subject: [PATCH] network-manager: fix getting of ifname from the sysfs path +To: + +commit 5e0f8c8a4ced ('network-manager: remove useless use of basename') +somewhat carelessly didn't take into account that $_i has a slash at +the end which made the result of the ## substitution be just an empty +string. + +The slash was put to the end of /sys/class/net/*/ to make sure we're only +iterating directories, but it's not strictly necessary. In an unlikely case +something else than a directory appears in /sys/class/net/, we'll already deal +with it gracefully. Remove it. + +This fixes the TEST-30-ISCSI test. +--- + modules.d/35network-manager/nm-run.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index a539d5b2..b33e0992 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -6,7 +6,7 @@ else + /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon + fi + +-for _i in /sys/class/net/*/ ++for _i in /sys/class/net/* + do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) + grep -q connection-uuid= $state 2>/dev/null || continue +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-remove-useless-use-of-basename.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-remove-useless-use-of-basename.patch new file mode 100644 index 0000000000..1650c9a767 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-network-manager-remove-useless-use-of-basename.patch @@ -0,0 +1,26 @@ +From 5e0f8c8a4ced36268d0077acafa1db2402776fa6 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 17 Jun 2019 10:07:38 +0200 +Subject: [PATCH] network-manager: remove useless use of basename +To: + +--- + modules.d/35network-manager/nm-run.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 0f943631..5f4b38ca 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -10,7 +10,7 @@ for _i in /sys/class/net/*/ + do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) + grep -q connection-uuid= $state 2>/dev/null || continue +- ifname=$(basename $_i) ++ ifname=${_i##*/} + sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts + source_hook initqueue/online $ifname + /sbin/netroot $ifname +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-rngd-new-module-running-early-during-boot-to-help-ge.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-rngd-new-module-running-early-during-boot-to-help-ge.patch new file mode 100644 index 0000000000..5ea342df78 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/049-rngd-new-module-running-early-during-boot-to-help-ge.patch @@ -0,0 +1,88 @@ +From adee5b97bc5418b6e357342bb3be20568668aa55 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Renaud=20M=C3=A9trich?= +Date: Thu, 11 Jul 2019 10:50:40 +0200 +Subject: [PATCH] rngd: new module running early during boot to help generating + entropy when system's default entropy sources are poor (e.g. use of SSD disks + or UEFI RNG not available) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +To: + +On systems with low entropy at boot, the boot can take up to several +hours, specially when NBDE is used (e.g. clevis) which makes use of +the random number generator. + +Enabling rngd service at boot early, because dracut-initqueue runs, +enables to initialize the random number generator in a couple of seconds +instead of minutes or hours. + +Signed-off-by: Renaud Métrich +--- + modules.d/06rngd/module-setup.sh | 39 ++++++++++++++++++++++++++++++++ + modules.d/06rngd/rngd.service | 7 ++++++ + 2 files changed, 46 insertions(+) + create mode 100644 modules.d/06rngd/module-setup.sh + create mode 100644 modules.d/06rngd/rngd.service + +diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh +new file mode 100644 +index 00000000..43d5c2d3 +--- /dev/null ++++ b/modules.d/06rngd/module-setup.sh +@@ -0,0 +1,39 @@ ++#!/bin/bash ++# vim: set tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80: ++# ++# Copyright (c) 2019 Red Hat, Inc. ++# Author: Renaud Métrich ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++# ++ ++depends() { ++ echo systemd ++ return 0 ++} ++ ++check() { ++ # if there's no rngd binary, no go. ++ require_binaries rngd || return 1 ++ ++ return 0 ++} ++ ++install() { ++ inst rngd ++ inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service" ++ mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants" ++ ln -rfs "${initdir}${systemdsystemunitdir}/rngd.service" \ ++ "${initdir}${systemdsystemunitdir}/sysinit.target.wants/rngd.service" ++} +diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service +new file mode 100644 +index 00000000..570fbedb +--- /dev/null ++++ b/modules.d/06rngd/rngd.service +@@ -0,0 +1,7 @@ ++[Unit] ++Description=Hardware RNG Entropy Gatherer Daemon ++DefaultDependencies=no ++Before=systemd-udevd.service ++ ++[Service] ++ExecStart=/usr/sbin/rngd -f +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch new file mode 100644 index 0000000000..a091e4c9fa --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch @@ -0,0 +1,34 @@ +From a76aa8e39016a8564adb0f18f93bbf2e15d3243f Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy +Date: Sun, 8 Mar 2020 05:47:50 +0300 +Subject: [PATCH] Makefile: fix VERSION again + +The variable is not undefined anymore after the first assignment, so +we should check if variable is empty instead. +--- + Makefile | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index c69e2dfc..02e2c4b5 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,13 @@ + -include dracut-version.sh + + DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :) +-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION) ++ifeq ($(DRACUT_MAIN_VERSION),) ++DRACUT_MAIN_VERSION = $(DRACUT_VERSION) ++endif + DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :) +-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION) ++ifeq ($(DRACUT_FULL_VERSION),) ++DRACUT_FULL_VERSION = $(DRACUT_VERSION) ++endif + + -include Makefile.inc + +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-merge-main-version-and-git-version-earlier.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-merge-main-version-and-git-version-earlier.patch new file mode 100644 index 0000000000..49c532b929 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-Makefile-merge-main-version-and-git-version-earlier.patch @@ -0,0 +1,78 @@ +From eb8a7a96351b6e1cfd9dc34f1e854333a8f4a4e0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= + +Date: Fri, 6 Mar 2020 08:46:36 +0700 +Subject: [PATCH] Makefile: merge main-version and git-version earlier + +With GNU Make 4.3 on both ArchLinux, and VoidLinux, +GITVERION is always empty because of bad substitution. +Change '\#' to simply '#' can fix it, +but we don't need that complation. + +We can merge DRACUT_MAIN_VERSION and GITVERSION into DRACUT_FULL_VERSION. +Because, GITVERSION will be attached back to DRACUT_MAIN_VERSION in all +situation. + +While we're at it, detect if we're in git worktree by: +limiting GIT_CEILING_DIRECTORIES to parent directory of +dracut's top level directory; instead of checking for .git directory, +in order to support git-worktree, in such case, .git will be a file, see +gitrepository-layout(5) +--- + Makefile | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 22b584f1..c69e2dfc 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,9 @@ + -include dracut-version.sh + +-DRACUT_MAIN_VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || :) ++DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :) + DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION) +-GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } ) ++DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :) ++DRACUT_FULL_VERSION ?= $(DRACUT_VERSION) + + -include Makefile.inc + +@@ -92,14 +93,14 @@ endif + + %.xml: %.asc + @rm -f -- "$@" +- asciidoc -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" -d manpage -b docbook -o "$@" $< ++ asciidoc -a "version=$(DRACUT_FULL_VERSION)" -d manpage -b docbook -o "$@" $< + + dracut.8: dracut.usage.asc dracut.8.asc + + dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc + @rm -f -- dracut.xml + asciidoc -a "mainversion=$(DRACUT_MAIN_VERSION)" \ +- -a "version=$(DRACUT_MAIN_VERSION)$(GITVERSION)" \ ++ -a "version=$(DRACUT_FULL_VERSION)" \ + -a numbered \ + -d book -b docbook -o dracut.xml dracut.asc + @rm -f -- dracut.html +@@ -112,7 +113,7 @@ dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc + dracut.pc: Makefile.inc Makefile + @echo "Name: dracut" > dracut.pc + @echo "Description: dracut" >> dracut.pc +- @echo "Version: $(DRACUT_MAIN_VERSION)$(GITVERSION)" >> dracut.pc ++ @echo "Version: $(DRACUT_FULL_VERSION)" >> dracut.pc + @echo "dracutdir=$(pkglibdir)" >> dracut.pc + @echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc + @echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc +@@ -182,7 +183,7 @@ endif + + dracut-version.sh: + @rm -f dracut-version.sh +- @echo "DRACUT_VERSION=$(DRACUT_MAIN_VERSION)$(GITVERSION)" > dracut-version.sh ++ @echo "DRACUT_VERSION=$(DRACUT_FULL_VERSION)" > dracut-version.sh + + clean: + $(RM) *~ +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-btrfs-force-preload-btrfs-module.patch new file mode 100644 index 0000000000..386722c2ae --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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 +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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-busybox-module-fix.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-busybox-module-fix.patch new file mode 100644 index 0000000000..faaf026e53 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-busybox-module-fix.patch @@ -0,0 +1,102 @@ +From f769154bccf22d2b5caf5e4888f88bf7edde2662 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy +Date: Mon, 25 May 2020 19:02:05 +0300 +Subject: [PATCH 1/2] dracut-functions: fix find_binary() to return full path + +Fixes: a01204202b30 (Allow running on a cross-compiled rootfs) +--- + dracut-functions.sh | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 3cb9c7af..b5c28248 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -41,31 +41,36 @@ str_ends() { [ "${1%*"$2"}" != "$1" ]; } + # search in the usual places to find the binary. + find_binary() { + local _delim ++ local _path + local l + local p + [[ -z ${1##/*} ]] || _delim="/" + + if [[ "$1" == *.so* ]]; then + for l in libdirs ; do +- if { $DRACUT_LDD "$dracutsysrootdir$l$_delim$1" &>/dev/null; }; then +- printf "%s\n" "$1" ++ _path="${l}${_delim}${1}" ++ if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &>/dev/null; }; then ++ printf "%s\n" "${_path}" + return 0 + fi + done +- if { $DRACUT_LDD "$dracutsysrootdir$_delim$1" &>/dev/null; }; then +- printf "%s\n" "$1" ++ _path="${_delim}${1}" ++ if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &>/dev/null; }; then ++ printf "%s\n" "${_path}" + return 0 + fi + fi + if [[ "$1" == */* ]]; then +- if [[ -L $dracutsysrootdir$_delim$1 ]] || [[ -x $dracutsysrootdir$_delim$1 ]]; then +- printf "%s\n" "$1" ++ _path="${_delim}${1}" ++ if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then ++ printf "%s\n" "${_path}" + return 0 + fi + fi + for p in $DRACUT_PATH ; do +- if [[ -L $dracutsysrootdir$p$_delim$1 ]] || [[ -x $dracutsysrootdir$p$_delim$1 ]]; then +- printf "%s\n" "$1" ++ _path="${p}${_delim}${1}" ++ if [[ -L ${dracutsysrootdir}${_path} ]] || [[ -x ${dracutsysrootdir}${_path} ]]; then ++ printf "%s\n" "${_path}" + return 0 + fi + done +-- +2.26.2 + +From 50cc23ba32b0fda63eff7623b529dbeb4e6a38c6 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy +Date: Mon, 25 May 2020 17:49:20 +0300 +Subject: [PATCH 2/2] busybox: simplify listing of supported utilities + +'--list' option is supported since busybox-1.20.0, which was released +in 2010. +--- + modules.d/05busybox/module-setup.sh | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh +index ecbd6a13..5d88c5d1 100755 +--- a/modules.d/05busybox/module-setup.sh ++++ b/modules.d/05busybox/module-setup.sh +@@ -14,15 +14,16 @@ depends() { + + # called by dracut + install() { +- local _i _progs _path _busybox ++ local _i _path _busybox ++ local _progs=() + _busybox=$(type -P busybox) + inst $_busybox /usr/bin/busybox +- for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}') +- do +- _progs="$_progs $_i" ++ for _i in $($_busybox --list); do ++ [[ ${_i} == busybox ]] && continue ++ _progs+=("${_i}") + done + +- for _i in $_progs; do ++ for _i in "${_progs[@]}"; do + _path=$(find_binary "$_i") + [ -z "$_path" ] && continue + ln_r /usr/bin/busybox $_path +-- +2.26.2 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut-lib.sh-quote-variables-in-parameter-expansion.patch new file mode 100644 index 0000000000..11ca7add6d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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 +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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch new file mode 100644 index 0000000000..cf54cabb5e --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-dracut.sh-don-t-call-fsfreeze-on-subvol-of-root-file.patch @@ -0,0 +1,75 @@ +From 0386e4627779cb51f4292b3c642d90586d5e71b4 Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Wed, 29 Jan 2020 23:53:29 +0100 +Subject: [PATCH] dracut.sh: don't call fsfreeze on subvol of root file system + +dracut.sh already doesn't call fsfreeze if the output file is on +the root file system. For btrfs, however, this is not sufficient. +Because fsfreeze is a superblock operation, and all btrfs subvolumes +share the same superblock, fsfreeze may freeze the entire system +if the subvolume on which the output file is written and / are +subvolumes of the same file system. Avoid this by comparing file +system UUIDs for btrfs. + +Fixes: de576db3c225 ("call fsfreeze(8) on /boot to flush initramfs data & metadata to media") +--- + dracut.sh | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index af346f3a..c14f6c0b 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -2075,6 +2075,40 @@ fi + + command -v restorecon &>/dev/null && restorecon -- "$outfile" + ++btrfs_uuid() { ++ btrfs filesystem show "$1" | sed -n '1s/^.*uuid: //p' ++} ++ ++freeze_ok_for_btrfs() { ++ local mnt uuid1 uuid2 ++ # If the output file is on btrfs, we need to make sure that it's ++ # not on a subvolume of the same file system as the root FS. ++ # Otherwise, fsfreeze() might freeze the entire system. ++ # This is most conveniently checked by comparing the FS uuid. ++ ++ [[ "$(stat -f -c %T -- "/")" == "btrfs" ]] || return 0 ++ mnt=$(stat -c %m -- "$1") ++ uuid1=$(btrfs_uuid "$mnt") ++ uuid2=$(btrfs_uuid "/") ++ [[ "$uuid1" && "$uuid2" && "$uuid1" != "$uuid2" ]] ++} ++ ++freeze_ok_for_fstype() { ++ local outfile=$1 ++ local fstype ++ ++ [[ "$(stat -c %m -- "$outfile")" == "/" ]] && return 1 ++ fstype=$(stat -f -c %T -- "$outfile") ++ case $fstype in ++ msdos) ++ return 1;; ++ btrfs) ++ freeze_ok_for_btrfs "$outfile";; ++ *) ++ return 0;; ++ esac ++} ++ + # We sync/fsfreeze only if we're operating on a live booted system. + # It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent, + # and there's no reason to sync, and *definitely* no reason to fsfreeze. +@@ -2087,7 +2121,7 @@ if test -d $dracutsysrootdir/run/systemd/system; then + fi + + # use fsfreeze only if we're not writing to / +- if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then ++ if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then + if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then + dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")" + fi +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-gentoo-ldconfig-paths.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-gentoo-ldconfig-paths.patch new file mode 100644 index 0000000000..15522ef4fc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-gentoo-ldconfig-paths.patch @@ -0,0 +1,39 @@ +From 0674b9136831b1beb6a7ec91147fd5c280c693a3 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy +Date: Mon, 9 Mar 2020 02:47:07 +0300 +Subject: [PATCH] Remove redundant gcc paths in ldconfig_paths() + +Bug: https://bugs.gentoo.org/705728 +--- + dracut-functions.sh | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 3cb9c7af..5337ff6c 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -76,7 +76,20 @@ find_binary() { + + ldconfig_paths() + { +- $DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq ++ local gccpath ++ ++ if type -P gcc-config &>/dev/null; then ++ gccpath=$(gcc-config -c) ++ gccpath=/usr/lib/gcc/${gccpath%-*}/${gccpath##*-} ++ fi ++ ++ while read -r line; do ++ if [[ ${line} != /usr/lib/gcc/* || -z ${gccpath} ]]; then ++ echo ${line} ++ elif [[ ${line} == ${gccpath} ]]; then ++ echo ${line} ++ fi ++ done < <($DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq) + } + + # Version comparision function. Assumes Linux style version scheme. +-- +2.24.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-lvm-fix-removal-of-pvscan-from-udev-rules.patch new file mode 100644 index 0000000000..8b93afc358 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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 +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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-network-manager-ensure-that-nm-run.sh-is-executed-wh.patch new file mode 100644 index 0000000000..d97193c9b1 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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 +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/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/050-systemd-remove-obsolete-syslog-parameter.patch new file mode 100644 index 0000000000..f24cf11b37 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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?= +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?= +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?= +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?= +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?= +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?= +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?= +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?= +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?= +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 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-bash-4.4.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-bash-4.4.patch deleted file mode 100644 index 3144c8e6b7..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-bash-4.4.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -urN dracut-044.orig/modules.d/50drm/module-setup.sh dracut-044/modules.d/50drm/module-setup.sh ---- dracut-044.orig/modules.d/50drm/module-setup.sh 2015-11-25 16:22:28.000000000 +0300 -+++ dracut-044/modules.d/50drm/module-setup.sh 2016-09-28 02:50:08.914967926 +0300 -@@ -24,9 +24,9 @@ - local _fname _fcont - while read _fname || [ -n "$_fname" ]; do - case "$_fname" in -- *.ko) _fcont="$(< $_fname)" ;; -- *.ko.gz) _fcont="$(gzip -dc $_fname)" ;; -- *.ko.xz) _fcont="$(xz -dc $_fname)" ;; -+ *.ko) _fcont="$(< $_fname tr -d \\0)" ;; -+ *.ko.gz) _fcont="$(gzip -dc $_fname | tr -d \\0)" ;; -+ *.ko.xz) _fcont="$(xz -dc $_fname | tr -d \\0)" ;; - esac - [[ $_fcont =~ $_drm_drivers - && ! $_fcont =~ iw_handler_get_spy ]] \ -diff -urN dracut-044.orig/modules.d/90kernel-modules/module-setup.sh dracut-044/modules.d/90kernel-modules/module-setup.sh ---- dracut-044.orig/modules.d/90kernel-modules/module-setup.sh 2015-11-25 16:22:28.000000000 +0300 -+++ dracut-044/modules.d/90kernel-modules/module-setup.sh 2016-09-28 02:49:11.725390294 +0300 -@@ -10,9 +10,9 @@ - function bmf1() { - local _f - while read _f || [ -n "$_f" ]; do case "$_f" in -- *.ko) [[ $(< $_f) =~ $_blockfuncs ]] && echo "$_f" ;; -- *.ko.gz) [[ $(gzip -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;; -- *.ko.xz) [[ $(xz -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;; -+ *.ko) [[ $(< $_f tr -d \\0) =~ $_blockfuncs ]] && echo "$_f" ;; -+ *.ko.gz) [[ $(gzip -dc <$_f | tr -d \\0) =~ $_blockfuncs ]] && echo "$_f" ;; -+ *.ko.xz) [[ $(xz -dc <$_f | tr -d \\0) =~ $_blockfuncs ]] && echo "$_f" ;; - esac - done - return 0 -diff -urN dracut-044.orig/modules.d/90kernel-network-modules/module-setup.sh dracut-044/modules.d/90kernel-network-modules/module-setup.sh ---- dracut-044.orig/modules.d/90kernel-network-modules/module-setup.sh 2015-11-25 16:22:28.000000000 +0300 -+++ dracut-044/modules.d/90kernel-network-modules/module-setup.sh 2016-09-28 02:51:08.202422231 +0300 -@@ -26,9 +26,9 @@ - while read _fname; do - [[ $_fname =~ $_unwanted_drivers ]] && continue - case "$_fname" in -- *.ko) _fcont="$(< $_fname)" ;; -- *.ko.gz) _fcont="$(gzip -dc $_fname)" ;; -- *.ko.xz) _fcont="$(xz -dc $_fname)" ;; -+ *.ko) _fcont="$(< $_fname tr -d \\0)" ;; -+ *.ko.gz) _fcont="$(gzip -dc $_fname | tr -d \\0)" ;; -+ *.ko.xz) _fcont="$(xz -dc $_fname | tr -d \\0)" ;; - esac - [[ $_fcont =~ $_net_drivers - && ! $_fcont =~ iw_handler_get_spy ]] \ -diff -urN dracut-044.orig/modules.d/90multipath/module-setup.sh dracut-044/modules.d/90multipath/module-setup.sh ---- dracut-044.orig/modules.d/90multipath/module-setup.sh 2015-11-25 16:22:28.000000000 +0300 -+++ dracut-044/modules.d/90multipath/module-setup.sh 2016-09-28 02:49:11.726390235 +0300 -@@ -58,9 +58,9 @@ - local _f - while read _f || [ -n "$_f" ]; do - case "$_f" in -- *.ko) [[ $(< $_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.gz) [[ $(gzip -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.xz) [[ $(xz -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -+ *.ko) [[ $(< $_f tr -d \\0) =~ $_funcs ]] && echo "$_f" ;; -+ *.ko.gz) [[ $(gzip -dc <$_f | tr -d \\0) =~ $_funcs ]] && echo "$_f" ;; -+ *.ko.xz) [[ $(xz -dc <$_f | tr -d \\0) =~ $_funcs ]] && echo "$_f" ;; - esac - done - return 0 -diff -urN dracut-044.orig/modules.d/95iscsi/module-setup.sh dracut-044/modules.d/95iscsi/module-setup.sh ---- dracut-044.orig/modules.d/95iscsi/module-setup.sh 2015-11-25 16:22:28.000000000 +0300 -+++ dracut-044/modules.d/95iscsi/module-setup.sh 2016-09-28 02:49:11.726390235 +0300 -@@ -168,9 +168,9 @@ - local _f - while read _f || [ -n "$_f" ]; do - case "$_f" in -- *.ko) [[ $(< $_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.gz) [[ $(gzip -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.xz) [[ $(xz -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -+ *.ko) [[ $(< $_f tr -d \\0) =~ $_funcs ]] && echo "$_f" ;; -+ *.ko.gz) [[ $(gzip -dc <$_f | tr -d \\0) =~ $_funcs ]] && echo "$_f" ;; -+ *.ko.xz) [[ $(xz -dc <$_f | tr -d \\0) =~ $_funcs ]] && echo "$_f" ;; - esac - done - return 0 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-preserve-xattrs-when-copying.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-preserve-xattrs-when-copying.patch deleted file mode 100644 index 3146d8485a..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/files/dracut-044-preserve-xattrs-when-copying.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 61c761bc2c35fb244d46fbbde97161f5927071dc Mon Sep 17 00:00:00 2001 -From: Stefan Berger -Date: Tue, 25 Oct 2016 15:09:49 -0400 -Subject: [PATCH] dracut-install: preserve extended attributes when copying - files - -Preserve extended attributes when copying files using dracut-install. - -The copying of extended attributes avoids file execution denials when -the Linux Integrity Measurement's Appraisal mode is active. In that mode -executables need their file signatures copied. In particular, this patch -solves the problem that dependent libaries are not included in the -initramfs since the copied programs could not be executed due to missing -signatures. The following audit record shows the type of failure that -is now prevented: - -type=INTEGRITY_DATA msg=audit(1477409025.492:30065): pid=922 uid=0 - auid=4294967295 ses=4294967295 - subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 - op="appraise_data" cause="IMA-signature-required" - comm="ld-linux-x86-64" - name="/var/tmp/dracut.R6ySa4/initramfs/usr/bin/journalctl" - dev="dm-0" ino=37136 res=0 - -Signed-off-by: Stefan Berger ---- - install/dracut-install.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index fe30bba..c0f1c17 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -294,7 +294,7 @@ static int cp(const char *src, const char *dst) - normal_copy: - pid = fork(); - if (pid == 0) { -- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps", "-fL", src, dst, -+ execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps,xattr", "-fL", src, dst, - NULL); - _exit(EXIT_FAILURE); - } -@@ -302,7 +302,7 @@ static int cp(const char *src, const char *dst) - while (waitpid(pid, &ret, 0) < 0) { - if (errno != EINTR) { - ret = -1; -- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps -fL %s %s", src, -+ log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps,xattr -fL %s %s", src, - dst); - break; - } diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/metadata.xml index 153efe6cdc..a3674ec5f5 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/dracut/metadata.xml @@ -17,8 +17,4 @@ Module installing additional tools like strace, file editor, ssh and more - - Generic, modular initramfs generation tool that can be used across various - distributions. -