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