Blame SOURCES/driver-abi-rebuild.sh

70130e
#!/bin/sh
70130e
#
70130e
# Trivial script to rebuild drivers for ABI changes in the server
70130e
# Run me after a new xserver has hit the buildroot
70130e
70130e
builddir="abi-rebuild"
70130e
70130e
#if [ -e "$builddir" ]; then
70130e
#    echo "Path '$builddir' exists. Move out of the way first"
70130e
#    exit 1
70130e
#fi
70130e
70130e
mkdir -p $builddir
70130e
pushd $builddir
70130e
70130e
if git config --get remote.origin.url | grep -q redhat.com ; then
70130e
    pkg=rhpkg
70130e
else
70130e
    pkg=fedpkg
70130e
fi
70130e
70130e
# figure out the branch we're on
70130e
branch=$(git branch | awk '/^\*/ { print $2 }' | grep -v '^master$')
70130e
if [ $branch ]; then
70130e
    branch="-b $branch"
70130e
fi
70130e
70130e
$pkg co $branch xorg-x11-drivers
70130e
pushd xorg-x11-drivers
70130e
driverlist=$(grep ^Requires *.spec | awk '{ print $2 }')
70130e
popd
70130e
70130e
# Things not in -drivers for whatever reason...
d64d53
extradrivers="xorg-x11-glamor xorg-x11-drv-ivtv"
70130e
70130e
rm -rf xorg-x11-drivers
70130e
echo $driverlist $extradrivers | xargs -n1 $pkg co $branch
70130e
70130e
for i in xorg-x11-drv-*/ ; do
70130e
    [ -e $i/dead.package ] && continue
70130e
    pushd $i
d64d53
    rpmdev-bumpspec -c "- 1.15 ABI rebuild" *.spec
70130e
    $pkg commit -c -p && $pkg build --nowait
70130e
    #$pkg mockbuild
70130e
    #$pkg srpm
70130e
    #mockchain -r fedora-20-x86_64 -l $OLDPWD
70130e
    #mockchain -r rhel-7.0-candidate-x86_64 -l $OLDPWD
d64d53
d64d53
    if [ $i = "xorg-x11-glamor" ]; then
d64d53
        koji wait-repo f21-build --build $($pkg verrel)
d64d53
    fi
d64d53
70130e
    popd
70130e
done
70130e
70130e
popd
70130e
70130e