tools-hardened: Remove
Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
parent
a64d987584
commit
13ab05785a
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This just removes the temporary conf err and log
|
||||
# files generated during a run
|
||||
|
||||
rm -f *conf *err *log
|
|
@ -1,61 +0,0 @@
|
|||
#!/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
|
||||
}
|
||||
|
||||
|
||||
banner() {
|
||||
cat << EOF | tee -a zzz.log > stage$1-$2-systemd.log
|
||||
|
||||
************************************************************************
|
||||
* stage$1-$2-systemd
|
||||
************************************************************************"
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
do_stages() {
|
||||
local arch=$1
|
||||
|
||||
for s in 1 2 3; do
|
||||
local tgpath="${storedir}/builds/systemd/${arch}"
|
||||
local target="stage${s}-${arch}-systemd-${mydate}.tar.bz2"
|
||||
local tglink="stage${s}-${arch}-systemd.tar.bz2"
|
||||
|
||||
if [[ ! -f "${tgpath}/${tglink}" ]]; then
|
||||
touch stage${s}-${arch}-systemd.log
|
||||
echo "!!! ${tglink} at ${tgpath} doesn't exist" \
|
||||
| tee -a zzz.log \
|
||||
> stage${s}-${arch}-systemd.err
|
||||
return 1
|
||||
fi
|
||||
|
||||
banner ${s} ${arch}
|
||||
catalyst -f stage${s}-${arch}-systemd.conf \
|
||||
| tee -a zzz.log \
|
||||
> stage${s}-${arch}-systemd.log \
|
||||
2> stage${s}-${arch}-systemd.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}-systemd.err
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /etc/catalyst/catalyst.conf
|
||||
|
||||
mydate=`date +%Y%m%d`
|
||||
|
||||
prepare_confs() {
|
||||
local arch=$1
|
||||
local flavor=$2
|
||||
|
||||
for s in 1 2 3; do
|
||||
cat stage${s}-${arch}_hardfp-${flavor}.conf.template | \
|
||||
sed -e "s/\(^version_stamp.*$\)/\1-${mydate}/" > stage${s}-${arch}_hardfp-${flavor}.conf
|
||||
done
|
||||
}
|
||||
|
||||
banner() {
|
||||
cat << EOF | tee -a zzz.log > stage$1-$2_hardfp-$3.log
|
||||
|
||||
************************************************************************
|
||||
* stage$1-$2_hardfp-$3
|
||||
************************************************************************"
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
do_stages() {
|
||||
local arch=$1
|
||||
local flavor=$2
|
||||
|
||||
for s in 1 2 3; do
|
||||
local tgpath="${storedir}/builds/${flavor}/${arch}"
|
||||
local target="stage${s}-${arch}_hardfp-${flavor}-${mydate}.tar.bz2"
|
||||
local tglink="stage${s}-${arch}_hardfp-${flavor}.tar.bz2"
|
||||
|
||||
if [[ ! -f "${tgpath}/${tglink}" ]]; then
|
||||
touch stage${s}-${arch}_hardfp-${flavor}.log
|
||||
echo "!!! ${target} at ${tgpath} doesn't exit" \
|
||||
| tee -a zzz.log \
|
||||
> stage${s}-${arch}_hardfp-${flavor}.err
|
||||
return 1
|
||||
fi
|
||||
|
||||
banner ${s} ${arch} ${flavor}
|
||||
catalyst -f stage${s}-${arch}_hardfp-${flavor}.conf \
|
||||
| tee -a zzz.log \
|
||||
> stage${s}-${arch}_hardfp-${flavor}.log \
|
||||
2> stage${s}-${arch}_hardfp-${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}_hardfp-${flavor}.err
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# approximate timings:
|
||||
#
|
||||
# catalyst -s current 3 minutes
|
||||
# catalyst -f stage1 130 minutes
|
||||
#
|
||||
|
||||
main() {
|
||||
>zzz.log
|
||||
|
||||
catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err
|
||||
|
||||
for arch in armv7a; do
|
||||
for flavor in hardened; do
|
||||
prepare_confs ${arch} ${flavor}
|
||||
done
|
||||
done
|
||||
|
||||
for arch in armv7a; do
|
||||
for flavor in 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 &
|
|
@ -1,7 +0,0 @@
|
|||
subarch: armv7a_hardfp
|
||||
target: stage1
|
||||
version_stamp: hardened
|
||||
rel_type: hardened/armv7a
|
||||
profile: hardened/linux/arm/armv7a
|
||||
snapshot: current
|
||||
source_subpath: hardened/armv7a/stage3-armv7a_hardfp-hardened
|
|
@ -1,7 +0,0 @@
|
|||
subarch: armv7a_hardfp
|
||||
target: stage2
|
||||
version_stamp: hardened
|
||||
rel_type: hardened/armv7a
|
||||
profile: hardened/linux/arm/armv7a
|
||||
snapshot: current
|
||||
source_subpath: hardened/armv7a/stage1-armv7a_hardfp-hardened
|
|
@ -1,7 +0,0 @@
|
|||
subarch: armv7a_hardfp
|
||||
target: stage3
|
||||
version_stamp: hardened
|
||||
rel_type: hardened/armv7a
|
||||
profile: hardened/linux/arm/armv7a
|
||||
snapshot: current
|
||||
source_subpath: hardened/armv7a/stage2-armv7a_hardfp-hardened
|
Loading…
Reference in a new issue