Update of /cvsroot/devil-linux/build/scripts
In directory vz-cvs-3.sog:/tmp/cvs-serv24054/scripts
Modified Files:
grub
Log Message:
downgrade grub
Index: grub
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/grub,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- grub 2 Nov 2011 14:03:41 -0000 1.20
+++ grub 2 Nov 2011 19:07:53 -0000 1.21
@@ -1,5 +1,12 @@
#!/bin/bash
+# $Source$
+# $Revision$
+# $Date$
#
+# http://www.devil-linux.org
+
+# you need the next line, otherwise script won't be executed !!!
+# DL-build-system v3
# get the directoryname of the script
MYDIR=${0%/*}
@@ -9,23 +16,26 @@
MYNAME="GRUB"
-# more problems with grub.....
-exit 0
-
-# grub currently doesn't want to compile
-if [ "$CONFIG_CPU" = "x86_64" ]; then
- exit 0
-fi
-
case $1 in
build )
- #patch_from_file 0 $SRCDIR/grub-hide-startup.patch || exit 1
+ patch_from_dir ../grub-patches
- ./configure --prefix=/usr --sysconfdir=/etc --disable-grub-emu-usb --enable-device-mapper \
- --disable-efiemu --enable-efiemu=no --disable-werror --disable-nls --target=x86_64 --with-platform=pc || exit 1
+ if [ "$CONFIG_GCC_HARDENED" = "y" ]; then
+ export CC="gcc -fno-stack-protector -fno-pic -fno-pie -nopie"
+ fi
+ CFLAGS="-static ${CFLAGS}"
+ export CFLAGS
+ #autoreconf --install --force
+ aclocal
+ automake
+ autoconf
+ ./configure --prefix=/usr --sbindir=/sbin --disable-auto-linux-mem-opt
make $PMAKE || exit 1
-
+ pushd grub > /dev/null || exit 1
+ rm -f grub
+ make $PMAKE LDFLAGS="-static -Wl,-z,noexecstack" || exit 1
+ popd > /dev/null || exit 1
strip_debug
;;
@@ -33,15 +43,15 @@
rm -rf $TMPDIR || exit 1
mkdir -p $TMPDIR || exit 1
make install DESTDIR=$TMPDIR || exit 1
+ paxctl -p -s -m -x -e -r $TMPDIR/sbin/grub || exit 1
copy_docs $TMPDIR
- rm -rf $TMPDIR/etc/bash_completion.d
- rm -f $TMPDIR/etc/grub.d/40_custom
- cp -dpvR $TMPDIR/etc/* $ETCDIR/etc || exit 1
- rm -rf $TMPDIR/etc || exit 1
- cp -dpvR $TMPDIR/* $CDDIR/ || exit 1
- mkdir -p $CDDIR/boot/grub
- cp -dpvR $TMPDIR/usr/lib/grub/i386-pc/* $CDDIR/boot/grub/ || exit 1
- rm -rf $TMPDIR || exit 1
+ mkdir -p $CDDIR/sbin
+ cp -dpvR $TMPDIR/sbin/* $CDDIR/sbin/ || exit 1
+ cp -dpvR $TMPDIR/usr/lib $CDDIR/usr/ || exit 1
+ mkdir -p $CDDIR/boot/grub
+ cp -dpvR $TMPDIR/usr/lib/grub/i386-pc/* $CDDIR/boot/grub/ || exit 1
+ cp -p $DL_DIR/other/devil-linux.xpm.gz $CDDIR/boot/grub/ || exit 1
+ rm -rf $TMPDIR || exit 1
;;
* )
|