[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/kernel-xen-2.6/F-7/scripts bumpspecfile.py, 1.1, 1.2 configcommon.pl, 1.1, 1.2 configdiff.pl, 1.1, 1.2 cross-amd64.sh, 1.1, 1.2 cross-i586.sh, 1.1, 1.2 cross-i686.sh, 1.1, 1.2 cross-ia64.sh, 1.1, 1.2 cross-iseries.sh, 1.1, 1.2 cross-ppc.sh, 1.1, 1.2 cross-ppc64.sh, 1.1, 1.2 cross-ppc8260.sh, 1.1, 1.2 cross-ppc8560.sh, 1.1, 1.2 cross-pseries.sh, 1.1, 1.2 cross-s390.sh, 1.1, 1.2 cross-s390x.sh, 1.1, 1.2 newpatch.sh, 1.1, 1.2 pull-upstreams.sh, 1.1, 1.2 rebase-xen-hv.sh, 1.1, 1.2 rebase-xen-kernel.sh, 1.1, 1.2 rebase.sh, 1.1, 1.2 reconfig.sh, 1.1, 1.2 rediffall.pl, 1.1, 1.2
- From: Eduardo Habkost (ehabkost) <fedora-extras-commits redhat com>
- To: fedora-extras-commits redhat com
- Subject: rpms/kernel-xen-2.6/F-7/scripts bumpspecfile.py, 1.1, 1.2 configcommon.pl, 1.1, 1.2 configdiff.pl, 1.1, 1.2 cross-amd64.sh, 1.1, 1.2 cross-i586.sh, 1.1, 1.2 cross-i686.sh, 1.1, 1.2 cross-ia64.sh, 1.1, 1.2 cross-iseries.sh, 1.1, 1.2 cross-ppc.sh, 1.1, 1.2 cross-ppc64.sh, 1.1, 1.2 cross-ppc8260.sh, 1.1, 1.2 cross-ppc8560.sh, 1.1, 1.2 cross-pseries.sh, 1.1, 1.2 cross-s390.sh, 1.1, 1.2 cross-s390x.sh, 1.1, 1.2 newpatch.sh, 1.1, 1.2 pull-upstreams.sh, 1.1, 1.2 rebase-xen-hv.sh, 1.1, 1.2 rebase-xen-kernel.sh, 1.1, 1.2 rebase.sh, 1.1, 1.2 reconfig.sh, 1.1, 1.2 rediffall.pl, 1.1, 1.2
- Date: Mon, 12 Nov 2007 07:57:36 -0500
Author: ehabkost
Update of /cvs/pkgs/rpms/kernel-xen-2.6/F-7/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20157/scripts
Added Files:
bumpspecfile.py configcommon.pl configdiff.pl cross-amd64.sh
cross-i586.sh cross-i686.sh cross-ia64.sh cross-iseries.sh
cross-ppc.sh cross-ppc64.sh cross-ppc8260.sh cross-ppc8560.sh
cross-pseries.sh cross-s390.sh cross-s390x.sh newpatch.sh
pull-upstreams.sh rebase-xen-hv.sh rebase-xen-kernel.sh
rebase.sh reconfig.sh rediffall.pl
Log Message:
Merging from private-ehabkost-debuginfo-branch
Index: bumpspecfile.py
===================================================================
RCS file: bumpspecfile.py
diff -N bumpspecfile.py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ bumpspecfile.py 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+#
+# FIXME: Remove hardcoded name/email.
+#
+import re
+import sys
+import time
+import os
+import string
+
+class Specfile:
+ def __init__(self,filename):
+ file=open(filename,"r")
+ self.lines=file.readlines()
+
+ def addChangelogEntry(self,entry,email):
+ changematch=re.compile(r"^%changelog")
+ date=time.strftime("%a %b %d %Y", time.localtime(time.time()))
+ newchangelogentry="%changelog\n* "+date+" "+email+"\n"+entry+"\n\n"
+ for i in range(len(self.lines)):
+ if(changematch.match(self.lines[i])):
+ self.lines[i]=newchangelogentry
+ break
+
+ def writeFile(self,filename):
+ file=open(filename,"w")
+ file.writelines(self.lines)
+ file.close()
+
+if __name__=="__main__":
+ aspec=(sys.argv[1])
+ s=Specfile(aspec)
+ entry=(sys.argv[2])
+ s.addChangelogEntry(entry,"Dave Jones <davej redhat com>")
+ s.writeFile(aspec)
+
Index: configcommon.pl
===================================================================
RCS file: configcommon.pl
diff -N configcommon.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ configcommon.pl 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,82 @@
+#! /usr/bin/perl
+
+my @args= ARGV;
+my @configoptions;
+my @configvalues;
+my @common;
+my $configcounter = 0;
+
+# first, read the 1st file
+
+open (FILE,"$args[0]") || die "Could not open $args[0]";
+while (<FILE>) {
+ my $str = $_;
+ if (/\# ([\w]+) is not set/) {
+ $configoptions[$configcounter] = $1;
+ $configvalues[$configcounter] = $str;
+ $common[$configcounter] = 1;
+ $configcounter ++;
+ } else {
+ if (/([\w]+)=/) {
+ $configoptions[$configcounter] = $1;
+ $configvalues[$configcounter] = $str;
+ $common[$configcounter] = 1;
+ $configcounter ++;
+ } else {
+ $configoptions[$configcounter] = "foobarbar";
+ $configvalues[$configcounter] = $str;
+ $common[$configcounter] = 1;
+ $configcounter ++;
+ }
+ }
+};
+
+# now, read all configfiles and see of the options match the initial one.
+# if not, mark it not common
+my $cntr=1;
+
+
+while ($cntr < @ARGV) {
+ open (FILE,$args[$cntr]) || die "Could not open $args[$cntr]";
+ while (<FILE>) {
+ my $nooutput;
+ my $counter;
+ my $configname;
+
+ if (/\# ([\w]+) is not set/) {
+ $configname = $1;
+ } else {
+ if (/([\w]+)=/) {
+ $configname = $1;
+ }
+ }
+
+ $counter = 0;
+ $nooutput = 0;
+ while ($counter < $configcounter) {
+ if ("$configname" eq "$configoptions[$counter]") {
+ if ("$_" eq "$configvalues[$counter]") {
+ 1;
+ } else {
+ $common[$counter] = 0;
+ }
+ }
+ $counter++;
+ }
+ }
+
+ $cntr++;
+}
+
+# now print the common values
+my $counter = 0;
+
+while ($counter < $configcounter) {
+ if ($common[$counter]!=0) {
+ print "$configvalues[$counter]";
+ }
+ $counter++;
+}
+
+1;
+
Index: configdiff.pl
===================================================================
RCS file: configdiff.pl
diff -N configdiff.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ configdiff.pl 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,76 @@
+#! /usr/bin/perl
+
+my @args= ARGV;
+my @configoptions;
+my @configvalues;
+my @alreadyprinted;
+my $configcounter = 0;
+
+# first, read the override file
+
+open (FILE,"$args[0]") || die "Could not open $args[0]";
+while (<FILE>) {
+ my $str = $_;
+ if (/\# ([\w]+) is not set/) {
+ $configoptions[$configcounter] = $1;
+ $configvalues[$configcounter] = $str;
+ $alreadprinted[$configcounter] = 0;
+ $configcounter ++;
+ } else {
+ if (/([\w]+)=/) {
+ $configoptions[$configcounter] = $1;
+ $configvalues[$configcounter] = $str;
+ $alreadprinted[$configcounter] = 0;
+ $configcounter ++;
+ } else {
+ $configoptions[$configcounter] = "$_";
+ $configvalues[$configcounter] = $str;
+ $alreadprinted[$configcounter] = 0;
+ $configcounter ++;
+ }
+ }
+};
+
+# now, read and output the entire configfile, except for the overridden
+# parts... for those the new value is printed.
+# O(N^2) algorithm so if this is slow I need to look at it later
+
+open (FILE2,"$args[1]") || die "Could not open $args[1]";
+while (<FILE2>) {
+ my $nooutput;
+ my $counter;
+ my $configname="$_";
+ my $match;
+
+ if (/\# ([\w]+) is not set/) {
+ $configname = $1;
+ } else {
+ if (/([\w]+)=/) {
+ $configname = $1;
+ }
+ }
+
+ $counter = 0;
+ $nooutput = 0;
+ $match = 0;
+# print "C : $configname";
+ while ($counter < $configcounter) {
+ if ("$configname" eq "$configoptions[$counter]") {
+ if ( ("$_" eq "$configvalues[$counter]") || ("$configname" eq "") ) {
+ $match = 1;
+ } else {
+ $alreadyprinted[$configcounter] = 1;
+ print "$_";
+ $match = 1;
+ }
+ }
+ $counter++;
+ }
+ if ($match == 0) {
+ print "$_";
+ }
+
+}
+
+
+1;
Index: cross-amd64.sh
===================================================================
RCS file: cross-amd64.sh
diff -N cross-amd64.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-amd64.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=x86_64-linux- ARCH=x86_64 hammer
+
Index: cross-i586.sh
===================================================================
RCS file: cross-i586.sh
diff -N cross-i586.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-i586.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make ARCH=i386 i586
+
Index: cross-i686.sh
===================================================================
RCS file: cross-i686.sh
diff -N cross-i686.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-i686.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make ARCH=i386 i686
+
Index: cross-ia64.sh
===================================================================
RCS file: cross-ia64.sh
diff -N cross-ia64.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-ia64.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,2 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ia64-linux- ARCH=ia64 ia64
Index: cross-iseries.sh
===================================================================
RCS file: cross-iseries.sh
diff -N cross-iseries.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-iseries.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ppc64-linux- ARCH=ppc64 ppc64iseries
+
Index: cross-ppc.sh
===================================================================
RCS file: cross-ppc.sh
diff -N cross-ppc.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-ppc.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ppc-linux- ARCH=ppc ppc
+
Index: cross-ppc64.sh
===================================================================
RCS file: cross-ppc64.sh
diff -N cross-ppc64.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-ppc64.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ppc64-linux- ARCH=ppc64 ppc64
+
Index: cross-ppc8260.sh
===================================================================
RCS file: cross-ppc8260.sh
diff -N cross-ppc8260.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-ppc8260.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ppc-linux- ARCH=ppc ppc8260
+
Index: cross-ppc8560.sh
===================================================================
RCS file: cross-ppc8560.sh
diff -N cross-ppc8560.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-ppc8560.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ppc-linux- ARCH=ppc ppc8560
+
Index: cross-pseries.sh
===================================================================
RCS file: cross-pseries.sh
diff -N cross-pseries.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-pseries.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=ppc64-linux- ARCH=ppc64 pseries64
+
Index: cross-s390.sh
===================================================================
RCS file: cross-s390.sh
diff -N cross-s390.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-s390.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,2 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=s390-linux- ARCH=s390 s390
Index: cross-s390x.sh
===================================================================
RCS file: cross-s390x.sh
diff -N cross-s390x.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cross-s390x.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,2 @@
+export PATH=$PATH:/opt/cross/bin
+make CROSS_COMPILE=s390x-linux- ARCH=s390 s390x
Index: newpatch.sh
===================================================================
RCS file: newpatch.sh
diff -N newpatch.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ newpatch.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Easy application of new patches.
+# Always adds to the very end. (Bumps last patch nr by 100)
+# Parameters:
+# $1 - patch filename
+# $2 - description
+
+OLD=$(grep ^Patch kernel.spec | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
+NEW=$(($OLD/100*100+100))
+
+sed -i "/^Patch$OLD:\ /a#\ $2\nPatch$NEW:\ $1" kernel.spec
+
+LAST=$(grep ^ApplyPatch kernel.spec | tail -n1 | awk '{ print $2 }')
+
+sed -i "/^ApplyPatch $LAST/aApplyPatch $1" kernel.spec
+
+cvs add $1
+
+scripts/bumpspecfile.py kernel.spec "- $2"
+make clog
+
Index: pull-upstreams.sh
===================================================================
RCS file: pull-upstreams.sh
diff -N pull-upstreams.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pull-upstreams.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+wget http://people.redhat.com/roland/utrace/2.6-current/series
+for i in `grep patch$ series`
+do
+ rm -f linux-2.6-$i
+ wget http://people.redhat.com/roland/utrace/2.6-current/$i
+ mv $i linux-2.6-$i
+done
+rm -f series
+
Index: rebase-xen-hv.sh
===================================================================
RCS file: rebase-xen-hv.sh
diff -N rebase-xen-hv.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rebase-xen-hv.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# it only rebases de hypervisor now
+
+set -x
+
+pushd xen || exit 1
+make clean
+popd
+
+CSET=`hg tip | grep "changeset:" | cut -f2 -d':' | sed 's/ //g'`
+tar cvf xen-$CSET.tar xen || exit 1
+rm -f xen-$CSET.tar.bz2
+bzip2 -v9 xen-$CSET.tar || exit 1
+
+set +x
+
+ls -l xen-$CSET.tar.bz2
Index: rebase-xen-kernel.sh
===================================================================
RCS file: rebase-xen-kernel.sh
diff -N rebase-xen-kernel.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rebase-xen-kernel.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# you are supposed to have both linux-2.6 "upstream tree"
+# and linux-2.6-xen-fedora mercurial updated against that tree
+
+# it needs linux-2.6 linux-2.6-xen and linux-2.6-xen-fedora on the current directory
+# with the right changesets on them.
+
+set -x
+
+# remove previous patch if it exist
+rm -f linux-2.6-xen.patch
+
+for repo in linux-2.6 linux-2.6-xen-fedora xen-3.0.3-testing linux-2.6-xen-3.0.3 ; do
+ if [ ! -d $repo/ ]; then
+ echo "$repo directory don't exist";
+ exit 1
+ else
+ echo " * $repo `cd $repo; (hg tip | grep 'changeset:')`" >> linux-2.6-xen.patch
+ fi
+done
+
+/usr/bin/diff -urNp --exclude=".hg*" --exclude="*.orig" --exclude="*~" \
+ /scratch/src/linux-2.6.18/ linux-2.6-xen-fedora/ >> linux-2.6-xen.patch
+
+
+set +x
+
+ls -lh linux-2.6-xen.patch
Index: rebase.sh
===================================================================
RCS file: rebase.sh
diff -N rebase.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rebase.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,166 @@
+#!/bin/bash
+
+# Current kernel bits
+if [ `grep -c ^patch upstream` -ge 1 ]; then
+ export OLD=`grep ^patch upstream | tail -n1 | sed s/patch-// | sed s/\.bz2//`
+else
+ export OLD=`grep linux-2.6 upstream | tail -n1 | sed s/linux-// | sed s/\.tar\.bz2//`
+fi
+export OLDBASE=`echo $OLD | sed s/-/\ /g | sed s/2\.6\.// | awk '{ print $1 }'`
+if [ `echo $OLD | grep -c rc` -ge 1 ]; then
+ export OLDRC=`echo $OLD | sed s/-/\ /g | sed s/rc// | awk '{ print $2 }'`
+ if [ `echo $OLD | grep -c git` -ge 1 ]; then
+ export OLDGIT=`echo $OLD | sed s/-/\ /g | sed s/git// | awk '{ print $3 }'`
+ else
+ export OLDGIT=0
+ fi
+else
+ export OLDRC=0
+ if [ `echo $OLD | grep -c git` -ge 1 ]; then
+ export OLDGIT=`echo $OLD | sed s/-/\ /g | sed s/git// | awk '{ print $2 }'`
+ else
+ export OLDGIT=0
+ fi
+fi
+
+# Is there a new snapshot or prepatch ?
+NEW=`lynx -dump http://www.kernel.org/kdist/finger_banner | grep "snapshot for the stable"`
+if [ -z "$NEW" ] ; then
+ NEW=`lynx -dump http://www.kernel.org/kdist/finger_banner | grep "prepatch for the stable"`
+ if [ -z "$NEW" ] ; then
+ if [ "$OLDRC" -ne 0 ] ; then
+ NEW=`lynx -dump http://www.kernel.org/kdist/finger_banner | grep "stable version of the Linux kernel is"`
+ else
+ echo "No new rc or git snapshot of stable branch".
+ exit
+ fi
+ fi
+fi
+export N=`echo $NEW | awk '{ print $11 }'`
+if [ -z "$N" ]; then
+ # "Stable version"
+ export NEW=`echo $NEW | awk '{ print $10 }'`
+else
+ export NEW=`echo $NEW | awk '{ print $11 }'`
+fi
+
+export NEWBASE=`echo $NEW | sed s/-/\ /g | sed s/2\.6\.// | awk '{ print $1 }'`
+if [ `echo $NEW | grep -c rc` -ge 1 ]; then
+ export NEWRC=`echo $NEW | sed s/-/\ /g | sed s/rc// | awk '{ print $2 }'`
+ if [ `echo $NEW | grep -c git` -ge 1 ]; then
+ export NEWGIT=`echo $NEW | sed s/-/\ /g | sed s/git// | awk '{ print $3 }'`
+ else
+ export NEWGIT=0
+ fi
+else
+ export NEWRC=0
+ if [ `echo $NEW | grep -c git` -ge 1 ]; then
+ export NEWGIT=`echo $NEW | sed s/-/\ /g | sed s/git// | awk '{ print $2 }'`
+ else
+ export NEWGIT=0
+ fi
+fi
+
+echo "OLD kernel was $OLD BASE=$OLDBASE RC=$OLDRC GIT=$OLDGIT"
+echo "NEW kernel is $NEW BASE=$NEWBASE RC=$NEWRC GIT=$NEWGIT"
+
+if [ "$OLDRC" -eq 0 -a "$OLDGIT" -eq 0 -a "$OLDGIT" -ne "$NEWGIT" ]; then
+ echo "Rebasing from a stable release to a new git snapshot"
+ perl -p -i -e 's/^%define\ released_kernel\ 1/\%define\ released_kernel\ 0/' kernel.spec
+ # force these to zero in this case, they may not have been when we rebased to stable
+ perl -p -i -e 's/^%define\ rcrev.*/\%define\ rcrev\ 0/' kernel.spec
+ perl -p -i -e 's/^%define\ gitrev.*/\%define\ gitrev\ 0/' kernel.spec
+fi
+
+if [ "$NEWRC" -eq 0 -a "$NEWGIT" -eq 0 ]; then
+ echo "Rebasing from -rc to final release."
+ perl -p -i -e 's/^%define\ released_kernel\ 0/\%define\ released_kernel\ 1/' kernel.spec
+ export TARBALL_BASE=$(($OLDBASE-1))
+ perl -p -i -e 's/^%define\ base_sublevel\ $ENV{TARBALL_BASE}/%define\ base_sublevel\ $ENV{NEWBASE}/' kernel.spec
+ perl -p -i -e 's/^%define\ rcrev.*/\%define\ rcrev\ 0/' kernel.spec
+ perl -p -i -e 's/^%define\ gitrev.*/\%define\ gitrev\ 0/' kernel.spec
+
+ grep -v kernel-2.6.$TARBALL_BASE .cvsignore >.cvsignore.tmp ; mv .cvsignore.tmp .cvsignore
+ echo kernel-2.6.$NEWBASE >> .cvsignore
+
+ for i in upstream sources .cvsignore
+ do
+ grep -v linux-2.6.$(($OLDBASE-1)).tar.bz2 $i > .$i.tmp; mv .$i.tmp $i
+ grep -v patch-2.6.$OLDBASE-rc$OLDRC.bz2 $i > .$i.tmp; mv .$i.tmp $i
+ grep -v patch-2.6.$OLDBASE-rc$OLDRC-git$OLDGIT.bz2 $i > .$i.tmp; mv .$i.tmp $i
+ done
+
+ echo linux-2.6.$TARBALL_BASE.tar.bz2 >> upstream
+
+ rm -f linux-2.6.$(($OLDBASE-1)).tar.bz2
+ rm -f linux-2.6.$(($OLDBASE-1)).tar.bz2.sign
+ rm -f patch-2.6.$OLDBASE-rc$OLDRC.bz2
+ rm -f patch-2.6.$OLDBASE-rc$OLDRC.bz2.sign
+ rm -f patch-2.6.$OLDBASE-rc$OLDRC-git$OLDGIT.bz2
+ rm -f patch-2.6.$OLDBASE-rc$OLDRC-git$OLDGIT.bz2.sign
+
+ cvs remove linux-2.6.$(($OLDBASE-1)).tar.bz2.sign
+ cvs remove patch-2.6.$OLDBASE-rc$OLDRC.bz2.sign
+ cvs remove patch-2.6.$OLDBASE-rc$OLDRC-git$OLDGIT.bz2.sign
+
+ make download
+ make upload FILES=linux-$NEW.tar.bz2
+
+ cvs add linux-$NEW.tar.bz2.sign
+
+ bumpspecfile.py kernel.spec "- $NEW"
+ make clog
+ echo FIXME! Fix up fedora_cvs_origin
+ make verrel
+ exit
+fi
+
+if [ "$OLDRC" != "$NEWRC" ]; then
+ echo "Different rc. Rebasing from $OLDRC to $NEWRC"
+ perl -p -i -e 's/^%define\ rcrev.*/\%define\ rcrev\ $ENV{"NEWRC"}/' kernel.spec
+ perl -p -i -e 's/$ENV{OLDBASE}-rc$ENV{OLDRC}.bz2/$ENV{NEWBASE}-rc$ENV{NEWRC}.bz2/' .cvsignore
+ perl -p -i -e 's/$ENV{OLDBASE}-rc$ENV{OLDRC}.bz2/$ENV{NEWBASE}-rc$ENV{NEWRC}.bz2/' upstream
+ grep -v patch-2.6.$OLDBASE-rc$OLDRC.bz2 sources > .sources.tmp; mv .sources.tmp sources
+ if [ `grep -c patch-2.6.$NEWBASE-rc$NEWRC.bz2 upstream` -eq 0 ]; then
+ echo patch-2.6.$NEWBASE-rc$NEWRC.bz2 >> .cvsignore
+ echo patch-2.6.$NEWBASE-rc$NEWRC.bz2 >> upstream
+ fi
+ rm -f patch-2.6.$OLDBASE-rc$OLDRC.bz2
+ cvs remove patch-2.6.$OLDBASE-rc$OLDRC.bz2.sign
+fi
+
+if [ "$OLDGIT" != "$NEWGIT" ]; then
+ if [ "$OLDRC" -eq 0 -a "$OLDGIT" -eq 0 ]; then
+ echo "Rebasing to pre-rc git$NEWGIT"
+ else
+ echo "Different git. Rebasing from git$OLDGIT to git$NEWGIT"
+ fi
+ perl -p -i -e 's/^%define\ gitrev.*/\%define\ gitrev\ $ENV{"NEWGIT"}/' kernel.spec
+ if [ "$OLDGIT" -ne 0 ]; then
+ if [ "$NEWGIT" -ne 0 ]; then
+ perl -p -i -e 's/$ENV{OLD}/$ENV{NEW}/' .cvsignore
+ perl -p -i -e 's/$ENV{OLD}/$ENV{NEW}/' upstream
+ fi
+ grep -v patch-$OLD.bz2 sources > .sources.tmp; mv .sources.tmp sources
+ grep -v patch-$OLD.bz2 upstream > .upstream.tmp; mv .upstream.tmp upstream
+ else
+ echo patch-$NEW.bz2 >> .cvsignore
+ echo patch-$NEW.bz2 >> upstream
+ fi
+
+ make download
+ make upload FILES=patch-$NEW.bz2
+
+ cvs add patch-$NEW.bz2.sign
+ if [ "$OLDGIT" -ne 0 ]; then
+ rm -f patch-$OLD.bz2
+ rm -f patch-$OLD.bz2.sign
+ fi
+ cvs remove patch-$OLD.bz2.sign
+fi
+
+if [ "$OLDRC" != "$NEWRC" -o "$OLDGIT" != "$NEWGIT" ]; then
+ bumpspecfile.py kernel.spec "- $NEW"
+ make clog
+fi
+
Index: reconfig.sh
===================================================================
RCS file: reconfig.sh
diff -N reconfig.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ reconfig.sh 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+base_sublevel=$(grep "^%define base_sublevel" kernel.spec | head -n1 | awk '{ print $3 }')
+
+if [ `grep -c "^%define released_kernel 1" kernel.spec` -ge 1 ]; then
+ V=$base_sublevel
+else
+ let V=$base_sublevel+1
+fi
+
+cd kernel-2.6.$base_sublevel/linux-2.6.$base_sublevel.noarch/
+rm -f kernel-*.config
+cp ../../kernel-2.6.$V-*.config .
+
+for i in kernel-*.config
+do
+ echo $i
+ rm -f .config
+ cp $i .config
+ Arch=`head -1 .config | cut -b 3-`
+ make ARCH=$Arch nonint_oldconfig > /dev/null || exit 1
+ echo "# $Arch" > configs/$i
+ cat .config >> configs/$i
+ echo
+done
+
Index: rediffall.pl
===================================================================
RCS file: rediffall.pl
diff -N rediffall.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ rediffall.pl 12 Nov 2007 12:57:04 -0000 1.2
@@ -0,0 +1,64 @@
+#!/usr/bin/perl -w
+#
+# Script to rediff all patches in the spec
+# Usage: perl -w rediffall.pl < kernel-2.4.spec
+#
+# $workdir is where the new rediff'ed patches are created
+# $origdir is where the original patches and tarball are located
+#
+# Note that both $workdir and $origdir must be absolute path names.
+# Suggestion: create a /kernel symbolic link to the top of your CVS tree.
+
+my $workdir = "/dev/shm/redifftree";
+my $origdir = "/home/davej/devel";
+my $kernver = "linux-2.6.17";
+my $datestrip = "s/^\\(\\(+++\\|---\\) [^[:blank:]]\\+\\)[[:blank:]].*/\\1/";
+my $patchindex = 0;
+my @patchlist;
+
+# phase 1: create a tree
+print "Extracting pristine source..\n";
+system("mkdir -p $workdir");
+system("rm -rf $workdir/*");
+chdir("$workdir");
+system("tar -jxvf $origdir/$kernver.tar.bz2 > /dev/null");
+system("cp -al $kernver linux-$patchindex");
+
+# phase 2: read the spec from stdin and store all patches
+print "Reading specfile..\n";
+
+while (<>) {
+ my $line = $_;
+ if ($line =~ /^Patch([0-9]+)\: ([a-zA-Z0-9\-\_\.\+]+\.patch)/) {
+ $patchlist[$1] = $2;
+ } else {
+ if ($line =~ /^Patch([0-9]+)\: ([a-zA-Z0-9\-\_\.]+\.bz2)/) {
+ $patchlist[$1] = $2;
+ }
+ }
+
+ if ($line =~ /^%patch([0-9]+) -p1/) {
+ # copy the tree, apply the patch, diff and remove the old tree
+ my $oldindex = $patchindex;
+ $patchindex = $1;
+
+ print "rediffing patch number $patchindex: $patchlist[$patchindex]\n";
+
+ system("cp -al linux-$oldindex linux-$patchindex");
+ chdir("linux-$patchindex");
+ if ($patchlist[$patchindex] =~ /bz2/) {
+ system("bzcat $origdir/$patchlist[$patchindex] | patch -p1 &>/dev/null");
+ } else {
+ system("cat $origdir/$patchlist[$patchindex] | patch -p1 &>/dev/null");
+ }
+ chdir("$workdir");
+ system("rm -f `find -name \"*orig\"`");
+ if ($patchlist[$patchindex] =~ /bz2/) {
+ } else {
+ system("diff -urNp --exclude-from=/home/davej/.exclude linux-$oldindex linux-$patchindex | sed '$datestrip' > $patchlist[$patchindex]");
+ }
+ system("rm -rf linux-$oldindex");
+ }
+};
+
+1;
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]