diff --git a/base/linux26-src/linux26-src.conf b/base/linux26-src/linux26-src.conf index f65efe777..e0ce9d1ec 100644 --- a/base/linux26-src/linux26-src.conf +++ b/base/linux26-src/linux26-src.conf @@ -14,52 +14,79 @@ # --- SDE-COPYRIGHT-NOTE-END --- # include the function to patch and configure the kernel -. $base/package/base/linux26/lx_config.sh +. $base/package/*/*/linux-conf.in main_lx_src() { - cd $root/usr/src + local vanilla_ver=$( echo $ver | cut -d. -f1-3 ) + local patches_dir= echo "Extracting the Linux Kernel Sources [$vanilla_ver] ... " - lx_tempdir=`mktemp -d tmp.XXXXXXXXXX` # hack to extract the files into our usr/src dir ... # this part is continued inside lx_injectextraversion - ln -sf $PWD/${lx_tempdir} $builddir/linux-${vanilla_ver} - tar -k $taropt $archdir/$srctar -C $builddir/ - chown -R 0:0 ${lx_tempdir} ; chmod go=u,go-w ${lx_tempdir} + tar $taropt $( match_source_file -p linux linux$treever | head -n 1 ) - echo "Copying kernel patches ... " - rm -rf linux$treever-patches ; mkdir -p linux$treever-patches - cp -v $base/package/$repository/linux$treever/README linux$treever-patches/ - cp -v $patchfiles linux$treever-patches/ - - cd ${lx_tempdir} + chown -R 0:0 linux-$vanilla_ver; chmod go=u,go-w linux-$vanilla_ver + cd linux-$vanilla_ver + lx_patch lx_config + + patches_dir="$root/usr/src/linux-$lx_kernelrelease-patches" + # remove debug configs rm -f .config.[1-9] - if [ "$ROCKCFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then + if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then # create a valid .config (new settings may be available etc.) yes '' | eval $MAKE oldconfig > /dev/null - else - cp -v .config_nomods ../linux$treever-patches/config_nomods.txt - cp -v .config_modules ../linux$treever-patches/config_modules.txt fi - # can fail in stage 0-1 ... - if [ $stagelevel -gt 1 ] && [[ $treever = 24* ]] ; then - echo "Creating dependencies (e.g. for versioned symbols) ..." - eval $MAKE dep-files + if grep -q "CONFIG_MODULES=y" .config ; then + eval $MAKE $makeopt modules_prepare fi echo "Clean up the *.orig and *~ files ... " find -name '*.orig' -o -name '*~' | xargs rm -f rm -f .config.old + + echo "Copying kernel patches ... " + rm -rf "$patches_dir"; mkdir -p "$patches_dir" + + cat <<-EOT > $patches_dir/README + This directory contains all the applied patches, used + to build the kernel (in addition to the official kernel sources). + EOT + + for x in $patchfiles ; do + # if the patch does not exist it was downloaded or so + # and we just do not copy it ... + [ ! -f "$x" ] || cp -v "$x" "$patches_dir" + done + + if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" != none ] ; then + cp -v .config_nomods "$patches_dir/config_nomods.txt" + cp -v .config_modules "$patches_dir/config_modules.txt" + fi + cp -v .config "$patches_dir/config.txt" + + echo "Installing kernel sources [$lx_kernelrelease] " + rm -rf $root/usr/src/{linux-$lx_kernelrelease,linux} + mkdir -vp "$root/usr/src/linux-$lx_kernelrelease" + ln -svnf "linux-$lx_kernelrelease" $root/usr/src/linux + + tar -cf - * | tar -C "$root/usr/src/linux-$lx_kernelrelease" -xf - + cp -v .config "$root/usr/src/linux-$lx_kernelrelease/" } -autoextract=0 ; createdocs=0 +createdocs=0 +srctar=none custmain="main_lx_src" -patchfiles="`echo $base/package/$repository/linux$treever/*.patch` $patchfiles" +for x in $( match_source_file -p patch-.* linux$treever | grep -v '\.tar\.' ); do + var_insert patchfiles " " "$x" +done +for x in $( ls -1d $base/package/$repository/linux$treever/*.patch ); do + var_append patchfiles " " "$x" +done diff --git a/base/linux26-src/linux26-src.desc b/base/linux26-src/linux26-src.desc index deab35daa..b15592cdf 100644 --- a/base/linux26-src/linux26-src.desc +++ b/base/linux26-src/linux26-src.desc @@ -1,25 +1,18 @@ -[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- -[COPY] +[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN --- [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. -[COPY] Please add additional copyright information _after_ the line containing -[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by -[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! [COPY] -[COPY] ROCK Linux: rock-src/package/base/linux26-src/linux26-src.desc -[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf +[COPY] Filename: package/.../linux26-src/linux26-src.desc +[COPY] Copyright (C) 2007 The OpenSDE Project +[COPY] Copyright (C) 1998 - 2003 Clifford Wolf +[COPY] +[COPY] More information can be found in the files COPYING and README. [COPY] [COPY] This program is free software; you can redistribute it and/or modify [COPY] it under the terms of the GNU General Public License as published by -[COPY] the Free Software Foundation; either version 2 of the License, or -[COPY] (at your option) any later version. A copy of the GNU General Public -[COPY] License can be found at Documentation/COPYING. -[COPY] -[COPY] Many people helped and are helping developing ROCK Linux. Please -[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM -[COPY] file for details. -[COPY] -[COPY] --- ROCK-COPYRIGHT-NOTE-END --- +[COPY] the Free Software Foundation; version 2 of the License. A copy of the +[COPY] GNU General Public License can be found in the file COPYING. +[COPY] --- SDE-COPYRIGHT-NOTE-END --- [I] The Linux 2.6 kernel sources @@ -39,6 +32,6 @@ [L] GPL [S] Stable -[V] 2.6.7 +[V] 2.6.21.1 [P] X -1-------9 100.900