Blame SOURCES/driver-abi-rebuild.sh

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