Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
poudriere setup script for quarterlies
#!/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
@FlorianHeigl

This comment has been minimized.

Copy link
Owner Author

@FlorianHeigl FlorianHeigl commented Jan 15, 2015

trying to get the most essential workflow down.

@FlorianHeigl

This comment has been minimized.

Copy link
Owner Author

@FlorianHeigl FlorianHeigl commented Jan 15, 2015

Error isn't detected
Installing updates...mtree: line 2: no parent node

(must be manually fixed)

@FlorianHeigl

This comment has been minimized.

Copy link
Owner Author

@FlorianHeigl FlorianHeigl commented Jan 15, 2015

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