diff options
author | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2014-02-17 11:42:16 +0000 |
---|---|---|
committer | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2014-02-17 11:42:16 +0000 |
commit | 1e098d3aa8e302b246a8220376d4b70eaca05ba2 (patch) | |
tree | b1f124f00a4d712202c67ddcb1ee0992f94a0bab /sys-kernel | |
parent | Update ChangeLog to indicate that bug 499618 was fixed (diff) | |
download | historical-1e098d3aa8e302b246a8220376d4b70eaca05ba2.tar.gz historical-1e098d3aa8e302b246a8220376d4b70eaca05ba2.tar.bz2 historical-1e098d3aa8e302b246a8220376d4b70eaca05ba2.zip |
Fixed problem with root= boot parameter being ignored by dracut in hostonly
mode. Rels comment #40 of bug #498832.
Commit on behalf of Alexander Tsoy <alexander@tsoy.me>.
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64
Manifest-Sign-Key: 0xF0134531E1DBFAB5
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/dracut/ChangeLog | 11 | ||||
-rw-r--r-- | sys-kernel/dracut/Manifest | 18 | ||||
-rw-r--r-- | sys-kernel/dracut/dracut-036-r1.ebuild | 254 | ||||
-rw-r--r-- | sys-kernel/dracut/files/036-0006-dracut.sh-Fix-variable-name-typo.patch | 33 |
4 files changed, 307 insertions, 9 deletions
diff --git a/sys-kernel/dracut/ChangeLog b/sys-kernel/dracut/ChangeLog index 453f50cf07f1..42b2372dc515 100644 --- a/sys-kernel/dracut/ChangeLog +++ b/sys-kernel/dracut/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-kernel/dracut # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.152 2014/02/16 13:00:01 aidecoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.153 2014/02/17 11:42:11 aidecoe Exp $ + +*dracut-036-r1 (17 Feb 2014) + + 17 Feb 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-036-r1.ebuild, + +files/036-0006-dracut.sh-Fix-variable-name-typo.patch: + Fixed problem with root= boot parameter being ignored by dracut in hostonly + mode. Rels comment #40 of bug #498832. + + Commit on behalf of Alexander Tsoy <alexander@tsoy.me>. *dracut-036 (16 Feb 2014) diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest index a8b528b9ba26..bca357d6599d 100644 --- a/sys-kernel/dracut/Manifest +++ b/sys-kernel/dracut/Manifest @@ -19,21 +19,23 @@ AUX 036-0002-dracut-functions.sh-support-for-altern.patch 1487 SHA256 8de2b22936 AUX 036-0003-gentoo.conf-let-udevdir-be-handled-by-.patch 950 SHA256 24c62302bffc30ecc5414c50efff3d7f34ca5e90b1ee824def7f465cabb6a4d4 SHA512 b0e71ee9df7d9880dc42b97c0b339e4f9e49b513095bd586fc4ee745a694a1cb472e400ce2535e3fc70bc06d76107cc21a4333421be97b396e74e8a5d1c42639 WHIRLPOOL 1764a1c9707a2747b33f9ad46fe4ddc04bf05769c9f1ba505f2bc92babeffe96f4859600fffcc30af44367ae3b8605b6e2720589b9c3b1d4d45d9d900f90bd9e AUX 036-0004-Use-the-same-paths-in-dracut.sh-as-tho.patch 2412 SHA256 07520bf44145b6fcde8bdd6c2e9f0b00bce5d95ed7a297d5feacbbd0151b2960 SHA512 c9837d1bb8adf01e0e89aa3dab880ec73c721a8e0de4ec86e44e97485d22eed3aa4f2537df7891ff31cf9fa174b1a9eb138620a9c4bc68569641008cf558c387 WHIRLPOOL 04f3fa193ceb0888dd361dc3004dcd3cca9507f32cc8ce4a254c1da1a00f5bae98a60a1085b7b8001fb01ffb560878a9e85b60ce196bd3a9e7224e33979540d9 AUX 036-0005-Install-dracut-install-into-libexec-di.patch 2583 SHA256 615d263e814aece64c37af729103049ca85fd32768e649549f26d24daecbcbd8 SHA512 4c7d752be0ed76617f44c723abcce56224de804ea0b0070f3a5513859ce899e45904fcd8520352fa333504a21e8ba744e664bada1bd5d6d82e4e916ea6691b31 WHIRLPOOL 5aa5705e8bcc104d3d3c355ffcc25d4880e1a9c50707c85ff7903ed1e12849c39dd15fbf857f11e291184ccb89c2fd889787bbce6cdd48dfd5c6f0e283de148e +AUX 036-0006-dracut.sh-Fix-variable-name-typo.patch 1159 SHA256 11268d492da82ad9153ae798f2c3860876057bd804400426d26fc1c3f45a49e3 SHA512 8a62ade167c517e20da17eccbac07ea16a363fdecb5556cd04a5b5ec3e516963df52823eac30bbe6d1ab6b3135b45606e74d05dc2bba23fb4ba3f5029d2b8467 WHIRLPOOL 74674a5b646ea9335adf1a67971e1931e3ebc31cc93b66a4035135e41194a359571fd1f2d964d2b2ab2354d64ad083025e31b7ce47009e362379b4432e45a239 DIST 034-0010-module-setup.sh-add-comments.patch.bz2 6424 SHA256 fbcb940c83e362cc93a78c5be28ffd7c794a331f992498e451d69c1830f054fa SHA512 e5e41b8696716c5284ea981ae85dbe688c5c31330e400c79f4ba46890939dffdd7744e4a85d27d074987a8db65114332171af0a5471338e3e4bed19d54edc6fd WHIRLPOOL c5d29ef2f20aa752e57180be35a2014c214a25e4e49d3f623d05cd6ef1debd2cec38d24453ecb0c004cdbb52239f0d541ddc9df065ab84fb7d62c30594704347 DIST dracut-034.tar.bz2 277692 SHA256 48c7fd57e287d4f34dfff5b5ead14a4511926858f1e2ffaa40b762f257516d7f SHA512 ae06510668e63550d4d6b509b314c7668880387cfe696fc7f21cf04cc488be743440871dbd1fcf4e8314f9aa9e61ee3e78a42a75631123c420767677c6744e34 WHIRLPOOL 0412dea239fbd82d79e873869211ea31b7495dac74d7079e8aa52dd8d2484986fd0a0831aefffe29cfe5acfbf64fa01a9a1fa742192a28276a8671b663a69e13 DIST dracut-036.tar.xz 255192 SHA256 6dd97c4323ec8bd87b24a95349692fb6c6ca2d1b3528793ef117820049b6fcd3 SHA512 e55448701ef4b0c8969d4d64239a2a7df3d7b06f4457838d2b2139e58b754822654a1b8cfc7d6dbcd7a79dbc14e75366a39e21104b4aeda20c7bf34734668344 WHIRLPOOL ddbe88cb6b333586a71eeed98871066bc79208d2ba8d88dfb42245aca6bd15d6c0c436948569fc8c18703f9d66ad9918bb1e73e050ce6c807fae833148ead218 EBUILD dracut-034-r4.ebuild 10371 SHA256 58e2dbde568f0a913a9cfe43428a19119d061c94ab1a53bd950b6fafe88ecdde SHA512 5ea984d26f446061e9fbac2dc0a20ca93c44626d5cf689507747d2a7b3e87ad446784bf99cfc52c91818c222dd3f3c82afa4d927226818db0886d78dfa6d7984 WHIRLPOOL 9dbc755d90b34f5a1d66f2b72705a46abff81b1b5c56e1acc7b0bb27f6ecf33992e6e5037c449150720ac949132b444c2f6df735cfb977e989f868a7dbb04b70 +EBUILD dracut-036-r1.ebuild 7496 SHA256 bcb8b2a21cb86c04070962be46206da583ab6b1b97ff99aefda15faaf1951d66 SHA512 b396c29fe8a010b9a9e75ef964529f5f0678d1bce9ec5e99fd3316d30ef4cea505e3d8171d257d7579ec62b6242f9382a744ee4d858e4fc7717b1839c85ed7b3 WHIRLPOOL e806b00c9e32e2a1fbb977272047c5135f3d3b9e13e83ecc0135586a6ab84f091b57c0d692e11d5a70fa9cb3f7bd4734f3c637887694c4cf342f38c9f1809e6d EBUILD dracut-036.ebuild 7428 SHA256 eeb2276bdc05a80f61b803c88f0cc428c3303fe31df7d6b597d1e4885f21d861 SHA512 f799e3e5f3f749ed9d656997e0c8234bfc006e53f41262fb78688b9ec697b776825b9430d27d6e070e22d270691c6e6d0d94371f953a94aeaff742369d209047 WHIRLPOOL f5d565e94985bd97a110bce61514261b8e0bf3d3a65c6544b8f213bc7e062c7b30c8fdb838ff14fb229e4001dd07decda6e4cab66dac7e661cce92cc785f2290 -MISC ChangeLog 66793 SHA256 8f9c11f1c1418550b5d312cfa3df46d03cd9f9c1f8f11099246d1ef2e1e40df2 SHA512 6dba707dcaa08eeb9815aa8419a8425ab22b5fa745c43b9b715e907ee59f7ca991499bd507dd3fbb713a5991e6a1e053876129ce44bfb9f6fef781ba7cf6c1e5 WHIRLPOOL 9bcd70847b754e2fe69e624eb290a1f3f7055bf723e6fe363c9d3797bd4ecdb96e083befc177df7ff6df0192c105020872bef2b7641a7858f4b7b64739686392 +MISC ChangeLog 67140 SHA256 e5b566ec1c3397cf5e400b2f45a0247433651079db1de4ed7fd1c6440630f481 SHA512 cd76ec4d23c7251604cc30c464121f3f26ae3787ebb8556d75c0c04aa4c36af082c6035dd0a6cc2c0d6ca1ff9229289776c5d6a121ff6a4007902336a9030bdb WHIRLPOOL a79cda81b5f59f6284992e743aac432a7adfe54e46f78390742e004dd938530697dec6b6c8e188c25f46825334b8682cdda12bc295bcf082b0d7defada2232aa MISC metadata.xml 906 SHA256 5f19b725d0669877fdd7814634b7aa7dd73331459bace52de02908417b833c3f SHA512 c5838d36080528d541b67cb38de17cc2351f7e5e17ab060c58f037792225ea223ade6b7e69376f4a9256b0bb3dcf4de578dcd50ee1c7d04a3f3288ca3c1ada43 WHIRLPOOL 532ea421fab965094820d5c0961a00ca38c858461f572a0cd4a145aa90340a569ee942062338ae03773c2709a08e4882f3176333aa5383b7e3c467cb01c0874d -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQEcBAEBCAAGBQJTALZZAAoJEPATRTHh2/q16gIH/AiFClPpEFhBFU5aVV+fQG9A -xQ/SPb6iBFSVNZWgyg3GtcHU5YhOGEks8O7gTH6RkhNid1cEfKMONExByGgWYQMJ -AxdZUU9+KIYEfs2itGyw4Cgtbkv9bGx3MqFodMkqVdRBZPA5DhrNEO1fVK48++RE -nSnI3K/GGQvftqU7OTrgruHXIYDSL35y3M7YJxAXEABhE7gHP33e8BpexTUrYivg -9312ERBMYFE6FlcqVVK/Vl4zjrYTFcsdpYqWIEGbTQ4fvysvZkWf3rduuNLAFkUo -NahIHTwOe7k47M3d+ZsD3QsCb1FY23k/8U8jMA/x6DHwU1Tcvt1UCxTv4mc+ip8= -=rI+X +iQEcBAEBCAAGBQJTAfWUAAoJEPATRTHh2/q1YBsH/AnVpZDXvFzL4ATgeRH02YQd +uOHOlQUCS0bLYqZcDG9QOvvOXATYoVQGiubtgZzDaBDDKSVMp0FhfAPqdbKA3tDk +X4j0Ki2c68GdajqvErq0YV1+0i/ISXIczGoq0oF+IPv6uxAR//HkWQYdSnfDs5NN +jp6KplYfSl/+Zcmtwx9TRvNZ5qHnlinrF3JsSwgq++ADUvUeVnHWPeKhf/REZ9Cx +0Cv84xvprQjfRmp+l81mlORw4IU2BpJZU1VEanPXIoZ5gLdcOgOfDApgw8GVr3A/ +JHeYUHNZsrrmTYik/ZmblNsxaYoH3rcsw8Z5w6XXCSJpqPrKaURnFsEW3STA85w= +=gOQq -----END PGP SIGNATURE----- diff --git a/sys-kernel/dracut/dracut-036-r1.ebuild b/sys-kernel/dracut/dracut-036-r1.ebuild new file mode 100644 index 000000000000..8dd42c56dbef --- /dev/null +++ b/sys-kernel/dracut/dracut-036-r1.ebuild @@ -0,0 +1,254 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-036-r1.ebuild,v 1.1 2014/02/17 11:42:11 aidecoe Exp $ + +EAPI=4 + +inherit bash-completion-r1 eutils linux-info multilib systemd + +DESCRIPTION="Generic initramfs generation tool" +HOMEPAGE="http://dracut.wiki.kernel.org" +SRC_URI="mirror://kernel/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 ) + selinux? ( sec-policy/selinux-dracut ) + " +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 ) + " +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 +PATCHES=( + "${FILESDIR}/${PV}-0001-NEWS-update-for-version-036.patch" + "${FILESDIR}/${PV}-0002-dracut-functions.sh-support-for-altern.patch" + "${FILESDIR}/${PV}-0003-gentoo.conf-let-udevdir-be-handled-by-.patch" + "${FILESDIR}/${PV}-0004-Use-the-same-paths-in-dracut.sh-as-tho.patch" + "${FILESDIR}/${PV}-0005-Install-dracut-install-into-libexec-di.patch" + "${FILESDIR}/${PV}-0006-dracut.sh-Fix-variable-name-typo.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 +} + +# Grabbed from net-misc/netctl ebuild. +optfeature() { + local desc=$1 + shift + while (( $# )); do + if has_version "$1"; then + elog " [I] $1 to ${desc}" + else + elog " [ ] $1 to ${desc}" + fi + shift + done +} + +# +# ebuild functions +# + +src_prepare() { + epatch "${PATCHES[@]}" + + local libdirs="/$(get_libdir) /usr/$(get_libdir)" + [[ $libdirs =~ /lib\ ]] || libdirs+=" /lib /usr/lib" + 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 + fi + + epatch_user +} + +src_configure() { + local myconf="--libdir=${MY_LIBDIR}" + myconf+=" --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 +} + +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 + + # + # 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 98selinux + else + # Without systemd following modules do not make sense + rm_module 00systemd-bootchart + 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_src_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 dependencies may be" + elog "installed." + 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 sys-apps/usleep 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 + 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 "Framebuffer splash (media-gfx/splashutils)" \ + media-gfx/splashutils + 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 + 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" \ + dev-libs/openssl + optfeature "Enable logging with syslog-ng or rsyslog" app-admin/syslog-ng \ + app-admin/rsyslog +} diff --git a/sys-kernel/dracut/files/036-0006-dracut.sh-Fix-variable-name-typo.patch b/sys-kernel/dracut/files/036-0006-dracut.sh-Fix-variable-name-typo.patch new file mode 100644 index 000000000000..c0b6301ddf55 --- /dev/null +++ b/sys-kernel/dracut/files/036-0006-dracut.sh-Fix-variable-name-typo.patch @@ -0,0 +1,33 @@ +From 9e01e3d9c8f89b1ef98053a64bde9beed9714029 Mon Sep 17 00:00:00 2001 +From: Colin Guthrie <colin@mageia.org> +Date: Wed, 5 Feb 2014 10:06:51 +0000 +Subject: [PATCH 6/6] dracut.sh: Fix variable name typo. + +This caused the root_dev variable not to be set which in turn meant that +the root device was not whitelisted in 99base/module-setup.sh when injecting +compile-time devexists hooks in hostonly initrds. This ties the generated +initrd to the root fs device (typically the UUID) rather than relying solely +only the root= kernel command line. + +While it is hostonly, not hardcoding e.g. UUIDs is still desirable. Any +swap partition on the host device is still added however. +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 08335d0..d693d58 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1005,7 +1005,7 @@ if [[ $hostonly ]]; then + _bdev=$(readlink -f "/dev/block/$_dev") + [[ -b $_bdev ]] && _dev=$_bdev + push host_devs $_dev +- [[ "$_mp" == "/" ]] && root_dev="$_dev" ++ [[ "$mp" == "/" ]] && root_dev="$_dev" + push host_devs "$_dev" + done + +-- +1.8.5.5 + |