diff options
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r-- | sys-kernel/dracut/ChangeLog | 72 | ||||
-rw-r--r-- | sys-kernel/dracut/Manifest | 7 | ||||
-rw-r--r-- | sys-kernel/dracut/dracut-007-r1.ebuild | 192 | ||||
-rw-r--r-- | sys-kernel/dracut/files/dracut-007-dm-udev-rules.patch | 60 | ||||
-rw-r--r-- | sys-kernel/dracut/files/dracut-007-install-uvesafb.patch | 26 | ||||
-rw-r--r-- | sys-kernel/dracut/files/dracut-007-multipath-udev-rules.patch | 46 | ||||
-rw-r--r-- | sys-kernel/dracut/metadata.xml | 32 |
7 files changed, 435 insertions, 0 deletions
diff --git a/sys-kernel/dracut/ChangeLog b/sys-kernel/dracut/ChangeLog new file mode 100644 index 0000000..3bd91d2 --- /dev/null +++ b/sys-kernel/dracut/ChangeLog @@ -0,0 +1,72 @@ +# ChangeLog for sys-kernel/dracut +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/ChangeLog,v 1.8 2011/01/09 03:27:27 vapier Exp $ + + 09 Jan 2011; Mike Frysinger <vapier@gentoo.org> dracut-007.ebuild: + Use new mount-boot_pkg_postinst helper. + + 25 Aug 2010; Lance Albertson <ramereth@gentoo.org> dracut-006-r1.ebuild, + dracut-007.ebuild: + Fixes bug #334347 (dm related dependencies). Thanks to Akos Szalkai + <szalkai@szalkai.net> for report and patch. + +*dracut-007 (17 Aug 2010) +*dracut-006-r1 (17 Aug 2010) + + 17 Aug 2010; Lance Albertson <ramereth@gentoo.org> +dracut-006-r1.ebuild, + +files/dracut-006-console_init-not-necessary.patch, + +files/dracut-006-dm-udev-rules.patch, +dracut-007.ebuild, + +files/dracut-007-dm-udev-rules.patch, + +files/dracut-007-multipath-udev-rules.patch, metadata.xml: + Version bump and revision update + + Update 006 with patches from #329003, bump to 007 to resolve #331903. + Thanks to Amadeusz Żołnowski for contributing the ebuilds and patches. + +*dracut-006 (07 Jul 2010) + + 07 Jul 2010; Lance Albertson <ramereth@gentoo.org> +dracut-006.ebuild, + +files/dracut-006-dhcp6.patch, +files/dracut-006-lc-all-c.patch, + metadata.xml: + Version bump, resolves bug #324705 + + Thanks to Amadeusz Żołnowski for submitting the ebuild and patches. + + 22 Mar 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> + metadata.xml: + Fixed herd. + +*dracut-004 (02 Feb 2010) + + 02 Feb 2010; Lance Albertson <ramereth@gentoo.org> -dracut-002.ebuild, + +dracut-004.ebuild: + Version bump + +*dracut-003 (09 Dec 2009) +*dracut-002-r1 (09 Dec 2009) + + 09 Dec 2009; Lance Albertson <ramereth@gentoo.org> +dracut-002-r1.ebuild, + +files/dracut-002-makefile-add-with_switch_root.patch, +dracut-003.ebuild: + Version bump, fix switch_root issues #293178, & remove system deps + + Force package dep >=sys-apps/util-linux-2.16 which includes switch_root by + default. Otherwise dracut would have a file conflict with util-linux. + Backport upstream Makefile patch b3611b525 for version 002 instead of patch + included in the bug report. + + 29 Sep 2009; Lance Albertson <ramereth@gentoo.org> dracut-002.ebuild, + +files/dracut-002-add-missing-functions.patch, + +files/dracut-002-gencmdline-check-for-keyboard-i18n-files.patch: + Fix dracut-gencmdline issues + +*dracut-002 (27 Sep 2009) + + 27 Sep 2009; Lance Albertson <ramereth@gentoo.org> +dracut-002.ebuild, + +files/dracut-002-custom-paths.patch, + +files/dracut-002-dir-symlinks.patch, +files/dracut-002-unmount.patch, + +metadata.xml: + Initial ebuild based from #278442 + + Thanks to Ambroz Bizjak <ambro@b4ever.net> for the initial ebuild and + patches + diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest new file mode 100644 index 0000000..343e7cc --- /dev/null +++ b/sys-kernel/dracut/Manifest @@ -0,0 +1,7 @@ +AUX dracut-007-dm-udev-rules.patch 2048 RMD160 20bb37d057b58a523a5bc28fb69fc3b9c231370c SHA1 867ada86c0949106d5b18c69b9e52dbd3cf28e97 SHA256 690a85d5623e673cb43d228ecf4c669bb9e231ec4fd197dac8d66f957eaa98f6 +AUX dracut-007-install-uvesafb.patch 1279 RMD160 abc41bd9b788e8c3caadf7f18fea37bc3a7238ef SHA1 074cd1ebf18ec834058d183fd3374dfa24b7f737 SHA256 90dfe723524084eca6a54dcc656f4662879f5d5da65e66b2a71339ad18a399a4 +AUX dracut-007-multipath-udev-rules.patch 1327 RMD160 616179d21a205b477e729e15b074380432b1154c SHA1 08e20308f983574cb52f567de7fe85d5df61a1e1 SHA256 2df06515c59fe64a461f63444793ae1af287b46be9ddd61f3310f6a87ad830f0 +DIST dracut-007.tar.bz2 99629 RMD160 5bb9d1e89e3d7b3a024369eecb594e71a359778d SHA1 38f2e74f127f682eac4dc7da30ee0ea8debfff1f SHA256 6d58778bcf24b46c82cc72c7d6f5cc1e7bac7f3f9c33aa542052583bd00d20e1 +EBUILD dracut-007-r1.ebuild 5151 RMD160 d72078fb6f9230f6f37af096f1be82dcc0e461a1 SHA1 fc2642e4cdfec1860dfb6754266d47b9e3fe56c4 SHA256 4e4fac9cf8b1247090a4b1f931e97dbc67975c119e3c477627cf27e64fd64f54 +MISC ChangeLog 2705 RMD160 2952538a50332ff027d43b5aab35677b119769a2 SHA1 47e5b10462c7a1ce782d272eb4141aaf0de87df9 SHA256 c0c7d9af76fcb3e1a7800a6367f4639519da28c6554b332bd99b73fa77c53ef7 +MISC metadata.xml 1719 RMD160 02315212a387576ecab8a390e07953eb297a1b83 SHA1 861af2ab0127d120e47c8c4138841c32ac2c9453 SHA256 def34b3d66553100b9da7f1702b0da90a279eafa9fddf460b4e35f729535f5f8 diff --git a/sys-kernel/dracut/dracut-007-r1.ebuild b/sys-kernel/dracut/dracut-007-r1.ebuild new file mode 100644 index 0000000..7d5ef3a --- /dev/null +++ b/sys-kernel/dracut/dracut-007-r1.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-007.ebuild,v 1.3 2011/01/09 03:27:27 vapier Exp $ + +EAPI=2 + +inherit eutils mount-boot + +DESCRIPTION="Generic initramfs generation tool" +HOMEPAGE="http://sourceforge.net/projects/dracut/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +COMMON_IUSE="bootchart btrfs debug gensplash mdraid multipath selinux syslog +uswsusp xen" +NETWORK_IUSE="iscsi nbd nfs" +DM_IUSE="crypt dmraid dmsquash-live lvm" +IUSE="${COMMON_IUSE} ${DM_IUSE} ${NETWORK_IUSE}" + +NETWORK_DEPS="net-misc/bridge-utils >=net-misc/dhcp-3.1.2_p1 sys-apps/iproute2" +DM_DEPS="|| ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 )" + +RDEPEND=" + >=app-shells/bash-4.0 + >=app-shells/dash-0.5.4.11 + >=sys-apps/module-init-tools-3.5 + >=sys-apps/sysvinit-2.87-r3 + >=sys-apps/util-linux-2.16 + >=sys-fs/udev-149 + + bootchart? ( app-benchmarks/bootchart ) + btrfs? ( sys-fs/btrfs-progs ) + crypt? ( sys-fs/cryptsetup ${DM_DEPS} ) + debug? ( dev-util/strace ) + dmraid? ( sys-fs/dmraid sys-fs/multipath-tools ${DM_DEPS} ) + dmsquash-live? ( sys-apps/eject ${DM_DEPS} ) + gensplash? ( media-gfx/splashutils ) + iscsi? ( sys-block/open-iscsi[utils] ${NETWORK_DEPS} ) + lvm? ( >=sys-fs/lvm2-2.02.33 ) + mdraid? ( sys-fs/mdadm ) + multipath? ( sys-fs/multipath-tools ) + nbd? ( sys-block/nbd ${NETWORK_DEPS} ) + nfs? ( net-fs/nfs-utils net-nds/rpcbind ${NETWORK_DEPS} ) + selinux? ( sys-libs/libselinux sys-libs/libsepol ) + syslog? ( || ( app-admin/syslog-ng app-admin/rsyslog ) ) + uswsusp? ( sys-power/suspend ) + xen? ( app-emulation/xen ) + " +DEPEND=" + >=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 m + + for m in $@; do + if [[ $m =~ ^[0-9][0-9][^\ ]*$ ]]; then + rm -rf "${modules_dir}"/$m + else + rm -rf "${modules_dir}"/[0-9][0-9]$m + fi + done +} + +# Displays Gentoo Base System major release number +base_sys_maj_ver() { + local line + + read line < /etc/gentoo-release + line=${line##* } + echo "${line%%.*}" +} + +# +# ebuild functions +# + +src_prepare() { + epatch "${FILESDIR}/${P}-multipath-udev-rules.patch" + epatch "${FILESDIR}/${P}-dm-udev-rules.patch" + epatch "${FILESDIR}/${P}-install-uvesafb.patch" +} + +src_compile() { + emake WITH_SWITCH_ROOT=0 prefix=/usr sysconfdir=/etc || die "emake failed" +} + +src_install() { + emake WITH_SWITCH_ROOT=0 \ + prefix=/usr sysconfdir=/etc \ + DESTDIR="${D}" install || die "emake install failed" + + local gen2conf + + dodir /boot/dracut /var/lib/dracut/overlay /etc/dracut.conf.d + dodoc HACKING TODO AUTHORS NEWS README* + + case "$(base_sys_maj_ver)" in + 1) gen2conf=gentoo.conf ;; + 2) gen2conf=gentoo-openrc.conf ;; + *) die "Expected ver. 1 or 2 of Gentoo Base System (/etc/gentoo-release)." + esac + + insinto /etc/dracut.conf.d + newins dracut.conf.d/${gen2conf}.example ${gen2conf} + + # + # Modules + # + local module + modules_dir="${D}/usr/share/dracut/modules.d" + + echo "${PF}" > "${modules_dir}"/10rpmversion/dracut-version + + # Disable modules not enabled by USE flags + for module in ${IUSE} ; do + ! use ${module} && rm_module ${module} + done + + ! any_module ${DM_IUSE} && rm_module 90dm + ! any_module ${NETWORK_IUSE} && rm_module 45ifcfg 40network + + # Disable S/390 modules which are not tested at all + rm_module 95dasd 95dasd_mod 95zfcp 95znet + + # Disable modules which won't work for sure + rm_module 95fcoe # no tools + + # fips module depends on masked app-crypt/hmaccalc + rm_module 01fips +} + +pkg_postinst() { + mount-boot_pkg_postinst + + elog 'To generate the initramfs:' + elog ' # mount /boot (if necessary)' + elog ' # dracut "" <kernel-version>' + elog '' + elog 'For command line documentation see man 7 dracut.kernel.' + elog '' + elog 'Simple example to select root and resume partition:' + elog ' root=/dev/sda1 resume=/dev/sda2' + elog '' + elog 'The default config (in /etc/dracut.conf) is very minimal and is highly' + elog 'recommended you adjust based on your needs. To include only dracut' + elog 'modules and kernel drivers for this system, use the "-H" option.' + elog 'Some modules need to be explicitly added with "-a" option even if' + elog 'required tools are installed.' + + [[ $(base_sys_maj_ver) = 1 ]] && { + echo + ewarn 'You might encounter following problem during boot time when using' + ewarn 'baselayout1:' + ewarn ' devpts is already mounted or /dev/pts is busy' + ewarn 'See discussion on the Gentoo Forums:' + ewarn 'http://forums.gentoo.org/viewtopic-p-6377431.html' + } + + echo + ewarn 'dhcp-3 is known to not work with QEMU. You will need dhcp-4 or' + ewarn 'later for it.' +} diff --git a/sys-kernel/dracut/files/dracut-007-dm-udev-rules.patch b/sys-kernel/dracut/files/dracut-007-dm-udev-rules.patch new file mode 100644 index 0000000..a9611d2 --- /dev/null +++ b/sys-kernel/dracut/files/dracut-007-dm-udev-rules.patch @@ -0,0 +1,60 @@ +From 374c91e07c0996d5aacb25ba71b3aa1fcf83afec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name> +Date: Sun, 4 Jul 2010 21:21:29 +0200 +Subject: [PATCH 2/2] dm, dmraid, lvm: install udev rules file 64-device-mapper.rules + +Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install rules: + 10-dm.rules + 11-dm-lvm.rules + 13-dm-disk.rules + 95-dm-notify.rules +but provides only 64-device-mapper.rules combining more or less the +above rules files. +--- + modules.d/90dm/install | 3 +++ + modules.d/90dmraid/install | 3 +++ + modules.d/90lvm/install | 3 +++ + 3 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/modules.d/90dm/install b/modules.d/90dm/install +index f77d945..0bc9ced 100755 +--- a/modules.d/90dm/install ++++ b/modules.d/90dm/install +@@ -7,3 +7,6 @@ inst dmsetup + + inst dmeventd + inst_rules 10-dm.rules 95-dm-notify.rules ++# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules ++# files, but provides the one below: ++inst_rules 64-device-mapper.rules +diff --git a/modules.d/90dmraid/install b/modules.d/90dmraid/install +index a016e4d..81c63f0 100755 +--- a/modules.d/90dmraid/install ++++ b/modules.d/90dmraid/install +@@ -15,6 +15,9 @@ done + + + inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules ++# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules ++# files, but provides the one below: ++inst_rules 64-device-mapper.rules + + inst "$moddir/dmraid.sh" /sbin/dmraid_scan + +diff --git a/modules.d/90lvm/install b/modules.d/90lvm/install +index 3e20866..461d1a7 100755 +--- a/modules.d/90lvm/install ++++ b/modules.d/90lvm/install +@@ -13,6 +13,9 @@ if [[ $hostonly ]] || [[ $lvmconf = "yes" ]]; then + fi + + inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules 11-dm-lvm.rules ++# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules ++# files, but provides the one below: ++inst_rules 64-device-mapper.rules + + inst "$moddir/lvm_scan.sh" /sbin/lvm_scan + inst_hook cmdline 30 "$moddir/parse-lvm.sh" +-- +1.7.2 + diff --git a/sys-kernel/dracut/files/dracut-007-install-uvesafb.patch b/sys-kernel/dracut/files/dracut-007-install-uvesafb.patch new file mode 100644 index 0000000..552298e --- /dev/null +++ b/sys-kernel/dracut/files/dracut-007-install-uvesafb.patch @@ -0,0 +1,26 @@ +diff -ru dracut-007.orig//modules.d/50plymouth/installkernel dracut-007/modules.d/50plymouth/installkernel +--- dracut-007.orig//modules.d/50plymouth/installkernel 2010-08-09 16:13:51.000000000 +0200 ++++ dracut-007/modules.d/50plymouth/installkernel 2010-09-18 21:36:22.048443676 +0200 +@@ -3,3 +3,9 @@ + for modname in $(find "$srcmods/kernel/drivers/gpu/drm" -name '*.ko' 2>/dev/null); do + grep -q drm_crtc_init $modname && instmods $modname + done ++# Include uvesafb ++[ -e /sbin/v86d ] && { ++ instmods uvesafb ++ inst /sbin/v86d ++ inst /sbin/testvbe ++} +diff -ru dracut-007.orig//modules.d/50plymouth/plymouth-pretrigger.sh dracut-007/modules.d/50plymouth/plymouth-pretrigger.sh +--- dracut-007.orig//modules.d/50plymouth/plymouth-pretrigger.sh 2010-08-09 16:13:51.000000000 +0200 ++++ dracut-007/modules.d/50plymouth/plymouth-pretrigger.sh 2010-09-18 21:12:37.753313417 +0200 +@@ -8,6 +8,9 @@ + udevadm trigger --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 + + udevadm settle --timeout=30 2>&1 | vinfo ++ ++ [ ! -c /dev/fb0 -a -e /sbin/v86d ] && modprobe uvesafb ++ + [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5 + [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0 + [ -e /dev/systty ] || ln -s tty0 /dev/systty diff --git a/sys-kernel/dracut/files/dracut-007-multipath-udev-rules.patch b/sys-kernel/dracut/files/dracut-007-multipath-udev-rules.patch new file mode 100644 index 0000000..601569c --- /dev/null +++ b/sys-kernel/dracut/files/dracut-007-multipath-udev-rules.patch @@ -0,0 +1,46 @@ +From 303a1e3dc95c2c876a4e775e78482c35c0a40e20 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name> +Date: Mon, 5 Jul 2010 13:09:32 +0200 +Subject: [PATCH 1/2] 90multipath: added kpartx.rules; multipath.rules - different prefix + +--- + modules.d/90multipath/install | 13 ++++++------- + 1 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/modules.d/90multipath/install b/modules.d/90multipath/install +index ed2d698..656b3fd 100755 +--- a/modules.d/90multipath/install ++++ b/modules.d/90multipath/install +@@ -6,23 +6,22 @@ else + LIBDIR="/lib" + fi + ++# Last three are for S/390 + for f in \ + /sbin/dmsetup \ + /sbin/kpartx \ + /sbin/mpath_wait \ + /sbin/multipath \ + /sbin/multipathd \ +- /sbin/xdrgetuid \ +- /sbin/xdrgetprio \ +- /etc/xdrdevices.conf \ + /etc/multipath.conf \ + /etc/multipath/wwids \ + $(ls $LIBDIR/libmultipath* $LIBDIR/multipath/* 2>/dev/null) \ +- ;do +- [ -e "$f" ] && inst "$f" ++ /sbin/xdrgetuid \ ++ /sbin/xdrgetprio \ ++ /etc/xdrdevices.conf; do ++ [ -e "$f" ] && inst "$f" + done + + inst_hook pre-trigger 02 "$moddir/multipathd.sh" + inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh" +-inst_rules 40-multipath.rules +- ++inst_rules 40-multipath.rules 65-multipath.rules 66-kpartx.rules +-- +1.7.2 + diff --git a/sys-kernel/dracut/metadata.xml b/sys-kernel/dracut/metadata.xml new file mode 100644 index 0000000..5f8c052 --- /dev/null +++ b/sys-kernel/dracut/metadata.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>ramereth@gentoo.org</email> + <name>Lance Albertson</name> + </maintainer> + <use> + <flag name="bootchart">Add support for bootchart (app-benchmarks/bootchart)</flag> + <flag name="btrfs">Add support for root on Btrfs</flag> + <flag name="crypt">Add support for encrypted partitions with cryptsetup/LUKS</flag> + <flag name="debug">Module installing additional tools like strace, file editor, ssh and more</flag> + <flag name="dmraid">Add support for dmraid devices, also known as ATA-RAID, or Fake RAID.</flag> + <flag name="dmsquash-live">Module which might be used for Live CDs</flag> + <flag name="gensplash">Add support for framebuffer splash at boot-time</flag> + <flag name="iscsi">Add support for iSCSI</flag> + <flag name="lvm">Add support for the Logical Volume Manager (sys-apps/lvm2)</flag> + <flag name="md">Add support for MD devices, also known as software RAID devices</flag> + <flag name="mdraid">Add support for MD devices, also known as software RAID devices</flag> + <flag name="multipath">Add support for Device Mapper multipathing</flag> + <flag name="nbd">Add support for network block devices</flag> + <flag name="nfs">Add support for NFS</flag> + <flag name="uswsusp">Add support for uswsusp (sys-power/suspend)</flag> + <flag name="xen">Add support for Xen</flag> + </use> + <longdescription lang="en"> + Generic, modular initramfs generation tool that can be used across various + distributions. + </longdescription> +</pkgmetadata> + |