# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 inherit bash-completion-r1 eutils linux-info multilib systemd DESCRIPTION="Generic initramfs generation tool" HOMEPAGE="http://dracut.wiki.kernel.org" AIDECOE_DISTFILES="http://dev.gentoo.org/~aidecoe/distfiles" 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="selinux systemd" RESTRICT="test" CDEPEND="virtual/udev ! "${D}/usr/lib/dracut/dracut-version.sh" insinto "/usr/lib/dracut/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}/usr/lib/dracut/modules.d" # Remove S/390 modules which are not tested at all # QA: not tested by us, or by upstream? rm_module 80cms 95dasd 95dasd_mod 95zfcp 95znet # Remove modules which won't work for sure # QA: Why no tools for this module? rm_module 95fcoe # no tools # fips module depends on masked app-crypt/hmaccalc # QA: why is this still masked? rm_module 01fips 02fips-aesni # Remove extra modules which go to future dracut-extras # QA: have these moved to extras yet? If not, shouldn't we let # people use them? 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" # 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 if [[ -n $REPLACING_VERSIONS && $REPLACING_VERSIONS < 024 ]]; then if ! [[ $(=dracut-024." ewarn "Use rd.auto option to turn it on." fi fi # Here is where your elog would go. # I would just point out the names of the packages that dracut # supports if they are present on the system # and maybe refer to the README.generic file. }