Blame SOURCES/driver-abi-rebuild.sh

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