Updated buildscripts (v2.2.8)

Erik-Jan ej.lfs at xs4all.nl
Sun Apr 20 05:09:53 PDT 2003


Erik-Jan wrote:
 
<a lot>

Oops again, left a small debug-thingy in the patch. Removed it now...
-------------- next part --------------
--- build-ch5-2.2.8.sh.orig	Sun Apr 20 13:39:05 2003
+++ build-ch5-2.2.8.sh	Sun Apr 20 14:07:17 2003
@@ -1020,6 +1020,18 @@
       >> ${LOGFILE} 2>&1 &&
 echo " o ALL OK" || echo "XXXXXX NOT OK - CHECK LOGS (${LOGFILE}) XXXXXX"
 
+### COREUTILS/FILEUTILS ###
+
+# Will be running user tests as "plfstest"
+# For chgrp tests the user needs to be in more than one group.
+# we will temporarily add the groups "plfstest" and "plfstest2"
+# and add user "plfstest" to them. Used by both coreutils and fileutils.
+grep ^plfstest: /etc/passwd > /dev/null 2>&1 || 
+	useradd -M -s /bin/sh plfstest &&
+grep ^plfstest: /etc/group > /dev/null 2>&1 || groupadd plfstest &&
+grep ^plfstest2: /etc/group > /dev/null 2>&1 || groupadd plfstest2 &&
+usermod -G plfstest,plfstest2 plfstest &&
+
 # If we are using coreutils, dont install fileutils
 test Y = "${USE_COREUTILS}" &&
 {
@@ -1029,6 +1041,15 @@
    unpack_tarball coreutils-${COREUTILS_VER}
    cd ${PKGDIR}
 
+   # make sure to use a valid shell in tests/rm/fail-2eperm.
+   # only needed in versions <= 4.5.9
+   TESTFILE=tests/rm/fail-2eperm
+   grep 'valid shell' ${TESTFILE} > /dev/null 2>&1 || {
+      cp ${TESTFILE}{,.bak}
+      sed 's%su -c%su --shell=/bin/sh -c%' ${TESTFILE}.bak > ${TESTFILE}
+      rm ${TESTFILE}.bak
+   }
+
    max_log_init Coreutils initial "(shared)" ${CONFLOGS} ${LOG}
    CFLAGS="-O2 -pipe" ./configure --prefix=/stage1  \
       >> ${LOGFILE} 2>&1 &&
@@ -1044,21 +1065,16 @@
    make check-root \
       >>  ${LOGFILE} 2>&1 &&
    echo " o Root Tests OK" &&
+   echo -e "\n${BRKLN}" >> ${LOGFILE} &&
 
-   # Will be running user tests as "nobody"
-   # For chgrp tests the user needs to be in more than one group.
-   # we will temporarily add the group "plfstest" and add nobody to it
-   groupadd plfstest &&
-   usermod -G plfstest nobody &&
+   # set permissions  
+   chown -R plfstest:plfstest tests &&
 
    echo -e "\n User Tests \n------------" >> ${LOGFILE} &&
-   su nobody -c "env RUN_EXPENSIVE_TESTS=yes make check" \
+   su plfstest -c "env RUN_EXPENSIVE_TESTS=yes make check" \
       >>  ${LOGFILE} 2>&1 &&
    echo " o User Tests OK" || echo "XXXXXX NOT OK - CHECK LOGS (${LOGFILE}) XXXXXX"
 
-   # Remove plfstest group
-   groupdel plfstest 
-
    min_log_init ${INSTLOGS} &&
    make install \
       >> ${LOGFILE} 2>&1 &&
@@ -1082,9 +1098,19 @@
    echo " o Build OK" &&
 
    min_log_init ${TESTLOGS} &&
-   make check \
+   echo -e "\n Root Tests \n------------" >> ${LOGFILE} &&
+   make check-root \
       >>  ${LOGFILE} 2>&1 &&
-   echo " o Test OK" &&
+   echo " o Root Tests OK" &&
+   echo -e "\n${BRKLN}" >> ${LOGFILE} &&
+
+   # set permissions
+   chown -R plfstest:plfstest tests &&
+
+   echo -e "\n User Tests \n------------" >> ${LOGFILE} &&
+   su plfstest -c "env RUN_EXPENSIVE_TESTS=yes make check" \
+      >>  ${LOGFILE} 2>&1 &&
+   echo " o User Tests OK" || echo "XXXXXX NOT OK - CHECK LOGS (${LOGFILE}) XXXXXX"
 
    min_log_init ${INSTLOGS} &&
    make install \
@@ -1092,6 +1118,11 @@
    echo " o ALL OK" || echo "XXXXXX NOT OK - CHECK LOGS (${LOGFILE}) XXXXXX"
 }
 
+# Remove plfstest user and groups 
+grep ^plfstest: /etc/passwd > /dev/null 2>&1 && userdel plfstest
+grep ^plfstest: /etc/group > /dev/null 2>&1 && groupdel plfstest
+grep ^plfstest2: /etc/group > /dev/null 2>&1 && groupdel plfstest2
+
 ### BZIP2 ###
 # export BZIP2_VER=1.0.2
 cd ${SRC}


More information about the lfs-dev mailing list