Last active
August 29, 2015 14:13
-
-
Save FlorianHeigl/f976f5bdf5ae41426c8d to your computer and use it in GitHub Desktop.
poudriere setup script for quarterlies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ksh93 | |
confdir=/usr/local/etc/poudriere.d | |
BRANCHES="2014Q2 2015Q1" | |
ARCHS="i386 amd64" | |
VERSIONS="9.1 9.3 10.1" | |
MAKECONF=cust-make.conf | |
OPTIONS=cust-options | |
setnames() | |
{ | |
rel="${version}-RELEASE" | |
jailname="$( echo $version | tr \. \_ )_${branch}_${arch}" | |
portstree="branches/${branch}" | |
return | |
} | |
create_jail() | |
{ | |
echo "poudriere jail -c -j $jailname -a $arch -v $rel -p $portstree" | |
# this self-overwrites, but no harm in that. | |
echo "ln -sf $confdir/$MAKECONF $confdir/${jailname}-make.conf" | |
echo "ln -sf $confdir/$OPTIONS $confdir/${jailname}-options" | |
} | |
update_tree() | |
{ | |
poudriere -p $portstree -u | |
} | |
update_jail() | |
{ | |
XX=$(poudriere -j $jailname -u 2>&1 ) | |
if echo "$XX" | grep mtree >/dev/null ; then | |
echo "Update of Jail $jailname failed with Mtree Bug" | |
fi | |
} | |
for branch in $BRANCHES ; do | |
for arch in $ARCHS ; do | |
for version in $VERSIONS ; do | |
setnames | |
create_jail | |
done | |
done | |
done | |
for branch in $BRANCHES ; do | |
for arch in $ARCHS ; do | |
for version in $VERSIONS ; do | |
setnames | |
update_jail | |
done | |
done | |
done | |
for branch in $BRANCHES ; do | |
update_tree | |
done |
Error isn't detected
Installing updates...mtree: line 2: no parent node
(must be manually fixed)
flipping poudriere etc directories is probably the ultimate power.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
trying to get the most essential workflow down.