bzr: bump to 2.4.2

burg-bzr: see changelog
This commit is contained in:
Phil 2011-12-25 18:32:09 +00:00
parent 51744c67aa
commit 5f674858cc
10 changed files with 278 additions and 1163 deletions

View File

@ -1,354 +0,0 @@
#! /bin/sh -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
transform="s,x,x,"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
grub_prefix=`echo /boot/burg | sed ${transform}`
locale_dir=`echo /boot/burg/locale | sed ${transform}`
grub_lang=`echo $LANG | cut -d _ -f 1`
sysconfdir=/etc
pass_file=${sysconfdir}/default/burg-passwd
. ${libdir}/burg/burg-mkconfig_lib
# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
echo "insmod $i"
done
if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
if test "x${GRUB_USERS}" != "x" ; then
if test ! -r $pass_file ; then
echo "Password file not found" >&2 ; exit 1
fi
awk -F: 'BEGIN {super=""} {print "password_" $3,$1,$4; if ($2=="s") super=super $1 ",";} END {if (super=="") exit 1; else print "set superusers=" super;}' $pass_file || { echo "No superuser is found" >&2 ; exit 1; }
fi
default_theme="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
if test ! -r "${grub_prefix}/themes/${default_theme}/theme"; then
default_theme=burg
fi
if test "x${GRUB_THEME}" = "xsaved"; then
echo "set theme_name=${default_theme}"
fi
if test "x${GRUB_GFXMODE}" = "xsaved"; then
echo "set gfxmode=640x480"
fi
cat << EOF
if [ -s \$prefix/burgenv ]; then
load_env
fi
set default="${GRUB_DEFAULT}"
if [ \${prev_saved_entry} ]; then
set saved_entry=\${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z \${boot_once} ]; then
saved_entry=\${chosen}
save_env saved_entry
fi
}
EOF
if test "x${GRUB_GFXMODE}" != "xsaved"; then
echo "set gfxmode=${GRUB_GFXMODE}"
fi
serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
if [ xserial = "x$x" ]; then
serial=1;
fi
if [ xgfxterm = "x$x" ]; then
gfxterm=1;
fi
done
if [ "x$serial" = x1 ]; then
if ! test -e ${grub_prefix}/serial.mod ; then
echo "Serial terminal not available on this platform." >&2 ; exit 1
fi
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
GRUB_SERIAL_COMMAND=serial
fi
echo "${GRUB_SERIAL_COMMAND}"
fi
if [ x$GRUB_THEME != x ] && [ ! -f $GRUB_THEME ] ; then
cat << EOF
function select_menu {
if menu_popup -t template_popup theme_menu ; then
free_config template_popup template_subitem menu class screen
load_config \${prefix}/themes/\${theme_name}/theme \${prefix}/themes/custom/theme_\${theme_name}
EOF
if test "x${GRUB_THEME}" = "xsaved"; then
cat << EOF
save_env theme_name
menu_refresh
fi
}
EOF
else
cat << EOF
menu_refresh
fi
}
set theme_name=${GRUB_THEME}
EOF
fi
cat << EOF
function toggle_fold {
if test -z \$theme_fold ; then
set theme_fold=1
else
set theme_fold=
fi
EOF
if test "x${GRUB_FOLD}" = "xsaved"; then
cat << EOF
save_env theme_fold
menu_refresh
}
EOF
else
cat << EOF
menu_refresh
}
EOF
if test "x${GRUB_FOLD}" = "xtrue"; then
echo "set theme_fold=1"
else
echo "set theme_fold="
fi
fi
cat << EOF
function select_resolution {
if menu_popup -t template_popup resolution_menu ; then
menu_reload_mode
EOF
if test "x${GRUB_GFXMODE}" = "xsaved"; then
echo " save_env gfxmode"
fi
cat << EOF
fi
}
EOF
echo "if test -f \${prefix}/themes/\${theme_name}/theme ; then"
cat << EOF
insmod coreui
menu_region.text
EOF
for i in ${grub_prefix}/themes/* ; do
if test -r "$i/theme"; then
theme_name=`echo $i | sed 's,.*/,,'`
echo " load_string '+theme_menu { -${theme_name} { command=\"set theme_name=${theme_name}\" }}'"
fi
done
for i in ${grub_prefix}/themes/conf.d/* ; do
case "$i" in
*~*) ;;
*)
if grub_file_is_not_garbage "$i" && test -r "$i" ; then
echo " load_config \${prefix}/themes/conf.d/`echo $i | sed 's,.*/,,'`"
fi
;;
esac
done
echo " load_config \${prefix}/themes/\${theme_name}/theme \${prefix}/themes/custom/theme_\${theme_name}"
if [ "x$gfxterm" = x1 ]; then
cat << EOF
insmod ${GRUB_VIDEO_BACKEND}
insmod png
insmod jpeg
set gfxfont="Unifont Regular 16"
menu_region.gfx
vmenu resolution_menu
EOF
fi
cat << EOF
controller.ext
fi
EOF
gfxterm=0
term_output=
for x in ${GRUB_TERMINAL_OUTPUT}; do
if [ xgfxterm != "x$x" ]; then
term_output=${term_output} $x
fi
done
GRUB_TERMINAL_OUTPUT=${term_output}
fi
if [ "x$gfxterm" = x1 ]; then
# Make the font accessible
prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`
cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
insmod gfxterm
insmod ${GRUB_VIDEO_BACKEND}
EOF
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
&& is_path_readable_by_grub "$GRUB_THEME"; then
echo "Found theme: $GRUB_THEME" >&2
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` | sed -e "s/^/ /"
cat << EOF
insmod gfxmenu
EOF
themedir="`dirname "$GRUB_THEME"`"
for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
if [ -f "$x" ]; then
cat << EOF
loadfont (\$root)`make_system_path_relative_to_its_root $x`
EOF
fi
done
if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
cat << EOF
insmod jpeg
EOF
fi
if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
cat << EOF
insmod png
EOF
fi
if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
cat << EOF
insmod tga
EOF
fi
cat << EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
EOF
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then
echo "Found background: $GRUB_BACKGROUND" >&2
case "$GRUB_BACKGROUND" in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
*) echo "Unsupported image format" >&2; exit 1 ;;
esac
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` | sed -e "s/^/ /"
cat << EOF
insmod $reader
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
EOF
fi
cat << EOF
fi
EOF
fi
case x${GRUB_TERMINAL_INPUT} in
x)
# Just use the native terminal
;;
x*)
cat << EOF
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_input
terminal ${GRUB_TERMINAL_INPUT}
fi
EOF
;;
esac
case x${GRUB_TERMINAL_OUTPUT} in
x)
# Just use the native terminal
;;
x*)
cat << EOF
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal ${GRUB_TERMINAL_OUTPUT}
fi
EOF
;;
esac
# Gettext variables and module
if [ "x${LANG}" != "xC" ] ; then
prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir})
cat << EOF
set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
set lang=${grub_lang}
insmod gettext
EOF
fi
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
verbose=
else
verbose=" --verbose"
fi
cat << EOF
if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=${GRUB_TIMEOUT}
fi
EOF
else
cat << EOF
set timeout=${GRUB_TIMEOUT}
EOF
fi
# Play an initial tune
if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
cat << EOF
insmod play
play ${GRUB_INIT_TUNE}
EOF
fi

View File

@ -1,148 +0,0 @@
#! /bin/sh -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=/usr
exec_prefix=${prefix}
bindir=/bin
libdir=${exec_prefix}/lib
. ${libdir}/burg/burg-mkconfig_lib
export TEXTDOMAIN=burg
export TEXTDOMAINDIR=${prefix}/share/locale
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
OSLABEL=linux
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
fi
CLASS="--class ${OSLABEL} ${CLASS}"
export AUTH_NORMAL AUTH_RESCUE
get_auth_option ${OSLABEL}
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
fi
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if [ "${version}" = "linux-lts" ] ; then
_kernel=LTS
else
_kernel=Standard
fi
if ${recovery} ; then
title="$(gettext_quoted "%s, with ${_kernel}-Kernel (recovery mode)")"
else
title="$(gettext_quoted "%s, with ${_kernel}-Kernel")"
fi
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
# cat << EOF
# set gfxpayload=keep
#EOF
# fi
# else
cat << EOF
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
fi
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
echo '$(gettext_quoted "Loading initial ramdisk ...")'
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
}
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*vmlinu[xz]-,,g"`
alt_version="$version-fallback"
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
for i in "initramfs-${version}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
initrd="initramfs-${alt_version}.img"
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

View File

@ -1,143 +0,0 @@
#! /bin/sh -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
. ${libdir}/burg/burg-mkconfig_lib
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR=@localedir@
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
OSLABEL=linux
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
fi
CLASS="--class ${OSLABEL} ${CLASS}"
export AUTH_NORMAL AUTH_RESCUE
get_auth_option ${OSLABEL}
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
fi
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext_quoted "%s, (recovery mode)")"
else
title="$(gettext_quoted "%s")"
fi
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
# cat << EOF
# set gfxpayload=keep
#EOF
# fi
# else
cat << EOF
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
fi
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
echo '$(gettext_quoted "Loading initial ramdisk ...")'
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
}
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version="$version-fallback"
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
for i in "initramfs-${version}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
initrd="initramfs-${alt_version}.img"
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

View File

@ -1,143 +0,0 @@
#! /bin/sh -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
. ${libdir}/burg/burg-mkconfig_lib
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR=@localedir@
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
OSLABEL=linux
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
fi
CLASS="--class ${OSLABEL} ${CLASS}"
export AUTH_NORMAL AUTH_RESCUE
get_auth_option ${OSLABEL}
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
fi
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext_quoted "%s, (recovery mode)")"
else
title="$(gettext_quoted "%s")"
fi
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
# cat << EOF
# set gfxpayload=keep
#EOF
# fi
# else
cat << EOF
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
fi
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
echo '$(gettext_quoted "Loading initial ramdisk ...")'
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
}
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version="$version-fallback"
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
for i in "initramfs-${version}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
initrd="initramfs-${alt_version}.img"
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

View File

@ -1,147 +0,0 @@
#! /bin/sh -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=/usr
exec_prefix=${prefix}
bindir=/bin
libdir=${exec_prefix}/lib
. ${libdir}/burg/burg-mkconfig_lib
export TEXTDOMAIN=burg
export TEXTDOMAINDIR=${prefix}/share/locale
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
OSLABEL=linux
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
fi
CLASS="--class ${OSLABEL} ${CLASS}"
export AUTH_NORMAL AUTH_RESCUE
get_auth_option ${OSLABEL}
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
auth_option=${AUTH_RESCUE}
else
title="$(gettext_quoted "%s, with Linux %s")"
auth_option=${AUTH_NORMAL}
fi
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
# cat << EOF
# set gfxpayload=keep
#EOF
# fi
# else
cat << EOF
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
fi
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
cat << EOF
echo '$(gettext_quoted "Loading initial ramdisk ...")'
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
}
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" \
"initrd-${version}" "initramfs-${version}.img" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2
else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

View File

@ -4,84 +4,291 @@
# maintainer (i686): Phil Miller <philm[at]chakra-project[dot]org
# maintainer (x86_64): Giuseppe Calà <jiveaxe[at]gmail[dot]com>
# Tunables: change y to n to disable
_rm_build_dirs="${_rm_build_dirs:-n}" # remove build directories
_mk_burg_emu="${_mk_burg_emu:-n}" # enable burg emu
pkgname=burg-bzr
pkgver=1844
pkgrel=7
pkgdesc="A brand-new boot loader based on GRUB."
pkgrel=8
url="https://launchpad.net/burg"
license="GPL3"
arch=('i686' 'x86_64')
depends=('ruby' 'python' 'gettext' 'freetype2' 'sdl' 'ncurses')
optdepends=('os-prober' 'memtest86+')
makedepends=('bzr')
changelog=burg.Changelog
if [ "$CARCH" = "i686" ]; then
depends=('gettext' 'freetype2')
pkgdesc="Brand-new Universal loadeR from GRUB2 - Built for i386 BIOS"
fi
if [ "$CARCH" = "x86_64" ]; then
depends=('gettext' 'freetype2' 'dosfstools' 'efibootmgr')
pkgdesc="Brand-new Universal loadeR from GRUB2 - Built for x86_64 UEFI"
fi
optdepends=('os-prober' 'memtest86+' 'mtools')
makedepends=('bzr' 'ruby' 'bdf-unifont' 'python2' 'ncurses' 'sdl')
changelog=burg.changelog
backup=('etc/default/burg' 'etc/burg.d/40_custom')
provides=('burg')
if [[ "${_mk_burg_emu}" == 'y' ]]; then
makedepends+=('sdl')
depends+=('sdl')
conflicts+=('burg-emu')
provides+=('burg-emu')
fi
md5sums=('39a0e3f1035342d75a9eda7a65f9793f'
'e52920e72ae3702a416a4b1a39bf370c'
'04aff93772dcd9eb8acff54461e7ae7f'
'60bdcc9a3f86deb4f1a361f3bea4ae98'
'990eba4f3cb1808c97c2972de6957a3c'
'460a91c0998117285decdb176ad98ee1')
source=('burg.default'
'chakra-burg-detection-folding.patch'
'chakra-burg.patch'
'resume-hook.patch'
'20_memtest86+'
'update-burg')
install='burg.install'
_bzrmod=burg
_bzrtrunk=lp:${_bzrmod}
_bzrmod="burg"
_bzrtrunk="lp:${_bzrmod}"
_builddir="${_bzrmod}-build"
_builddir_emu="${_bzrmod}-emu-build"
_common_configure_opts="--host="${CARCH}-pc-linux-gnu" --program-prefix="" \
--prefix=/usr --bindir=/bin \
--sbindir=/sbin --mandir=/usr/share/man \
--infodir=/usr/share/info --sysconfdir=/etc \
--disable-werror"
_update_bzr() {
cd "${srcdir}/"
msg "Connecting to the server...."
if [[ ! -d "${srcdir}/${_bzrmod}" ]] ; then
bzr branch "${_bzrtrunk}"
else
cd "${srcdir}/${_bzrmod}" && bzr pull "${_bzrtrunk}"
fi
msg "BZR checkout done or server timeout"
}
_build_dir() {
local _rm_builddir='0'
while (( "$#" ))
do
local _check="$1"
if [[ "${_check}" == '-r' ]]; then
_rm_builddir='1'
elif [[ "${_check}" == 'emu' ]]; then
_builddir="${_bzrmod}-build"
_builddir_emu="${_bzrmod}-emu-build"
else
_builddir="${_bzrmod}-$1-build"
fi
shift
done
if [[ "${_check}" == 'emu' ]]; then
rm -rf "${srcdir}/${_builddir_emu}" || true
else
rm -rf "${srcdir}/${_builddir}" || true
fi
if [[ "${_rm_builddir}" == '0' ]]; then
if [[ "${_check}" == 'emu' ]]; then
cp -rip "${srcdir}/${_bzrmod}" "${srcdir}/${_builddir_emu}"
cd "${srcdir}/${_builddir_emu}"
else
cp -rip "${srcdir}/${_bzrmod}" "${srcdir}/${_builddir}"
cd "${srcdir}/${_builddir}/"
fi
fi
}
_build_common() {
local _check="$1"
if [[ "${_check}" == 'emu' ]]; then
cd "${srcdir}/${_builddir_emu}"
else
cd "${srcdir}/${_builddir}"
fi
# Archlinux changed default python to python3, need to use /usr/bin/python2 instead
sed 's|python|python2|g' -i ./autogen.sh || true
echo
./autogen.sh
echo
}
_build_bios() {
msg "Building burg bios...."
_build_dir
echo
# some random patches to facilitate automatic creation of burg.cfg
patch -Np1 -i "${srcdir}/chakra-burg.patch"
echo
_build_common
echo
cd "${srcdir}/${_builddir}/"
## fix unifont.bdf location so burg-mkfont can create *.pf2 files
sed 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|g' -i ./configure || true
_bios_configure_opts="${_common_configure_opts} --with-platform=pc --disable-grub-emu-usb"
./configure ${_bios_configure_opts}
echo
CFLAGS="" make
echo
}
_build_uefi_x86_64() {
msg "Building burg uefi x86_64...."
_build_dir
echo
# some random patches to facilitate automatic creation of burg.cfg
patch -Np1 -i "${srcdir}/chakra-burg.patch"
echo
_build_common
echo
cd "${srcdir}/${_builddir}/"
## fix unifont.bdf location so burg-mkfont can create *.pf2 files
sed 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|g' -i ./configure || true
_uefi_configure_opts="${_common_configure_opts} --with-platform=efi --target=x86_64 --disable-efiemu --disable-grub-emu-usb"
./configure ${_uefi_configure_opts}
echo
CFLAGS="" make
echo
}
_build_emu() {
msg "Building burg-emu...."
_build_dir emu
echo
_build_common emu
echo
cd "${srcdir}/${_builddir_emu}/"
## fix unifont.bdf location so burg-mkfont can create *.pf2 files
sed 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|g' -i ./configure || true
_emu_configure_opts="${_common_configure_opts} --with-platform=emu --disable-grub-emu-usb"
./configure ${_emu_configure_opts}
echo
CFLAGS="" make
echo
}
build() {
cd $srcdir/
export MAKEFLAGS="-j1"
_update_bzr
echo
msg "Connecting to the server...."
if [ ! -d ./${_bzrmod} ]; then
bzr branch ${_bzrtrunk} -r ${pkgver}
else
cd ${_bzrmod} && bzr pull -r ${pkgver}
fi
msg "BZR checkout done or server timeout"
if [[ "$CARCH" == 'i686' ]]; then
_build_bios
fi
echo
cd "${srcdir}/${_bzrmod}"
# Restore to old config: use for example: burg-install /dev/sda --no-floppy
# disable floppy probing in grub-mkdevicemap
#sed -i 's|int floppy_disks = 1;|int floppy_disks = 0;|' ${srcdir}/${_bzrmod}/util/grub-mkdevicemap.c
## Archlinux changed default /usr/bin/python to 3.1.2, need to use /usr/bin/python2 instead
sed -i 's|python|python2|' ${srcdir}/${_bzrmod}/autogen.sh
./autogen.sh || return 1
rm -rf $srcdir/$_bzrmod-build
msg "Creating build directory..."
mkdir $srcdir/$_bzrmod-build
msg "Starting make..."
cd $srcdir/$_bzrmod-build
$srcdir/$_bzrmod/configure --prefix=/usr --bindir=/bin \
--sbindir=/sbin --mandir=/usr/share/man \
--infodir=/usr/share/info --sysconfdir=/etc || return 1
make || return 1
if [[ "$CARCH" == 'x86_64' ]]; then
_build_uefi_x86_64
fi
echo
if [[ "${_mk_burg_emu}" == 'y' ]]; then
_build_emu
fi
echo
}
package() {
cd $srcdir/$_bzrmod-build
make install DESTDIR=$pkgdir || return 1
cd "${srcdir}/${_builddir}/"
make DESTDIR="${pkgdir}/" install
echo
if [[ "${_mk_burg_emu}" == 'y' ]]; then
install -D -m0755 "${srcdir}/${_builddir_emu}/grub-emu" "${pkgdir}/bin/burg-emu"
fi
# install /etc/default/burg(needed config file)
install -D -m0644 "${srcdir}/burg.default" "${pkgdir}/etc/default/burg"
# install update-burg script
install -D -m0755 "${srcdir}/update-burg" "${pkgdir}/sbin/update-burg"
# install memtest config detection
install -D -m0755 "${srcdir}/20_memtest86+" "${pkgdir}/etc/burg.d/20_memtest86+"
if [[ "${_rm_build_dirs}" == 'y' ]]; then
_build_dir -r
if [[ "${_mk_burg_emu}" == 'y' ]]; then
_build_dir -r emu
fi
fi
echo
# install /etc/default/burg(needed config file)
install -Dm644 ${srcdir}/burg.default ${pkgdir}/etc/default/burg
# install update-burg script
install -Dm755 ${srcdir}/update-burg ${pkgdir}/sbin/update-burg
# install memtest config detection
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/burg.d/20_memtest86+
cd ${pkgdir}
patch -Np0 -i ${srcdir}/chakra-burg-detection-folding.patch
cd ${pkgdir}/sbin
patch -Np0 -i ${srcdir}/resume-hook.patch
cd ${pkgdir}/sbin
patch -Np0 -i ${srcdir}/resume-hook.patch
}

View File

@ -1,59 +0,0 @@
--- orig/util/grub.d/10_linux.in 2010-11-01 14:41:38.000000000 -0600
+++ new/util/grub.d/10_linux.in 2010-11-01 15:54:26.796667850 -0600
@@ -51,7 +51,7 @@
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
+ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
fi
linux_entry ()
@@ -62,10 +62,8 @@
args="$4"
if ${recovery} ; then
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
- auth_option=${AUTH_RESCUE}
else
title="$(gettext_quoted "%s, with Linux %s")"
- auth_option=${AUTH_NORMAL}
fi
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
save_default_entry | sed -e "s/^/\t/"
@@ -104,7 +102,7 @@
EOF
}
-list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
+list=`for i in /boot/vmlinu[xz]* /vmlinu[xz]* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
@@ -116,14 +114,12 @@
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
- alt_version=`echo $version | sed -e "s,\.old$,,g"`
+ base_init=`echo $basename | sed -e "s,vmlinuz,kernel,g"`
+ alt_version="${base_init}-fallback"
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
- for i in "initrd.img-${version}" "initrd-${version}.img" \
- "initrd-${version}" "initramfs-${version}.img" \
- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
+ for i in "${base_init}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
@@ -138,6 +134,9 @@
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ initrd="${alt_version}.img"
+ linux_entry "${OS}" "${version} Fallback" false \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"

View File

@ -1,61 +0,0 @@
--- etc/burg.d/10_linux.orig 2010-11-01 14:41:38.000000000 -0600
+++ etc/burg.d/10_linux 2010-11-01 15:54:26.796667850 -0600
@@ -51,7 +51,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
+ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
fi
linux_entry ()
@@ -60,14 +60,17 @@ linux_entry ()
version="$2"
recovery="$3"
args="$4"
+ if [ "${version}" = "linux-lts" ] ; then
+ _kernel=LTS
+ else
+ _kernel=Standard
+ fi
if ${recovery} ; then
- title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
- auth_option=${AUTH_RESCUE}
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel (recovery mode)")"
else
- title="$(gettext_quoted "%s, with Linux %s")"
- auth_option=${AUTH_NORMAL}
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel")"
fi
- printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
+ printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}"
save_default_entry | sed -e "s/^/\t/"
# Use ELILO's generic "efifb" when it's known to be available.
@@ -115,15 +118,12 @@ while [ "x$list" != "x" ] ; do
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
- alt_version=`echo $version | sed -e "s,\.old$,,g"`
+ version=`echo $basename | sed -e "s,^[^0-9]*vmlinu[xz]-,,g"`
+ alt_version="$version-fallback"
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
- for i in "initrd.img-${version}" "initrd-${version}.img" \
- "initrd-${version}" "initramfs-${version}.img" \
- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
+ for i in "initramfs-${version}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
@@ -139,6 +139,7 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
+ initrd="initramfs-${alt_version}.img"
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi

View File

@ -5,28 +5,31 @@
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# Contributer: Joshua L. Blocher <verbalshadow@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=bzr
pkgver=2.2.2
pkgrel=2
pkgver=2.4.2
pkgrel=1
pkgdesc="A decentralized revision control system (bazaar)"
arch=('i686' 'x86_64')
url="http://www.bazaar-vcs.org"
url="http://bazaar.canonical.com/en/"
license=('GPL')
depends=('python2')
source=(http://launchpad.net/bzr/2.2/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz
bzr-2.2.2-python-2.7.patch)
md5sums=('d1bfa2fd1aad282c423c78d62ebacb21'
'0f0d8e0d31032cde59565b6c74a37e41')
optdepends=('python-paramiko: for sftp support')
source=("http://launchpad.net/${pkgname}/${pkgver%.*}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"{,.sig})
md5sums=('cfc06fddd348445c65a247c0b33a05db'
'90294e34a45df20b16be47a32c800c89')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -Np0 -i ${startdir}/bzr-2.2.2-python-2.7.patch || return 1
cd "${srcdir}/${pkgname}-${pkgver}"
sed -i 's|man/man1|share/man/man1|' setup.py
python2 setup.py install --prefix=/usr --root=${pkgdir}
sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \
bzrlib/{plugins/bash_completion/bashcomp.py,tests/ssl_certs/create_ssls.py,patiencediff.py,_patiencediff_py.py}
python2 setup.py build
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
# bash-completion
install -D -m644 contrib/bash/bzr ${pkgdir}/etc/bash_completion.d/bzr
install -D -m644 contrib/bash/bzr "${pkgdir}/etc/bash_completion.d/bzr"
}

View File

@ -1,40 +0,0 @@
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- bzrlib/transport/http/_urllib2_wrappers.py 2010-05-08 05:56:28 +0000
+++ bzrlib/transport/http/_urllib2_wrappers.py 2010-09-15 02:43:44 +0000
@@ -75,6 +75,26 @@
)
+class addinfourl(urllib2.addinfourl):
+ '''Replacement addinfourl class compatible with python-2.7's xmlrpclib
+
+ In python-2.7, xmlrpclib expects that the response object that it receives
+ has a getheader method. httplib.HTTPResponse provides this but
+ urllib2.addinfourl does not. Add the necessary functions here, ported to
+ use the internal data structures of addinfourl.
+ '''
+
+ def getheader(self, name, default=None):
+ if self.headers is None:
+ raise httplib.ResponseNotReady()
+ return self.headers.getheader(name, default)
+
+ def getheaders(self):
+ if self.headers is None:
+ raise httplib.ResponseNotReady()
+ return self.headers.items()
+
+
class _ReportingFileSocket(object):
def __init__(self, filesock, report_activity=None):
@@ -656,7 +676,7 @@
r = response
r.recv = r.read
fp = socket._fileobject(r, bufsize=65536)
- resp = urllib2.addinfourl(fp, r.msg, req.get_full_url())
+ resp = addinfourl(fp, r.msg, req.get_full_url())
resp.code = r.status
resp.msg = r.reason
resp.version = r.version