Gentoo Archives: gentoo-commits

From: "Amadeusz Zolnowski (aidecoe)" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-kernel/dracut: dracut-024-r2.ebuild ChangeLog dracut-023-r4.ebuild dracut-024-r1.ebuild dracut-023-r3.ebuild
Date: Thu, 01 Nov 2012 19:31:04
Message-Id: 20121101193047.9C2E821601@flycatcher.gentoo.org
1 aidecoe 12/11/01 19:30:47
2
3 Modified: ChangeLog
4 Added: dracut-024-r2.ebuild dracut-023-r4.ebuild
5 Removed: dracut-024-r1.ebuild dracut-023-r3.ebuild
6 Log:
7 Added missing epatch and improved patches a bit btw.
8
9 (Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key E1DBFAB5)
10
11 Revision Changes Path
12 1.94 sys-kernel/dracut/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.94&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?rev=1.94&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/ChangeLog?r1=1.93&r2=1.94
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v
21 retrieving revision 1.93
22 retrieving revision 1.94
23 diff -u -r1.93 -r1.94
24 --- ChangeLog 1 Nov 2012 10:51:53 -0000 1.93
25 +++ ChangeLog 1 Nov 2012 19:30:47 -0000 1.94
26 @@ -1,6 +1,16 @@
27 # ChangeLog for sys-kernel/dracut
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.93 2012/11/01 10:51:53 aidecoe Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.94 2012/11/01 19:30:47 aidecoe Exp $
31 +
32 +*dracut-024-r2 (01 Nov 2012)
33 +*dracut-023-r4 (01 Nov 2012)
34 +
35 + 01 Nov 2012; Amadeusz Żołnowski <aidecoe@g.o>
36 + files/024-0001-Fallback-to-external-blkid-and-path_id.patch,
37 + files/023-0003-Fallback-to-external-blkid-and-path_id.patch,
38 + -dracut-023-r3.ebuild, +dracut-023-r4.ebuild, -dracut-024-r1.ebuild,
39 + +dracut-024-r2.ebuild:
40 + Added missing epatch and improved patches a bit btw.
41
42 01 Nov 2012; Amadeusz Żołnowski <aidecoe@g.o> dracut-014-r3.ebuild,
43 dracut-018-r3.ebuild, dracut-019-r6.ebuild, dracut-022-r6.ebuild,
44
45
46
47 1.1 sys-kernel/dracut/dracut-024-r2.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-024-r2.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-024-r2.ebuild?rev=1.1&content-type=text/plain
51
52 Index: dracut-024-r2.ebuild
53 ===================================================================
54 # Copyright 1999-2012 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-024-r2.ebuild,v 1.1 2012/11/01 19:30:47 aidecoe Exp $
57
58 EAPI=4
59
60 inherit eutils linux-info toolchain-funcs
61
62 add_req_use_for() {
63 local dep="$1"; shift
64 local f
65
66 for f in "$@"; do
67 REQUIRED_USE+="${f}? ( ${dep} )
68 "
69 done
70 }
71
72 DESCRIPTION="Generic initramfs generation tool"
73 HOMEPAGE="http://dracut.wiki.kernel.org"
74 SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
75 LICENSE="GPL-2"
76 SLOT="0"
77 KEYWORDS="~amd64 ~x86"
78
79 REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt )
80 dracut_modules_crypt-loop? ( dracut_modules_crypt )
81 dracut_modules_livenet? ( dracut_modules_dmsquash-live )
82 "
83 COMMON_MODULES="
84 dracut_modules_biosdevname
85 dracut_modules_bootchart
86 dracut_modules_btrfs
87 dracut_modules_caps
88 dracut_modules_crypt-gpg
89 dracut_modules_crypt-loop
90 dracut_modules_gensplash
91 dracut_modules_mdraid
92 dracut_modules_multipath
93 dracut_modules_plymouth
94 dracut_modules_syslog
95 dracut_modules_systemd
96 "
97 DM_MODULES="
98 dracut_modules_crypt
99 dracut_modules_dmraid
100 dracut_modules_dmsquash-live
101 dracut_modules_livenet
102 dracut_modules_lvm
103 "
104 NETWORK_MODULES="
105 dracut_modules_cifs
106 dracut_modules_iscsi
107 dracut_modules_livenet
108 dracut_modules_nbd
109 dracut_modules_nfs
110 dracut_modules_ssh-client
111 "
112 add_req_use_for device-mapper ${DM_MODULES}
113 add_req_use_for net ${NETWORK_MODULES}
114 IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}"
115 IUSE="debug device-mapper optimization net selinux ${IUSE_DRACUT_MODULES}"
116
117 RESTRICT="test"
118
119 CDEPEND=">sys-fs/udev-166
120 dracut_modules_systemd? ( sys-apps/systemd )
121 "
122 RDEPEND="${CDEPEND}
123 app-arch/cpio
124 >=app-shells/bash-4.0
125 >=app-shells/dash-0.5.4.11
126 >=sys-apps/baselayout-1.12.14-r1
127 || ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
128 >=sys-apps/sysvinit-2.87-r3
129 >=sys-apps/util-linux-2.21
130
131 debug? ( dev-util/strace )
132 device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
133 net? ( net-misc/curl >=net-misc/dhcp-4.2.4_p2-r1[client] sys-apps/iproute2 )
134 selinux? ( sys-libs/libselinux sys-libs/libsepol )
135 dracut_modules_biosdevname? ( sys-apps/biosdevname )
136 dracut_modules_bootchart? ( app-benchmarks/bootchart2 sys-apps/usleep
137 sys-process/acct )
138 dracut_modules_btrfs? ( sys-fs/btrfs-progs )
139 dracut_modules_caps? ( sys-libs/libcap )
140 dracut_modules_cifs? ( net-fs/cifs-utils )
141 dracut_modules_crypt? ( sys-fs/cryptsetup )
142 dracut_modules_crypt-gpg? ( app-crypt/gnupg )
143 dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
144 dracut_modules_gensplash? ( media-gfx/splashutils )
145 dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
146 dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 )
147 dracut_modules_mdraid? ( sys-fs/mdadm )
148 dracut_modules_multipath? ( sys-fs/multipath-tools )
149 dracut_modules_nbd? ( sys-block/nbd )
150 dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind )
151 dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 )
152 dracut_modules_ssh-client? ( dev-libs/openssl )
153 dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) )
154 "
155 DEPEND="${CDEPEND}
156 app-text/asciidoc
157 >=dev-libs/libxslt-1.1.26
158 app-text/docbook-xml-dtd:4.5
159 >=app-text/docbook-xsl-stylesheets-1.75.2
160 virtual/pkgconfig
161 "
162
163 #
164 # Helper functions
165 #
166
167 # Returns true if any of specified modules is enabled by USE flag and false
168 # otherwise.
169 # $1 = list of modules (which have corresponding USE flags of the same name)
170 any_module() {
171 local m modules=" $@ "
172
173 for m in ${modules}; do
174 ! use $m && modules=${modules/ $m / }
175 done
176
177 shopt -s extglob
178 modules=${modules%%+( )}
179 shopt -u extglob
180
181 [[ ${modules} ]]
182 }
183
184 # Removes module from modules.d.
185 # $1 = module name
186 # Module name can be specified without number prefix.
187 rm_module() {
188 local force m
189 [[ $1 = -f ]] && force=-f
190
191 for m in $@; do
192 if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then
193 rm ${force} --interactive=never -r "${modules_dir}"/$m
194 else
195 rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m
196 fi
197 done
198 }
199
200 #
201 # ebuild functions
202 #
203
204 src_prepare() {
205 epatch "${FILESDIR}/${PV}-0001-Fallback-to-external-blkid-and-path_id.patch"
206 chmod +x "${S}/modules.d/95udev-rules/udev-rules-prepare.sh"
207
208 local udevdir="$($(tc-getPKG_CONFIG) udev --variable=udevdir)"
209 [[ ${udevdir} ]] || die "Couldn't detect udevdir"
210 einfo "Setting udevdir to ${udevdir}..."
211 sed -e "s@udevdir=.*@udevdir=\"${udevdir}\"@" \
212 -i "${S}/dracut.conf.d/gentoo.conf.example" || die
213
214 if use dracut_modules_systemd; then
215 local systemdutildir="$($(tc-getPKG_CONFIG) systemd \
216 --variable=systemdutildir)"
217 local systemdsystemunitdir="$($(tc-getPKG_CONFIG) systemd \
218 --variable=systemdsystemunitdir)"
219 [[ ${systemdutildir} ]] || die "Couldn't detect systemdutildir"
220 [[ ${systemdsystemunitdir} ]] \
221 || die "Couldn't detect systemdsystemunitdir"
222 einfo "Setting systemdutildir to ${systemdutildir} and ..."
223 sed -e "4asystemdutildir=\"${systemdutildir}\"" \
224 -i "${S}/dracut.conf.d/gentoo.conf.example" || die
225 einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir}..."
226 sed -e "5asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
227 -i "${S}/dracut.conf.d/gentoo.conf.example" || die
228 fi
229 }
230
231 src_compile() {
232 emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" doc
233 if use optimization; then
234 ewarn "Enabling experimental optimization!"
235 tc-export CC
236 emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" install/dracut-install
237 fi
238 }
239
240 src_install() {
241 local libdir="/usr/lib"
242
243 emake prefix=/usr libdir="${libdir}" sysconfdir=/etc \
244 DESTDIR="${D}" install
245
246 dodir /var/lib/dracut/overlay
247 dodoc HACKING TODO AUTHORS NEWS README*
248
249 insinto /etc/dracut.conf.d
250 newins dracut.conf.d/gentoo.conf.example gentoo.conf
251
252 insinto /etc/logrotate.d
253 newins dracut.logrotate dracut
254
255 dohtml dracut.html
256
257 #
258 # Modules
259 #
260 local module
261 modules_dir="${D%/}/${libdir#/}/dracut/modules.d"
262
263 # Remove modules not enabled by USE flags
264 for module in ${IUSE_DRACUT_MODULES} ; do
265 ! use ${module} && rm_module -f ${module#dracut_modules_}
266 done
267
268 # Those flags are specific, and even are corresponding to modules, they need
269 # to be declared as regular USE flags.
270 use debug || rm_module 95debug
271 use selinux || rm_module 98selinux
272
273 # Following flags define set of helper modules which are base dependencies
274 # for others and as so have no practical use, so remove these modules.
275 use device-mapper || rm_module 90dm
276 use net || rm_module 40network 45ifcfg 45url-lib
277
278 # Remove S/390 modules which are not tested at all
279 rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet
280
281 # Remove modules which won't work for sure
282 rm_module 95fcoe # no tools
283 # fips module depends on masked app-crypt/hmaccalc
284 rm_module 01fips 02fips-aesni
285
286 # Remove extra modules which go to future dracut-extras
287 rm_module 05busybox 97masterkey 98ecryptfs 98integrity
288 }
289
290 pkg_postinst() {
291 if linux-info_get_any_version && linux_config_src_exists; then
292 ewarn ""
293 ewarn "If the following test report contains a missing kernel"
294 ewarn "configuration option, you should reconfigure and rebuild your"
295 ewarn "kernel before booting image generated with this Dracut version."
296 ewarn ""
297
298 local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS ~MODULES"
299
300 # Kernel configuration options descriptions:
301 local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev"
302 local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\
303 "(initramfs/initrd) support"
304 local desc_MODULES="Enable loadable module support"
305
306 local opt desc
307
308 # Generate ERROR_* variables for check_extra_config.
309 for opt in ${CONFIG_CHECK}; do
310 opt=${opt#\~}
311 desc=desc_${opt}
312 eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \
313 "is missing and REQUIRED'"
314 done
315
316 check_extra_config
317 echo
318 else
319 ewarn ""
320 ewarn "Your kernel configuration couldn't be checked. Do you have"
321 ewarn "/usr/src/linux/.config file there? Please check manually if"
322 ewarn "following options are enabled:"
323 ewarn ""
324 ewarn " CONFIG_BLK_DEV_INITRD"
325 ewarn " CONFIG_DEVTMPFS"
326 ewarn " CONFIG_MODULES"
327 ewarn ""
328 fi
329 }
330
331
332
333 1.1 sys-kernel/dracut/dracut-023-r4.ebuild
334
335 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-023-r4.ebuild?rev=1.1&view=markup
336 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-kernel/dracut/dracut-023-r4.ebuild?rev=1.1&content-type=text/plain
337
338 Index: dracut-023-r4.ebuild
339 ===================================================================
340 # Copyright 1999-2012 Gentoo Foundation
341 # Distributed under the terms of the GNU General Public License v2
342 # $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-023-r4.ebuild,v 1.1 2012/11/01 19:30:47 aidecoe Exp $
343
344 EAPI=4
345
346 inherit eutils linux-info toolchain-funcs
347
348 add_req_use_for() {
349 local dep="$1"; shift
350 local f
351
352 for f in "$@"; do
353 REQUIRED_USE+="${f}? ( ${dep} )
354 "
355 done
356 }
357
358 DESCRIPTION="Generic initramfs generation tool"
359 HOMEPAGE="http://dracut.wiki.kernel.org"
360 SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
361 LICENSE="GPL-2"
362 SLOT="0"
363 KEYWORDS="~amd64 ~x86"
364
365 REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt )
366 dracut_modules_crypt-loop? ( dracut_modules_crypt )
367 dracut_modules_livenet? ( dracut_modules_dmsquash-live )
368 "
369 COMMON_MODULES="
370 dracut_modules_biosdevname
371 dracut_modules_bootchart
372 dracut_modules_btrfs
373 dracut_modules_caps
374 dracut_modules_crypt-gpg
375 dracut_modules_crypt-loop
376 dracut_modules_gensplash
377 dracut_modules_mdraid
378 dracut_modules_multipath
379 dracut_modules_plymouth
380 dracut_modules_syslog
381 dracut_modules_systemd
382 "
383 DM_MODULES="
384 dracut_modules_crypt
385 dracut_modules_dmraid
386 dracut_modules_dmsquash-live
387 dracut_modules_livenet
388 dracut_modules_lvm
389 "
390 NETWORK_MODULES="
391 dracut_modules_cifs
392 dracut_modules_iscsi
393 dracut_modules_livenet
394 dracut_modules_nbd
395 dracut_modules_nfs
396 dracut_modules_ssh-client
397 "
398 add_req_use_for device-mapper ${DM_MODULES}
399 add_req_use_for net ${NETWORK_MODULES}
400 IUSE_DRACUT_MODULES="${COMMON_MODULES} ${DM_MODULES} ${NETWORK_MODULES}"
401 IUSE="debug device-mapper optimization net selinux ${IUSE_DRACUT_MODULES}"
402
403 RESTRICT="test"
404
405 CDEPEND=">sys-fs/udev-166
406 dracut_modules_systemd? ( sys-apps/systemd )
407 "
408 RDEPEND="${CDEPEND}
409 app-arch/cpio
410 >=app-shells/bash-4.0
411 >=app-shells/dash-0.5.4.11
412 >=sys-apps/baselayout-1.12.14-r1
413 || ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
414 >=sys-apps/sysvinit-2.87-r3
415 >=sys-apps/util-linux-2.21
416
417 debug? ( dev-util/strace )
418 device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
419 net? ( net-misc/curl >=net-misc/dhcp-4.2.4_p2-r1[client] sys-apps/iproute2 )
420 selinux? ( sys-libs/libselinux sys-libs/libsepol )
421 dracut_modules_biosdevname? ( sys-apps/biosdevname )
422 dracut_modules_bootchart? ( app-benchmarks/bootchart2 sys-apps/usleep
423 sys-process/acct )
424 dracut_modules_btrfs? ( sys-fs/btrfs-progs )
425 dracut_modules_caps? ( sys-libs/libcap )
426 dracut_modules_cifs? ( net-fs/cifs-utils )
427 dracut_modules_crypt? ( sys-fs/cryptsetup )
428 dracut_modules_crypt-gpg? ( app-crypt/gnupg )
429 dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
430 dracut_modules_gensplash? ( media-gfx/splashutils )
431 dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
432 dracut_modules_lvm? ( >=sys-fs/lvm2-2.02.33 )
433 dracut_modules_mdraid? ( sys-fs/mdadm )
434 dracut_modules_multipath? ( sys-fs/multipath-tools )
435 dracut_modules_nbd? ( sys-block/nbd )
436 dracut_modules_nfs? ( net-fs/nfs-utils net-nds/rpcbind )
437 dracut_modules_plymouth? ( >=sys-boot/plymouth-0.8.3-r1 )
438 dracut_modules_ssh-client? ( dev-libs/openssl )
439 dracut_modules_syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) )
440 "
441 DEPEND="${CDEPEND}
442 app-text/asciidoc
443 >=dev-libs/libxslt-1.1.26
444 app-text/docbook-xml-dtd:4.5
445 >=app-text/docbook-xsl-stylesheets-1.75.2
446 virtual/pkgconfig
447 "
448
449 #
450 # Helper functions
451 #
452
453 # Returns true if any of specified modules is enabled by USE flag and false
454 # otherwise.
455 # $1 = list of modules (which have corresponding USE flags of the same name)
456 any_module() {
457 local m modules=" $@ "
458
459 for m in ${modules}; do
460 ! use $m && modules=${modules/ $m / }
461 done
462
463 shopt -s extglob
464 modules=${modules%%+( )}
465 shopt -u extglob
466
467 [[ ${modules} ]]
468 }
469
470 # Removes module from modules.d.
471 # $1 = module name
472 # Module name can be specified without number prefix.
473 rm_module() {
474 local force m
475 [[ $1 = -f ]] && force=-f
476
477 for m in $@; do
478 if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then
479 rm ${force} --interactive=never -r "${modules_dir}"/$m
480 else
481 rm ${force} --interactive=never -r "${modules_dir}"/[0-9][0-9]$m
482 fi
483 done
484 }
485
486 #
487 # ebuild functions
488 #
489
490 src_prepare() {
491 epatch "${FILESDIR}/${PV}-0001-dracut-functions.sh-find_binary-path-s.patch"
492 epatch "${FILESDIR}/${PV}-0002-90crypt-call-systemd-commands-only-if-.patch"
493 epatch "${FILESDIR}/${PV}-0003-Fallback-to-external-blkid-and-path_id.patch"
494 chmod +x "${S}/modules.d/95udev-rules/udev-rules-prepare.sh"
495
496 local udevdir="$($(tc-getPKG_CONFIG) udev --variable=udevdir)"
497 [[ ${udevdir} ]] || die "Couldn't detect udevdir"
498 einfo "Setting udevdir to ${udevdir}..."
499 sed -e "s@udevdir=.*@udevdir=\"${udevdir}\"@" \
500 -i "${S}/dracut.conf.d/gentoo.conf.example" || die
501
502 if use dracut_modules_systemd; then
503 local systemdutildir="$($(tc-getPKG_CONFIG) systemd \
504 --variable=systemdutildir)"
505 local systemdsystemunitdir="$($(tc-getPKG_CONFIG) systemd \
506 --variable=systemdsystemunitdir)"
507 [[ ${systemdutildir} ]] || die "Couldn't detect systemdutildir"
508 [[ ${systemdsystemunitdir} ]] \
509 || die "Couldn't detect systemdsystemunitdir"
510 einfo "Setting systemdutildir to ${systemdutildir} and ..."
511 sed -e "4asystemdutildir=\"${systemdutildir}\"" \
512 -i "${S}/dracut.conf.d/gentoo.conf.example" || die
513 einfo "Setting systemdsystemunitdir to ${systemdsystemunitdir}..."
514 sed -e "5asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
515 -i "${S}/dracut.conf.d/gentoo.conf.example" || die
516 fi
517 }
518
519 src_compile() {
520 emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" doc
521 if use optimization; then
522 ewarn "Enabling experimental optimization!"
523 tc-export CC
524 emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" install/dracut-install
525 fi
526 }
527
528 src_install() {
529 local libdir="/usr/lib"
530
531 emake prefix=/usr libdir="${libdir}" sysconfdir=/etc \
532 DESTDIR="${D}" install
533
534 dodir /var/lib/dracut/overlay
535 dodoc HACKING TODO AUTHORS NEWS README*
536
537 insinto /etc/dracut.conf.d
538 newins dracut.conf.d/gentoo.conf.example gentoo.conf
539
540 insinto /etc/logrotate.d
541 newins dracut.logrotate dracut
542
543 dohtml dracut.html
544
545 #
546 # Modules
547 #
548 local module
549 modules_dir="${D%/}/${libdir#/}/dracut/modules.d"
550
551 # Remove modules not enabled by USE flags
552 for module in ${IUSE_DRACUT_MODULES} ; do
553 ! use ${module} && rm_module -f ${module#dracut_modules_}
554 done
555
556 # Those flags are specific, and even are corresponding to modules, they need
557 # to be declared as regular USE flags.
558 use debug || rm_module 95debug
559 use selinux || rm_module 98selinux
560
561 # Following flags define set of helper modules which are base dependencies
562 # for others and as so have no practical use, so remove these modules.
563 use device-mapper || rm_module 90dm
564 use net || rm_module 40network 45ifcfg 45url-lib
565
566 # Remove S/390 modules which are not tested at all
567 rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet
568
569 # Remove modules which won't work for sure
570 rm_module 95fcoe # no tools
571 # fips module depends on masked app-crypt/hmaccalc
572 rm_module 01fips 02fips-aesni
573
574 # Remove extra modules which go to future dracut-extras
575 rm_module 05busybox 97masterkey 98ecryptfs 98integrity
576 }
577
578 pkg_postinst() {
579 if linux-info_get_any_version && linux_config_src_exists; then
580 ewarn ""
581 ewarn "If the following test report contains a missing kernel"
582 ewarn "configuration option, you should reconfigure and rebuild your"
583 ewarn "kernel before booting image generated with this Dracut version."
584 ewarn ""
585
586 local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS ~MODULES"
587
588 # Kernel configuration options descriptions:
589 local desc_DEVTMPFS="Maintain a devtmpfs filesystem to mount at /dev"
590 local desc_BLK_DEV_INITRD="Initial RAM filesystem and RAM disk "\
591 "(initramfs/initrd) support"
592 local desc_MODULES="Enable loadable module support"
593
594 local opt desc
595
596 # Generate ERROR_* variables for check_extra_config.
597 for opt in ${CONFIG_CHECK}; do
598 opt=${opt#\~}
599 desc=desc_${opt}
600 eval "local ERROR_${opt}='CONFIG_${opt}: \"${!desc}\"" \
601 "is missing and REQUIRED'"
602 done
603
604 check_extra_config
605 echo
606 else
607 ewarn ""
608 ewarn "Your kernel configuration couldn't be checked. Do you have"
609 ewarn "/usr/src/linux/.config file there? Please check manually if"
610 ewarn "following options are enabled:"
611 ewarn ""
612 ewarn " CONFIG_BLK_DEV_INITRD"
613 ewarn " CONFIG_DEVTMPFS"
614 ewarn " CONFIG_MODULES"
615 ewarn ""
616 fi
617 }