From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5C8EA13877A for ; Mon, 18 Aug 2014 23:16:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6087FE095A; Mon, 18 Aug 2014 23:16:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 960A2E095A for ; Mon, 18 Aug 2014 23:16:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88B5F3400EB for ; Mon, 18 Aug 2014 23:16:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D42A538D2 for ; Mon, 18 Aug 2014 21:59:39 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1407855995.0ed14e747f220c560f1ac5a0b90f88a23366cb69.robbat2@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools-uclibc/ X-VCS-Repository: proj/releng X-VCS-Files: tools-uclibc/common.sh tools-uclibc/run-armv7a.sh tools-uclibc/run-mips32r2.sh tools-uclibc/run-mipsel3.sh tools-uclibc/run.sh X-VCS-Directories: tools-uclibc/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 0ed14e747f220c560f1ac5a0b90f88a23366cb69 X-VCS-Branch: master Date: Mon, 18 Aug 2014 21:59:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f13e426f-ec2f-4ecc-992d-f30a1a0968fb X-Archives-Hash: a6d6b9dd0fb6573a2cbb5aa2f9e87f7f commit: 0ed14e747f220c560f1ac5a0b90f88a23366cb69 Author: Anthony G. Basile gentoo org> AuthorDate: Tue Aug 12 15:06:35 2014 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Aug 12 15:06:35 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=0ed14e74 tools-uclibc: pull out common code in run scripts and add parallel builds --- tools-uclibc/{run.sh => common.sh} | 62 ++------------------------------ tools-uclibc/run-armv7a.sh | 61 +++---------------------------- tools-uclibc/run-mips32r2.sh | 61 +++---------------------------- tools-uclibc/run-mipsel3.sh | 61 +++---------------------------- tools-uclibc/run.sh | 73 +++++--------------------------------- 5 files changed, 22 insertions(+), 296 deletions(-) diff --git a/tools-uclibc/run.sh b/tools-uclibc/common.sh old mode 100755 new mode 100644 similarity index 52% copy from tools-uclibc/run.sh copy to tools-uclibc/common.sh index b1b8211..d1350d2 --- a/tools-uclibc/run.sh +++ b/tools-uclibc/common.sh @@ -4,6 +4,7 @@ source /etc/catalyst/catalyst.conf mydate=`date +%Y%m%d` + undo_grsec() { [[ -d /proc/sys/kernel/grsecurity ]] || return for i in /proc/sys/kernel/grsecurity/chroot_* ; do @@ -11,37 +12,6 @@ undo_grsec() { done } -prepare_confs() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - - local cstage=stage${s} - local p=$(( s - 1 )) - [[ $p == 0 ]] && p=3 - local pstage=stage${p} - - local parch="${arch}" - [[ "${arch}" == "i686" ]] && parch="x86" - - local tarch="${arch}" - [[ "${arch}" == "amd64" ]] && tarch="x86_64" - - cat stage-all.conf.template | \ - sed -e "s:\(^version_stamp.*$\):\1-${mydate}:" \ - -e "s:CSTAGE:${cstage}:g" \ - -e "s:PSTAGE:${pstage}:g" \ - -e "s:SARCH:${arch}:g" \ - -e "s:PARCH:${parch}:g" \ - -e "s:TARCH:${tarch}:g" \ - -e "s:FLAVOR:${flavor}:g" \ - -e "s:MYCATALYST:$(pwd):g" \ - > stage${s}-${arch}-uclibc-${flavor}.conf - done - - sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf -} banner() { cat << EOF | tee -a zzz.log > stage$1-$2-uclibc-$3.log @@ -65,7 +35,7 @@ do_stages() { if [[ ! -f "${tgpath}/${tglink}" ]]; then touch stage${s}-${arch}-uclibc-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ + echo "!!! ${tglink} at ${tgpath} doesn't exist" \ | tee -a zzz.log \ > stage${s}-${arch}-uclibc-${flavor}.err return 1 @@ -90,31 +60,3 @@ do_stages() { return 0 } - - -main() { - >zzz.log - - undo_grsec - - catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err - - for arch in amd64 i686; do - for flavor in hardened vanilla; do - prepare_confs ${arch} ${flavor} - done - done - - for arch in amd64 i686; do - for flavor in hardened vanilla; do - do_stages ${arch} ${flavor} - ret=$? - if [[ $? == 1 ]]; then - echo "FAILURE at ${arch} ${flavor} " | tee zzz.log - return 1 - fi - done - done -} - -main $1 & diff --git a/tools-uclibc/run-armv7a.sh b/tools-uclibc/run-armv7a.sh index 7a248f5..13b684f 100755 --- a/tools-uclibc/run-armv7a.sh +++ b/tools-uclibc/run-armv7a.sh @@ -1,8 +1,6 @@ #!/bin/bash -source /etc/catalyst/catalyst.conf - -mydate=`date +%Y%m%d` +source common.sh prepare_confs() { local arch=$1 @@ -42,54 +40,6 @@ prepare_confs() { sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-uclibc-$3.log - -************************************************************************ -* stage$1-$2-uclibc-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/uclibc/${flavor}/${arch}" - local target="stage${s}-${arch}-uclibc-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-uclibc-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-uclibc-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-uclibc-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.log \ - 2> stage${s}-${arch}-uclibc-${flavor}.err - - if [[ -f "${tgpath}/${target}" ]]; then - rm -f "${tgpath}/${tglink}" - ln -s ${target} "${tgpath}/${tglink}" - else - echo "!!! ${target} was not generated" \ - | tee -a zzz.log \ - >stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - done - - return 0 -} - main() { >zzz.log @@ -101,15 +51,12 @@ main() { prepare_confs ${arch} ${flavor} done done - + + # No parallelization for arm. Its too hard on the cpu! for arch in armv7a_hardfp armv7a; do for flavor in hardened vanilla; do do_stages ${arch} ${flavor} - ret=$? - if [[ $? == 1 ]]; then - echo "FAILURE at ${arch} ${flavor} " | tee zzz.log - return 1 - fi + [[ $? == 1 ]] && echo "FAILURE at ${arch} ${flavor} " | tee zzz.log done done } diff --git a/tools-uclibc/run-mips32r2.sh b/tools-uclibc/run-mips32r2.sh index 8829b3d..3655549 100755 --- a/tools-uclibc/run-mips32r2.sh +++ b/tools-uclibc/run-mips32r2.sh @@ -1,8 +1,6 @@ #!/bin/bash -source /etc/catalyst/catalyst.conf - -mydate=`date +%Y%m%d` +source common.sh prepare_confs() { local arch=$1 @@ -32,54 +30,6 @@ prepare_confs() { sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-uclibc-$3.log - -************************************************************************ -* stage$1-$2-uclibc-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/uclibc/${flavor}/${arch}" - local target="stage${s}-${arch}-uclibc-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-uclibc-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-uclibc-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-uclibc-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.log \ - 2> stage${s}-${arch}-uclibc-${flavor}.err - - if [[ -f "${tgpath}/${target}" ]]; then - rm -f "${tgpath}/${tglink}" - ln -s ${target} "${tgpath}/${tglink}" - else - echo "!!! ${target} was not generated" \ - | tee -a zzz.log \ - >stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - done - - return 0 -} - main() { >zzz.log @@ -91,15 +41,12 @@ main() { prepare_confs ${arch} ${flavor} done done - + + # No parallelization for mips. Its too hard on the cpu! for arch in mips32r2; do for flavor in hardened vanilla; do do_stages ${arch} ${flavor} - ret=$? - if [[ $? == 1 ]]; then - echo "FAILURE at ${arch} ${flavor} " | tee zzz.log - return 1 - fi + [[ $? == 1 ]] && echo "FAILURE at ${arch} ${flavor} " | tee zzz.log done done } diff --git a/tools-uclibc/run-mipsel3.sh b/tools-uclibc/run-mipsel3.sh index 510639c..4b70bed 100755 --- a/tools-uclibc/run-mipsel3.sh +++ b/tools-uclibc/run-mipsel3.sh @@ -1,8 +1,6 @@ #!/bin/bash -source /etc/catalyst/catalyst.conf - -mydate=`date +%Y%m%d` +source common.sh prepare_confs() { local arch=$1 @@ -32,54 +30,6 @@ prepare_confs() { sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-uclibc-$3.log - -************************************************************************ -* stage$1-$2-uclibc-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/uclibc/${flavor}/${arch}" - local target="stage${s}-${arch}-uclibc-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-uclibc-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-uclibc-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-uclibc-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.log \ - 2> stage${s}-${arch}-uclibc-${flavor}.err - - if [[ -f "${tgpath}/${target}" ]]; then - rm -f "${tgpath}/${tglink}" - ln -s ${target} "${tgpath}/${tglink}" - else - echo "!!! ${target} was not generated" \ - | tee -a zzz.log \ - >stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - done - - return 0 -} - main() { >zzz.log @@ -91,15 +41,12 @@ main() { prepare_confs ${arch} ${flavor} done done - + + # No parallelization for mips. Its too hard on the cpu! for arch in mipsel3; do for flavor in hardened vanilla; do do_stages ${arch} ${flavor} - ret=$? - if [[ $? == 1 ]]; then - echo "FAILURE at ${arch} ${flavor} " | tee zzz.log - return 1 - fi + [[ $? == 1 ]] && echo "FAILURE at ${arch} ${flavor} " | tee zzz.log done done } diff --git a/tools-uclibc/run.sh b/tools-uclibc/run.sh index b1b8211..ed0a14f 100755 --- a/tools-uclibc/run.sh +++ b/tools-uclibc/run.sh @@ -1,15 +1,6 @@ #!/bin/bash -source /etc/catalyst/catalyst.conf - -mydate=`date +%Y%m%d` - -undo_grsec() { - [[ -d /proc/sys/kernel/grsecurity ]] || return - for i in /proc/sys/kernel/grsecurity/chroot_* ; do - echo 0 > $i - done -} +source common.sh prepare_confs() { local arch=$1 @@ -43,54 +34,6 @@ prepare_confs() { sed -i "/^chost/d" stage3-${arch}-uclibc-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-uclibc-$3.log - -************************************************************************ -* stage$1-$2-uclibc-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/uclibc/${flavor}/${arch}" - local target="stage${s}-${arch}-uclibc-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-uclibc-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-uclibc-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-uclibc-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-uclibc-${flavor}.log \ - 2> stage${s}-${arch}-uclibc-${flavor}.err - - if [[ -f "${tgpath}/${target}" ]]; then - rm -f "${tgpath}/${tglink}" - ln -s ${target} "${tgpath}/${tglink}" - else - echo "!!! ${target} was not generated" \ - | tee -a zzz.log \ - >stage${s}-${arch}-uclibc-${flavor}.err - return 1 - fi - done - - return 0 -} - main() { >zzz.log @@ -104,15 +47,15 @@ main() { prepare_confs ${arch} ${flavor} done done - + + # The parallelization `( do_stages ... ) &` doesn't work here + # if catalyst is using snapcache, bug #519656 for arch in amd64 i686; do for flavor in hardened vanilla; do - do_stages ${arch} ${flavor} - ret=$? - if [[ $? == 1 ]]; then - echo "FAILURE at ${arch} ${flavor} " | tee zzz.log - return 1 - fi + ( + do_stages ${arch} ${flavor} + [[ $? == 1 ]] && echo "FAILURE at ${arch} ${flavor} " | tee zzz.log + ) & done done }