attempt to make a atomic repo and installer
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
parent
80f8134e17
commit
a25b08c727
58
nightly.sh
58
nightly.sh
@ -10,8 +10,21 @@ NIGHTLY="--nightly"
|
||||
SKIP_PHASES="--skip-phase=productimg"
|
||||
DEST=$(pwd)
|
||||
DATE=$(date "+%Y%m%d")
|
||||
COMPSFILE="comps-f24.xml"
|
||||
TMPDIR=`mktemp -d /tmp/f24.$DATE.XXXX`
|
||||
DIST="rawhide"
|
||||
BRANCH="rawhide"
|
||||
COMPSFILE="comps-rawhide.xml"
|
||||
GIT_BRANCH="master"
|
||||
TMPDIR=`mktemp -d /tmp/$DIST.$DATE.XXXX`
|
||||
MOCK="/usr/bin/mock"
|
||||
TOMAIL="devel@lists.fedoraproject.org test@lists.fedoraproject.org"
|
||||
TOMAIL="dennis@ausil.us"
|
||||
SUBJECT='rawhide report: '$DATE' changes'
|
||||
FROM="Fedora Rawhide Report <rawhide@fedoraproject.org>"
|
||||
RSYNCPREFIX="sudo -u ftpsync"
|
||||
ATOMIC=$(mktemp -d /tmp/atomic.${DIST}.$DATE.XXXX)
|
||||
ATOMICREPO="/mnt/koji/compose/atomic/$BRANCHED/"
|
||||
ATOMICDEST="/pub/fedora/linux/atomic/$BRANCHED/"
|
||||
OLDCOMPOSE_ID=$(echo /mnt/koji/compose/rawhide/latest-Fedora-/COMPOSE_ID)
|
||||
# uncomment and edit for resuming a failed compose
|
||||
#COMPOSE_ID="Fedora-23-20150530.n.0"
|
||||
|
||||
@ -25,6 +38,7 @@ git clone https://git.fedorahosted.org/git/comps.git && {
|
||||
popd
|
||||
|
||||
|
||||
|
||||
CMD="pungi-koji --notification-script=/usr/bin/pungi-fedmsg-notification --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $NIGHTLY $SKIP_PHASES"
|
||||
|
||||
if [ -z "$COMPOSE_ID" ]; then
|
||||
@ -34,3 +48,43 @@ else
|
||||
fi
|
||||
|
||||
time $CMD "$@"
|
||||
NEWCOMPOSE_ID=$(echo /mnt/koji/compose/rawhide/latest-Fedora-/COMPOSE_ID)
|
||||
|
||||
DESTDIR=$TARGET_DIR/$NEWCOMPOSE_ID
|
||||
MOCKCONFIG="fedora-${DIST}-compose-x86_64"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --init
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --install lorax rpm-ostree git
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "mkdir -p ${DESTDIR}/compose/Atomic/x86_64/iso"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell ""
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "if [ ! -d $ATOMICREPO ]; then ostree init --repo=$ATOMICREPO --mode=archive-z2;fi"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "git clone https://git.fedorahosted.org/git/fedora-atomic.git $ATOMIC && pushd $ATOMIC && git log -n 1 --pretty='%h: %ci - %s' && git checkout ${GIT_BRANCH}"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "cd $ATOMIC && sed -i -e 's|mirrorlist=.*$|baseurl=http://kojipkgs.fedoraproject.org/compose/$BRANCHED/$NEWCOMPOSE_ID/compose/Everything/x86_64/os/|g' fedora*repo"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "rpm-ostree compose tree --repo=$ATOMICREPO $ATOMIC/fedora-atomic-docker-host.json >$logdir/atomic"
|
||||
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "lorax --nomacboot -p Fedora -v ${SHORTVERSION} -r ${SHORTCOMPOSE} \
|
||||
-s http://kojipkgs.fedoraproject.org/compose/$BRANCHED/$NEWCOMPOSE_ID/compose/Everything/x86_64/os/ \
|
||||
-i fedora-productimg-atomic \
|
||||
-t Atomic \
|
||||
--tmp /tmp/ \
|
||||
--logfile=${DESTDIR}/logs/x86_64/atomic \
|
||||
--add-template /spin-kickstarts/atomic-installer/lorax-configure-repo.tmpl \
|
||||
--add-template-var=ostree_osname=fedora-atomic \
|
||||
--add-arch-template-var=ostree_repo=https://kojipkgs.fedoraproject.org/compose/atomic/$VERSION/ \
|
||||
--add-template-var=ostree_ref=fedora-atomic/${VERSION}/x86_64/docker-host \
|
||||
--add-arch-template /spin-kickstarts/atomic-installer/lorax-embed-repo.tmpl \
|
||||
--add-arch-template-var=ostree_osname=fedora-atomic \
|
||||
--add-arch-template-var=ostree_ref=fedora-atomic/${VERSION}/x86_64/docker-host \
|
||||
${DESTDIR}/compose/Atomic/x86_64/os/ "
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "cp -l ${DESTDIR}/compose/Atomic/x86_64/os/images/boot.iso ${DESTDIR}/compose/Atomic/x86_64/iso/Fedora-Atomic-x86_64-${VERSION}-${DATE}.iso"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --shell "pushd ${DESTDIR}/compose/Atomic/x86_64/iso/ ;sha256sum -b --tag *iso >Fedora-Atomic-${VERSION}-x86_64-CHECKSUM; popd"
|
||||
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --clean
|
||||
|
||||
compose-changelog -p $TARGET_DIR/$NEWCOMPOSE_ID/logs/ $TARGET_DIR/$OLDCOMPOSE_ID/ $TARGET_DIR/$NEWCOMPOSE_ID/
|
||||
|
||||
if [ "$mail" = "0" ]; then
|
||||
for tomail in "$(echo $TOMAIL)" ; do
|
||||
cat $TARGET_DIR/$NEWCOMPOSE_ID/logs/*verbose | \
|
||||
mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user