Blame scripts/rawhide-rc.sh
|
Justin M. Forbes |
162535 |
#!/bin/sh
|
|
Justin M. Forbes |
162535 |
# Generate a commit for a rawhide RC release
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
klist -s
|
|
Justin M. Forbes |
162535 |
if [ ! $? -eq 0 ]; then
|
|
Justin M. Forbes |
162535 |
echo "klist couldn't read the credential cache."
|
|
Justin M. Forbes |
162535 |
echo "Do you need to fix your kerberos tokens?"
|
|
Justin M. Forbes |
162535 |
exit 1
|
|
Justin M. Forbes |
162535 |
fi
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
# Figure out what is our RC
|
|
Justin M. Forbes |
162535 |
RC=`grep "%global rcrev" kernel-tools.spec| cut -d ' ' -f 3`
|
|
Justin M. Forbes |
162535 |
RC=$(($RC+1))
|
|
Justin M. Forbes |
162535 |
BASE=`grep "%global base_sublevel" kernel-tools.spec| cut -d ' ' -f 3`
|
|
Justin M. Forbes |
162535 |
OLDBASE=$BASE
|
|
Justin M. Forbes |
162535 |
# See comment in kernel-tools.spec about the base numbering
|
|
Justin M. Forbes |
162535 |
BASE=$(($BASE+1))
|
|
Justin M. Forbes |
2b3bee |
MAJORVER=6
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
# Kill all patches
|
|
Justin M. Forbes |
162535 |
awk '!/patch/ { print $0 }' < sources > sources.tmp
|
|
Justin M. Forbes |
162535 |
mv sources.tmp sources
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
# Grab the tarball
|
|
Justin M. Forbes |
162535 |
if [ ! -f patch-$MAJORVER.$BASE-rc$RC.xz ]; then
|
|
Justin M. Forbes |
162535 |
wget -O patch-$MAJORVER.$BASE-rc$RC https://git.kernel.org/torvalds/p/v$MAJORVER.$BASE-rc$RC/v$MAJORVER.$OLDBASE
|
|
Justin M. Forbes |
162535 |
if [ ! $? -eq 0 ]; then
|
|
Justin M. Forbes |
162535 |
exit 1
|
|
Justin M. Forbes |
162535 |
fi
|
|
Justin M. Forbes |
162535 |
xz -9 patch-$MAJORVER.$BASE-rc$RC
|
|
Justin M. Forbes |
162535 |
fedpkg upload patch-$MAJORVER.$BASE-rc$RC.xz
|
|
Justin M. Forbes |
162535 |
fi
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
# bump rcrev in the spec and set git snapshot to 0
|
|
Justin M. Forbes |
162535 |
RC=$RC perl -p -i -e 's|%global rcrev.*|%global rcrev $ENV{'RC'}|' kernel-tools.spec
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
perl -p -i -e 's|%define gitrev.*|%define gitrev 0|' kernel-tools.spec
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
perl -p -i -e 's|%global baserelease.*|%global baserelease 0|' kernel-tools.spec
|
|
Justin M. Forbes |
162535 |
|
|
Justin M. Forbes |
162535 |
rpmdev-bumpspec -c "Linux v$MAJORVER.$BASE-rc$RC" kernel-tools.spec
|