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 8A25E1381F3 for ; Thu, 9 May 2013 21:11:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 61444E084F; Thu, 9 May 2013 21:11:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D67B9E084F for ; Thu, 9 May 2013 21:11:14 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BA66133DED6 for ; Thu, 9 May 2013 21:11:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 58382E506E for ; Thu, 9 May 2013 21:11:12 +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: <1368133848.57e35418478abc16845636fab6857767dc381f06.blueness@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools-uclibc/ X-VCS-Repository: proj/releng X-VCS-Files: tools-uclibc/run.sh tools-uclibc/stage-all.conf.template tools-uclibc/stage1-amd64-uclibc-hardened.conf.template tools-uclibc/stage1-amd64-uclibc-vanilla.conf.template tools-uclibc/stage1-i686-uclibc-hardened.conf.template tools-uclibc/stage1-i686-uclibc-vanilla.conf.template tools-uclibc/stage2-amd64-uclibc-hardened.conf.template tools-uclibc/stage2-amd64-uclibc-vanilla.conf.template tools-uclibc/stage2-i686-uclibc-hardened.conf.template tools-uclibc/stage2-i686-uclibc-vanilla.conf.template tools-uclibc/stage3-amd64-uclibc-hardened.conf.template tools-uclibc/stage3-amd64-uclibc-vanilla.conf.template tools-uclibc/stage3-i686-uclibc-hardened.conf.template tools-uclibc/stage3-i686-uclibc-vanilla.conf.template X-VCS-Directories: tools-uclibc/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 57e35418478abc16845636fab6857767dc381f06 X-VCS-Branch: master Date: Thu, 9 May 2013 21:11:12 +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: 4a842548-91ec-4c58-a0b9-c7b59fc4ba36 X-Archives-Hash: 5d0b3727cc458a4a01edeed0263664c5 commit: 57e35418478abc16845636fab6857767dc381f06 Author: Anthony G. Basile gentoo org> AuthorDate: Thu May 9 21:10:48 2013 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Thu May 9 21:10:48 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=57e35418 tools-uclibc: improve template logic --- tools-uclibc/run.sh | 60 +++++++++++++------ tools-uclibc/stage-all.conf.template | 9 +++ .../stage1-amd64-uclibc-hardened.conf.template | 9 --- .../stage1-amd64-uclibc-vanilla.conf.template | 9 --- .../stage1-i686-uclibc-hardened.conf.template | 9 --- .../stage1-i686-uclibc-vanilla.conf.template | 9 --- .../stage2-amd64-uclibc-hardened.conf.template | 9 --- .../stage2-amd64-uclibc-vanilla.conf.template | 9 --- .../stage2-i686-uclibc-hardened.conf.template | 9 --- .../stage2-i686-uclibc-vanilla.conf.template | 9 --- .../stage3-amd64-uclibc-hardened.conf.template | 8 --- .../stage3-amd64-uclibc-vanilla.conf.template | 8 --- .../stage3-i686-uclibc-hardened.conf.template | 8 --- .../stage3-i686-uclibc-vanilla.conf.template | 8 --- 14 files changed, 50 insertions(+), 123 deletions(-) diff --git a/tools-uclibc/run.sh b/tools-uclibc/run.sh index e45f7df..4d89f19 100755 --- a/tools-uclibc/run.sh +++ b/tools-uclibc/run.sh @@ -12,6 +12,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 echo 0 > $i done @@ -22,10 +23,31 @@ prepare_confs() { local flavor=$2 for s in 1 2 3; do - cat stage${s}-${arch}-uclibc-${flavor}.conf.template | \ + + 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:MyCatalyst:$(pwd):" > stage${s}-${arch}-uclibc-${flavor}.conf + -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() { @@ -101,13 +123,13 @@ main() { undo_grsec - if [[ "x${pretend}" != "xtest" ]]; then - catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err - else - >snapshot.log - >snapshot.err - echo "PRETEND: catalyst -s current > snapshot.log 2> snapshot.err" - fi +# if [[ "x${pretend}" != "xtest" ]]; then +# catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err +# else +# >snapshot.log +# >snapshot.err +# echo "PRETEND: catalyst -s current > snapshot.log 2> snapshot.err" +# fi for arch in amd64 i686; do for flavor in hardened vanilla; do @@ -115,16 +137,16 @@ main() { done done - for arch in amd64 i686; do - for flavor in hardened vanilla; do - do_stages ${arch} ${flavor} ${pretend} - ret=$? - if [[ $? == 1 ]]; then - echo "FAILURE at ${arch} ${flavor} ${pretend} " | tee zzz.log - return 1 - fi - done - done +# for arch in amd64 i686; do +# for flavor in hardened vanilla; do +# do_stages ${arch} ${flavor} ${pretend} +# ret=$? +# if [[ $? == 1 ]]; then +# echo "FAILURE at ${arch} ${flavor} ${pretend} " | tee zzz.log +# return 1 +# fi +# done +# done if [[ "x${pretend}" == "xtest" ]]; then tree /var/tmp/catalyst/builds diff --git a/tools-uclibc/stage-all.conf.template b/tools-uclibc/stage-all.conf.template new file mode 100644 index 0000000..28bb2d8 --- /dev/null +++ b/tools-uclibc/stage-all.conf.template @@ -0,0 +1,9 @@ +subarch: SARCH +target: CSTAGE +version_stamp: uclibc-FLAVOR +rel_type: FLAVOR/SARCH +profile: hardened/linux/uclibc/PARCH +snapshot: current +source_subpath: FLAVOR/SARCH/PSTAGE-SARCH-uclibc-FLAVOR +chost: TARCH-gentoo-linux-uclibc +portage_confdir: MYCATALYST/portage.SARCH.FLAVOR diff --git a/tools-uclibc/stage1-amd64-uclibc-hardened.conf.template b/tools-uclibc/stage1-amd64-uclibc-hardened.conf.template deleted file mode 100644 index accca1e..0000000 --- a/tools-uclibc/stage1-amd64-uclibc-hardened.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: amd64 -target: stage1 -version_stamp: uclibc-hardened -rel_type: hardened/amd64 -profile: hardened/linux/uclibc/amd64 -snapshot: current -source_subpath: hardened/amd64/stage3-amd64-uclibc-hardened -chost: x86_64-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.amd64.hardened diff --git a/tools-uclibc/stage1-amd64-uclibc-vanilla.conf.template b/tools-uclibc/stage1-amd64-uclibc-vanilla.conf.template deleted file mode 100644 index 4bfc2c7..0000000 --- a/tools-uclibc/stage1-amd64-uclibc-vanilla.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: amd64 -target: stage1 -version_stamp: uclibc-vanilla -rel_type: vanilla/amd64 -profile: hardened/linux/uclibc/amd64 -snapshot: current -source_subpath: vanilla/amd64/stage3-amd64-uclibc-vanilla -chost: x86_64-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.amd64.vanilla diff --git a/tools-uclibc/stage1-i686-uclibc-hardened.conf.template b/tools-uclibc/stage1-i686-uclibc-hardened.conf.template deleted file mode 100644 index 97941d6..0000000 --- a/tools-uclibc/stage1-i686-uclibc-hardened.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: i686 -target: stage1 -version_stamp: uclibc-hardened -rel_type: hardened/i686 -profile: hardened/linux/uclibc/x86 -snapshot: current -source_subpath: hardened/i686/stage3-i686-uclibc-hardened -chost: i686-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.i686.hardened diff --git a/tools-uclibc/stage1-i686-uclibc-vanilla.conf.template b/tools-uclibc/stage1-i686-uclibc-vanilla.conf.template deleted file mode 100644 index 4e60c07..0000000 --- a/tools-uclibc/stage1-i686-uclibc-vanilla.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: i686 -target: stage1 -version_stamp: uclibc-vanilla -rel_type: vanilla/i686 -profile: hardened/linux/uclibc/x86 -snapshot: current -source_subpath: vanilla/i686/stage3-i686-uclibc-vanilla -chost: i686-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.i686.vanilla diff --git a/tools-uclibc/stage2-amd64-uclibc-hardened.conf.template b/tools-uclibc/stage2-amd64-uclibc-hardened.conf.template deleted file mode 100644 index 82b721f..0000000 --- a/tools-uclibc/stage2-amd64-uclibc-hardened.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: amd64 -target: stage2 -version_stamp: uclibc-hardened -rel_type: hardened/amd64 -profile: hardened/linux/uclibc/amd64 -snapshot: current -source_subpath: hardened/amd64/stage1-amd64-uclibc-hardened -chost: x86_64-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.amd64.hardened diff --git a/tools-uclibc/stage2-amd64-uclibc-vanilla.conf.template b/tools-uclibc/stage2-amd64-uclibc-vanilla.conf.template deleted file mode 100644 index 71fb47a..0000000 --- a/tools-uclibc/stage2-amd64-uclibc-vanilla.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: amd64 -target: stage2 -version_stamp: uclibc-vanilla -rel_type: vanilla/amd64 -profile: hardened/linux/uclibc/amd64 -snapshot: current -source_subpath: vanilla/amd64/stage1-amd64-uclibc-vanilla -chost: x86_64-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.amd64.vanilla diff --git a/tools-uclibc/stage2-i686-uclibc-hardened.conf.template b/tools-uclibc/stage2-i686-uclibc-hardened.conf.template deleted file mode 100644 index 59b9acb..0000000 --- a/tools-uclibc/stage2-i686-uclibc-hardened.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: i686 -target: stage2 -version_stamp: uclibc-hardened -rel_type: hardened/i686 -profile: hardened/linux/uclibc/x86 -snapshot: current -source_subpath: hardened/i686/stage1-i686-uclibc-hardened -chost: i686-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.i686.hardened diff --git a/tools-uclibc/stage2-i686-uclibc-vanilla.conf.template b/tools-uclibc/stage2-i686-uclibc-vanilla.conf.template deleted file mode 100644 index 95d85f3..0000000 --- a/tools-uclibc/stage2-i686-uclibc-vanilla.conf.template +++ /dev/null @@ -1,9 +0,0 @@ -subarch: i686 -target: stage2 -version_stamp: uclibc-vanilla -rel_type: vanilla/i686 -profile: hardened/linux/uclibc/x86 -snapshot: current -source_subpath: vanilla/i686/stage1-i686-uclibc-vanilla -chost: i686-gentoo-linux-uclibc -portage_confdir: MyCatalyst/portage.i686.vanilla diff --git a/tools-uclibc/stage3-amd64-uclibc-hardened.conf.template b/tools-uclibc/stage3-amd64-uclibc-hardened.conf.template deleted file mode 100644 index 1cc923d..0000000 --- a/tools-uclibc/stage3-amd64-uclibc-hardened.conf.template +++ /dev/null @@ -1,8 +0,0 @@ -subarch: amd64 -target: stage3 -version_stamp: uclibc-hardened -rel_type: hardened/amd64 -profile: hardened/linux/uclibc/amd64 -snapshot: current -source_subpath: hardened/amd64/stage2-amd64-uclibc-hardened -portage_confdir: MyCatalyst/portage.amd64.hardened diff --git a/tools-uclibc/stage3-amd64-uclibc-vanilla.conf.template b/tools-uclibc/stage3-amd64-uclibc-vanilla.conf.template deleted file mode 100644 index 4e3d602..0000000 --- a/tools-uclibc/stage3-amd64-uclibc-vanilla.conf.template +++ /dev/null @@ -1,8 +0,0 @@ -subarch: amd64 -target: stage3 -version_stamp: uclibc-vanilla -rel_type: vanilla/amd64 -profile: hardened/linux/uclibc/amd64 -snapshot: current -source_subpath: vanilla/amd64/stage2-amd64-uclibc-vanilla -portage_confdir: MyCatalyst/portage.amd64.vanilla diff --git a/tools-uclibc/stage3-i686-uclibc-hardened.conf.template b/tools-uclibc/stage3-i686-uclibc-hardened.conf.template deleted file mode 100644 index 5915936..0000000 --- a/tools-uclibc/stage3-i686-uclibc-hardened.conf.template +++ /dev/null @@ -1,8 +0,0 @@ -subarch: i686 -target: stage3 -version_stamp: uclibc-hardened -rel_type: hardened/i686 -profile: hardened/linux/uclibc/x86 -snapshot: current -source_subpath: hardened/i686/stage2-i686-uclibc-hardened -portage_confdir: MyCatalyst/portage.i686.hardened diff --git a/tools-uclibc/stage3-i686-uclibc-vanilla.conf.template b/tools-uclibc/stage3-i686-uclibc-vanilla.conf.template deleted file mode 100644 index c84c48f..0000000 --- a/tools-uclibc/stage3-i686-uclibc-vanilla.conf.template +++ /dev/null @@ -1,8 +0,0 @@ -subarch: i686 -target: stage3 -version_stamp: uclibc-vanilla -rel_type: vanilla/i686 -profile: hardened/linux/uclibc/x86 -snapshot: current -source_subpath: vanilla/i686/stage2-i686-uclibc-vanilla -portage_confdir: MyCatalyst/portage.i686.vanilla