From 5e13a4ed63b2468c3320265f3acc4921bbf860cb Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Tue, 19 Aug 2003 16:31:32 +0000 Subject: [PATCH] more inteligent apply_patchfiles, converted linux packages to use patchfiles and so copy all patches (#105) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1124 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 2 ++ .../linux24-header-cross.desc | 2 +- .../base/linux24-header/linux24-header.desc | 2 +- package/base/linux24-src/linux24-src.desc | 2 +- package/base/linux24/linux24.desc | 2 +- package/base/linux24/lx_config.sh | 25 ++++++++----------- .../linux24benh-header.desc | 2 +- .../linux24benh-src/linux24benh-src.desc | 2 +- package/powerpc/linux24benh/linux24benh.desc | 2 +- scripts/functions | 8 ++++-- 10 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index 8d6eac327..66886b858 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -10,6 +10,8 @@ - removed /tmp mounting from system.init - fails with real filesystem - relaced some $( cd foo/bar ; ls ) with a direct $( ls foo/bar/ ) - rmoved sanity check for libart since it does not need glib ... + - more inteligent apply_patchfiles, converted linux packages to use + patchfiles and so copy all patches (#105) *) 2003-08-18 (2.0.0-camp - 2.0.0-rc1) diff --git a/package/base/linux24-header-cross/linux24-header-cross.desc b/package/base/linux24-header-cross/linux24-header-cross.desc index 6fb479139..a02a4f1fc 100644 --- a/package/base/linux24-header-cross/linux24-header-cross.desc +++ b/package/base/linux24-header-cross/linux24-header-cross.desc @@ -39,7 +39,7 @@ [E] group kernel-header [O] vanilla_ver="2.4.21" -[O] lx_patches="i2c-2.7.0-2.4.21-rc6.patch.bz2 acpi-20030619-2.4.21.diff.bz2" +[O] var_append patchfiles " " "i2c-2.7.0-2.4.21-rc6.patch.bz2 acpi-20030619-2.4.21.diff.bz2" [L] GPL [S] Stable diff --git a/package/base/linux24-header/linux24-header.desc b/package/base/linux24-header/linux24-header.desc index 564eb980a..27a8b971d 100644 --- a/package/base/linux24-header/linux24-header.desc +++ b/package/base/linux24-header/linux24-header.desc @@ -39,7 +39,7 @@ [E] group kernel-header [O] vanilla_ver="2.4.21" -[O] var_append lx_patches " " "i2c-2.8.0-2.4.21.patch acpi-20030619-2.4.21.diff.bz2" +[O] var_append patchfiles " " "i2c-2.8.0-2.4.21.patch acpi-20030619-2.4.21.diff.bz2" [L] GPL [S] Stable diff --git a/package/base/linux24-src/linux24-src.desc b/package/base/linux24-src/linux24-src.desc index 64f21711e..9d3f67eeb 100644 --- a/package/base/linux24-src/linux24-src.desc +++ b/package/base/linux24-src/linux24-src.desc @@ -39,7 +39,7 @@ [E] group kernel-src [O] vanilla_ver="2.4.21" -[O] var_append lx_patches " " "i2c-2.8.0-2.4.21.patch acpi-20030619-2.4.21.diff.bz2" +[O] var_append patchfiles " " "i2c-2.8.0-2.4.21.patch acpi-20030619-2.4.21.diff.bz2" [L] GPL [S] Stable diff --git a/package/base/linux24/linux24.desc b/package/base/linux24/linux24.desc index 1857897b7..12e8ae997 100644 --- a/package/base/linux24/linux24.desc +++ b/package/base/linux24/linux24.desc @@ -42,7 +42,7 @@ [P] X -1---5---9 109.000 [O] vanilla_ver="2.4.21" -[O] var_append lx_patches " " "i2c-2.8.0-2.4.21.patch acpi-20030619-2.4.21.diff.bz2" +[O] var_append patchfiles " " "i2c-2.8.0-2.4.21.patch acpi-20030619-2.4.21.diff.bz2" [D] 4044266806 linux-2.4.21.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.4/ [D] 2504740549 i2c-2.8.0-2.4.21.patch !http://www.ensicaen.ismra.fr/~delvare/devel/i2c/linux-2.4.21-i2c-2.8.0.patch diff --git a/package/base/linux24/lx_config.sh b/package/base/linux24/lx_config.sh index b7a3f1c13..7d8583576 100644 --- a/package/base/linux24/lx_config.sh +++ b/package/base/linux24/lx_config.sh @@ -32,26 +32,21 @@ lx_cpu=`echo "$arch_machine" | sed -e s/x86/i386/ \ MAKE="$MAKE ARCH=$lx_cpu CROSS_COMPILE=$archprefix KCC=$KCC" +# correct the abolute path for patchfiles supplied in the .conf file +for x in $patchfiles ; do + if [ ! -e $x ] ; then + var_remove patchfiles " " $x + x=$archdir/$x + var_append parchfiles " " $x + fi +done + lx_config () { echo "Generic linux source patching and configuration ..." - for x in $lx_patches ; do - echo "Applying $x ..." - [ -e $x ] || x=$archdir/$x - if [[ $x = *.bz2 ]] ; then - bzcat $x | patch -p1 -s - else - cat $x | patch -p1 -s - fi - done - hook_eval prepatch - echo "Patching ..." - for x in $patchfiles ; do - echo "Applying '$x' ..." - patch -p1 -s < $x - done + apply_patchfiles hook_eval postpatch echo "Redefining some VERSION flags ..." diff --git a/package/powerpc/linux24benh-header/linux24benh-header.desc b/package/powerpc/linux24benh-header/linux24benh-header.desc index 91ad57027..22fdc7d70 100644 --- a/package/powerpc/linux24benh-header/linux24benh-header.desc +++ b/package/powerpc/linux24benh-header/linux24benh-header.desc @@ -39,7 +39,7 @@ [E] group kernel-src [O] vanilla_ver="2.4.21" -[O] lx_patches="patch-2.4.21-ben2.bz2" +[O] var_append patchfiles " " "patch-2.4.21-ben2.bz2" [L] GPL [S] Stable diff --git a/package/powerpc/linux24benh-src/linux24benh-src.desc b/package/powerpc/linux24benh-src/linux24benh-src.desc index 9c677b520..a4619b0c7 100644 --- a/package/powerpc/linux24benh-src/linux24benh-src.desc +++ b/package/powerpc/linux24benh-src/linux24benh-src.desc @@ -39,7 +39,7 @@ [E] group kernel-src [O] vanilla_ver="2.4.21" -[O] lx_patches="patch-2.4.21-ben2.bz2" +[O] var_append patchfiles " " "patch-2.4.21-ben2.bz2" [L] GPL [S] Stable diff --git a/package/powerpc/linux24benh/linux24benh.desc b/package/powerpc/linux24benh/linux24benh.desc index 62a36a861..3dc7d32d1 100644 --- a/package/powerpc/linux24benh/linux24benh.desc +++ b/package/powerpc/linux24benh/linux24benh.desc @@ -42,7 +42,7 @@ [R] + powerpc [O] vanilla_ver="2.4.21" -[O] lx_patches="patch-2.4.21-ben2.bz2" +[O] var_append patchfiles " " "patch-2.4.21-ben2.bz2" [D] 4044266806 linux-2.4.21.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.4/ [D] 2875783741 patch-2.4.21-ben2.bz2 ftp://ftp.kernel.org/pub/linux/kernel/people/benh/ diff --git a/scripts/functions b/scripts/functions index 60267a3ec..3b25f3b21 100644 --- a/scripts/functions +++ b/scripts/functions @@ -411,8 +411,12 @@ register_badfiles() { apply_patchfiles() { for x in $patchfiles; do echo "Apply patch $x ..." - eval "patch $patchopt < $x" - done + if [[ $x = *.bz2 ]] ; then + bzcat $x | patch $patchopt + else + eval patch $patchopt < $x + fi + done } # Main program for building a package