sys-kernel/dracut: Emergency sync
This commit is contained in:
parent
553b4421b6
commit
76943da75e
@ -1,2 +0,0 @@
|
|||||||
DIST dracut-023.tar.bz2 238823 SHA256 6899cbf0c32f0d8ec1c420a4b6b3fd348b30fe3f4d557783ec40de1e8da26239 SHA512 abd5b165e67cf7298ef0ba8352de924232bdeb7390917f5fbd98a7a2a10b01fe1b3e35f8b619154ce21e5a90b3f9cb07a6fae9e4d8f017b9d7696d15ae46f11f WHIRLPOOL b50b309f4d128d785e62f21c084f4a79100aed0570127376643626e84d9d019b2c5bc32ff14aecec23fbb929456ac51d0a334a1aee275bafc6e4135e80a03789
|
|
||||||
EBUILD dracut-023.ebuild 7908 SHA256 84821711a3acc14f22b91be6784a0a0f6213c28f20a52038854b914c020c28e2 SHA512 c97103f23e9fa8792d43664cf410abdf39fee38c4245f943677637b107a980fc80a7247d95c33d38d9bbee596999fbaadcedc4d7409fd1fe196acf797c159442 WHIRLPOOL d59152c69d3a7f3d4dbe5e641e430e28ce7ba7ee632fd31007a8f1d5b62e76dfcd27f690b680a6564ef90eb7d20cb397d8b6d662e1d458291bed5cf22fc7750c
|
|
@ -1,10 +1,10 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-023.ebuild,v 1.2 2012/09/09 16:48:14 aidecoe Exp $
|
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-026-r1.ebuild,v 1.1 2013/03/12 08:47:57 aidecoe Exp $
|
||||||
|
|
||||||
EAPI=4
|
EAPI=4
|
||||||
|
|
||||||
inherit eutils linux-info toolchain-funcs
|
inherit eutils linux-info
|
||||||
|
|
||||||
add_req_use_for() {
|
add_req_use_for() {
|
||||||
local dep="$1"; shift
|
local dep="$1"; shift
|
||||||
@ -21,10 +21,11 @@ HOMEPAGE="http://dracut.wiki.kernel.org"
|
|||||||
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
|
SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.bz2"
|
||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64 ~x86"
|
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||||
|
|
||||||
REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt )
|
REQUIRED_USE="dracut_modules_crypt-gpg? ( dracut_modules_crypt )
|
||||||
dracut_modules_crypt-loop? ( dracut_modules_crypt )
|
dracut_modules_crypt-loop? ( dracut_modules_crypt )
|
||||||
|
dracut_modules_crypt-ssh? ( dracut_modules_crypt )
|
||||||
dracut_modules_livenet? ( dracut_modules_dmsquash-live )
|
dracut_modules_livenet? ( dracut_modules_dmsquash-live )
|
||||||
"
|
"
|
||||||
COMMON_MODULES="
|
COMMON_MODULES="
|
||||||
@ -33,6 +34,7 @@ COMMON_MODULES="
|
|||||||
dracut_modules_btrfs
|
dracut_modules_btrfs
|
||||||
dracut_modules_caps
|
dracut_modules_caps
|
||||||
dracut_modules_crypt-gpg
|
dracut_modules_crypt-gpg
|
||||||
|
dracut_modules_crypt-ssh
|
||||||
dracut_modules_crypt-loop
|
dracut_modules_crypt-loop
|
||||||
dracut_modules_gensplash
|
dracut_modules_gensplash
|
||||||
dracut_modules_mdraid
|
dracut_modules_mdraid
|
||||||
@ -74,18 +76,21 @@ RDEPEND="${CDEPEND}
|
|||||||
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
|
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] )
|
||||||
>=sys-apps/sysvinit-2.87-r3
|
>=sys-apps/sysvinit-2.87-r3
|
||||||
>=sys-apps/util-linux-2.21
|
>=sys-apps/util-linux-2.21
|
||||||
|
virtual/pkgconfig
|
||||||
|
|
||||||
debug? ( dev-util/strace )
|
debug? ( dev-util/strace )
|
||||||
device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
|
device-mapper? ( || ( sys-fs/device-mapper >=sys-fs/lvm2-2.02.33 ) )
|
||||||
net? ( net-misc/curl >=net-misc/dhcp-4.2.1-r1[client,ipv6] sys-apps/iproute2 )
|
net? ( net-misc/curl >=net-misc/dhcp-4.2.4_p2-r1[client] sys-apps/iproute2 )
|
||||||
selinux? ( sys-libs/libselinux sys-libs/libsepol )
|
selinux? ( sys-libs/libselinux sys-libs/libsepol )
|
||||||
dracut_modules_biosdevname? ( sys-apps/biosdevname )
|
dracut_modules_biosdevname? ( sys-apps/biosdevname )
|
||||||
dracut_modules_bootchart? ( app-benchmarks/bootchart2 )
|
dracut_modules_bootchart? ( app-benchmarks/bootchart2 sys-apps/usleep
|
||||||
|
sys-process/acct )
|
||||||
dracut_modules_btrfs? ( sys-fs/btrfs-progs )
|
dracut_modules_btrfs? ( sys-fs/btrfs-progs )
|
||||||
dracut_modules_caps? ( sys-libs/libcap )
|
dracut_modules_caps? ( sys-libs/libcap )
|
||||||
dracut_modules_cifs? ( net-fs/cifs-utils )
|
dracut_modules_cifs? ( net-fs/cifs-utils )
|
||||||
dracut_modules_crypt? ( sys-fs/cryptsetup )
|
dracut_modules_crypt? ( sys-fs/cryptsetup )
|
||||||
dracut_modules_crypt-gpg? ( app-crypt/gnupg )
|
dracut_modules_crypt-gpg? ( app-crypt/gnupg )
|
||||||
|
dracut_modules_crypt-ssh? ( net-misc/dropbear )
|
||||||
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
|
dracut_modules_dmraid? ( sys-fs/dmraid sys-fs/multipath-tools )
|
||||||
dracut_modules_gensplash? ( media-gfx/splashutils )
|
dracut_modules_gensplash? ( media-gfx/splashutils )
|
||||||
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
|
dracut_modules_iscsi? ( >=sys-block/open-iscsi-2.0.871.3 )
|
||||||
@ -103,9 +108,12 @@ DEPEND="${CDEPEND}
|
|||||||
>=dev-libs/libxslt-1.1.26
|
>=dev-libs/libxslt-1.1.26
|
||||||
app-text/docbook-xml-dtd:4.5
|
app-text/docbook-xml-dtd:4.5
|
||||||
>=app-text/docbook-xsl-stylesheets-1.75.2
|
>=app-text/docbook-xsl-stylesheets-1.75.2
|
||||||
virtual/pkgconfig
|
|
||||||
"
|
"
|
||||||
|
|
||||||
|
DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules
|
||||||
|
README.testsuite TODO )
|
||||||
|
DRACUT_LIBDIR="/usr/lib"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Helper functions
|
# Helper functions
|
||||||
#
|
#
|
||||||
@ -148,11 +156,12 @@ rm_module() {
|
|||||||
#
|
#
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
local udevdir="$($(tc-getPKG_CONFIG) udev --variable=udevdir)"
|
epatch "${FILESDIR}/${PV}-0001-dracut-functions.sh-support-for-altern.patch"
|
||||||
[[ ${udevdir} ]] || die "Couldn't detect udevdir"
|
epatch "${FILESDIR}/${PV}-0002-gentoo.conf-let-udevdir-be-handled-by-.patch"
|
||||||
einfo "Setting udevdir to ${udevdir}..."
|
epatch "${FILESDIR}/${PV}-0004-lsinitrd.sh-fix-for-default-initrd-not.patch"
|
||||||
sed -e "s@udevdir=.*@udevdir=\"${udevdir}\"@" \
|
epatch "${FILESDIR}/${PV}-0005-lsinitrd.sh-removed-trailing.patch"
|
||||||
-i "${S}/dracut.conf.d/gentoo.conf.example" || die
|
epatch "${FILESDIR}/${PV}-0006-make-host_fs_types-a-hashmap.patch"
|
||||||
|
chmod +x "${S}/modules.d/95udev-rules/udev-rules-prepare.sh"
|
||||||
|
|
||||||
if use dracut_modules_systemd; then
|
if use dracut_modules_systemd; then
|
||||||
local systemdutildir="$($(tc-getPKG_CONFIG) systemd \
|
local systemdutildir="$($(tc-getPKG_CONFIG) systemd \
|
||||||
@ -169,37 +178,46 @@ src_prepare() {
|
|||||||
sed -e "5asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
|
sed -e "5asystemdsystemunitdir=\"${systemdsystemunitdir}\"" \
|
||||||
-i "${S}/dracut.conf.d/gentoo.conf.example" || die
|
-i "${S}/dracut.conf.d/gentoo.conf.example" || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if use dracut_modules_crypt-ssh; then
|
||||||
|
epatch "${FILESDIR}/${PV}-crypt-ssh.patch"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf --libdir="${DRACUT_LIBDIR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" doc
|
emake doc
|
||||||
|
|
||||||
if use optimization; then
|
if use optimization; then
|
||||||
ewarn "Enabling experimental optimization!"
|
ewarn "Enabling experimental optimization!"
|
||||||
tc-export CC
|
tc-export CC
|
||||||
emake prefix=/usr sysconfdir=/etc DESTDIR="${D}" install/dracut-install
|
emake install/dracut-install
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
emake prefix=/usr libdir="/usr/$(get_libdir)" sysconfdir=/etc \
|
default
|
||||||
DESTDIR="${D}" install
|
|
||||||
|
|
||||||
dodir /var/lib/dracut/overlay
|
local libdir="${DRACUT_LIBDIR}"
|
||||||
dodoc HACKING TODO AUTHORS NEWS README*
|
|
||||||
|
|
||||||
insinto /etc/dracut.conf.d
|
insinto "${libdir}/dracut/dracut.conf.d/"
|
||||||
newins dracut.conf.d/gentoo.conf.example gentoo.conf
|
newins dracut.conf.d/gentoo.conf.example gentoo.conf
|
||||||
|
|
||||||
insinto /etc/logrotate.d
|
insinto /etc/logrotate.d
|
||||||
newins dracut.logrotate dracut
|
newins dracut.logrotate dracut
|
||||||
|
|
||||||
|
dodir /var/lib/dracut/overlay
|
||||||
|
|
||||||
dohtml dracut.html
|
dohtml dracut.html
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modules
|
# Modules
|
||||||
#
|
#
|
||||||
local module
|
local module
|
||||||
modules_dir="${D}/usr/$(get_libdir)/dracut/modules.d"
|
modules_dir="${D%/}/${libdir#/}/dracut/modules.d"
|
||||||
|
|
||||||
# Remove modules not enabled by USE flags
|
# Remove modules not enabled by USE flags
|
||||||
for module in ${IUSE_DRACUT_MODULES} ; do
|
for module in ${IUSE_DRACUT_MODULES} ; do
|
||||||
@ -267,4 +285,14 @@ pkg_postinst() {
|
|||||||
ewarn " CONFIG_MODULES"
|
ewarn " CONFIG_MODULES"
|
||||||
ewarn ""
|
ewarn ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if use dracut_modules_crypt || use dracut_modules_dmraid || use \
|
||||||
|
dracut_modules_mdraid || use dracut_modules_lvm; then
|
||||||
|
|
||||||
|
if ! [[ $(</proc/cmdline) =~ rd.auto[\ =] ]]; then
|
||||||
|
ewarn "Autoassembly of special devices like cryptoLUKS, dmraid, "
|
||||||
|
ewarn "mdraid or lvm is off for default as of >=dracut-024."
|
||||||
|
ewarn "Use rd.auto option to turn it on."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
64
sys-kernel/dracut/files/dracut-crypt-ssh.patch
Normal file
64
sys-kernel/dracut/files/dracut-crypt-ssh.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
commit 435277eac4489ef0fe1aa33591ae4aa27520ab63
|
||||||
|
Author: Stefan Reimer <it@startux.de>
|
||||||
|
Date: Sat Mar 30 13:02:51 2013 -0700
|
||||||
|
|
||||||
|
Add initial version of crypt-ssh
|
||||||
|
|
||||||
|
diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
|
||||||
|
index 9665e48..026b127 100755
|
||||||
|
--- a/modules.d/90crypt/cryptroot-ask.sh
|
||||||
|
+++ b/modules.d/90crypt/cryptroot-ask.sh
|
||||||
|
@@ -146,11 +146,16 @@ fi
|
||||||
|
|
||||||
|
if [ $ask_passphrase -ne 0 ]; then
|
||||||
|
luks_open="$(command -v cryptsetup) $cryptsetupopts luksOpen"
|
||||||
|
- ask_for_password --ply-tries 5 \
|
||||||
|
- --ply-cmd "$luks_open -T1 $device $luksname" \
|
||||||
|
- --ply-prompt "Password ($device)" \
|
||||||
|
- --tty-tries 1 \
|
||||||
|
- --tty-cmd "$luks_open -T5 $device $luksname"
|
||||||
|
+
|
||||||
|
+ if getarg 1 rc.luks.ssh; then
|
||||||
|
+ ask_for_password --ply-tries 5 \
|
||||||
|
+ --ply-cmd "$luks_open -T1 $device $luksname" \
|
||||||
|
+ --ply-prompt "Password ($device)" \
|
||||||
|
+ --tty-tries 1 \
|
||||||
|
+ --tty-cmd "$luks_open -T5 $device $luksname"
|
||||||
|
+ else
|
||||||
|
+ /usr/sbin/dropbear -p 22001 -F -m -j -k -s
|
||||||
|
+ fi
|
||||||
|
unset luks_open
|
||||||
|
fi
|
||||||
|
|
||||||
|
diff --git a/modules.d/92crypt-ssh/module-setup.sh b/modules.d/92crypt-ssh/module-setup.sh
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..d5e1342
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/modules.d/92crypt-ssh/module-setup.sh
|
||||||
|
@@ -0,0 +1,26 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
|
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
+
|
||||||
|
+# Author: Stefan Reimer
|
||||||
|
+# Date: 2013-Mar-24
|
||||||
|
+
|
||||||
|
+check() {
|
||||||
|
+ [ -x /usr/sbin/dropbear ]
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+depends() {
|
||||||
|
+ echo "network crypt"
|
||||||
|
+ return 0
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+install() {
|
||||||
|
+ #Install dropbear incl. keys
|
||||||
|
+ [ -r /etc/dropbear/dropbear_dss_host_key ] || /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
|
||||||
|
+ [ -r /etc/dropbear/dropbear_rsa_host_key ] || /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
|
||||||
|
+
|
||||||
|
+ inst /usr/sbin/dropbear "/usr/sbin/dropbear"
|
||||||
|
+ inst /etc/dropbear/dropbear_dss_host_key "/etc/dropbear/dropbear_dss_host_key"
|
||||||
|
+ inst /etc/dropbear/dropbear_rsa_host_key "/etc/dropbear/dropbear_rsa_host_key"
|
||||||
|
+ [ -r /root/.ssh/authorized_keys ] && inst /root/.ssh/authorized_keys "/root/.ssh/authorized_keys"
|
||||||
|
+}
|
Loading…
Reference in New Issue
Block a user