From: David Marec Date: Sat, 14 Oct 2017 17:11:47 +0000 (+0200) Subject: First issue X-Git-Url: http://popeye.lapinbilly.eu/git/?p=fbsd-stable-mgmt.git;a=commitdiff_plain;h=a334edfe5246e8c012e02fac0db3b8b0e0ecfa23 First issue --- diff --git a/update_stage0.sh b/update_stage0.sh new file mode 100755 index 0000000..2a299b5 --- /dev/null +++ b/update_stage0.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +usage() { + echo 'Usage: ...' + echo '-u svn update' + echo '-j jobs to be handled' + echo 'default to ' ${jarg} + echo '---------------------' +} + +parse() { + RED='\033[0;31m' + NC='\033[0m' # No Color + while getopts "uj:" option + do + case ${option} in + u) + update="1" + ;; + j) + case ${OPTARG} in + (*[!0-9]*|'') + echo -e "${RED}number expected for jobs${NC}; default value used." + ;; + (*) + jarg=${OPTARG} + ;; + esac + ;; + esac + done +} + + +jarg=`sysctl -n hw.ncpu` + + +if [ $? -ne 0 ] +then + usage +else + parse ${*} +fi + +[ ${update} ] && svn update /usr/src + +echo Cleaning +chflags -R noschg /usr/obj/* && rm -rf /usr/obj +echo building process on ${jarg} jobs +cd /usr/src && \ +make -j${jarg} buildworld && make -j${jarg} kernel KERNCONF=PEPINS && \ +echo "Reboot the system." + + diff --git a/update_stage1.sh b/update_stage1.sh new file mode 100755 index 0000000..c4a0442 --- /dev/null +++ b/update_stage1.sh @@ -0,0 +1,20 @@ +#!/bin/sh +zfs_mount() +{ +echo Mount zfs disk +zfs set readonly=off llroot +zfs mount -a +adjkerntz -i +/etc/rc.d/syscons start +} + + +mountro=`zfs get -H readonly llroot/ROOT/master | cut -w -f 3` +[ ${mountro} = "on" ] && zfs_mount +mergemaster -p +cd /usr/src && \ +make installworld && \ +mergemaster -iF && \ +make delete-old && \ +echo "reboot to delete old libs" + diff --git a/update_stagep.sh b/update_stagep.sh new file mode 100755 index 0000000..ed637bd --- /dev/null +++ b/update_stagep.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +usage() { + echo 'Usage: ...' + echo '-u svn update' + echo '-j jobs to be handled' + echo 'default to ' ${jarg} + echo '---------------------' +} + +parse() { + RED='\033[0;31m' + NC='\033[0m' # No Color + while getopts "uj:" option + do + case ${option} in + u) + update="1" + ;; + j) + case ${OPTARG} in + (*[!0-9]*|'') + echo -e "${RED}number expected for jobs${NC}; default value used." + ;; + (*) + jarg=${OPTARG} + ;; + esac + ;; + esac + done +} + + +jarg=`sysctl -n hw.ncpu` + + +if [ $? -ne 0 ] +then + usage +else + parse ${*} +fi + +echo "Updating port Tree" + +[ ${update} ] && poudriere ports -p HEAD -u + +echo "building lapinbilly" + +poudriere bulk -J ${jarg} -j lapinbilly -p HEAD -f /usr/local/etc/poudriere.d/port-list + +echo "building llanura" + +poudriere bulk -J ${jarg} -j release11 -p HEAD -f /usr/local/etc/poudriere.d/port-list-llanura