update
This commit is contained in:
parent
451d4b4c79
commit
6029ebfd77
21 changed files with 545 additions and 97 deletions
|
@ -18,6 +18,7 @@ shift
|
|||
[ -f $PREFIX/etc/testforge/testforge.bash ] && . $PREFIX/etc/testforge/testforge.bash
|
||||
|
||||
[ -n "$PLAY_ANSIBLE_SRC" ] || PLAY_ANSIBLE_SRC=$BASE_ANSIBLE_SRC
|
||||
[ -n "$PLAY_ANSIBLE_SRC" ] || PLAY_ANSIBLE_SRC=/mnt/o/data/TestForge/src/ansible
|
||||
[ -z "$PLAY_ANSIBLE_SRC" ] && ERROR export "PLAY_ANSIBLE_SRC" >&2 && exit 3
|
||||
[ ! -d "$PLAY_ANSIBLE_SRC" ] && ERROR ! -d "PLAY_ANSIBLE_SRC" >&2 && exit 4
|
||||
[ ! -f "$PLAY_ANSIBLE_SRC"/hosts.yml ] && ERROR ! -f "PLAY_ANSIBLE_SRC"/hosts.yml >&2 && exit 4
|
||||
|
|
|
@ -29,7 +29,8 @@ LONGOPTS="help,version,checksum,snapshot,dedupe,moniker:,dest:"
|
|||
dedupe=
|
||||
DIRS=
|
||||
|
||||
. /usr/local/bin/usr_local_base.bash || exit 2
|
||||
# . /usr/local/bin/usr_local_base.bash
|
||||
. /usr/local/bin/usr_local_tput.bash || exit 2
|
||||
error () { retval=$1 ; shift; echo "ERROR: $prog" $* ; exit $retval ; }
|
||||
|
||||
ARGS=$(getopt --options $SHORTOPTS --longoptions $LONGOPTS -- "$@")
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
prog=$( basename $0 .bash )
|
||||
PREFIX=/usr/local
|
||||
ROLE=base
|
||||
. /usr/local/bin/usr_local_base.bash || exit 2
|
||||
# . /usr/local/bin/usr_local_base.bash
|
||||
. /usr/local/bin/usr_local_tput.bash || exit 2
|
||||
|
||||
umask 0022
|
||||
[ "$#" -gt 0 ] && inidir=$1 || inidir=/usr/local/etc/testforge
|
||||
|
|
|
@ -25,7 +25,7 @@ fi
|
|||
cd /usr/local/src || exit 1
|
||||
|
||||
if [ ! -d $DIR ] ; then
|
||||
grep -q "^wlan[1-9][ ]00000000" /proc/net/route || { echo INFO: not connected ; exit 0 ; }
|
||||
grep -q "^wlan[1-9][0-9]*[ ]00000000" /proc/net/route || { echo INFO: not connected ; exit 0 ; }
|
||||
[ -f /usr/local/net/Http/$URL ] || \
|
||||
wget -xcP /usr/local/net/Http/ http://$URL || exit 1
|
||||
tar xvfJ /usr/local/net/Http/$URL
|
||||
|
@ -45,7 +45,7 @@ for file in $BASE/*.crt ; do
|
|||
|
||||
[ -f blacklist.txt ] || { echo ERROR: missing blacklist.txt ; exit 4 ; }
|
||||
|
||||
if [ ! -f certdata.txt.mozilla ] && grep -q "^wlan[1-9][ ]00000000" /proc/net/route ; then
|
||||
if [ ! -f certdata.txt.mozilla ] && grep -q "^wlan[1-9][0-9]*[ ]00000000" /proc/net/route ; then
|
||||
[ -f /usr/local/net/Http/$URL_CERTDATA ] || \
|
||||
wget -xcP /usr/local/net/Http/ http://$URL_CERTDATA
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# -*- mode: sh; fill-column: 75; tab-width: 8; coding: utf-8-unix -*-
|
||||
|
||||
# The idea here is to run ansible_local.bash --tags daily
|
||||
|
@ -11,9 +11,9 @@ prog=`basename $0 .bash`
|
|||
PREFIX=/usr/local
|
||||
ROLE=toxcore
|
||||
[ -f /usr/local/etc/testforge/testforge.bash ] && \
|
||||
. /usr/local/etc/testforge/testforge.bash
|
||||
. /usr/local/etc/testforge/testforge.bash && \
|
||||
export PLAY_ANSIBLE_SRC=$BASE_ANSIBLE_SRC
|
||||
TOXCORE_LOG_DIR=$PREFIX/var/log
|
||||
[ -d $TOXCORE_LOG_DIR ] || mkdir -p $TOXCORE_LOG_DIR
|
||||
. /usr/local/src/usr_local_src.bash
|
||||
|
||||
TOHOST=files.pythonhosted.org
|
||||
|
@ -35,6 +35,7 @@ errs=0
|
|||
warns=0
|
||||
WLOG="$TOXCORE_LOG_DIR"/$ly/W$prog$$.log
|
||||
ELOG="$TOXCORE_LOG_DIR"/$ly/E$prog$$.log
|
||||
[ -d $TOXCORE_LOG_DIR/$ly ] || mkdir -p $TOXCORE_LOG_DIR/$ly
|
||||
|
||||
[ -d /usr/local/share/doc ] || mkdir -p /usr/local/share/doc
|
||||
[ -d /var/local/share/doc/txt ] && [ ! -d /usr/local/share/doc/txt ] && \
|
||||
|
@ -72,13 +73,15 @@ if [ -d /etc/libvirt/qemu ] ; then
|
|||
fi
|
||||
|
||||
if /etc/init.d/libvirtd status ; then
|
||||
if [ "$MODE" = whonix ] ; then
|
||||
elt=toxcore_libvirt_test_ga
|
||||
DBUG $elt
|
||||
if virsh net-list | grep -q External ; then
|
||||
/usr/local/bin/toxcore_libvirt_test_ga.bash
|
||||
if [ "$MODE" = whonix ] ; then
|
||||
elt=toxcore_libvirt_test_ga
|
||||
DBUG $elt
|
||||
if virsh net-list | grep -q External ; then
|
||||
/usr/local/bin/toxcore_libvirt_test_ga.bash
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if /etc/init.d/libvirtd status >/dev/null ; then
|
||||
virsh list | grep '^ [0-9]' | while read id elt rest ; do
|
||||
[ $rest = running ] || continue
|
||||
virsh dumpxml $elt | grep -q org.qemu.guest_agent.0.*connected || \
|
||||
|
@ -94,24 +97,22 @@ export SSLTEST_TESTS="testssl nmap"
|
|||
if route | grep -q def ; then
|
||||
elt=testforge_ssl_test
|
||||
DBUG $elt
|
||||
$PREFIX/bin/testforge_ssl_test.bash -v 3 $TOHOST
|
||||
$PREFIX/bin/toxcore_ssl_test.bash -v 3 $TOHOST
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ] ; then
|
||||
ERROR retval=$retval testforge_ssl_test.bash -v 3 $TOHOST|tee -a $ELOG
|
||||
ERROR retval=$retval toxcore_ssl_test.bash -v 3 $TOHOST|tee -a $ELOG
|
||||
else
|
||||
INFO testforge_ssl_test.bash -v 3 $TOHOST
|
||||
INFO toxcore_ssl_test.bash -v 3 $TOHOST
|
||||
fi
|
||||
fi
|
||||
|
||||
elt=testforge_dirmngr_test
|
||||
if route | grep -q default ; then
|
||||
elt=testforge_dirmngr_test
|
||||
DBUG $elt
|
||||
$PREFIX/bin/testforge_dirmngr_test.bash
|
||||
$PREFIX/bin/toxcore_dirmngr_test.bash
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ] ; then
|
||||
ERROR retval=$retval testforge_dirmngr_test.bash | tee -a $ELOG
|
||||
ERROR retval=$retval toxcore_dirmngr_test.bash | tee -a $ELOG
|
||||
else
|
||||
INFO testforge_dirmngr_test.bash
|
||||
INFO toxcore_dirmngr_test.bash
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ SSLTEST_TESTS="$tests"
|
|||
declare -a tests_ran
|
||||
tests_ran=()
|
||||
|
||||
grep -q "^wlan[1-9][ ]00000000" /proc/net/route || { WARN "not connected" ; exit 0 ; }
|
||||
grep -q "^wlan[1-9][0-9]*[ ]00000000" /proc/net/route || { WARN "not connected" ; exit 0 ; }
|
||||
|
||||
IF=`route | grep ^def |sed -e 's/.* //'`
|
||||
[ -n "$IF" ] || { ERROR "no IF" ; exit 10 ; }
|
||||
|
@ -232,7 +232,7 @@ ssltest_proxies $onion
|
|||
rm -f $TMPDIR/${LOGP}.*.*
|
||||
OUTF=$TMPDIR/${LOGP}.out
|
||||
for CAFILE in $SSLTEST_CERTS ; do
|
||||
grep -q "^wlan[1-9][ ]00000000" /proc/net/route || {
|
||||
grep -q "^wlan[1-9][0-9]*[ ]00000000" /proc/net/route || {
|
||||
WARN $prog we are not connected >&2
|
||||
exit `expr 256 - 1`
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ PREFIX=/usr/local
|
|||
ROLE=toxcore
|
||||
|
||||
PKG=dracut
|
||||
VER=050
|
||||
VER=055
|
||||
DIR=${PKG}-$VER
|
||||
URL=distfiles.gentoo.org/distfiles/$DIR.tar.xz
|
||||
URI="https://www.kernel.org/pub/linux/utils/boot/${VER}/${DIR}.tar.xz"
|
||||
|
@ -21,18 +21,20 @@ gpg --recv-keys 9BAD8B9BBD1CBDEDE3443292900F3C4971086004
|
|||
cd $PREFIX/src || exit 2
|
||||
WD=$PWD
|
||||
|
||||
if [ -d /etc/apt -a $USER = root ] ; then
|
||||
# old_debian_requires asciidoc libkmod-dev libkmod-dev xsltproc
|
||||
which xsltproc 2>/dev/null || apt-get install xsltproc || exit 2
|
||||
which asciidoc 2>/dev/null || apt-get install asciidoc || exit 2
|
||||
elif [ -d /etc/portage -a $USER = root ] ; then
|
||||
which cpio >/dev/null || emerge -fp app-arch/cpio || exit 2
|
||||
[ -f /usr/lib64/libkmod.so ] || emerge -fp '>=sys-apps/kmod-23[tools]' || exit 2
|
||||
fi
|
||||
if [ $USER = root ] ; then
|
||||
if [ -d /etc/apt ] ; then
|
||||
# old_debian_requires asciidoc libkmod-dev libkmod-dev xsltproc
|
||||
which xsltproc 2>/dev/null || apt-get install xsltproc || exit 2
|
||||
which asciidoc 2>/dev/null || apt-get install asciidoc || exit 2
|
||||
elif [ -d /etc/portage -a $USER = root ] ; then
|
||||
which cpio >/dev/null || emerge -fp app-arch/cpio || exit 2
|
||||
[ -f /usr/lib64/libkmod.so ] || emerge -fp '>=sys-apps/kmod-23[tools]' || exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f $DIR/dracut-initramfs-restore ] ; then
|
||||
if [ -e $PREFIX/net/Http/$URL ] ; then
|
||||
ip route|grep -q ^default || { echo "DEBUG: $0 not connected" ; exit 0 ; }
|
||||
route|grep -q ^default || { echo "DEBUG: $0 not connected" ; exit 0 ; }
|
||||
wget -xc -P $PREFIX/net/Http https://$URL
|
||||
fi
|
||||
tar xvfJ $PREFIX/net/Http/$URL
|
||||
|
@ -48,23 +50,23 @@ grep -q ^prefix=$PREFIX configure || \
|
|||
|
||||
|
||||
src_configure() {
|
||||
local PV=$VER
|
||||
local PV=$VER
|
||||
|
||||
# tc-export CC PKG_CONFIG
|
||||
sed -e "s@^prefix=/usr\$@prefix=$PREFIX@" -i configure
|
||||
./configure \
|
||||
--disable-documentation \
|
||||
--prefix="${PREFIX}" \
|
||||
--sysconfdir="${PREFIX}/etc" \
|
||||
|| return 1
|
||||
sed -e "s@^prefix=/usr\$@prefix=$PREFIX@" -i configure
|
||||
./configure \
|
||||
--disable-documentation \
|
||||
--prefix="${PREFIX}" \
|
||||
--sysconfdir="${PREFIX}/etc" \
|
||||
|| return 1
|
||||
# --bashcompletiondir="$(get_bashcompdir)"
|
||||
# --systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
|
||||
if [ ! -f dracut-version.sh ] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh
|
||||
fi
|
||||
return 0
|
||||
if [ ! -f dracut-version.sh ] ; then
|
||||
# Source tarball from github doesn't include this file
|
||||
echo "DRACUT_VERSION=${PV}" > dracut-version.sh
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ "$#" -eq 0 ] ; then
|
||||
|
@ -110,7 +112,16 @@ EOF
|
|||
[ -x $PREFIX/lib/dracut/dracut-install -a \
|
||||
$PREFIX/lib/dracut/dracut-install -nt install/dracut-install ] || \
|
||||
make install >> install.log 2>&1 || exit 8
|
||||
[ -x $PREFIX/bin/${ROLE}_dracut.bash ] || cat >$PREFIX/bin/${ROLE}_dracut.bash <<EOF
|
||||
ROLE=$ROLE
|
||||
PREFIX=/usr/local
|
||||
VER=055
|
||||
|
||||
cd $PREFIX/src/dracut-$VER || exit 1
|
||||
|
||||
exec dracut.sh "\$@"
|
||||
EOF
|
||||
|
||||
elif [ "$1" = 'test' ] ; then
|
||||
$PREFIX/bin/$PKG --help || exit 30
|
||||
# Has tests
|
||||
|
@ -126,7 +137,6 @@ elif [ "$1" = 'refresh' ] ; then # 6*
|
|||
tar xfBv - -C ../../patches/gpgkey/usr/local/src/dracut-050/
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
cp -p install/dracut-install $PREFIX/bin
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
# -*- mode: sh; fill-column: 75; tab-width: 8; coding: utf-8-unix -*-
|
||||
|
||||
prog=`basename $0 .bash`
|
||||
PREFIX=/var/local
|
||||
PREFIX=/usr/local
|
||||
[ -f /usr/local/etc/testforge/testforge.bash ] && \
|
||||
. /usr/local/etc/testforge/testforge.bash
|
||||
ROLE=toxcore
|
||||
|
||||
. /var/local/src/var_local_src.bash || exit 2
|
||||
|
||||
. /usr/local/src/usr_local_src.bash || exit 2
|
||||
x
|
||||
PKG="kernel-expect"
|
||||
|
||||
GIT_HUB=github.com
|
||||
|
|
|
@ -12,7 +12,7 @@ P="BASE_PYTHON${PYVER}_MINOR"
|
|||
[ -z "$PYTHON_MINOR" ] && PYTHON_MINOR="$(eval echo \$$P)"
|
||||
PYTHON_EXE_MSYS=$PREFIX/bin/python$PYTHON_MINOR.sh
|
||||
PYTHON_EXE=$PYTHON_EXE_MSYS
|
||||
PYTHON_PIP_MSYS=$PREFIX/bin/pip$PYTHON_MINOR.sh
|
||||
PIP_EXE_MSYS=$PREFIX/bin/pip$PYTHON_MINOR.sh
|
||||
|
||||
MOD="pyassuan"
|
||||
DIR="${MOD}"
|
||||
|
|
|
@ -28,11 +28,14 @@ if [ "$#" -eq 0 ] ; then
|
|||
# [ -f $PREFIX/bin/sdwdate.bash ] || \
|
||||
# sh sdwdate.bash
|
||||
|
||||
bash analyze-ssl.bash
|
||||
bash gridfire.bash # || exit 16$?
|
||||
bash pyassuan.bash #|| exit 17$?
|
||||
bash tinfoilhat.shmoo.com.bash
|
||||
# sh negotiator.bash
|
||||
bash kernelexpect.bash
|
||||
bash kernel-hardening-checker.bash
|
||||
|
||||
# bash dracut-055.bash
|
||||
bash toxygen_wrapper.bash
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue