#!/usr/bin/env bash srcdir=$(dirname $0) releasever=19 name=fedora-ostree-${releasever} prefix=$(pwd)/${name} root=${prefix}.tmp output=${name}.tar.gz yumcachedir=${root}/var/cache/yum yumcache_lookaside=${prefix}-yum-cache set -x set -e if test -d ${yumcachedir}; then mv ${yumcachedir} ${yumcache_lookaside} fi rm ${root} -rf if test -d ${yumcache_lookaside}; then mkdir -p ${root}/var/cache/ mv ${yumcache_lookaside} ${yumcachedir} fi yum -c ${srcdir}/fedora-ostree.repo -y --releasever=${releasever} --nogpg --installroot=${root} --disablerepo='*' --enablerepo=fedora --enablerepo=fedora-ostree install systemd passwd yum ostree fedora-release vim-minimal kernel dracut if test "${mfotbreak}" = "post-yum"; then bash fi # To have OSTree work, directories need to be writable by the user. # Also, there's no point in shipping private files; there's no # security on OSTree repositories, so make everything at least # readable. chmod -R u+rw,go+r ${root} rm ${root}/var/lib/yum/* -rf rm ${root}/var/cache/yum/* -rf rm ${root}/var/log/* -rf tar -c -z -C ${root} -f ${output} . echo "Generated ${output}" rm ${root} -rf