Skip to content

Instantly share code, notes, and snippets.

@FlorianHeigl
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FlorianHeigl/f976f5bdf5ae41426c8d to your computer and use it in GitHub Desktop.
Save FlorianHeigl/f976f5bdf5ae41426c8d to your computer and use it in GitHub Desktop.
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
Copy link
Author

trying to get the most essential workflow down.

@FlorianHeigl
Copy link
Author

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

(must be manually fixed)

@FlorianHeigl
Copy link
Author

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