system/grub2: Updated for version 1.99.

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
crocket 2011-07-12 05:10:46 -04:00 committed by Niels Horn
parent f9137a32d6
commit e73830f364
8 changed files with 41 additions and 2662 deletions

View file

@ -1,61 +0,0 @@
#!/bin/bash -e
source /usr/lib/grub/grub-mkconfig_lib
# this allows desktop-base to override our settings
f=/usr/share/desktop-base/grub_background.sh
if test -e ${f} ; then
source ${f}
else
WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"
COLOR_NORMAL="white/black"
COLOR_HIGHLIGHT="white/light-gray"
fi
set_mono_theme()
{
cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
EOF
}
# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
if is_path_readable_by_grub $i ; then
bg=$i
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
if test -e /boot/grub/${reader}.mod ; then
echo "Found background image: `basename ${bg}`" >&2
use_bg=true
break
fi
fi
done
fi
# set the background if possible
if ${use_bg} ; then
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=${COLOR_NORMAL}
set color_highlight=${COLOR_HIGHLIGHT}
else
EOF
fi
# otherwise, set a monochromatic theme for Ubuntu
if ${use_bg} ; then
set_mono_theme | sed -e "s/^/ /g"
echo "fi"
else
set_mono_theme
fi

View file

@ -2,8 +2,12 @@ GRUB2 (the GRand Unified Bootloader)
GNU GRUB is a multiboot boot loader.
If you want to set the size of font then give FONT_SIZE=size
option to the list of build options.
The default size is 16.
If you want to set the size of gfxterm font,
then specify FONT_SIZE=size in the build options.
The default size is 19.
If you want to install grub2 on GPT,
you need to put a BIOS boot partition on GPT.
This requires os-prober, gnu-unifont, and help2man.

View file

@ -10,3 +10,5 @@ config() {
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/default/grub.new

View file

@ -6,15 +6,7 @@ GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=$( sed 's/Slackware /Slackware-/' /etc/slackware-version )
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
# Added by crocket
# VESA display mode code
# Example: GRUB_CMDLINE_LINUX="vga=xxx"
# If you want to know vesa display mode codes for linux
# Visit http://en.wikipedia.org/wiki/VESA_BIOS_Extensions#Linux_video_mode_numbers
# or http://www.gregfolkert.net/info/vesa-display-codes.html
# gfxpayload=1024x768(e.g,) can be used safely in future releases of grub2.
# please refer to the information displayed by executing "info grub".
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
# Uncomment to disable graphical terminal (grub-pc only)

File diff suppressed because it is too large Load diff

View file

@ -2,20 +2,19 @@
# Slackware build script for grub2
# Written by crocket (crockabiscuit@yahoo.com)
# Written by crocket (crockabiscuit@gmail.com)
PRGNAM=grub2
ARCNAM=grub
VERSION=${VERSION:-1.98}
BUILD=${BUILD:-2}
VERSION=${VERSION:-1.99}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
ARCNAM=grub
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@ -25,7 +24,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
FONT_SIZE=${FONT_SIZE:-16}
FONT_SIZE=${FONT_SIZE:-19}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@ -34,7 +33,9 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
# -fPIC generates errors with grub2 1.99
# SLKCFLAGS="-O2 -fPIC"
SLKCFLAGS="-O2"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
@ -47,7 +48,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $ARCNAM-$VERSION
tar xvf $CWD/$ARCNAM-$VERSION.tar.gz
tar xvf $CWD/$ARCNAM-$VERSION.tar.xz
cd $ARCNAM-$VERSION
chown -R root:root .
find . \
@ -62,6 +63,7 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--infodir=/usr/info \
--mandir=/usr/man \
--build=$ARCH-slackware-linux \
@ -69,30 +71,26 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
# Copy grub files from ubuntu.
mkdir -p $PKG/etc/default
cat $CWD/etc.default.grub > $PKG/etc/default/grub
sed "s#/usr/lib#/usr/lib${LIBDIRSUFFIX}#" \
$CWD/05_debian_theme > $PKG/etc/grub.d/05_debian_theme
cat $CWD/etc.default.grub > $PKG/etc/default/grub.new
# Don't strip the files because it breaks module loading.
#find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
# | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/bin | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/sbin | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# convert gnu-unifont to a font useable by grub2 gfxterm.
$PKG/usr/bin/grub-mkfont -o $PKG/usr/share/grub/unifont.pf2 -abv \
-s $FONT_SIZE /usr/share/fonts/TTF/unifont.ttf
# Copy a snapshot version of grub2 info since the current version's is deficient.
cat $CWD/grub.INFO > $PKG/usr/info/grub.info
gzip -9 $PKG/usr/info/*.info*
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $(find $PKG/usr/man -type l); do ln -s $(readlink $i).gz $i.gz; rm $i; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO docs/grub.cfg \
cp -a ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@ -102,11 +100,12 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Add .new extension to all configuration files
# and add them to doinst.sh
for file in $(find $PKG/etc -type f)
for file in $(find $PKG/etc -type f -perm -444)
do
mv $file $file.new
chmod -x $file.new # leaving execution permission is dangerous
echo config ${file#$PKG/}.new >> $PKG/install/doinst.sh
# This leads grub-mkconfig to abnormal behaviors.
# chmod -x $file.new
echo "config ${file#$PKG/}.new" >> $PKG/install/doinst.sh
done
cd $PKG

View file

@ -1,10 +1,10 @@
PRGNAM="grub2"
VERSION="1.98"
VERSION="1.99"
HOMEPAGE="http://www.gnu.org/software/grub/"
DOWNLOAD="ftp://alpha.gnu.org/gnu/grub/grub-1.98.tar.gz"
MD5SUM="c0bcf60e524739bb64e3a2d4e3732a59"
DOWNLOAD="ftp://ftp.gnu.org/gnu/grub/grub-1.99.tar.xz"
MD5SUM="27e360b951f006c464299d06bbd63442"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="crocket"
EMAIL="crockabiscuit@yahoo.com"
EMAIL="crockabiscuit@gmail.com"
APPROVED="dsomero"

View file

@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
grub2: GRUB (the GRand Unified Bootloader)
grub2: GRUB2 (the GRand Unified Bootloader)
grub2:
grub2: GNU GRUB is a multiboot boot loader.
grub2:
grub2: os-prober is needed to detect OSes on other partitions.
grub2: Website: http://www.gnu.org/software/grub/
grub2:
grub2:
grub2:
grub2:
grub2: unifont is required since graphical terminal uses unifont.
grub2: Graphical terminal displays background images on grub.
grub2:
grub2: The website of grub is http://www.gnu.org/software/grub/
grub2: