summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Żołnowski <aidecoe@gentoo.org>2012-12-16 19:54:33 +0000
committerAmadeusz Żołnowski <aidecoe@gentoo.org>2012-12-16 19:54:33 +0000
commit4e3e8e4e945114312e0ac06bae45367029c210c1 (patch)
tree9a91ca6e91b5cebcd5ea9a1f235163fd1341bf16 /sys-kernel/dracut
parentStable for ppc, wrt bug #443080 (diff)
downloadhistorical-4e3e8e4e945114312e0ac06bae45367029c210c1.tar.gz
historical-4e3e8e4e945114312e0ac06bae45367029c210c1.tar.bz2
historical-4e3e8e4e945114312e0ac06bae45367029c210c1.zip
Use alternative dirs to search for udev rules. Use pkg-config to detect
primary udevdir at run-time. Fixes bug #447088. Package-Manager: portage-2.1.11.37/cvs/Linux x86_64 Manifest-Sign-Key: 0xE1DBFAB5
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r--sys-kernel/dracut/ChangeLog12
-rw-r--r--sys-kernel/dracut/Manifest21
-rw-r--r--sys-kernel/dracut/dracut-024-r3.ebuild272
-rw-r--r--sys-kernel/dracut/files/024-0001-Fallback-to-external-blkid-and-path_id.patch4
-rw-r--r--sys-kernel/dracut/files/024-0002-dracut-functions.sh-support-for-altern.patch39
-rw-r--r--sys-kernel/dracut/files/024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch30
6 files changed, 366 insertions, 12 deletions
diff --git a/sys-kernel/dracut/ChangeLog b/sys-kernel/dracut/ChangeLog
index 7028ff5089d3..09ea3c26ae2b 100644
--- a/sys-kernel/dracut/ChangeLog
+++ b/sys-kernel/dracut/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-kernel/dracut
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.98 2012/12/16 18:02:28 aidecoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.99 2012/12/16 19:54:27 aidecoe Exp $
+
+*dracut-024-r3 (16 Dec 2012)
+
+ 16 Dec 2012; Amadeusz Żołnowski <aidecoe@gentoo.org>
+ files/024-0001-Fallback-to-external-blkid-and-path_id.patch,
+ +files/024-0002-dracut-functions.sh-support-for-altern.patch,
+ +files/024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch,
+ +dracut-024-r3.ebuild:
+ Use alternative dirs to search for udev rules. Use pkg-config to detect
+ primary udevdir at run-time. Fixes bug #447088.
16 Dec 2012; Amadeusz Żołnowski <aidecoe@gentoo.org> -dracut-023-r2.ebuild,
-dracut-024.ebuild:
diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest
index 0c0a1fefa56e..0e697ceb7f6b 100644
--- a/sys-kernel/dracut/Manifest
+++ b/sys-kernel/dracut/Manifest
@@ -28,7 +28,9 @@ AUX 022-0019-dracut.sh-create-relative-symlinks-for.patch 760 SHA256 d0e17c2847c
AUX 023-0001-dracut-functions.sh-find_binary-path-s.patch 1272 SHA256 f4d4789f33f6c40894f6fd48da9168a7b8c597e78665f5b2d6256e00c1c7286b SHA512 ff5015dc08d07e0c8a62dd5e93f5bfbf4f20e9999705c0ca45e4dbb0a71f8e0322d8ee7891263866430116127d7dddd56d5e16e0fd60e480399cc90a599c7b67 WHIRLPOOL a0874103b54f729e7c59a4e53f3563918923b83ecdcb6664fccd4e2eaeab0c7f231ef838b4ab2213bcad05a25abde3003bef74f6643f0c0e77d231caee1ae061
AUX 023-0002-90crypt-call-systemd-commands-only-if-.patch 1090 SHA256 827185a3110e850236ba6d080f269b5e73356822d9571a1e5e826c7b5a04fb08 SHA512 a8d2bcd473ff1b0628ada82276d125da0e508ab723446dc1f36075ffe1c7af3d664c0f417c3865f581cda986572a57a9bc7a933696fee1e44f18826849f45093 WHIRLPOOL bd6d4431698471505d7b77eb43490b09c138e23465f4db926e65bc7eb94bd891698cece53aafa072150dfc0a4ea639e1642a9ecc5f7541c7f14ed297e5b70adf
AUX 023-0003-Fallback-to-external-blkid-and-path_id.patch 4583 SHA256 74d61ec7f895bcf31b86f29caa6bff7c99865bd0976220befc40f6c16d4e4087 SHA512 98c65c088a606a9fa3f0e870234d418dbd6fc63d67448df4c7de02bc80460a4d9c8077c031d5a6bd24ad309f381f8b0090423439ec22f117b86c8de4f16da13a WHIRLPOOL 51575d6a61b557c933b6f59fcc4f6016cf1318f8fbcca9358b75c53c5a8ad5f30dd184e9a35482ff411d7a037c1a61e713cc8603a5caa389c4d85d2d812a40ca
-AUX 024-0001-Fallback-to-external-blkid-and-path_id.patch 4579 SHA256 7cec4ee2279a7fa7b534f046cfd0844096b9f30a47a190058809b1e47681ba2a SHA512 557999cc25d521d8a7141869e8bc0464745b9bea296458dc86603b6ad091765f12cbb20fbd6745ae59659d045e20ec3be5d27a0abfdd19cfc29f0f1ced40cac1 WHIRLPOOL 1f9484f0c8add42a4109fc2fe013197215d7f54697ba6ae20f37540ca1cb5c8060b4fd7461d8bb4199f578ae533ae5ed9ec6f80d5aa4e084ba64a7d952c465e0
+AUX 024-0001-Fallback-to-external-blkid-and-path_id.patch 4582 SHA256 77cf33b6e397888a7ab5eecbfa6a7521b1874893a8a87b41b2b7294210393031 SHA512 591bc93a64814d8c7611cb1f357a6faa1ecb853829e7bec7b00e97f9402b835eb842e9e66e1b87826c4454d0ed4f9e9c5bcb6c17660bd166260247d76ea7a0d9 WHIRLPOOL 2a73db2ddfa53c1e31def6114f8f70d5ecca10c91ae265720698565f6dae21329a55e2334b7bd60ee4b75efbc5cd7d9e756ff8f6ffe595929e3b7ebee589ee6b
+AUX 024-0002-dracut-functions.sh-support-for-altern.patch 1367 SHA256 b9b7efa2f72afc9a7d29493bf7afe8adad68e74db2966db7a2475668c25c2081 SHA512 a7db4f6d81e1009221f6bb5479a5669d28519d81f02b42d2c37ff5ceccd69e5749c3c7cccf09992ed0a6d224de5ce28bb15436b5b3819697eb5c996bc11298f1 WHIRLPOOL f8e8aca5293dee46c3e56abb1a5794dadb6a10c8c3852543085466b6fe1139f79a0c63d12bf01fec97cd4581cf78b0834b760b623e0cc3c6a9314d87f0cba6d7
+AUX 024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch 950 SHA256 959038e9a6894e686701962ea8d7dd68d589c863aea78279e4e4c13a6472ea51 SHA512 786aeced7f98fb3dd9475e953b66abcc825d8af7be9a09e87ff5ad740a7eb88321c8bbee8d1644f7eeade8182ab934473bc9dcc51fb8a3fcad5386134a180b60 WHIRLPOOL b8f5c9f61cf60e6f612034ea6616896417d58f18c2cf46a553b67efa08cfad7a1d2a3c533f385e16a44f22913551fcc6b01ef5c413ccdc93b3359ed37548df1b
AUX dracut-014-multipath-udev-rules.patch 848 SHA256 0e2215897b7cbac1bf9c84b42d6eb8af4438674934749bc339f768cba6662c18 SHA512 c83e2a4e8bc5d25351ce82afdd4f63d9abedbe16a3dfd8aa69f1b0828a841e5106555319f112d93af92b3c1f5e2154a7bf36c8825f1e91feeb512e7c69b5fa16 WHIRLPOOL abc1bc20c022bb040e12ef00aa0aaa5cbbdcdcea71fddb3c222dbf393f7cc1ed1a0725fa95440ba90165c222dc07c6ab530d0b02577608500224f406e66f6257
AUX dracut-014-usrmount-fsck-fix.patch 1208 SHA256 192ed24457c07d282cbdc75576d6bfc272572c482d28188c34a48c613a5b1565 SHA512 71d3199a5acf81cce0527c6e95db61ae07e833e4c27147b9a339655ac01c7e32db40956f171cb9a13a97062f89c6cb5bdcb8e33a2a4b1898c86a1b700fd5c444 WHIRLPOOL 648aa6e97df18f8dd24bd5eba48e18a56ea6a10e36c4e40ec9734547750b10064393c96b31ce2e52229e80507c8333dd95a04aaa873158a220ef4cab6998f8cc
AUX dracut-018-lsinitrd-support-symlinks.patch 699 SHA256 b2d422b0a026265101045b641a2b4cef20e0ca15ca3e6fce8616d721b334ea2f SHA512 6b6f83fa8e99b5160130de6ae86699e6327665d852fdc7910e751c7644f668357f83f108896ebb73130546c76f17f6d0dff50c0da4634779e8d461685529a98b WHIRLPOOL bb2e2c6b12daf8727e874e393e58380b9d49e083ebf929c48104d23d088cc455de3c039fcaa3ac74aa88516c733c2536ccd4a950ee9a8b9745d63e61dbafbb47
@@ -45,16 +47,17 @@ EBUILD dracut-019-r6.ebuild 7098 SHA256 ff726d57322e929e0072e40f84bf4da9fd999da6
EBUILD dracut-022-r6.ebuild 8524 SHA256 f76d8a04088200c950541d04fb39725a825b817d8fc88e97cc01a1679dd775bc SHA512 3217386625e9dfd28596e3a4f6c9c6bcd6a60b42643736ddb97cb6446f743d80a00188bf300f182a311b3a4d8464e7096637675986766cbb216397462f147453 WHIRLPOOL 96885c504fe45867ef5541ea743c5865fb02a51645e8ead1d02dc8ac37e888b3696839e0734213a94454eb67605b5cd632ca8ee55afe2da1aba5aca4e8f1e854
EBUILD dracut-023-r4.ebuild 8257 SHA256 accf64276b71d0f36f9e6a441b7dad84025ec0023b36f93932d83de52a32e1cd SHA512 ebe8faa6f39ac3894ec39a92d1144a610669021cf03ac71c8fd40c2ed4cb154341fde038fc4ab11014e616530c6198ed0fc90f839b4aa2d6ba38fcd501d07f0b WHIRLPOOL 0b16f237b79ce1fd14d6d738bbe889aee58e4e7fb426c92877b0133c3786ea19fb2ba0cac5a47e81a44dc22c0c5eeb5d4bb731dfdf011f4ad62ebd6e06b6a55f
EBUILD dracut-024-r2.ebuild 8101 SHA256 2752853b9d18edcdafac166b8ec465a0b4825538bc583eab2438192292418019 SHA512 421113cb9b1aa9f3d8bb3b5e24763542af78029d356fbb1e09f30d73d065b43519f7e20cc826c3199e6688251b30830cbf216b8aa1ce80812912c176a6831dea WHIRLPOOL 69a434a4e9136bbe7d3e653c42a678c8b2c1a5ec52df9fa56a4fc2c5945a769d0552b6039451de2073b04d660eec4456e9ab61bb2dfbce55199eecc58d7742fe
-MISC ChangeLog 36180 SHA256 78dd72ec3c26657168071fcb208d9672831cae0fa6a0081dc7160326f80cdd36 SHA512 2db144642dab35035f34847f1c7b5f142333aa8d3e5ad620b889eefb572973817bf952da034a53542ecaec5c6fc10fa2e176ab49f2696543877e62ad05a31038 WHIRLPOOL 5853abc680cba05447b06caf08bea15cb997a40ede145c6ebcdcb74250fc9ab945411567c0fbe421e9ee997ab6c79379c77d37474460bf213a3b231cfde365d7
+EBUILD dracut-024-r3.ebuild 7979 SHA256 42a2a979c4f772f25e8e1d85ef2a7331bea15afe3a51055855ae2f343cd150d1 SHA512 54eac43a5103efd6cd53803f0452a82ac44c0c838453b95999a06406d9338d674c18f952343fbac17b37c6471cc1840926ff6dfcd38ff02e48bd27976259d38a WHIRLPOOL 5f98437761eb2fc0b895118a75b1e164c6fd8a02d8e8f1914b1fa93b8a2935272dbd125275710443962bd7ec31ee56f7d54913e7df863464eb0d1a21a95cbccb
+MISC ChangeLog 36608 SHA256 bde3a011860f9210694af8013c1f3e59b9774853a338a7971de33e2839407a72 SHA512 673160f68f1fc11420f1db2cc7fbc4f0a7a28644c7fb7d72c5ef1fc783cc871d41e2b029d53c691fff948e3ebcb1d80edaf03b60b398b1135caf47fdf5ab8316 WHIRLPOOL 0efe9887e816eec2073edbcf9c86713dfc666b56e3bc6d8e165a9f4722a1e02b53cdd0520a861eb6f2d54dfc2cdebfa1ca3d86ec8594e42629bc0979260bc3f8
MISC metadata.xml 926 SHA256 b895115d72a686208816e1042bd295abb183ea832cdda73859deb690c11b932c SHA512 e6695bc301c6b3621e1730bc8e6ecc6c317705037a3004aab36bfea0b7f6a8b235a6d61ec4e4b9bb234ea53971d6c18dfbd0d09b3f30080a07eeb9e57da98c96 WHIRLPOOL d844828523e7bb0805b4b3d64d72163702adb6d4bedf7929494208e50696e43ddddc1e4a262c663ec98e05b65037868454135c0a46f82fb6b455e692826b48dc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCAAGBQJQzgy2AAoJEPATRTHh2/q1iXcH/RkVVMVx1KV5DkAeviTjEwbk
-BWN9qHGfzqbHUhrtFphxPjGnhf4kaUKLTbA5FF6xP1NMz49x8TdAx9c/VQnEcIPE
-gXbVaJaefkIwW9QTu9mu9xolJANJ4ONbL6oUfXsTaAWODHelVPpXBzJt7T9iRCQP
-S1jxmQNKb7NqZNt1UqVQFjMkGamalZn1m7aBgQGhrkqg0oPZUOn7BVy2NO/DaRdt
-GP6QFRhEK5UX4GY+z1bySeyA/HHvEttSgXAPHMjpipqmTbNhZFT9Ek6iRUcW67SG
-7Y8GaOcOHLjEhEe2MMdtPelGv1RClCCajA9bdLuj7reaLoawTouAV60VwyJY4Xg=
-=kToM
+iQEcBAEBCAAGBQJQzib1AAoJEPATRTHh2/q1L+oH/Au4EDpRjg7hnCwTPz8X6/fn
+/uAqrjXgqiuifnc+yoq637nq7LV6Bei1gTFmudogL0wy6tpcz1qChZOJ29yGtkEM
+u+dGJ/2AeoiIQOJEnIamKOfDWiURbAVAdn7JNwvZwPdt3/Amb5W1btU/z139ZrYP
+03KthLZ8BVrQU0ffhZoQ1l/RnkkyexPbSxDDqtxoUP9Ps+fMYdvasNrJxxhpkow/
+/kwi+ZNTPhHXwx1XvcfU0q/IHwjpbYOezUkJqy39hHw53uAtJa+Go9BvIl6hTSfN
+9pystxhPCEUVNTuzhoVL3oar3gqwmnirm2eRLyOSTDRh3o/8i7kn5iG58Wtdalw=
+=DJaO
-----END PGP SIGNATURE-----
diff --git a/sys-kernel/dracut/dracut-024-r3.ebuild b/sys-kernel/dracut/dracut-024-r3.ebuild
new file mode 100644
index 000000000000..a906a787ce68
--- /dev/null
+++ b/sys-kernel/dracut/dracut-024-r3.ebuild
@@ -0,0 +1,272 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-024-r3.ebuild,v 1.1 2012/12/16 19:54:27 aidecoe Exp $
+
+EAPI=4
+
+inherit eutils linux-info
+
+add_req_use_for() {
+ local dep="$1"; shift
+ local f
+
+ for f in "$@"; do
+ REQUIRED_USE+="${f}? ( ${dep} )
+"
+ done
+}
+
+DESCRIPTION="Generic initramfs generation tool"
+HOMEPAGE="http://dracut.wiki.kernel.org"
+SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt )
+ dracut_modules_crypt-loop? ( dracut_modules_crypt )
+ dracut_modules_livenet? ( dracut_modules_dmsquash-live )
+ "
+COMMON_MODULES="
+ dracut_modules_biosdevname
+ dracut_modules_bootchart
+ dracut_modules_btrfs
+ dracut_modules_caps
+ dracut_modules_crypt-gpg
+ dracut_modules_crypt-loop
+ dracut_modules_gensplash
+ dracut_modules_mdraid
+ dracut_modules_multipath
+ dracut_modules_plymouth
+ dracut_modules_syslog
+ dracut_modules_systemd
+ "
+DM_MODULES="
+ dracut_modules_crypt
+ dracut_modules_dmraid
+ dracut_modules_dmsquash-live
+ dracut_modules_livenet
+ dracut_modules_lvm
+ "
+NETWORK_MODULES="
+ dracut_modules_cifs
+ dracut_modules_iscsi
+ dracut_modules_livenet
+ dracut_modules_nbd
+ dracut_modules_nfs
+ dracut_modules_ssh-client
+ "
+add_req_use_for device-mapper ${DM_MODULES}
+add_req_use_for net ${NETWORK_MODULES}
+IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}"
+IUSE="debug device-mapper optimization net selinux ${IUSE_DRACUT_MODULES}"
+
+RESTRICT="test"
+
+CDEPEND=">virtual/udev-166
+ dracut_modules_systemd? ( sys-apps/systemd )
+ "
+RDEPEND="${CDEPEND}
+ app-arch/cpio
+ >=app-shells/bash-4.0
+ >=app-shells/dash-0.5.4.11
+ >=sys-apps/baselayout-1.12.14-r1
+ || ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
+ >=sys-apps/sysvinit-2.87-r3
+ >=sys-apps/util-linux-2.21
+ virtual/pkgconfig
+
+ debug? ( dev-util/strace )
+ device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
+ net? ( net-misc/curl >=net-misc/dhcp-4.2.4_p2-r1[client] sys-apps/iproute2 )
+ selinux? ( sys-libs/libselinux sys-libs/libsepol )
+ dracut_modules_biosdevname? ( sys-apps/biosdevname )
+ dracut_modules_bootchart? ( app-benchmarks/bootchart2 sys-apps/usleep
+ sys-process/acct )
+ dracut_modules_btrfs? ( sys-fs/btrfs-progs )
+ dracut_modules_caps? ( sys-libs/libcap )
+ dracut_modules_cifs? ( net-fs/cifs-utils )
+ dracut_modules_crypt? ( sys-fs/cryptsetup )
+ dracut_modules_crypt-gpg? ( app-crypt/gnupg )
+ dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
+ dracut_modules_gensplash? ( media-gfx/splashutils )
+ dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
+ dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 )
+ dracut_modules_mdraid? ( sys-fs/mdadm )
+ dracut_modules_multipath? ( sys-fs/multipath-tools )
+ dracut_modules_nbd? ( sys-block/nbd )
+ dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind )
+ dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 )
+ dracut_modules_ssh-client? ( dev-libs/openssl )
+ dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) )
+ "
+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
+ "
+
+#
+# Helper functions
+#
+
+# Returns true if any of specified modules is enabled by USE flag and false
+# otherwise.
+# $1 = list of modules (which have corresponding USE flags of the same name)
+any_module() {
+ local m modules=" $@ "
+
+ for m in ${modules}; do
+ ! use $m && modules=${modules/ $m / }
+ done
+
+ shopt -s extglob
+ modules=${modules%%+( )}
+ shopt -u extglob
+
+ [[ ${modules} ]]
+}
+
+# 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
+}
+
+#
+# ebuild functions
+#
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-0001-Fallback-to-external-blkid-and-path_id.patch"
+ epatch "${FILESDIR}/${PV}-0002-dracut-functions.sh-support-for-altern.patch"
+ epatch "${FILESDIR}/${PV}-0003-gentoo.conf-let-udevdir-be-handled-by-.patch"
+ chmod +x "${S}/modules.d/95udev-rules/udev-rules-prepare.sh"
+
+ if use dracut_modules_systemd; then
+ local systemdutildir="$($(tc-getPKG_CONFIG) systemd \
+ --variable=systemdutildir)"
+ local systemdsystemunitdir="$($(tc-getPKG_CONFIG) systemd \
+ --variable=systemdsystemunitdir)"
+ [[ ${systemdutildir} ]] || die "Couldn't detect systemdutildir"
+ [[ ${systemdsystemunitdir} ]] \
+ || die "Couldn't detect systemdsystemunitdir"
+ einfo "Setting systemdutildir to ${systemdutildir} and ..."
+ sed -e "4asystemdutildir=\"${systemdutildir}\"" \
+ -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+ einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir}..."
+ sed -e "5asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
+ -i "${S}/dracut.conf.d/gentoo.conf.example" || die
+ fi
+}
+
+src_compile() {
+ emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" doc
+ if use optimization; then
+ ewarn "Enabling experimental optimization!"
+ tc-export CC
+ emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" install/dracut-install
+ fi
+}
+
+src_install() {
+ local libdir="/usr/lib"
+
+ emake prefix=/usr libdir="${libdir}" sysconfdir=/etc \
+ DESTDIR="${D}" install
+
+ dodir /var/lib/dracut/overlay
+ dodoc HACKING TODO AUTHORS NEWS README*
+
+ insinto /etc/dracut.conf.d
+ newins dracut.conf.d/gentoo.conf.example gentoo.conf
+
+ insinto /etc/logrotate.d
+ newins dracut.logrotate dracut
+
+ dohtml dracut.html
+
+ #
+ # Modules
+ #
+ local module
+ modules_dir="${D%/}/${libdir#/}/dracut/modules.d"
+
+ # Remove modules not enabled by USE flags
+ for module in ${IUSE_DRACUT_MODULES} ; do
+ ! use ${module} && rm_module -f ${module#dracut_modules_}
+ done
+
+ # Those flags are specific, and even are corresponding to modules, they need
+ # to be declared as regular USE flags.
+ use debug || rm_module 95debug
+ use selinux || rm_module 98selinux
+
+ # Following flags define set of helper modules which are base dependencies
+ # for others and as so have no practical use, so remove these modules.
+ use device-mapper || rm_module 90dm
+ use net || rm_module 40network 45ifcfg 45url-lib
+
+ # Remove S/390 modules which are not tested at all
+ rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet
+
+ # 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
+
+ # Remove extra modules which go to future dracut-extras
+ rm_module 05busybox 97masterkey 98ecryptfs 98integrity
+}
+
+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 ~MODULES"
+
+ # 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 desc_MODULES="Enable loadable module 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 " CONFIG_MODULES"
+ ewarn ""
+ fi
+}
diff --git a/sys-kernel/dracut/files/024-0001-Fallback-to-external-blkid-and-path_id.patch b/sys-kernel/dracut/files/024-0001-Fallback-to-external-blkid-and-path_id.patch
index 0315e3b9f9ee..4951ad299cfb 100644
--- a/sys-kernel/dracut/files/024-0001-Fallback-to-external-blkid-and-path_id.patch
+++ b/sys-kernel/dracut/files/024-0001-Fallback-to-external-blkid-and-path_id.patch
@@ -1,7 +1,7 @@
From 2a0b056b156c471a8cf5cbac918f9bfc30f86e06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Thu, 1 Nov 2012 09:31:01 +0100
-Subject: [PATCH] Fallback to external blkid and path_id in udev rules for
+Subject: [PATCH 1/3] Fallback to external blkid and path_id in udev rules for
<udev-176.
Starting with commit 24a38bc1cbe461c344ce61c7e10b6d51d5689c93 dracut
@@ -111,5 +111,5 @@ index 0000000..a340e38
+ mv "${f}.new" "$f"
+done
--
-1.7.12.4
+1.8.0.2
diff --git a/sys-kernel/dracut/files/024-0002-dracut-functions.sh-support-for-altern.patch b/sys-kernel/dracut/files/024-0002-dracut-functions.sh-support-for-altern.patch
new file mode 100644
index 000000000000..ffb5026fe66c
--- /dev/null
+++ b/sys-kernel/dracut/files/024-0002-dracut-functions.sh-support-for-altern.patch
@@ -0,0 +1,39 @@
+From 0232fbd3503180f17b4e254e0ca6089cdb199bc1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
+Date: Sun, 16 Dec 2012 20:00:33 +0100
+Subject: [PATCH 2/3] dracut-functions.sh: support for alternative udev dirs -
+ udevaltdirs
+
+It is required for Gentoo which moves udev from / to /usr and supports
+both /lib/udev and /usr/lib/udev for compatibility with other packages.
+---
+ dracut-functions.sh | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index f1c797c..4a9ebbb 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -896,12 +896,18 @@ inst_rule_group_owner() {
+ # create a function to install them to make life simpler.
+ inst_rules() {
+ local _target=/etc/udev/rules.d _rule _found
++ local _rules_dirs=( "$udevdir/rules.d" "/etc/udev/rules.d" )
++ local _d
++
++ for _d in $udevaltdirs; do
++ _rules_dirs+=( "$_d/rules.d" )
++ done
+
+ inst_dir "${udevdir}/rules.d"
+ inst_dir "$_target"
+ for _rule in "$@"; do
+ if [ "${rule#/}" = "$rule" ]; then
+- for r in ${udevdir}/rules.d /etc/udev/rules.d; do
++ for r in "${_rules_dirs[@]}"; do
+ if [[ -f $r/$_rule ]]; then
+ _found="$r/$_rule"
+ inst_rule_programs "$_found"
+--
+1.8.0.2
+
diff --git a/sys-kernel/dracut/files/024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch b/sys-kernel/dracut/files/024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch
new file mode 100644
index 000000000000..1d825e2e3816
--- /dev/null
+++ b/sys-kernel/dracut/files/024-0003-gentoo.conf-let-udevdir-be-handled-by-.patch
@@ -0,0 +1,30 @@
+From 8f8ecaf6d0a3b19356617c502b5241088f98d17f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
+Date: Sun, 16 Dec 2012 20:02:48 +0100
+Subject: [PATCH 3/3] gentoo.conf: let udevdir= be handled by pkg-config and
+ use udevaltdirs
+
+To avoid need of rebuild after udev update/downgrade let udevdir= be set
+dynamically with pkg-config. Use udevaltdirs to search for rules both
+in old and new locations.
+---
+ dracut.conf.d/gentoo.conf.example | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dracut.conf.d/gentoo.conf.example b/dracut.conf.d/gentoo.conf.example
+index 1361a30..b78e5c6 100644
+--- a/dracut.conf.d/gentoo.conf.example
++++ b/dracut.conf.d/gentoo.conf.example
+@@ -1,7 +1,8 @@
+ # /etc/dracut.conf.d/gentoo.conf
+ # dracut config file customized for Gentoo Base System release 2
+
+-udevdir=/lib/udev
++udevdir=
++udevaltdirs="/lib/udev /usr/lib/udev"
+ ro_mnt=yes
+
+ #
+--
+1.8.0.2
+