tools-uclibc: improve template logic for amd64 and x86
This commit is contained in:
parent
3d65d3c34a
commit
f1dff97150
|
@ -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() {
|
||||
|
|
9
tools-uclibc/stage-all.conf.template
Normal file
9
tools-uclibc/stage-all.conf.template
Normal file
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue