Update of /cvsroot/devil-linux/build/scripts
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13379/scripts
Modified Files:
Tag: rel-1-2-patches
grsecurity prepare
Log Message:
- removed remains of kernel 2.6 support from 1.2 series (fl)
- updated gradm to 2.1.8-200601212342 (fl)
- patched grsecurity so it applies on top of kernel 2.4.32-hf (fl)
- updated grsecurity to 2.1.8-2.4.32-200601211647 (fl)
- kernel 2.4.32-hf32.5 panics on boot so up to 2.4.32-hf32.6 (fl)
- added kernel hotfix patches so we run kernel 2.4.32-hf32.5 (fl)
Index: grsecurity
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/grsecurity,v
retrieving revision 1.20.2.5
retrieving revision 1.20.2.6
diff -u -d -r1.20.2.5 -r1.20.2.6
--- grsecurity 19 Jun 2005 13:54:12 -0000 1.20.2.5
+++ grsecurity 27 May 2006 13:30:04 -0000 1.20.2.6
@@ -25,15 +25,45 @@
GRADMDIR=$(find_src_dir gradm)
+# the crude way: apply a patch to the file grsecurity.patch
+apply_patch2grsecurity_patch () {
+ local PATCHFILE=$1
+ bzcat ${PATCHFILE} | \
+ sed \
+ -e 's/^--- grsecurity.*/--- grsecurity.patch-org/g' \
+ -e 's/^+++ grsecurity.*/+++ grsecurity.patch/g' | \
+ patch -p0
+}
+
+
case $1 in
build )
if [ "$CONFIG_GRSECURITY" = "y" ] ; then
cd $KERNELDIR
if [ ! -f devil-linux-grsec-kernel-patches.done ]; then
- zcat $DL_DIR/src/grsecurity-2.*$CONFIG_LINUX_VERSION*.patch.gz > grsecurity.patch || exit 1
+ zcat $DL_DIR/src/grsecurity-2.*$CONFIG_LINUX_VERSION*.patch.gz \
+ > grsecurity.patch || exit 1
+ # apply a patch to the patch if there's one
+ PATCHFILE="$(ls $DL_DIR/src/grsecurity-2.*-${CONFIG_LINUX_VERSION}.*-patch2patch.bz2 2>/dev/null)"
+ [ -n "${PATCHFILE}" ] && apply_patch2grsecurity_patch ${PATCHFILE} || exit 1
if [ ! "$CONFIG_VHZ" = "OFF" ]; then
- bzcat $DL_DIR/src/grsecurity-kernel-vhz1.patch.bz2 |sed -e 's/^--- grsecurity.*/--- grsecurity.patch.old/g' -e 's/^+++ grsecurity.*/+++ grsecurity.patch/g' | patch -p0 || exit 1
+ PATCHFILE="$(ls $DL_DIR/src/grsecurity-kernel-vhz1.patch.bz2 2>/dev/null)"
+ [ -n "${PATCHFILE}" ] && apply_patch2grsecurity_patch ${PATCHFILE} || exit 1
fi
+ # patch kernel version inside patch so this patch applies cleanly
+ eval $(grep ^EXTRAVERSION Makefile | tr -d ' ')
+ eval $(grep ^\+EXTRAVERSION grsecurity.patch | tr -d ' ' | \
+ sed -e "s/+\(EXTRAVERSION\)/GRSEC_\1/")
+ cat <<-EOF | patch -p0 | exit 1
+ --- grsecurity.patch
+ +++ grsecurity.patch
+ @@ -974,2 +974,2 @@
+ --EXTRAVERSION =
+ -+EXTRAVERSION = ${GRSEC_EXTRAVERSION}
+ +-EXTRAVERSION = ${EXTRAVERSION}
+ ++EXTRAVERSION = ${EXTRAVERSION}${GRSEC_EXTRAVERSION}
+ EOF
+ # finally apply grsecurity patch to kernel tree
cat grsecurity.patch | patch -p1 || exit 1
if [ ! "$CONFIG_VHZ" = "OFF" ]; then
bzcat $DL_DIR/src/grsecurity-kernel-vhz2.patch.bz2 | patch -p0 || exit 1
@@ -49,10 +79,11 @@
# compile the admin program
cd $GRADMDIR || exit 1
- if [ ! -f devil-linux-patches.done ]; then
- bzcat $DL_DIR/src/gradm-distro.diff.bz2 | patch -p1
- touch devil-linux-patches.done
- fi
+ # currently no need to patch gradm (FL - 20060526)
+ #if [ ! -f devil-linux-patches.done ]; then
+ # bzcat $DL_DIR/src/gradm-distro.diff.bz2 | patch -p1 || exit 1
+ # touch devil-linux-patches.done
+ #fi
make $PMAKE all || exit 1
strip_debug
Index: prepare
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/prepare,v
retrieving revision 1.46.2.3
retrieving revision 1.46.2.4
diff -u -d -r1.46.2.3 -r1.46.2.4
--- prepare 13 Dec 2005 09:51:26 -0000 1.46.2.3
+++ prepare 27 May 2006 13:30:04 -0000 1.46.2.4
@@ -125,10 +125,12 @@
if [ ! -f devil-linux-kernel-patches.done ]; then
touch devil-linux-kernel-patches.done
- for PATCH in $(ls $WORKDIR/kernel-patches-$CONFIG_LINUX_VERSION/* 2> /dev/null )
+ PATCHDIR="$WORKDIR/kernel-patches-$CONFIG_LINUX_VERSION"
+ for PATCH in $(cd ${PATCHDIR}; ls * 2> /dev/null )
do
- echo applying patch: $PATCH
- patch -p1 -i $PATCH || exit 1
+ echo applying patch: ${PATCH/#[0-9][0-9]_/}
+ patch -p1 -i ${PATCHDIR}/$PATCH || exit 1
+ echo
done
fi
|