* Incremental Patch Building Script
@ 2002-04-16 10:04 Robin Johnson
2002-04-16 12:10 ` Adrian Bunk
0 siblings, 1 reply; 5+ messages in thread
From: Robin Johnson @ 2002-04-16 10:04 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 466 bytes --]
Hi,
I have written a script to build incremental patches, as found on
bzimage.org previously. I have written this so that other people will find
it easier to roll their own incremental patches to use.
Comments/Suggestions on improvement welcome
Please CC me, as I am not subscribed to the list.
Thanks.
--
Robin Hugh Johnson
E-Mail : robbat2@orbis-terrarum.net
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1844 bytes --]
#!/bin/bash
#
# Incremental Kernel Patch Builder
# Robin Johnson
# robbat2@orbis-terrarum.net
#
# Build an incremental diff between two kernel patches
# run as "./interpatch 2.4.13 ac7 ac8" to build patch-2.4.13-ac7-ac8.bz2
# this would require the follow files in the current directory:
# linux-2.4.13.tar.bz2
# patch-2.4.13-ac7.bz2
# patch-2.4.13-ac8.bz2
#
# REQUIRES tmpfs and lots of RAM for speed reasons
#
#
TAR_CMD="tar x"
COMPRESS_CMD="bzip2 -9c"
UNCOMPRESS_CMD="bzip2 -dc"
PATCH_CMD="patch -s -p1"
DIFF_CMD="diff -HurdN" #the Hurd kernel ?
MOUNTCMD="mount -t tmpfs /dev/ram8"
MOUNTOPT=" -o size=512M"
# -----------------------------------------
# NO USER CONFIGURATION BEYOND THIS!
# -----------------------------------------
KERNELVERSION=$1
PATCHLEVEL1=$2
PATCHLEVEL2=$3
SRC="linux-${KERNELVERSION}.tar.bz2"
OLDVERSION="${KERNELVERSION}-${PATCHLEVEL1}"
NEWVERSION="${KERNELVERSION}-${PATCHLEVEL2}"
OLDDIR="linux-${OLDVERSION}"
NEWDIR="linux-${NEWVERSION}"
PATCH1="patch-${OLDVERSION}.bz2"
PATCH2="patch-${NEWVERSION}.bz2"
TARGET="patch-${KERNELVERSION}-${PATCHLEVEL1}-${PATCHLEVEL2}"
SRCDIR=`pwd`
TMPDIR=`mktemp -q -d kernpatch.XXXXXX`
echo "Setting up space..."
${MOUNTCMD} ${TMPDIR} ${MOUNTOPT}
cd ${TMPDIR}
echo "Extracting..."
${UNCOMPRESS_CMD} ${SRCDIR}/${SRC} | ${TAR_CMD}
echo "Copying..."
mv linux $OLDDIR
cp -r $OLDDIR $NEWDIR
echo "Patching #1..."
${UNCOMPRESS_CMD} ${SRCDIR}/${PATCH1} | ${PATCH_CMD} -d $OLDDIR
echo "Patching #2..."
${UNCOMPRESS_CMD} ${SRCDIR}/${PATCH2} | ${PATCH_CMD} -d $NEWDIR
echo "Building diff..."
${DIFF_CMD} $OLDDIR $NEWDIR > ${TARGET}
echo "Compressing diff..."
${COMPRESS_CMD} ${TARGET} > ${SRCDIR}/${TARGET}.bz2
cd ${SRCDIR}
echo "Cleaning up..."
rm -rf ${TMPDIR}/*
umount ${TMPDIR}
rm -rf ${TMPDIR}
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Incremental Patch Building Script
2002-04-16 10:04 Incremental Patch Building Script Robin Johnson
@ 2002-04-16 12:10 ` Adrian Bunk
2002-04-16 14:11 ` Robin Johnson
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2002-04-16 12:10 UTC (permalink / raw)
To: Robin Johnson; +Cc: linux-kernel
On Tue, 16 Apr 2002, Robin Johnson wrote:
> Hi,
>
> I have written a script to build incremental patches, as found on
> bzimage.org previously. I have written this so that other people will find
> it easier to roll their own incremental patches to use.
>
> Comments/Suggestions on improvement welcome
There's already interdiff from Tim Waugh's patchutils [1] that makes
incremental diffs between patches. And interdiff doesn't need the source
the patches are against (IOW: to make an incremental patch between two
kernel -pre patches you don't need any kernel sources). It's pretty
simple:
interdiff -z patch-2.4.19-pre6.gz patch-2.4.19-pre7.gz > mydiff
> Please CC me, as I am not subscribed to the list.
>
> Thanks.
cu
Adrian
[1] http://cyberelk.net/tim/data/patchutils/
--
You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
Alan Cox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Incremental Patch Building Script
2002-04-16 12:10 ` Adrian Bunk
@ 2002-04-16 14:11 ` Robin Johnson
2002-04-16 15:14 ` Tim Waugh
2002-04-19 23:16 ` Tim Waugh
0 siblings, 2 replies; 5+ messages in thread
From: Robin Johnson @ 2002-04-16 14:11 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-kernel
On Tue, 16 Apr 2002, Adrian Bunk wrote:
>
> There's already interdiff from Tim Waugh's patchutils [1] that makes
> incremental diffs between patches. And interdiff doesn't need the source
> the patches are against (IOW: to make an incremental patch between two
> kernel -pre patches you don't need any kernel sources). It's pretty
> simple:
>
> interdiff -z patch-2.4.19-pre6.gz patch-2.4.19-pre7.gz > mydiff
I did try interdiff before writing this script, and it wasn't generating
the right output.
--
Robin Hugh Johnson
E-Mail : robbat2@orbis-terrarum.net
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ# : 30269588 or 41961639
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Incremental Patch Building Script
2002-04-16 14:11 ` Robin Johnson
@ 2002-04-16 15:14 ` Tim Waugh
2002-04-19 23:16 ` Tim Waugh
1 sibling, 0 replies; 5+ messages in thread
From: Tim Waugh @ 2002-04-16 15:14 UTC (permalink / raw)
To: Robin Johnson; +Cc: Adrian Bunk, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
On Tue, Apr 16, 2002 at 07:11:46AM -0700, Robin Johnson wrote:
> > interdiff -z patch-2.4.19-pre6.gz patch-2.4.19-pre7.gz > mydiff
>
> I did try interdiff before writing this script, and it wasn't generating
> the right output.
The Linus patches have 'a/' or 'b/' as the first component of the
filename. Try using 'interdiff -zp1 ...'---the '-p1' option causes
interdiff to ignore the first pathname component.
Tim.
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Incremental Patch Building Script
2002-04-16 14:11 ` Robin Johnson
2002-04-16 15:14 ` Tim Waugh
@ 2002-04-19 23:16 ` Tim Waugh
1 sibling, 0 replies; 5+ messages in thread
From: Tim Waugh @ 2002-04-19 23:16 UTC (permalink / raw)
To: Robin Johnson; +Cc: Adrian Bunk, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 752 bytes --]
On Tue, Apr 16, 2002 at 07:11:46AM -0700, Robin Johnson wrote:
> On Tue, 16 Apr 2002, Adrian Bunk wrote:
> >
> > There's already interdiff from Tim Waugh's patchutils [1] that makes
> > incremental diffs between patches. And interdiff doesn't need the source
> > the patches are against (IOW: to make an incremental patch between two
> > kernel -pre patches you don't need any kernel sources). It's pretty
> > simple:
> >
> > interdiff -z patch-2.4.19-pre6.gz patch-2.4.19-pre7.gz > mydiff
>
> I did try interdiff before writing this script, and it wasn't generating
> the right output.
I think that the problems Robin was seeing are resolved in
patchutils-0.2.12.
(The output was correct, but needlessly lengthy.)
Tim.
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-19 23:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-16 10:04 Incremental Patch Building Script Robin Johnson
2002-04-16 12:10 ` Adrian Bunk
2002-04-16 14:11 ` Robin Johnson
2002-04-16 15:14 ` Tim Waugh
2002-04-19 23:16 ` Tim Waugh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox