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 0528713877A for ; Sat, 28 Jun 2014 10:43:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97F6EE08A8; Sat, 28 Jun 2014 10:43:28 +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 3562FE08A8 for ; Sat, 28 Jun 2014 10:43:28 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 304AE3400F3 for ; Sat, 28 Jun 2014 10:43:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E2BDB19205 for ; Sat, 28 Jun 2014 10:43:24 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1403952244.54ad5b197e26018a804b912e95485b50600bc5cc.blueness@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools-musl/ X-VCS-Repository: proj/releng X-VCS-Files: tools-musl/common.sh tools-musl/run-armv7a.sh tools-musl/run-mipsel3.sh tools-musl/run.sh X-VCS-Directories: tools-musl/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 54ad5b197e26018a804b912e95485b50600bc5cc X-VCS-Branch: master Date: Sat, 28 Jun 2014 10:43:24 +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: 14ae4f26-b5ee-4b16-a75d-3aa8c67c70bf X-Archives-Hash: 584016e007ddf6492ab588b84a41b4f3 commit: 54ad5b197e26018a804b912e95485b50600bc5cc Author: Anthony G. Basile gentoo org> AuthorDate: Sat Jun 28 10:44:04 2014 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Jun 28 10:44:04 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=54ad5b19 tools-musl: pull out code in run scripts --- tools-musl/{run.sh => common.sh} | 60 +--------------------------------------- tools-musl/run-armv7a.sh | 52 +--------------------------------- tools-musl/run-mipsel3.sh | 51 +--------------------------------- tools-musl/run.sh | 59 +-------------------------------------- 4 files changed, 4 insertions(+), 218 deletions(-) diff --git a/tools-musl/run.sh b/tools-musl/common.sh old mode 100755 new mode 100644 similarity index 53% copy from tools-musl/run.sh copy to tools-musl/common.sh index 55651d1..2420b85 --- a/tools-musl/run.sh +++ b/tools-musl/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}-musl-${flavor}.conf - done - - sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf -} banner() { cat << EOF | tee -a zzz.log > stage$1-$2-musl-$3.log @@ -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 vanilla hardened; do - prepare_confs ${arch} ${flavor} - done - done - - for arch in amd64 i686; do - for flavor in vanilla hardened; 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-musl/run-armv7a.sh b/tools-musl/run-armv7a.sh index f170931..ad4fa3a 100755 --- a/tools-musl/run-armv7a.sh +++ b/tools-musl/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}-musl-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-musl-$3.log - -************************************************************************ -* stage$1-$2-musl-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/musl/${flavor}/${arch}" - local target="stage${s}-${arch}-musl-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-musl-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-musl-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ - | tee -a zzz.log \ - > stage${s}-${arch}-musl-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-musl-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-musl-${flavor}.log \ - 2> stage${s}-${arch}-musl-${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}-musl-${flavor}.err - return 1 - fi - done - - return 0 -} - main() { >zzz.log diff --git a/tools-musl/run-mipsel3.sh b/tools-musl/run-mipsel3.sh index 3da4f1c..3d70505 100755 --- a/tools-musl/run-mipsel3.sh +++ b/tools-musl/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 @@ -34,53 +32,6 @@ prepare_confs() { sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-musl-$3.log - -************************************************************************ -* stage$1-$2-musl-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/musl/${flavor}/${arch}" - local target="stage${s}-${arch}-musl-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-musl-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-musl-${flavor}.log - echo "!!! ${target} at ${tgpath} doesn't exit" \ - | tee -a zzz.log \ - > stage${s}-${arch}-musl-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-musl-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-musl-${flavor}.log \ - 2> stage${s}-${arch}-musl-${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}-musl-${flavor}.err - return 1 - fi - done - - return 0 -} main() { diff --git a/tools-musl/run.sh b/tools-musl/run.sh index 55651d1..84609aa 100755 --- a/tools-musl/run.sh +++ b/tools-musl/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}-musl-${flavor}.conf } -banner() { -cat << EOF | tee -a zzz.log > stage$1-$2-musl-$3.log - -************************************************************************ -* stage$1-$2-musl-$3 -************************************************************************" - -EOF -} - - -do_stages() { - local arch=$1 - local flavor=$2 - - for s in 1 2 3; do - local tgpath="${storedir}/builds/musl/${flavor}/${arch}" - local target="stage${s}-${arch}-musl-${flavor}-${mydate}.tar.bz2" - local tglink="stage${s}-${arch}-musl-${flavor}.tar.bz2" - - if [[ ! -f "${tgpath}/${tglink}" ]]; then - touch stage${s}-${arch}-musl-${flavor}.log - echo "!!! ${tglink} at ${tgpath} doesn't exist" \ - | tee -a zzz.log \ - > stage${s}-${arch}-musl-${flavor}.err - return 1 - fi - - banner ${s} ${arch} ${flavor} - catalyst -f stage${s}-${arch}-musl-${flavor}.conf \ - | tee -a zzz.log \ - > stage${s}-${arch}-musl-${flavor}.log \ - 2> stage${s}-${arch}-musl-${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}-musl-${flavor}.err - return 1 - fi - done - - return 0 -} - main() { >zzz.log