[Lunar-commits] r19938 - moonbase/trunk/kernel/linux-2.6-grsec

Moritz Heiber moe at lunar-linux.org
Thu May 4 09:42:35 UTC 2006


Author: moe
Date: 2006-05-04 09:42:35 +0000 (Thu, 04 May 2006)
New Revision: 19938

Modified:
   moonbase/trunk/kernel/linux-2.6-grsec/PRE_BUILD
Log:
Updated grsec's PRE_BUILD to a more up-to-date version



Modified: moonbase/trunk/kernel/linux-2.6-grsec/PRE_BUILD
===================================================================
--- moonbase/trunk/kernel/linux-2.6-grsec/PRE_BUILD	2006-05-04 09:06:48 UTC (rev 19937)
+++ moonbase/trunk/kernel/linux-2.6-grsec/PRE_BUILD	2006-05-04 09:42:35 UTC (rev 19938)
@@ -1,40 +1,39 @@
-cd /usr/src
+# Bail if we're not running a core with kernel functions
 
-SOURCE_DIR_NAME=linux-${VERSION}-grsec
+if [ ! -e $FUNCTIONS/kernel.lunar ] ; then
+  message "${PROBLEM_COLOR}Bailing out, ${DEFAULT_COLOR}Lunar (or theedge) code version too old"
+  message "${PROBLEM_COLOR}Update core ${MODULE_COLOR}(lin lunar or lin theedge)${DEFAULT_COLOR} to install this kernel"
+  exit 1
+fi
 
-if [ ! -d ${SOURCE_DIR_NAME} ]; then
-    
-    rm  -rf  linux-${KERNEL_VERSION}    
-    rm  -rf  linux-${KERNEL_RELEASE}    
-    rm  -rf  linux						
-    
-    unpack  ${SOURCE} 
-    
-    # let's make our source dir have a unique name
-    
-    mv linux-${KERNEL_RELEASE} ${SOURCE_DIR_NAME} &&    
-    ln  -s   ${SOURCE_DIR_NAME}  linux             &&
-    
-    cd  linux/ &&
-    
-    patch_it  ${SOURCE2}  1 &&
-    patch_it  ${SOURCE3}  1 &&
-    
-    for config in .config-2.6-grsec .config.2.6.stable
-    do
-      if [ -f ${CONFIG_CACHE}/${config} ]; then
-         cp $CONFIG_CACHE/${config} /usr/src/linux/.config 
-         break	
-      fi	
-    done
-    
+mk_source_dir $SOURCE_DIRECTORY
+rm -f /usr/src/linux
+ln -sf $SOURCE_DIRECTORY /usr/src/linux
+cd $SOURCE_DIRECTORY
+
+# Check wether we're running an up-to-date tar
+if [ `installed_version tar | cut -d. -f2` -ge 15 ]; then
+  tar xf $SOURCE_CACHE/$SOURCE --no-same-owner \
+  --no-same-permissions --strip-components=1
 else
+  message "${PROBLEM_COLOR}Error:${DEFAULT_COLOR} Please update your tar module"
+  exit 1
+fi
 
-    message "Sources found: /usr/src/${SOURCE_DIR_NAME}" 
-    
-    if [ "`readlink linux`" != "${SOURCE_DIR_NAME}" ]; then
-       rm -rf linux
-       ln -s ${SOURCE_DIR_NAME} linux
-    fi
-    
+# if we have an EXTRA patch, apply it   
+
+if [ -n "${SOURCE2}" ] ; then
+  patch_it  ${SOURCE2}  1
 fi
+
+if [ -n "$SOURCE3}" ] ; then
+  patch_it  ${SOURCE3}  1
+fi
+    
+for config in .config-2.6-grsec .config.2.6.stable
+  do
+    if [ -f ${CONFIG_CACHE}/${config} ]; then
+      cp $CONFIG_CACHE/${config} /usr/src/linux/.config 
+      break	
+    fi	
+done  



More information about the Lunar-commits mailing list