diff options
| author | Bill Nottingham <notting@nostromo.devel.redhat.com> | 2007-05-18 15:53:59 -0400 |
|---|---|---|
| committer | Bill Nottingham <notting@nostromo.devel.redhat.com> | 2007-05-18 15:53:59 -0400 |
| commit | 9ac7e1b65240f77730400189da2ef2ceec963430 (patch) | |
| tree | 909accf58479ae118f3b2e37d9a2b16a8757f00b /scripts | |
| parent | 0b7134bb2ca5cab3833a43c475fa43879dd88029 (diff) | |
| download | releng-9ac7e1b65240f77730400189da2ef2ceec963430.tar.gz releng-9ac7e1b65240f77730400189da2ef2ceec963430.tar.xz releng-9ac7e1b65240f77730400189da2ef2ceec963430.zip | |
update buildrawhide
add pungify
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/buildrawhide | 42 | ||||
| -rwxr-xr-x | scripts/pungify | 76 |
2 files changed, 118 insertions, 0 deletions
diff --git a/scripts/buildrawhide b/scripts/buildrawhide new file mode 100755 index 0000000..11a2e1c --- /dev/null +++ b/scripts/buildrawhide @@ -0,0 +1,42 @@ +#!/bin/sh + +# runs currently on app5.fedora.phx.redhat.com +# invoked by a script on porkchop.redhat.com (internal) that does the rsync afterwards +# the chroot in /mashroot is premade (ick) + +DATE=$1 + +[ -z "$DATE" ] && { + echo "usage: buildrawhide <date>" + exit 1 +} + +cp /home/fedora/notting/mash-latest.rpm /mashroot/tmp +mount -t nfs -o rw,defaults ntap-fedora1.fedora.phx.redhat.com:/vol/fedora/build/koji /mashroot/mnt/koji/ +chroot /mashroot bash -- << EOF +set -x +yum -y upgrade +yum -y install koji yum createrepo cvs make intltool findutils +yum -y install /tmp/mash-latest.rpm + +OLD=$(find /mnt/koji/mash/ -maxdepth 1 -type d -name "rawhide-20*" 2>/dev/null| sort | tail -1) +mkdir /tmp/mashbuild.$DATE +cd /tmp/mashbuild.$DATE +cvs -d :pserver:anonymous@cvs.fedora.redhat.com:/cvs/extras -z3 co comps && { + cd comps + make comps-f7.xml + cp comps-f7.xml ../comps.xml + cd .. +} +mkdir -p /mnt/koji/mash/rawhide-$DATE/logs +mash -o /mnt/koji/mash/rawhide-$DATE --compsfile /tmp/mashbuild.$DATE/comps.xml development 2>&1 | tee /mnt/koji/mash/rawhide-$DATE/logs/mash.log +rc=$? +if [ "$rc" = "0" ]; then + [ -n "$OLD" ] && /usr/share/mash/treediff /mnt/koji/mash/rawhide-$DATE/development $OLD/development > /mnt/koji/mash/rawihde-$DATE/logs/treediff +fi +rm -rf /tmp/mashbuild.$DATE +exit $rc +EOF +rc=$? +umount /mashroot/mnt/koji +exit $rc diff --git a/scripts/pungify b/scripts/pungify new file mode 100755 index 0000000..2f4dea7 --- /dev/null +++ b/scripts/pungify @@ -0,0 +1,76 @@ +#!/bin/sh + +# pungify - run pungi on a particular rawhide tree +# needs passed: +# the tree version (usually a datestamp) +# the arch +# the hostname to connect to (can be user@host) +# +# Hosts must have valid mock development configs. More paths are hardcoded in this script than probably should be. + +TREE=$1 + +ARCH=$2 + +HOST=$3 + +usage() { + echo "Usage: pungify <tree> <arch> <host>" + exit 1 +} + +[ -z "$TREE" -o -z "$ARCH" -o -z "$HOST" ] && usage + +ssh $HOST /bin/bash -- << EOF + set -x + mock -r fedora-devel-$ARCH-core --uniqueext=$TREE init || exit 1 + /usr/sbin/mock-helper yum --installroot /var/lib/mock/fedora-development-$ARCH-core-$TREE/root install pungi nfs-utils setarch || exit 1 + cp /etc/resolv.conf /var/lib/mock/fedora-development-$ARCH-core-$TREE/root/tmp + mock -r fedora-devel-$ARCH-core --uniqueext=$TREE shell -- << EEE + set -x + cp /tmp/resolv.conf /etc/ + mkdir -p /tmp/treebuild.$TREE/{output,cache,development} + cd /tmp/treebuild.$TREE + cat > pungi.conf << EOP +[default] +product_name = Fedora +product_path = Fedora +iso_basename = F +bugurl = http://bugzilla.redhat.com +comps = /etc/pungi/comps-fc7.xml +manifest = /etc/pungi/minimal-manifest +yumconf = /etc/yum.conf +destdir = /tmp/treebuild.$TREE/output +cachedir = /tmp/treebuild.$TREE/cache +arch = $ARCH +version = development +EOP + cat > /etc/yum.conf << EOY +[main] +pkgpolicy=newest +distroverpkg=redhat-release +tolerant=1 +exactarch=1 +obsoletes=1 +gpgcheck=0 +reposdir=/var/empty +metadata_expire=1800 + +[development] +name=Fedora Core - Development +baseurl=file:///tmp/treebuild.$TREE/development/$ARCH/os/ +enabled=1 +gpgcheck=0 +EOY + mount -t nfs -o ro,nolock ntap-fedora1.fedora.phx.redhat.com:/vol/fedora/build/koji/mash/rawhide-$TREE/development development + rm -f /var/lib/rpm/__db* + yum -y upgrade + mkdir -p output/development/$ARCH/os/repodata + ln -s /tmp/treebuild.$TREE/development/$ARCH/os/Fedora output/development/$ARCH/os/Fedora + pungi -c ./pungi.conf -B + umount development + rm -f /var/lib/rpm/__db* + rm -rf output/development/$ARCH/os/{Fedora,repodata} +EEE +EOF +rsync -vae ssh $HOST /var/lib/mock/fedora-development-$ARCH-core-$TREE/root/tmp/treebuild.$TREE/development/$ARCH/os/ /mnt/koji/mash/rawhide-$TREE/development/$ARCH/os/ |
