|
From: Serge L. <fi...@in...> - 2007-11-30 20:23:25
|
Hi,
please tell me your opinion about the following change:
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/prepare,v
retrieving revision 1.69
diff -u -r1.69 prepare
--- scripts/prepare 22 Oct 2007 14:08:51 -0000 1.69
+++ scripts/prepare 29 Nov 2007 14:48:14 -0000
@@ -39,6 +39,16 @@
echo "please remove or rename it"
exit 1
fi
+
+ pushd $KERNELDIR > /dev/null
+ if [ ! -f .minor_version_patch.done ]; then
+ for i in $(ls -1 ../../src/kernel-minor-patch/*)
+ do
+ bzcat $i | patch -p1 || exit 1
+ done
+ touch .minor_version_patch.done
+ popd > /dev/null
+ fi
# let's find out if we force the usage of old kernel include files
# this is sometimes necessary, when they change too much in the new kernel
===================================================================
from my environment:
src/kernel-minor-patch/patch-2.6.23.9.bz2
src/linux-2.6.23.tar.bz2
the ISO file was created successfully.
--
Sincerely,
Serge Leschinsky
|
|
From: Heiko Z. <he...@zu...> - 2007-11-30 21:05:36
|
I like it, then we don't have to download that huge kernel tarball every time. It may also work if you use the $KERNELVERSION variable (may be spelled a little different) for the filename, then we don't need the separate folder. Something like: bzcat $DL_DIR/srv/patch-$KERNELVERSION.bz2 | patch -p1 || exit 1 Heiko On Fri, November 30, 2007 14:23, Serge Leschinsky wrote: > Hi, > > > please tell me your opinion about the following change: > > =================================================================== > RCS file: /cvsroot/devil-linux/build/scripts/prepare,v > retrieving revision 1.69 diff -u -r1.69 prepare --- scripts/prepare 22 > Oct 2007 14:08:51 -0000 1.69 > +++ scripts/prepare 29 Nov 2007 14:48:14 -0000 > @@ -39,6 +39,16 @@ > echo "please remove or rename it" exit 1 fi + > + pushd $KERNELDIR > /dev/null > + if [ ! -f .minor_version_patch.done ]; then > + for i in $(ls -1 ../../src/kernel-minor-patch/*) > + do > + bzcat $i | patch -p1 || exit 1 > + done > + touch .minor_version_patch.done > + popd > /dev/null > + fi > > > # let's find out if we force the usage of old kernel include files > # this is sometimes necessary, when they change too much in the new kernel > =================================================================== > > > from my environment: src/kernel-minor-patch/patch-2.6.23.9.bz2 > src/linux-2.6.23.tar.bz2 > > the ISO file was created successfully. -- Regards Heiko Zuerker http://www.devil-linux.org |
|
From: Serge L. <fi...@in...> - 2007-12-03 07:44:26
|
Heiko,
I'm sorry for delay - I forgot to pay the bill and ISP blocked my account from
December, 1... :-\
Heiko Zuerker wrote:
> I like it, then we don't have to download that huge kernel tarball every
> time.
It's the first good news for me today :-)
> It may also work if you use the $KERNELVERSION variable (may be spelled a
> little different) for the filename, then we don't need the separate
> folder.
> Something like:
> bzcat $DL_DIR/srv/patch-$KERNELVERSION.bz2 | patch -p1 || exit 1
:-) I tried to do that.
To define filename for the file I should know minor version of the kernel patch
or add asterisk as a mask. I mean KERNELVERSION returns 2.6.23 (in my case) but
the patch has name patch-KERNELVERSION.MINOR_VERSION.bz2 (2.6.23.9). If I use
the pattern patch-KERNELVERSION.*.bz2 I get false positive, so I have to make
the pattern narrower...
'man bash' helps me :-) and I've created the next variant:
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/prepare,v
retrieving revision 1.69
diff -u -r1.69 prepare
--- scripts/prepare 22 Oct 2007 14:08:51 -0000 1.69
+++ scripts/prepare 1 Dec 2007 11:54:19 -0000
@@ -40,6 +40,18 @@
exit 1
fi
+# We are applying minor version kernel patch here
+ pushd $KERNELDIR > /dev/null
+ if [ ! -f .minor_version_patch.done ]; then
+ shopt -s extglob
+ for i in $(ls ../../src/patch-$KERNELVERSION.+([[:digit:]]).bz2)
+ do
+ bzcat $i | patch -p1 || exit 1
+ done
+ touch .minor_version_patch.done
+ popd > /dev/null
+ fi
+
# let's find out if we force the usage of old kernel include files
# this is sometimes necessary, when they change too much in the new kernel
KERN_INC=$(find_src_dir kernel-includes)
--
Sincerely,
Serge Leschinsky
|
|
From: Heiko Z. <he...@zu...> - 2007-12-03 14:23:47
|
On Mon, December 3, 2007 01:44, Serge Leschinsky wrote: > Heiko, > > I'm sorry for delay - I forgot to pay the bill and ISP blocked my account > from December, 1... :-\ > > > Heiko Zuerker wrote: > >> I like it, then we don't have to download that huge kernel tarball >> every time. > It's the first good news for me today :-) > > >> It may also work if you use the $KERNELVERSION variable (may be spelled >> a little different) for the filename, then we don't need the separate >> folder. Something like: >> bzcat $DL_DIR/srv/patch-$KERNELVERSION.bz2 | patch -p1 || exit 1 > :-) I tried to do that. > To define filename for the file I should know minor version of the kernel > patch or add asterisk as a mask. I mean KERNELVERSION returns 2.6.23 (in > my case) but the patch has name patch-KERNELVERSION.MINOR_VERSION.bz2 > (2.6.23.9). If I use > the pattern patch-KERNELVERSION.*.bz2 I get false positive, so I have to > make the pattern narrower... > > 'man bash' helps me :-) and I've created the next variant: > > > =================================================================== > RCS file: /cvsroot/devil-linux/build/scripts/prepare,v > retrieving revision 1.69 diff -u -r1.69 prepare --- scripts/prepare 22 > Oct 2007 14:08:51 -0000 1.69 > +++ scripts/prepare 1 Dec 2007 11:54:19 -0000 > @@ -40,6 +40,18 @@ > exit 1 fi > > +# We are applying minor version kernel patch here > + pushd $KERNELDIR > /dev/null > + if [ ! -f .minor_version_patch.done ]; then > + shopt -s extglob > + for i in $(ls ../../src/patch-$KERNELVERSION.+([[:digit:]]).bz2) > + do > + bzcat $i | patch -p1 || exit 1 > + done > + touch .minor_version_patch.done > + popd > /dev/null > + fi > + > # let's find out if we force the usage of old kernel include files > # this is sometimes necessary, when they change too much in the new kernel > KERN_INC=$(find_src_dir kernel-includes) Now that's a beautiful solution! I'm too lazy to look it up now, does [[:digit:] work for double digits too ? -- Regards Heiko Zuerker http://www.devil-linux.org |
|
From: Serge L. <fi...@in...> - 2007-12-03 14:46:20
|
Heiko, > > Now that's a beautiful solution! Thank you! > I'm too lazy to look it up now, does [[:digit:] work for double digits too ? > Actually [[:digit:]] works for one digit only, but +([[:digit:]]) is a 'bash' analog of perl expression (\d)+, i.e. one or more times. -- Sincerely Serge Leschinsky |