This commit is contained in:
Mario Fetka 2011-12-10 15:06:28 +01:00
parent bd13662be8
commit 08637f456f
16 changed files with 4 additions and 2192 deletions

View File

@ -169,7 +169,8 @@ _get_real_kv_full() {
elif [[ "${OKV/.*}" = "3" ]]; then
# Linux 3.x support, KV_FULL is set to: 3.0-genlink
# need to add another final .0 to the version part
echo "${ORIGINAL_KV_FULL/-/.0-}"
# echo "${ORIGINAL_KV_FULL/-/.0-}"
echo "${ORIGINAL_KV_FULL}"
else
echo "${ORIGINAL_KV_FULL}"
fi
@ -329,6 +330,8 @@ nas-kernel_src_unpack() {
# some sources could have multiple append-based EXTRAVERSIONs
sed -i "s/^EXTRAVERSION :=.*//" "${S}/Makefile" || die
fi
# no need for the ckversion
sed -i "s:\$(CKVERSION)::" "${S}/Makefile" || die
OKV="${okv}"
}

View File

@ -1,54 +0,0 @@
# ChangeLog for sys-kernel/genkernel
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
03 Nov 2010; Mario Fetka <mario.fetka@gmail.com>
+files/3.4.11/cmd_strip_v2.patch:
add genkernel stip patch
30 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
files/3.4.11/genkernel-3.4.10.907-mdev_chroot_dev-1.patch:
correct typo in patch
30 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
+files/3.4.11/genkernel-3.4.10.907-mdev_chroot_dev-1.patch,
-files/3.4.11/genkernel-3.4.10.907-mdev_dev-1.patch:
add wrapper arround the creation of chroot dev entries onyl when required
30 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
files/3.4.11/genkernel-3.4.10.907-mdev_dev-1.patch:
add nashack boot option
29 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
files/3.4.11/genkernel-3.4.10.907-mdev_dev-1.patch:
add nas hack for /dev/console /dev/null /dev/tty1 /dev/initctl and /dev/pts
29 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
files/3.4.11/genkernel-3.4.10.907-mdev_dev-1.patch:
add nas hack for /dev/console /dev/null /dev/tty1 /dev/initctl
29 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
files/3.4.11/genkernel-3.4.10.907-mdev_dev-1.patch:
add creation of deve entries on the chroot env
29 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
+files/3.4.11/genkernel-3.4.10.907-mdev_dev-1.patch:
add nas hack for /dev/console /dev/null
27 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
genkernel-3.4.10.907-r13.ebuild:
downgrade some tools
26 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
genkernel-3.4.10.907-r13.ebuild,
+files/3.4.11/genkernel-3.4.10.907-busybox-1.17.3.patch,
-files/3.4.11/genkernel-3.4.10.907-nice-option.patch:
Bump busybox
25 Oct 2010; Mario Fetka <mario.fetka@gmail.com>
-genkernel-3.4.10.907-r3.ebuild, +genkernel-3.4.10.907-r13.ebuild,
+files/3.4.11/genkernel-3.4.10.907-nice-option.patch,
+files/3.4.11/0001-use-mdadm-instead-of-bundled-stripped-down-mdassembl.pa
tch, +metadata.xml:
add mdadm

View File

@ -1,23 +0,0 @@
AUX 3.4.11/0001-use-mdadm-instead-of-bundled-stripped-down-mdassembl.patch 5450 RMD160 03c674f453a3256181db93346856ae05fec3c52c SHA1 acf12ec07e152bd367c511a2d01747b6d2bb0f00 SHA256 3b32865584756e053be14358286de9246621e14b6c135e2fc03e2d99279bb7be
AUX 3.4.11/cmd_strip_v2.patch 3483 RMD160 a26d74f0fe38330e7a809aea8f416fdd2ba719a8 SHA1 d36fdf9b98ae42162ce6a1f6e4641c5a1878c166 SHA256 3534d726f577566bee0615b0984e7f89a45f3e95c5308e9e6af5491a9fedb671
AUX 3.4.11/genkernel-3.4.10.907-busybox-1.17.3.patch 38833 RMD160 5dda7e0d16a0c6d238f0bb8622c96816f7751d81 SHA1 d21aa64341c53d59381bfb442260c8195e6f32ca SHA256 dd947c6fa94274a30723b1a085431e4e01adff30b1616aa2766ae4a5f07ddca5
AUX 3.4.11/genkernel-3.4.10.907-mdev_chroot_dev-1.patch 3294 RMD160 232bb132f94561d74dfc44839cafb2347e117905 SHA1 8efe0da2f9aeb9f7e816f40cf2b9cb0f7302f730 SHA256 42c3a776924c124e074f17fa403e7f37a5f5902db448eeeeb0d69eac3a8d887f
AUX 3.4.11/genkernel-3.4.11-aufs-slowusb.patch 3425 RMD160 74add9c16143240da14ad307a25d5cccba58e893 SHA1 ffeee71f9e2146e0533591e62c0b3d1e0f77efd7 SHA256 8a131caf94253c0799daa18e0146b13b96f0667552ad6f97ce246c13f403a900
AUX 3.4.11/genkernel-3.4.11-branding.patch 3273 RMD160 8234e9da1ee6e4f89074b3a97a8508db07a6be01 SHA1 f7fa1b8b07aa334b54e96a510756d6f82954ed90 SHA256 d9a9907c5bd316ee7384f4dcb3f2d80775b5aed1fb6b40763bce8543ecee86a2
AUX 3.4.11/genkernel-3.4.11-btrfs-partial-support-bug-303529.patch 291 RMD160 06cea814b7f1a44bda3a46bb5939ebc5649be485 SHA1 eb65b70222e3063379d71d3e2091ffb8b6b2cbc6 SHA256 c4f83688c1bec65bd7082d93be0e014163c9ecf0c9f5a0d36ec1ed5645bfca2b
AUX 3.4.11/genkernel-3.4.11-partial-fix-to-console-arg.patch 464 RMD160 d2d132f6527e3f386cc0719bd82cdf561cd76a66 SHA1 2c67a1cd3b4b1fb7b2b39487dcc761486b39bcd7 SHA256 c8c87497f35f6d47749040f53b94b30610818aeb91e6f962f522f9b84a902646
AUX 3.4.11/genkernel-3.4.11-sdelay-compat.patch 274 RMD160 5170828fb8039d246f8a7357d3a78274fc25cc50 SHA1 e4bf22da7fe1ceedd300a37332c3295d342202b1 SHA256 fcaa04f4ae9183ebe0512f1100a4ee74bcffbaa02d91b75c3c075e95c02b215c
AUX genkernel-crypt-config.patch 1005 RMD160 4a72594eeb122022acb70854720196cb80fa3114 SHA1 86b2c46afd686a846fdf59b7ad030761cfbcc5c6 SHA256 547eadbb63b54c28d6ff4fe197478408c76ec30d863e8ee0d9cce4169b9f9cb1
AUX genkernel.bash 2438 RMD160 b3d8e4436d8768c07d18c5aaff9c14fc16641729 SHA1 e15a9c6ef506aa6872a6a97d26751246dedded04 SHA256 e7de9771ba79ef878e2c9a21a1c1720f092c6047d3cc7d4a49ff6b90e7e2c248
DIST LVM2.2.02.28.tgz 531905 RMD160 bf6f25db6e34bf362353ae9557691a7f01962502 SHA1 6eb2f6e1228b017ad23d0b7f2bb12fd113f96616 SHA256 2d8d7b123e427d0bfb7471d7c17dfd88890eb98257ca22ea3be5d7307e83aceb
DIST busybox-1.17.3.tar.bz2 2094550 RMD160 1abd376ca05da9fb25c1d51207f5be7e291fdd71 SHA1 9c4090b010441cd1f0800830583e1e7612ba19fb SHA256 de2f0274f61a068d75ad33861e0982e99c6b625681460ce420222371c3511ff2
DIST device-mapper.1.02.22.tgz 189726 RMD160 8bf9986536c49f53c398d6a2180e21e1235bea18 SHA1 a4533872c32951a1b549bb9207a13b7e4dae0701 SHA256 ff833a6cd6246686f5b3f5692fd6597f1ffbc60f08929e5fe68304cdafb61595
DIST dmraid-1.0.0.rc16.tar.bz2 1042907 RMD160 b5fe992f4bc2e1a0716fc0c9e689b214667982d1 SHA1 99e76332bb03c5a79406e3c8cb12b6746288635d SHA256 f849c44d041f8891c61419ddf906e6e34b44948939ae9e550be662ffc2492255
DIST fuse-2.7.4.tar.gz 506658 RMD160 fe1808cfd58ad6651259245b424301e99881faa2 SHA1 7a86f5cf39f38e64ccbae093599d64a895b950ba SHA256 c8b070ece5d4e09bd06eea6c28818c718f803d93a4b85bacb9982deb8ded49e6
DIST genkernel-3.4.10.907.tar.bz2 202413 RMD160 81ea32bb0b91ed7114bd825b7339132214abc2df SHA1 f2f2ab0658283e3a17caaa3fcc93ddf619e04afa SHA256 0fe4bd273d3ab9fe87e12fbf65b41edafc05cce95e0412e3f5450a0ca6010f12
DIST mdadm-3.1.4.tar.bz2 288578 RMD160 f41a2be4158efac08dbe2e95f1c6812609475fad SHA1 4ee43922d38b15a930daaaa026ef1b4efacdbc8a SHA256 849ad0ad4ad3c1d2d8806a16b30e1f59ab2daf313cb103807207f7cba889ea63
DIST open-iscsi-2.0-871.tar.gz 330514 RMD160 f996d9145bc3727394f1a4999f430bd5ea5c2a0d SHA1 968baf16d4094fb9842bc04b0fe8109103356252 SHA256 bcea8746ae82f2ada7bc05d2aa59bcda1ca0d5197f05f2e16744aae59f0a7dcb
DIST unionfs-fuse-0.24.tar.bz2 30381 RMD160 27934c23472f6e9d71e622f13aa9fd51a1f8018e SHA1 26f281e4e5f1e82194b430956b94cd7745d5bd97 SHA256 d8abc855eb618ac356b1e716599c82f8f0f74dbaee36d4062edc707567121937
EBUILD genkernel-3.4.10.907-r13.ebuild 4985 RMD160 1a90d8144c12e8f67cb04502d8e3b24aa5200c08 SHA1 d4694c5355c462501f1334f1fcade0dcfccaa3f3 SHA256 37a17572d4846cd69c2d2d224d91917452b362e41c79e7275e9f545d0a8ab41d
MISC ChangeLog 2024 RMD160 38ee8a36848e43ba11a27ac5dca1f7a2f032f543 SHA1 20cc53763a940581ac41dad6ce32d97d3f366600 SHA256 6669f5cccfd27bde49810032858e315754e71e160e53fd80a66c84f44d0737ad
MISC metadata.xml 1238 RMD160 c82938e77f387291d6a1c3bf9b0d802f2878dd12 SHA1 b5738f14922c69e78cfb867acdc65eeea25977bf SHA256 2c13f98be5fa8bdaf21ac86bcd00bbeb8944df5615de0cfce35ae4c00ef4b4d5

View File

@ -1,152 +0,0 @@
From f01e862b38b3219252ee76f7a20179a20a97a0fb Mon Sep 17 00:00:00 2001
From: Matthias Dahl <ua_bugz_gentoo@mortal-soul.de>
Date: Fri, 27 Aug 2010 17:26:52 +0200
Subject: [PATCH] use mdadm instead of bundled stripped down mdassemble (v2)
mdassemble can't handle newer metadata formats and fails for partitioned
arrays, among other things.
This...
- replaces the bundled mdassemble with proper support for mdadm
- fixes raid autodetection/assemble when no mdadm.conf is available
- fixes a compilation failure for newer mdadm versions
Tested w/ genkernel 3.4.10.907 and mdadm 3.1.3.
---
defaults/initrd.scripts | 5 +++--
gen_compile.sh | 35 +++++++++++++++++++++++++++++++++++
gen_determineargs.sh | 2 ++
gen_initramfs.sh | 12 ++++++++++++
genkernel.conf | 5 +++++
5 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index e0710c4..531d2bd 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -608,9 +608,10 @@ startVolumes() {
then
if [ ! -e '/etc/mdadm.conf' ]
then
- /sbin/mdadm --examine > /etc/mdadm.conf
+ echo "DEVICE /dev/sd[a-z]* /dev/hd[a-z]*" >/etc/mdadm.conf
+ /sbin/mdadm --examine --scan >>/etc/mdadm.conf
fi
- /sbin/mdadm --assemble
+ /sbin/mdadm -A --scan
fi
if [ "${USE_DMRAID_NORMAL}" = '1' ]
diff --git a/gen_compile.sh b/gen_compile.sh
index 7bab9e1..ec5df4b 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -444,6 +444,41 @@ compile_lvm() {
fi
}
+compile_mdadm() {
+ if [ ! -f "${MDADM_BINCACHE}" ]
+ then
+ [ -f "${MDADM_SRCTAR}" ] ||
+ gen_die "Could not find MDADM source tarball: ${MDADM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
+ cd "${TEMP}"
+ rm -rf "${MDADM_DIR}" > /dev/null
+ /bin/tar -jxpf "${MDADM_SRCTAR}" ||
+ gen_die 'Could not extract MDADM source tarball!'
+ [ -d "${MDADM_DIR}" ] ||
+ gen_die 'MDADM directory ${MDADM_DIR} is invalid!'
+
+ cd "${MDADM_DIR}"
+ sed -i "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = -Os:" Makefile
+ sed -i "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = -Os:" Makefile
+ sed -i "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" Makefile
+ sed -i "s/^# LDFLAGS = -static/LDFLAGS = -static/" Makefile
+
+ print_info 1 'mdadm: >> Compiling...'
+ compile_generic 'mdadm' utils
+
+ mkdir -p "${TEMP}/mdadm/sbin"
+ install -m 0755 -s mdadm "${TEMP}/mdadm/sbin/mdadm"
+ print_info 1 ' >> Copying to bincache...'
+ cd "${TEMP}/mdadm"
+ strip "sbin/mdadm" ||
+ gen_die 'Could not strip mdadm!'
+ /bin/tar -cjf "${MDADM_BINCACHE}" sbin/mdadm ||
+ gen_die 'Could not create binary cache'
+
+ cd "${TEMP}"
+ rm -rf "${MDADM_DIR}" mdadm
+ fi
+}
+
compile_dmraid() {
compile_device_mapper
if [ ! -f "${DMRAID_BINCACHE}" ]
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index d911f07..b4b31fb 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -128,6 +128,7 @@ determine_real_args() {
BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"`
DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
+ MDADM_BINCACHE=`cache_replace "${MDADM_BINCACHE}"`
DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
ISCSI_BINCACHE=`cache_replace "${ISCSI_BINCACHE}"`
BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
@@ -139,6 +140,7 @@ determine_real_args() {
BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
+ MDADM_BINCACHE=`arch_replace "${MDADM_BINCACHE}"`
DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
ISCSI_BINCACHE=`arch_replace "${ISCSI_BINCACHE}"`
BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 231411e..2400b75 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -328,10 +328,22 @@ append_mdadm(){
fi
cd ${TEMP}
mkdir -p "${TEMP}/initramfs-mdadm-temp/etc/"
+ mkdir -p "${TEMP}/initramfs-mdadm-temp/sbin/"
if [ "${MDADM}" -eq '1' ]
then
cp -a /etc/mdadm.conf "${TEMP}/initramfs-mdadm-temp/etc" \
|| gen_die "Could not copy mdadm.conf!"
+ if [ -e '/sbin/mdadm' ] && LC_ALL="C" ldd /sbin/mdadm|grep -q 'not a dynamic executable'
+ then
+ print_info 1 ' MDADM: Adding support (using local static binaries)...'
+ cp /sbin/mdadm "${TEMP}/initramfs-mdadm-temp/sbin/mdadm" ||
+ gen_die 'Could not copy over mdadm!'
+ else
+ print_info 1 ' MDADM: Adding support (compiling binaries)...'
+ compile_mdadm
+ /bin/tar -jxpf "${MDADM_BINCACHE}" -C "${TEMP}/initramfs-mdadm-temp" ||
+ gen_die "Could not extract mdadm binary cache!";
+ fi
fi
cd "${TEMP}/initramfs-mdadm-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
diff --git a/genkernel.conf b/genkernel.conf
index a71ce69..62b7801 100644
--- a/genkernel.conf
+++ b/genkernel.conf
@@ -162,6 +162,11 @@ LVM_DIR="LVM2.${LVM_VER}"
LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"
+MDADM_VER="VERSION_MDADM"
+MDADM_DIR="mdadm-${MDADM_VER}"
+MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2"
+MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2"
+
DMRAID_VER="VERSION_DMRAID"
DMRAID_DIR="dmraid/${DMRAID_VER}"
DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
--
1.7.2.2

View File

@ -1,101 +0,0 @@
diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index 20380ac..cec496e 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -133,6 +133,11 @@ longusage() {
echo " --integrated-initramfs"
echo " Build the generated initramfs into the kernel instead of"
echo " keeping it as a separate file"
+ echo " --strip=(all|kernel|modules|none)"
+ echo " Strip debug symbols from the installed kernel, modules,"
+ echo " all (default) or none"
+ echo " --no-strip"
+ echo " Don't strip installed kernel or modules (alias for --strip=none)"
}
usage() {
@@ -536,6 +541,14 @@ parse_cmdline() {
--config=*)
print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
;;
+ --strip=*)
+ CMD_STRIP_TYPE=`parse_opt "$*"`
+ print_info 2 "CMD_STRIP_TYPE: ${CMD_STRIP_TYPE}"
+ ;;
+ --no-strip)
+ CMD_STRIP_TYPE=none
+ print_info 2 "CMD_STRIP_TYPE: ${CMD_STRIP_TYPE}"
+ ;;
all)
BUILD_KERNEL=1
BUILD_MODULES=1
diff --git a/gen_compile.sh b/gen_compile.sh
index d87d2f4..e7c3d41 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -284,7 +284,16 @@ compile_modules() {
compile_generic modules kernel
export UNAME_MACHINE="${ARCH}"
[ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
+ if [ "${CMD_STRIP_TYPE}" == "all" -o "${CMD_STRIP_TYPE}" == "modules" ]
+ then
+ print_info 1 " >> Installing ${KV} modules (and stripping)"
+ INSTALL_MOD_STRIP=1
+ export INSTALL_MOD_STRIP
+ else
+ print_info 1 " >> Installing ${KV} modules"
+ fi
compile_generic "modules_install" kernel
+ unset INSTALL_MOD_STRIP
unset UNAME_MACHINE
}
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index ed84798..7fb8a66 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -119,6 +119,7 @@ determine_real_args() {
set_config_with_override 1 KEYMAP CMD_KEYMAP "yes"
set_config_with_override 1 DOKEYMAPAUTO CMD_DOKEYMAPAUTO
set_config_with_override 2 BUSYBOX_CONFIG CMD_BUSYBOX_CONFIG
+ set_config_with_override 1 STRIP_TYPE CMD_STRIP_TYPE "all"
BOOTDIR=`arch_replace "${BOOTDIR}"`
BOOTDIR=${BOOTDIR%/} # Remove any trailing slash
diff --git a/gen_funcs.sh b/gen_funcs.sh
index 07a7f5f..010f5bd 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -393,7 +393,13 @@ copy_image_with_preserve() {
print_info 5 " Copying ${symlinkName}: ${newSrceImage}"
print_info 5 " to ${BOOTDIR}/${currDestImage}"
cp "${newSrceImage}" "${BOOTDIR}/${currDestImage}" ||
- gen_die "Could not copy the ${symlinkName} image to ${BOOTDIR}!"
+ gen_die "Could not copy the ${symlinkName} image to ${BOOTDIR}!"
+
+ if [ "${CMD_STRIP_TYPE}" = "all" -o "${CMD_STRIP_TYPE}" = "kernel" ]
+ then
+ print_info 5 " Stripping ${BOOTDIR}/${currDestImage}"
+ strip --strip-debug "${BOOTDIR}/${currDestImage}" >/dev/null 2>&1
+ fi
if [ "${SYMLINK}" -eq '1' ]
then
diff --git a/genkernel.8 b/genkernel.8
index 4dba331..2c498a8 100644
--- a/genkernel.8
+++ b/genkernel.8
@@ -243,6 +243,13 @@ against a kernel source tree.
\fB\-\-initramfs\-overlay=\fR<dir>
Directory structure to include in the initramfs,
only available on 2.6 kernels
+.TP
+\fB\-\-strip=\fR<all|kernel|modules|none>
+Strip debug symbols from the installed kernel, modules, all (default)
+or none.
+.TP
+\fB\-\-no\-\fBstrip
+Alias for \fB\-\-strip=none\fR
.SH RAMDISK OPTIONS
The following options can be passed as kernel parameters from the
bootloader, which the ramdisk scripts would recognize.

View File

@ -1,109 +0,0 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2010-10-30
Initial Package Version: 3.4.10.907
Origin: gentoo busybox mdev-start.sh and me
Upstream Status: unknown
Description: add a new boot command 'nashack' that creates the missing dev entries
diff -Naur genkernel-3.4.10.907.orig/defaults/initrd.scripts genkernel-3.4.10.907/defaults/initrd.scripts
--- genkernel-3.4.10.907.orig/defaults/initrd.scripts 2010-10-29 16:11:03.765695917 +0000
+++ genkernel-3.4.10.907/defaults/initrd.scripts 2010-10-29 21:14:39.022515391 +0000
@@ -284,9 +284,60 @@
/bin/ash
}
+seed_chroot_dev()
+{
+ # Seed /dev with some things that we know we need
+
+ # Create problematic directories
+ mkdir -p ${CHROOT}/dev/pts ${CHROOT}/dev/shm
+
+ # creating /dev/console and /dev/tty1 to be able to write
+ # to $CONSOLE with/without bootsplash before mdev creates it
+ [ -c ${CHROOT}/dev/console ] || mknod ${CHROOT}/dev/console c 5 1
+ [ -c ${CHROOT}/dev/tty1 ] || mknod ${CHROOT}/dev/tty1 c 4 1
+
+ # udevd will dup its stdin/stdout/stderr to /dev/null
+ # and we do not want a file which gets buffered in ram
+ [ -c ${CHROOT}/dev/null ] || mknod ${CHROOT}/dev/null c 1 3
+
+ # creating /dev/initctl to be able to switch init
+ [ -c ${CHROOT}/dev/initctl ] || mknod ${CHROOT}/dev/initctl p
+}
+
+seed_dev()
+{
+ # Seed /dev with some things that we know we need
+
+ # creating /dev/console and /dev/tty1 to be able to write
+ # to $CONSOLE with/without bootsplash before mdev creates it
+ [ -c /dev/console ] || mknod /dev/console c 5 1
+ [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1
+
+ # udevd will dup its stdin/stdout/stderr to /dev/null
+ # and we do not want a file which gets buffered in ram
+ [ -c /dev/null ] || mknod /dev/null c 1 3
+
+ # copy over any persistant things
+ if [ -d /lib/mdev/devices ] ; then
+ cp -RPp /lib/mdev/devices/* /dev 2>/dev/null
+ fi
+
+ # Not provided by sysfs but needed
+ ln -snf /proc/self/fd /dev/fd
+ ln -snf fd/0 /dev/stdin
+ ln -snf fd/1 /dev/stdout
+ ln -snf fd/2 /dev/stderr
+ [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
+
+ # Create problematic directories
+ mkdir -p /dev/pts /dev/shm
+}
+
runmdev() {
# busybox udev replacement
mdev -s
+ # add missing dev entrys for nas devices without console
+ seed_dev
}
test_success() {
@@ -1093,3 +1144,5 @@
USE_UNIONFS_NORMAL=0
fi
}
+
+
diff -Naur genkernel-3.4.10.907.orig/defaults/linuxrc genkernel-3.4.10.907/defaults/linuxrc
--- genkernel-3.4.10.907.orig/defaults/linuxrc 2010-10-29 16:11:03.762695924 +0000
+++ genkernel-3.4.10.907/defaults/linuxrc 2010-10-30 07:31:00.700222780 +0000
@@ -62,6 +62,10 @@
init_opts\=*)
INIT_OPTS=`parse_opt "${x}"`
;;
+ # remount chroot rw and create missing files
+ nashack)
+ NASHACK=1
+ ;;
# Livecd options
cdroot)
CDROOT=1
@@ -731,6 +735,17 @@
verbose_kmsg
+# create the missing dev entrys for the nas boxes if the don't exist
+if [ "${NASHACK}" = '1' ]
+then
+ if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ]
+ then
+ mount -o remount,rw ${CHROOT} >/dev/null 2>&1
+ seed_chroot_dev
+ mount -o remount,ro ${CHROOT} >/dev/null 2>&1
+ fi
+fi
+
echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ]
then

View File

@ -1,126 +0,0 @@
diff -Nurp genkernel-3.4.10.906.orig/defaults/initrd.scripts genkernel-3.4.10.906/defaults/initrd.scripts
--- genkernel-3.4.10.906.orig/defaults/initrd.scripts 2009-08-11 18:42:31.669397498 +0200
+++ genkernel-3.4.10.906/defaults/initrd.scripts 2009-08-11 19:16:22.161397604 +0200
@@ -195,6 +195,13 @@ mount_sysfs() {
[ "$ret" -eq '0' ] || bad_msg "Failed to mount /sys!"
}
+aufs_setup_dir() {
+ mount -t aufs -o "br:$OVERLAY=rw:$2=ro" -- aufs $1
+ if [ "$?" -eq '0' ]; then
+ good_msg "Addition of $2 to $OVERLAY merged into $1"
+ fi
+}
+
findnfsmount() {
if [ "${IP}" != '' ] || busybox udhcpc -n -T 15 -q
then
@@ -378,9 +385,10 @@ setup_hotplug() {
check_slowusb() {
[ "${DO_slowusb}" ] || \
- for dir in /sys/bus/usb/drivers/usb-storage/*
+ for x in /sys/bus/usb/drivers/usb-storage/*
do
- [ -d "${dir}" ] && FORCE_slowusb="1"
+ [ -d "${x}" ] && [ "${x}" != "/sys/bus/usb/drivers/usb-storage/module" ] \
+ && FORCE_slowusb="1"
done
}
@@ -388,9 +396,7 @@ start_dev_mgr() {
if [ "${KV_2_6_OR_GREATER}" ]
then
cd /sys
- [ "${DO_slowusb}" ] && sdelay
check_slowusb
- [ "${FORCE_slowusb}" ] && sdelay
good_msg 'Activating mdev'
runmdev
[ "${DO_slowusb}" ] || \
@@ -928,6 +934,34 @@ getdvhoff() {
echo $(( $(hexdump -n 4 -s $((316 + 12 * $2)) -e '"%i"' $1) * 512))
}
+setup_aufs() {
+
+ # Directory used for rw changes in union mount filesystem
+ UNION=/aufs
+ OVERLAY=/overlay
+
+ mkdir -p "${UNION}"
+ mkdir -p "${OVERLAY}"
+ mount -t tmpfs none "${OVERLAY}"
+ good_msg "Loading aufs module (if module)"
+ modprobe aufs > /dev/null 2>&1
+
+ aufs_setup_dir "${UNION}" "${NEW_ROOT}/${FS_LOCATION}"
+
+ # setup internal mounts
+ mkdir -p "${UNION}/mnt/livecd"
+ if [ ! -e "${UNION}/mnt/cdrom" ]; then
+ mkdir "${UNION}/mnt/cdrom" -p
+ fi
+ mount --bind "${NEW_ROOT}/${FS_LOCATION}" "${UNION}/mnt/livecd"
+ mount --bind "${NEW_ROOT}/mnt/cdrom" "${UNION}/mnt/cdrom"
+
+ # Make sure fstab notes livecd is mounted ro. Makes system skip remount which fails on aufs $
+ sed -e 's|\(.*\s/\s*tmpfs\s*\)defaults\(.*\)|\1defaults,ro\2|' "/${UNION}/etc/fstab" > "/${UNION}/etc/fstab.new"
+ mv "/${UNION}/etc/fstab.new" "/${UNION}/etc/fstab"
+
+}
+
setup_unionfs() {
local rw_dir=$1
local ro_dir=$2
diff -Nurp genkernel-3.4.10.906.orig/defaults/linuxrc genkernel-3.4.10.906/defaults/linuxrc
--- genkernel-3.4.10.906.orig/defaults/linuxrc 2009-02-04 14:30:48.000000000 +0100
+++ genkernel-3.4.10.906/defaults/linuxrc 2009-08-11 19:19:48.949397441 +0200
@@ -191,6 +191,9 @@ do
USE_UNIONFS_NORMAL=1
fi
;;
+ aufs)
+ USE_AUFS_NORMAL=1
+ ;;
nounionfs)
USE_UNIONFS_NORMAL=0
;;
@@ -587,7 +588,13 @@ then
fi
- if [ "${USE_UNIONFS_NORMAL}" = '1' ]
+ if [ "${USE_AUFS_NORMAL}" -eq '1' ]
+ then
+ good_msg 'Setting up aufs mounts'
+ setup_aufs
+ CHROOT="${UNION}"
+
+ elif [ "${USE_UNIONFS_NORMAL}" = '1' ]
then
setup_unionfs ${NEW_ROOT} ${NEW_ROOT}/${FS_LOCATION}
CHROOT=/union
@@ -636,10 +643,6 @@ then
fi
done
- if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]
- then
- sleep 10
- fi
mkdir initramfs proc tmp sys 2>/dev/null
chmod 1777 tmp
@@ -668,6 +671,11 @@ else
setup_unionfs /union_changes ${NEW_ROOT}
mkdir -p ${UNION}/tmp/.initrd
fi
+ if [ "${USE_AUFS_NORMAL}" -eq '1' ]
+ then
+ setup_aufs
+ mkdir -p ${UNION}/tmp/.initrd
+ fi
fi
# Execute script on the cdrom just before boot to update things if necessary

View File

@ -1,68 +0,0 @@
diff -Nurp genkernel-3.4.10.906.orig/gen_bootloader.sh genkernel-3.4.10.906/gen_bootloader.sh
--- genkernel-3.4.10.906.orig/gen_bootloader.sh 2009-08-05 15:19:47.000000000 +0200
+++ genkernel-3.4.10.906/gen_bootloader.sh 2009-08-11 18:40:03.292176371 +0200
@@ -62,7 +62,7 @@ set_bootloader_grub() {
# Add grub configuration to grub.conf
echo "# Genkernel generated entry, see GRUB documentation for details" >> ${GRUB_CONF}
- echo "title=Gentoo Linux ($KV)" >> ${GRUB_CONF}
+ echo "title=Genlink Linux ($KV)" >> ${GRUB_CONF}
if [ "${BUILD_INITRD}" -eq '0' ]
then
echo -e "\tkernel /kernel-${KNAME}-${ARCH}-${KV} root=${GRUB_ROOTFS}" >> ${GRUB_CONF}
@@ -139,7 +139,7 @@ set_bootloader_grub_duplicate_default()
sed -n 1,$((${startline}-1))p "${GRUB_CONF}" > "${GRUB_CONF_TMP}"
# Put in our title
- echo "title=Gentoo Linux (${KV})" >> "${GRUB_CONF_TMP}"
+ echo "title=Genlink Linux (${KV})" >> "${GRUB_CONF_TMP}"
# Pass the default entry (minus the title) through to the replacement function and pipe the output to GRUB_CONF_TMP
sed -n $((${startline}+1)),$((${stopline}-1))p "${GRUB_CONF}" | set_bootloader_grub_duplicate_default_replace_kernel_initrd >> "${GRUB_CONF_TMP}"
diff -Nurp genkernel-3.4.10.906.orig/gen_cmdline.sh genkernel-3.4.10.906/gen_cmdline.sh
--- genkernel-3.4.10.906.orig/gen_cmdline.sh 2009-08-05 15:19:47.000000000 +0200
+++ genkernel-3.4.10.906/gen_cmdline.sh 2009-08-11 18:40:03.292176371 +0200
@@ -2,7 +2,7 @@
# $Id: 20380ac6f16d8c9be4dcfbfd6bc1e0b0ba1979b3 $
longusage() {
- echo "Gentoo Linux Genkernel ${GK_V}"
+ echo "Genlink/Gentoo Linux Genkernel ${GK_V}"
echo "Usage: "
echo " genkernel [options] action"
echo
@@ -136,7 +136,7 @@ longusage() {
}
usage() {
- echo "Gentoo Linux Genkernel ${GK_V}"
+ echo "Genlink/Gentoo Linux Genkernel ${GK_V}"
echo "Usage: "
echo " genkernel [options] all"
echo
diff -Nurp genkernel-3.4.10.906.orig/genkernel genkernel-3.4.10.906/genkernel
--- genkernel-3.4.10.906.orig/genkernel 2009-08-05 15:22:28.000000000 +0200
+++ genkernel-3.4.10.906/genkernel 2009-08-11 18:40:03.292176371 +0200
@@ -93,7 +93,7 @@ then
fi
clear_log
-NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}"
+NORMAL=${GOOD} print_info 1 "Genlink/Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}"
print_info 1 "Running with options: ${Options}"
echo
diff -Nurp genkernel-3.4.10.906.orig/netboot/linuxrc.x genkernel-3.4.10.906/netboot/linuxrc.x
--- genkernel-3.4.10.906.orig/netboot/linuxrc.x 2008-12-24 17:17:49.000000000 +0100
+++ genkernel-3.4.10.906/netboot/linuxrc.x 2009-08-11 18:40:03.293490689 +0200
@@ -249,8 +249,8 @@ SubGenius() {
GenMotd() {
echo -e "" > /etc/motd
echo -e "" >> /etc/motd
- echo -e "Gentoo Linux; http://www.gentoo.org/" >> /etc/motd
- echo -e " Copyright 2001-${CPYYEAR} Gentoo Foundation; Distributed under the GPL" >> /etc/motd
+ echo -e "Genlink Linux; http://linamh.disconnected-by-peer.at/wiki/Genlink/" >> /etc/motd
+ echo -e " Copyright 2004-${CPYYEAR} Genlink Linux; Distributed under the GPL" >> /etc/motd
echo -e "" >> /etc/motd
echo -e " Gentoo/${MYARCH} Netboot for ${MACHTYPE} Systems" >> /etc/motd
echo -e " ${BUILDDATE}" >> /etc/motd

View File

@ -1,12 +0,0 @@
--- genkernel-3.4.10.906.orig/defaults/linuxrc
+++ genkernel-3.4.10.906/defaults/linuxrc
@@ -229,6 +229,9 @@
# Start device manager
start_dev_mgr
+# start BTRFS volume detection
+[ -x /sbin/btrfsctl ] && /sbin/btrfsctl -a
+
# Setup md device nodes if they dont exist
setup_md_device

View File

@ -1,11 +0,0 @@
diff -Nurp genkernel-3.4.10.906.orig/defaults/linuxrc genkernel-3.4.10.906/defaults/linuxrc
--- genkernel-3.4.10.906.orig/defaults/linuxrc 2009-08-12 14:28:26.919151873 +0200
+++ genkernel-3.4.10.906/defaults/linuxrc 2009-08-12 14:30:39.632271882 +0200
@@ -132,6 +132,7 @@ do
# Redirect output to a specific tty
CONSOLE\=*|console\=*)
CONSOLE=`parse_opt "${x}"`
+ CONSOLE=`basename ${CONSOLE}`
# exec >${CONSOLE} <${CONSOLE} 2>&1
;;
# /dev/md

View File

@ -1,11 +0,0 @@
--- genkernel-3.4.10.906.orig/defaults/initrd.scripts
+++ genkernel-3.4.10.906/defaults/initrd.scripts
@@ -794,6 +794,8 @@ sdelay() {
if [ -n "${SDELAY}" ]
then
sleep ${SDELAY}
+ elif grep cdroot /proc/cmdline > /dev/null 2>&1; then
+ sleep 3
else
sleep 1
fi

View File

@ -1,19 +0,0 @@
diff -Nurp genkernel-3.4.10.907.orig/arch/x86/modules_load genkernel-3.4.10.907/arch/x86/modules_load
--- genkernel-3.4.10.907.orig/arch/x86/modules_load 2009-12-17 05:21:37.000000000 +0100
+++ genkernel-3.4.10.907/arch/x86/modules_load 2010-04-10 21:53:00.590161869 +0200
@@ -28,3 +28,5 @@ MODULES_USB="ehci-hcd uhci usb-ohci hid
# Filesystems
MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
+# Crypto stuff, required for Sabayon crypt installs
+MODULES_CRYPT="aes sha1 sha256 sha512 xts"
diff -Nurp genkernel-3.4.10.907.orig/arch/x86_64/modules_load genkernel-3.4.10.907/arch/x86_64/modules_load
--- genkernel-3.4.10.907.orig/arch/x86_64/modules_load 2009-12-17 05:21:37.000000000 +0100
+++ genkernel-3.4.10.907/arch/x86_64/modules_load 2010-04-10 21:53:12.358096340 +0200
@@ -26,3 +26,6 @@ MODULES_USB="ehci-hcd uhci usb-ohci hid
# Filesystems
MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
+
+# Crypto stuff, required for Sabayon crypt installs
+MODULES_CRYPT="aes sha1 sha256 sha512 xts"

View File

@ -1,73 +0,0 @@
# genkernel (8) completion
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Written by Aron Griffis <agriffis@gentoo.org>
_genkernel()
{
declare cur prev genkernel_help actions params
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
# extract initial list of params/actions from genkernel --help
genkernel_help=$(command genkernel --help)
actions=( $(<<<"$genkernel_help" sed -n \
'/^Available Actions:/,/^$/s/^[[:space:]]\+\([^[:space:]]\+\).*/\1/p') )
params=( $(<<<"$genkernel_help" egrep -oe '--[^[:space:]]{2,}') )
# attempt to complete the current parameter based on the list
COMPREPLY=($(compgen -W "${params[*]/=*/=} ${actions[*]}" -- "$cur"))
# if we don't have a rhs to complete
if [[ ${#COMPREPLY[@]} -gt 1 ]]; then
return
elif [[ ${#COMPREPLY[@]} -eq 0 && $cur != --*=* ]]; then
return
elif [[ ${#COMPREPLY[@]} -eq 1 && $COMPREPLY != --*= ]]; then
# using nospace completion, add an explicit space
COMPREPLY="${COMPREPLY} "
return
fi
# we have a unique lhs and need to complete the rhs
declare args lhs rhs
if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
lhs=$COMPREPLY
else
lhs=${cur%%=*}=
rhs=${cur#*=}
fi
# genkernel's help gives clues as to what belongs on the rhs.
# extract the clue for the current parameter
args=" ${params[*]} "
args="${args##* $lhs}"
args="${args%% *}"
# generate a list of completions for the argument; this replaces args with
# an array of results
args=( $(case $args in
('<0-5>') compgen -W "$(echo {1..5})" -- "$rhs" ;;
('<outfile>'|'<file>') compgen -A file -o plusdirs -- "$rhs" ;;
('<dir>') compgen -A directory -S / -- "$rhs" ;;
('<tbz2>') compgen -G '*.tbz2' -G '*.tar.bz2' -o plusdirs -- "$rhs" ;;
(*) compgen -o bashdefault -- "$rhs" ;; # punt
esac) )
# we're using nospace completion to prevent spaces after paths that aren't
# "done" yet. So do some hacking to the args to add spaces after
# non-directories.
declare slash=/
args=( "${args[@]/%/ }" ) # add space to all
args=( "${args[@]/%$slash /$slash}" ) # remove space from dirs
# recreate COMPREPLY
if [[ $cur == "$lhs"* ]]; then
COMPREPLY=( "${args[@]}" )
elif [[ ${#args[@]} -gt 0 ]]; then
COMPREPLY=( "${args[@]/#/$lhs}" )
fi
}
complete -o nospace -F _genkernel genkernel

View File

@ -1,148 +0,0 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.907.ebuild,v 1.1 2009/12/17 04:37:13 robbat2 Exp $
# genkernel-9999 -> latest SVN
# genkernel-9999.REV -> use SVN REV
# genkernel-VERSION -> normal genkernel release
VERSION_BUSYBOX='1.17.3'
VERSION_DMAP='1.02.22'
VERSION_DMRAID='1.0.0.rc16'
VERSION_FUSE='2.7.4'
VERSION_ISCSI='2.0-871'
VERSION_LVM='2.02.28'
VERSION_MDADM='3.1.4'
VERSION_UNIONFS_FUSE='0.24'
MY_HOME="http://wolf31o2.org"
RH_HOME="ftp://sources.redhat.com/pub"
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
BB_HOME="http://www.busybox.net/downloads"
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
http://www.open-iscsi.org/bits/open-iscsi-${VERSION_ISCSI}.tar.gz
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
mirror://kernel/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.bz2
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
if [[ ${PV} == 9999* ]]
then
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
#EGIT_BRANCH=''
inherit git bash-completion eutils
S="${WORKDIR}/${PN}"
SRC_URI="${COMMON_URI}"
else
inherit bash-completion eutils
SRC_URI="mirror://gentoo/${P}.tar.bz2
${MY_HOME}/sources/genkernel/${P}.tar.bz2
${COMMON_URI}"
fi
DESCRIPTION="Gentoo automatic kernel building scripts"
HOMEPAGE="http://www.gentoo.org"
LICENSE="GPL-2"
SLOT="0"
RESTRICT=""
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
# Release Engineering, it's easier for us to deal with all arches at once.
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
#KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
#KEYWORDS="~arm"
IUSE="ibm selinux"
DEPEND="sys-fs/e2fsprogs
selinux? ( sys-libs/libselinux )"
RDEPEND="${DEPEND} app-arch/cpio"
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
git_src_unpack
else
unpack ${P}.tar.bz2
fi
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
cd "${S}"
# Add unionfs/aufs support.
for i in ${FILESDIR}/3.4.11/*.patch; do
epatch "${i}"
done
# Add crypt support
epatch "${FILESDIR}"/${PN}-crypt-config.patch
}
src_install() {
# This block updates genkernel.conf
sed \
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
-e "s:VERSION_DMAP:$VERSION_DMAP:" \
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
-e "s:VERSION_ISCSI:$VERSION_ISCSI:" \
-e "s:VERSION_LVM:$VERSION_LVM:" \
-e "s:VERSION_MDADM:$VERSION_MDADM:" \
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|| die "Could not adjust versions"
insinto /etc
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
doman genkernel.8 || die "doman"
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
dobin genkernel || die "dobin genkernel"
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
insinto /usr/share/genkernel
doins -r "${S}"/* || die "doins"
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
# Copy files to /var/cache/genkernel/src
elog "Copying files to /var/cache/genkernel/src..."
mkdir -p "${D}"/var/cache/genkernel/src
cp -f \
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
"${DISTDIR}"/mdadm-${VERSION_MDADM}.tar.bz2 \
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
"${DISTDIR}"/open-iscsi-${VERSION_ISCSI}.tar.gz \
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
dobashcompletion "${FILESDIR}"/genkernel.bash
}
pkg_postinst() {
echo
elog 'Documentation is available in the genkernel manual page'
elog 'as well as the following URL:'
echo
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
echo
ewarn "This package is known to not work with reiser4. If you are running"
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
ewarn "even reiser3."
echo
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
echo
bash-completion_pkg_postinst
}

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!--
$Header: /var/cvsroot/gentoo-x86/skel.metadata.xml,v 1.18 2008/07/28 19:27:05 cardoe Exp $
This is the example metadata file.
The root element of this file is <pkgmetadata>. Within this element a
number of subelements are allowed: herd, maintainer, and
longdescription. herd is a required subelement.
For a full description look at:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=4
Before committing, please remove the comments from this file. They are
not relevant for general metadata.xml files.
-->
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>@gentoo.org</email>
<!-- <description>Description of the maintainership</description> -->
</maintainer>
<!-- <longdescription>Long description of the package</longdescription> -->
<!--
<use>
<flag name='flag'>Description of how USE='flag' affects this package</flag>
<flag name='userland_GNU'>Description of how USERLAND='GNU' affects this
package</flag>
<flag name='aspell'>Uses <pkg>app-text/aspell</pkg> for spell checking.
Requires an installed dictionary from <cat>app-dicts</cat></flag>
</use>
-->
</pkgmetadata>