Blame SOURCES/driver-abi-rebuild.sh

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