rpms/kernel/devel/scripts rebase.sh,NONE,1.1
Dave Jones (davej)
fedora-extras-commits at redhat.com
Tue Jul 3 20:26:17 UTC 2007
- Previous message (by thread): rpms/kernel/devel patch-2.6.22-rc7-git2.bz2.sign, NONE, 1.1 .cvsignore, 1.640, 1.641 kernel-2.6.spec, 1.3262, 1.3263 sources, 1.605, 1.606 upstream, 1.527, 1.528 patch-2.6.22-rc7-git1.bz2.sign, 1.1, NONE
- Next message (by thread): rpms/kernel/devel/scripts pull-upstreams.sh,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14197/scripts
Added Files:
rebase.sh
Log Message:
Add a script to make rebasing easier.
So far only tested on git->git transitions.
Will be fleshed out further each time a different transition occurs.
--- NEW FILE rebase.sh ---
#!/bin/bash
# Is there a new snapshot ?
export OLD=`grep ^patch upstream | tail -n1 | sed s/patch-// | sed s/\.bz2//`
export OLDBASE=`echo $OLD | sed s/-/\ /g | sed s/2\.6\.// | awk '{ print $1 }'`
export OLDRC=`echo $OLD | sed s/-/\ /g | sed s/rc// | awk '{ print $2 }'`
export OLDGIT=`echo $OLD | sed s/-/\ /g | sed s/git// | awk '{ print $3 }'`
NEW=`lynx -dump http://www.kernel.org/kdist/finger_banner | grep "snapshot for the stable"`
if [ "${?}" != 0 ] ; then
echo "No new git snapshot of stable branch".
exit
fi
export NEW=`echo $NEW | awk '{ print $11 }'`
export NEWBASE=`echo $NEW | sed s/-/\ /g | sed s/2\.6\.// | awk '{ print $1 }'`
export NEWRC=`echo $NEW | sed s/-/\ /g | sed s/rc// | awk '{ print $2 }'`
export NEWGIT=`echo $NEW | sed s/-/\ /g | sed s/git// | awk '{ print $3 }'`
echo "OLD kernel was $OLD BASE=$OLDBASE RC=$OLDRC GIT=$OLDGIT"
echo "NEW kernel is $NEW BASE=$NEWBASE RC=$NEWRC GIT=$NEWGIT"
if [ "$OLDBASE" = "$NEWBASE" ]; then
echo Same base
else
echo "Rebasing across point releases not yet done."
exit
fi
if [ "$OLDRC" != "$NEWRC" ]; then
echo "Different rc. Rebasing from $OLDRC to $NEWRC"
perl -p -i -e 's/^%define\ rcrev\ $ENV{"OLDRC"}/\%define\ rcrev\ $ENV{"NEWRC"}/' kernel-2.6.spec
fi
if [ "$OLDGIT" != "$NEWGIT" ]; then
echo "Different git. Rebasing from git$OLDGIT to git$NEWGIT"
perl -p -i -e 's/^%define\ gitrev\ $ENV{"OLDGIT"}/\%define\ gitrev\ $ENV{"NEWGIT"}/' kernel-2.6.spec
perl -p -i -e 's/$ENV{OLD}/$ENV{NEW}/' .cvsignore
perl -p -i -e 's/$ENV{OLD}/$ENV{NEW}/' upstream
#TODO: Remove the $OLD line from sources
make download
make upload FILES=patch-$NEW.bz2
cvs add patch-$NEW.bz2.sign
rm -f patch-$OLD.bz2
rm -f patch-$OLD.bz2.sign
cvs remove patch-$OLD.bz2.sign
fi
#TODO: Call this only if we changed version.
bumpspecfile.py kernel-2.6.spec "- $NEW"
make clog
- Previous message (by thread): rpms/kernel/devel patch-2.6.22-rc7-git2.bz2.sign, NONE, 1.1 .cvsignore, 1.640, 1.641 kernel-2.6.spec, 1.3262, 1.3263 sources, 1.605, 1.606 upstream, 1.527, 1.528 patch-2.6.22-rc7-git1.bz2.sign, 1.1, NONE
- Next message (by thread): rpms/kernel/devel/scripts pull-upstreams.sh,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list