delete and add new packages

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/genlink@2576 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2010-10-24 18:10:38 +00:00
parent 1e96e02102
commit e6be8b1478
19 changed files with 533 additions and 70 deletions

View File

@@ -0,0 +1,126 @@
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

@@ -0,0 +1,68 @@
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

@@ -0,0 +1,12 @@
--- 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

@@ -0,0 +1,11 @@
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

@@ -0,0 +1,11 @@
--- 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

@@ -0,0 +1,19 @@
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

@@ -0,0 +1,73 @@
# 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