In BuildKernel() update from
[linux-2.6.git] / scripts / kernel-2.6-planetlab.spec
index ddfa350..70aa3df 100644 (file)
@@ -4,12 +4,11 @@ Summary: The Linux kernel (the core of the Linux operating system)
 # These are the kernels that are built IF the architecture allows it.
 
 %define buildup 1
-%define buildsmp 0
+%define buildsmp 1
 %define builduml 0
-%define buildsource 0
+%define buildxen 0
 %define builddoc 0
 
-
 # Versions of various parts
 
 #
@@ -18,24 +17,18 @@ Summary: The Linux kernel (the core of the Linux operating system)
 # that the kernel isn't the stock distribution kernel, for example by
 # adding some text to the end of the version number.
 #
-%define sublevel 7
+%define sublevel 20
 %define kversion 2.6.%{sublevel}
 %define rpmversion 2.6.%{sublevel}
-%define rhbsys  %([ -r /etc/beehive-root ] && echo  || echo .`whoami`)
-%define release 1.planetlab%{?date:.%{date}}
-# For Mandrake
-%define _enable_debug_packages 1
+%define release 1.2949.fc6.vs2.2.0.1.0%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+%define signmodules 0
+%define make_target bzImage
 
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
 
-# groups of related archs
-%define all_x86 i586 i686
-
-# Override generic defaults with per-arch defaults 
+# Override generic defaults with per-arch defaults
 
-%ifarch %{all_x86}
 %define image_install_path boot
-%endif
 
 #
 # Three sets of minimum package version requirements in the form of Conflicts:
@@ -54,29 +47,41 @@ Summary: The Linux kernel (the core of the Linux operating system)
 # problems with the newer kernel or lack certain things that make 
 # integration in the distro harder than needed.
 #
-%define package_conflicts  cipe < 1.4.5, tux < 2.1.0, kudzu <= 0.92, initscripts < 7.23, dev < 3.2-7, iptables < 1.2.5-3, bcm5820 < 1.81, nvidia-rh72 <= 1.0
+%define package_conflicts  cipe < 1.4.5, kudzu <= 0.92, initscripts < 7.23, dev < 3.2-7, iptables < 1.2.5-3, bcm5820 < 1.81, nvidia-rh72 <= 1.0 selinux-policy-targeted < 1.23.16-1
 
 #
 # Several packages had bugs in them that became obvious when the NPTL
-# threading code got integrated. 
+# threading code got integrated.
 #
 %define nptl_conflicts SysVinit < 2.84-13, pam < 0.75-48, vixie-cron < 3.0.1-73, privoxy < 3.0.0-8, spamassassin < 2.44-4.8.x,  cups < 1.1.17-13
 
+#
+# The ld.so.conf.d file we install uses syntax older ldconfig's don't grok.
+#
+
+# MEF commented out
+# %define xen_conflicts glibc < 2.3.5-1
+
 #
 # Packages that need to be installed before the kernel is, because the %post
 # scripts use them.
 #
 %define kernel_prereq  fileutils, module-init-tools, initscripts >= 5.83, mkinitrd >= 3.5.5
 
+Vendor: PlanetLab
+Packager: PlanetLab Central <support@planet-lab.org>
+Distribution: PlanetLab 3.0
+URL: http://cvs.planet-lab.org/cvs/linux-2.6
+
 Name: kernel
 Group: System Environment/Kernel
 License: GPLv2
 Version: %{rpmversion}
 Release: %{release}
-ExclusiveArch: %{all_x86}
 ExclusiveOS: Linux
 Provides: kernel = %{version}
 Provides: kernel-drm = 4.3.0
+Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
 Prereq: %{kernel_prereq}
 Conflicts: %{kernel_dot_org_conflicts}
 Conflicts: %{package_conflicts}
@@ -89,73 +94,53 @@ AutoReqProv: no
 #
 # List the packages used during the kernel build
 #
-BuildPreReq: patch >= 2.5.4, bash >= 2.03, sh-utils, tar
-#BuildPreReq: module-init-tools
-BuildPreReq: bzip2, findutils, gzip, m4, perl, make >= 3.78, gnupg
-#BuildPreReq: kernel-utils >= 2.4-12.1.139
-# temporary req since modutils changed output format 
-#BuildPreReq: modutils >= 2.4.26-14
-BuildRequires: gcc >= 2.96-98, binutils >= 2.12
-#BuildRequires: redhat-rpm-config
+BuildPreReq: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
+BuildPreReq: bzip2, findutils, gzip, m4, perl, make >= 3.78, gnupg, diffutils
+BuildRequires: gcc >= 3.3.3, binutils >= 2.12, redhat-rpm-config
 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
 
 
-
 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
 
-%description 
+%description
 The kernel package contains the Linux kernel (vmlinuz), the core of any
 Linux operating system.  The kernel handles the basic functions
 of the operating system:  memory allocation, process allocation, device
 input and output, etc.
 
+%package devel
+Summary: Development package for building kernel modules to match the kernel.
+Group: System Environment/Kernel
+AutoReqProv: no
+Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}
+Prereq: /usr/bin/find
+
+%description devel
+This package provides kernel headers and makefiles sufficient to build modules
+against the kernel package.
 
-%package sourcecode
-Summary: The source code for the Linux kernel.
-Group: Development/System
-Prereq: fileutils
-Requires: make >= 3.78
-Requires: gcc >= 3.2
-Requires: /usr/bin/strip
-# for xconfig and gconfig
-Requires: qt-devel, gtk2-devel readline-devel ncurses-devel
-Provides: kernel-source
-Obsoletes: kernel-source <= 2.6.6
-
-%description sourcecode
-The kernel-sourcecode package contains the source code files for the Linux
-kernel. The source files can be used to build a custom kernel that is
-smaller by virtue of only including drivers for your particular hardware, if
-you are so inclined (and you know what you're doing). The customisation
-guide in the documentation describes in detail how to do this. This package
-is neither needed nor usable for building external kernel modules for
-linking such modules into the default operating system kernels.
 
 %package doc
 Summary: Various documentation bits found in the kernel source.
 Group: Documentation
-%if !%{buildsource}
-Obsoletes: kernel-source <= 2.6.6
-Obsoletes: kernel-sourcecode <= 2.6.6
-%endif
 
 %description doc
 This package contains documentation files from the kernel
 source. Various bits of information about the Linux kernel and the
-device drivers shipped with it are documented in these files. 
+device drivers shipped with it are documented in these files.
 
 You'll want to install this package if you need a reference to the
 options that can be passed to Linux kernel modules at load time.
 
-
 %package smp
 Summary: The Linux kernel compiled for SMP machines.
 
 Group: System Environment/Kernel
 Provides: kernel = %{version}
 Provides: kernel-drm = 4.3.0
+Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}smp
 Prereq: %{kernel_prereq}
 Conflicts: %{kernel_dot_org_conflicts}
 Conflicts: %{package_conflicts}
@@ -175,6 +160,57 @@ hyperthreading technology.
 
 Install the kernel-smp package if your machine uses two or more CPUs.
 
+%package smp-devel
+Summary: Development package for building kernel modules to match the SMP kernel.
+Group: System Environment/Kernel
+Provides: kernel-smp-devel-%{_target_cpu} = %{rpmversion}-%{release}
+Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
+Provides: kernel-devel = %{rpmversion}-%{release}smp
+AutoReqProv: no
+Prereq: /usr/bin/find
+
+%description smp-devel
+This package provides kernel headers and makefiles sufficient to build modules
+against the SMP kernel package.
+
+%package xenU
+Summary: The Linux kernel compiled for unprivileged Xen guest VMs
+
+Group: System Environment/Kernel
+Provides: kernel = %{version}
+Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}xenU
+Prereq: %{kernel_prereq}
+Conflicts: %{kernel_dot_org_conflicts}
+Conflicts: %{package_conflicts}
+Conflicts: %{nptl_conflicts}
+
+# MEF commented out 
+# Conflicts: %{xen_conflicts}
+
+# We can't let RPM do the dependencies automatic because it'll then pick up
+# a correct but undesirable perl dependency from the module headers which
+# isn't required for the kernel proper to function
+AutoReqProv: no
+
+%description xenU
+This package includes a version of the Linux kernel which
+runs in Xen unprivileged guest VMs.  This should be installed
+both inside the unprivileged guest (for the modules) and in
+the guest0 domain.
+
+%package xenU-devel
+Summary: Development package for building kernel modules to match the kernel.
+Group: System Environment/Kernel
+AutoReqProv: no
+Provides: kernel-xenU-devel-%{_target_cpu} = %{rpmversion}-%{release}
+Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}xenU
+Provides: kernel-devel = %{rpmversion}-%{release}xenU
+Prereq: /usr/sbin/hardlink, /usr/bin/find
+
+%description xenU-devel
+This package provides kernel headers and makefiles sufficient to build modules
+against the kernel package.
+
 %package uml
 Summary: The Linux kernel compiled for use in user mode (User Mode Linux).
 
@@ -183,10 +219,57 @@ Group: System Environment/Kernel
 %description uml
 This package includes a user mode version of the Linux kernel.
 
-%prep
+%package uml-devel
+Summary: Development package for building kernel modules to match the UML kernel.
+Group: System Environment/Kernel
+Provides: kernel-uml-devel-%{_target_cpu} = %{rpmversion}-%{release}
+Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
+Provides: kernel-devel = %{rpmversion}-%{release}smp
+AutoReqProv: no
+Prereq: /usr/sbin/hardlink, /usr/bin/find
+
+%description uml-devel
+This package provides kernel headers and makefiles sufficient to build modules
+against the User Mode Linux kernel package.
+
+%package uml-modules
+Summary: The Linux kernel modules compiled for use in user mode (User Mode Linux).
+
+Group: System Environment/Kernel
+
+%description uml-modules
+This package includes a user mode version of the Linux kernel modules.
 
+%package vserver
+Summary: A placeholder RPM that provides kernel and kernel-drm
+
+Group: System Environment/Kernel
+Provides: kernel = %{version}
+Provides: kernel-drm = 4.3.0
+Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
+
+%description vserver
+VServers do not require and cannot use kernels, but some RPMs have
+implicit or explicit dependencies on the "kernel" package
+(e.g. tcpdump). This package installs no files but provides the
+necessary dependencies to make rpm and yum happy.
+
+
+%prep
+# First we unpack the kernel tarball.
+# If this isn't the first make prep, we use links to the existing clean tarball
+# which speeds things up quite a bit.
+if [ ! -d kernel-%{kversion}/vanilla ]; then
+  # Ok, first time we do a make prep.
+  rm -f pax_global_header
 %setup -q -n %{name}-%{version} -c
-cd linux-%{kversion}
+  mv linux-%{kversion} vanilla
+else
+  # We already have a vanilla dir.
+  cd kernel-%{kversion}
+fi
+
+cd vanilla
 
 # make sure the kernel has the sublevel we know it has. This looks weird
 # but for -pre and -rc versions we need it since we only want to use
@@ -195,86 +278,96 @@ perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
 
 # get rid of unwanted files resulting from patch fuzz
-find . -name "*.orig" -exec rm -fv {} \;
-find . -name "*~" -exec rm -fv {} \;
+find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
+
 
 ###
 ### build
 ###
 %build
 
-cd linux-%{kversion}
-
-
-
 BuildKernel() {
+    MakeTarget=$1
+    Arch=$2
+    Flavour=$3
+
+    # create a clean copy in BUILD/ (for backward compatibility with
+    # other RPMs that bootstrap off of the kernel build)
+    cd $RPM_BUILD_DIR
+    rm -rf linux-%{_target_cpu}-%{kversion}$Flavour
+    cp -rl kernel-%{kversion}/vanilla linux-%{_target_cpu}-%{kversion}$Flavour
+    cd linux-%{_target_cpu}-%{kversion}$Flavour
 
     # Pick the right config file for the kernel we're building
-    if [ -n "$1" ] ; then
-       Config=kernel-%{kversion}-%{_target_cpu}-$1-planetlab.config
+    if [ -n "$Flavour" ] ; then
+      Config=kernel-%{kversion}-%{_target_cpu}-$Flavour-planetlab.config
+      DevelDir=/usr/src/kernels/%{KVERREL}-$Flavour-%{_target_cpu}
+      DevelLink=/usr/src/kernels/%{KVERREL}$Flavour-%{_target_cpu}
     else
-       Config=kernel-%{kversion}-%{_target_cpu}-planetlab.config
+      Config=kernel-%{kversion}-%{_target_cpu}-planetlab.config
+      DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
+      DevelLink=
     fi
 
-    KernelVer=%{version}-%{release}$1
-    echo BUILDING A KERNEL FOR $1 %{_target_cpu}...
+    KernelVer=%{version}-%{release}$Flavour
+    echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
 
     # make sure EXTRAVERSION says what we want it to say
-    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$1/" Makefile
-
-    # override ARCH in the case of UML
-    if [ "$1" = "uml" ] ; then
-        export ARCH=um
-    fi
+    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$Flavour/" Makefile
 
     # and now to start the build process
 
     make -s mrproper
     cp configs/$Config .config
 
-    make -s nonint_oldconfig > /dev/null
-    make -s include/linux/version.h 
+    #Arch=`head -1 .config | cut -b 3-`
+    echo USING ARCH=$Arch
+
+    make -s ARCH=$Arch nonint_oldconfig > /dev/null
+    make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget
+    make -s ARCH=$Arch %{?_smp_mflags} modules || exit 1
 
-    make -s %{?_smp_mflags} bzImage 
-    make -s %{?_smp_mflags} modules || exit 1
-    # XXX This causes all sorts of errors. Need to debug.
-#    make buildcheck
-    
     # Start installing the results
 
+%if "%{_enable_debug_packages}" == "1"
     mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/boot
+%endif
     mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
-    install -m 644 System.map $RPM_BUILD_ROOT/usr/lib/debug/boot/System.map-$KernelVer
-    objdump -t vmlinux | grep ksymtab | cut -f2 | cut -d" " -f2 | cut -c11- | sort -u  > exported
-    echo "_stext" >> exported
-    echo "_end" >> exported
-    touch $RPM_BUILD_ROOT/boot/System.map-$KernelVer
-    for i in `cat exported` 
-    do 
-        grep " $i\$" System.map >> $RPM_BUILD_ROOT/boot/System.map-$KernelVer || :
-        grep "tab_$i\$" System.map >> $RPM_BUILD_ROOT/boot/System.map-$KernelVer || :
-        grep "__crc_$i\$" System.map >> $RPM_BUILD_ROOT/boot/System.map-$KernelVer ||:
-    done
-    rm -f exported
     install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
-    rm -f System.map
-    cp arch/*/boot/bzImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+    install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
+    if [ -f arch/$Arch/boot/bzImage ]; then
+      cp arch/$Arch/boot/bzImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+    fi
+    if [ -f arch/$Arch/boot/zImage.stub ]; then
+      cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
+    fi
+    if [ "$Flavour" = "uml" ] ; then
+       install -D -m 755 linux $RPM_BUILD_ROOT/%{_bindir}/linux
+    fi
 
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
-    make -s INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
+    make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
+
     # And save the headers/makefiles etc for building modules against
     #
     # This all looks scary, but the end result is supposed to be:
     # * all arch relevant include/ files
     # * all Makefile/Kconfig files
-    # * all script/ files 
+    # * all script/ files
 
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
+    # dirs for additional modules per module-init-tools, kbuild/modules.txt
+    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
+    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
     # first copy everything
-    cp --parents `find  -type f -name Makefile -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build 
-    cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build 
+       cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    if [ "$Flavour" = "uml" ] ; then
+      cp --parents -a `find arch/um -name include` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    fi
     # then drop all but the needed Makefiles/Kconfig files
     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
@@ -282,36 +375,74 @@ BuildKernel() {
     cp arch/%{_arch}/kernel/asm-offsets.s $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/kernel || :
     cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
     cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    cp -a arch/%{_arch}/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
-    cp -a arch/%{_arch}/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
+    if [ -d arch/%{_arch}/scripts ]; then
+      cp -a arch/%{_arch}/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
+    fi
+    if [ -f arch/%{_arch}/*lds ]; then
+      cp -a arch/%{_arch}/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
+    fi
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     cd include
-    cp -a acpi config linux math-emu media net pcmcia rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
     cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    if [ "$Arch" = "x86_64" ]; then
+      cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    fi
+%if %{buildxen}
+    if [ "$Flavour" = "xenU" ]; then
+      cp -a xen $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+      cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    fi
+%endif
+%if %{builduml}
+    if [ "$Flavour" = "uml" ] ; then
+      cp -a `readlink -f asm/arch` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+    fi
+%endif
+    # While arch/powerpc/include/asm is still a symlink to the old
+    # include/asm-ppc{64,} directory, include that in kernel-devel too.
+    if [ "$Arch" = "powerpc" -a -r ../arch/powerpc/include/asm ]; then
+      cp -a `readlink ../arch/powerpc/include/asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
+      mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
+      pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
+      ln -sf ../../../include/asm-ppc* asm
+      popd
+    fi
+
     # Make sure the Makefile and version.h have a matching timestamp so that
     # external modules can be built
     touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/version.h
     touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/autoconf.h
-    cd .. 
+    cd ..
 
     #
     # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
     #
+%if "%{_enable_debug_packages}" == "1"
     mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
     cp vmlinux $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
+%endif
+%if %{buildxen}
+    if [ -f vmlinuz ]; then
+      cp vmlinuz $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+    fi
+%endif
+
+    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
 
     # mark modules executable so that strip-to-file can strip them
-    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f  | xargs chmod u+x
+    cat modnames | xargs chmod u+x
 
-    # detect missing or incorrect license tags
-    for i in `find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" ` ; do echo -n "$i " ; /sbin/modinfo -l $i >> modinfo ; done
-    cat modinfo | grep -v "^GPL" | grep -v "^Dual BSD/GPL" | grep -v "^Dual MPL/GPL" | grep -v "^GPL and additional rights" | grep -v "^GPL v2" && exit 1 
-    rm -f modinfo
     # remove files that will be auto generated by depmod at rpm -i time
     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.*
 
+    # Move the devel headers out of the root file system
+    mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
+    mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
+    ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
+    [ -z "$DevelLink" ] || ln -sf `basename $DevelDir` $RPM_BUILD_ROOT/$DevelLink
 }
 
 ###
@@ -322,16 +453,26 @@ BuildKernel() {
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/boot
 
+%if "%{_target_cpu}" == "x86_64"
+%define kernel_arch %{_target_cpu}
+%else
+%define kernel_arch i386
+%endif
+
 %if %{buildup}
-BuildKernel
+BuildKernel %make_target %kernel_arch
 %endif
 
-%if %{buildsmp}
-BuildKernel smp
+%if %{buildsmp} && "%{_target_cpu}" != "i586"
+BuildKernel %make_target %kernel_arch smp
 %endif
 
-%if %{builduml}
-BuildKernel uml
+%if %{builduml} && "%{_target_cpu}" != "i586"
+BuildKernel linux um uml
+%endif
+
+%if %{buildxen} && "%{_target_cpu}" != "i586"
+BuildKernel vmlinuz %kernel_arch xenU
 %endif
 
 ###
@@ -340,10 +481,21 @@ BuildKernel uml
 
 %install
 
-cd linux-%{kversion}
-
-# architectures that don't get kernel-source (i586/i686/athlon) dont need
-# much of an install because the build phase already copied the needed files
+cd vanilla
+
+%if %{buildxen} && "%{_target_cpu}" == "i686"
+mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
+rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
+cat > $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf <<\EOF
+# This directive teaches ldconfig to search in nosegneg subdirectories
+# and cache the DSOs there with extra bit 0 set in their hwcap match
+# fields.  In Xen guest kernels, the vDSO tells the dynamic linker to
+# search in nosegneg subdirectories and to match this extra hwcap bit
+# in the ld.so.cache file.
+hwcap 0 nosegneg
+EOF
+chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
+%endif
 
 %if %{builddoc}
 mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation
@@ -354,34 +506,6 @@ chmod -R a+r *
 tar cf - Documentation | tar xf - -C $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}
 %endif
 
-%if %{buildsource}
-
-mkdir -p $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-chmod -R a+r *
-
-# clean up the source tree so that it is ready for users to build their own
-# kernel
-make -s mrproper
-# copy the source over
-tar cf - . | tar xf - -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-
-# set the EXTRAVERSION to <version>custom, so that people who follow a kernel building howto
-# don't accidentally overwrite their currently working moduleset and hose
-# their system
-perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}custom/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/Makefile
-
-# some config options may be appropriate for an rpm kernel build but are less so for custom user builds,
-# change those to values that are more appropriate as defeault for people who build their own kernel.
-perl -p -i -e "s/^CONFIG_DEBUG_INFO.*/# CONFIG_DEBUG_INFO is not set/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs/*
-perl -p -i -e "s/^.*CONFIG_DEBUG_PAGEALLOC.*/# CONFIG_DEBUG_PAGEALLOC is not set/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs/*
-perl -p -i -e "s/^.*CONFIG_DEBUG_SLAB.*/# CONFIG_DEBUG_SLAB is not set/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs/*
-perl -p -i -e "s/^.*CONFIG_DEBUG_SPINLOCK.*/# CONFIG_DEBUG_SPINLOCK is not set/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs/*
-perl -p -i -e "s/^.*CONFIG_DEBUG_HIGHMEM.*/# CONFIG_DEBUG_HIGHMEM is not set/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs/*
-perl -p -i -e "s/^.*CONFIG_MODULE_SIG.*/# CONFIG_MODULE_SIG is not set/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs/*
-
-install -m 644 %{SOURCE10}  $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
-%endif
-
 ###
 ### clean
 ###
@@ -395,7 +519,7 @@ rm -rf $RPM_BUILD_ROOT
 
 # load the loop module for upgrades...in case the old modules get removed we have
 # loopback in the kernel so that mkinitrd will work.
-%pre 
+%pre
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 exit 0
 
@@ -403,34 +527,123 @@ exit 0
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 exit 0
 
-%post 
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}
-if [ -x /usr/sbin/hardlink ] ; then
-pushd /lib/modules/%{KVERREL}/build > /dev/null ; {
-       cd /lib/modules/%{KVERREL}/build
-       find . -type f | while read f; do hardlink -c /lib/modules/*/build/$f $f ; done
+%post
+if [ `uname -i` == "x86_64" ]; then
+  if [ -f /etc/sysconfig/kernel ]; then
+    /bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel
+  fi
+fi
+
+# trick mkinitrd in case the current environment does not have device mapper
+rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' /etc/fstab)
+if echo $rootdev |grep -q /dev/mapper 2>/dev/null ; then
+    if [ ! -f $rootdev ]; then
+       fake_root_lvm=1
+       mkdir -p $(dirname $rootdev)
+       touch $rootdev
+    fi
+fi
+
+[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}
+#/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
+# Older modutils do not support --package option
+/sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}
+
+# remove fake handle
+if [ -n "$fake_root_lvm" ]; then
+    rm -f $rootdev
+fi
+
+# make some useful links
+pushd /boot > /dev/null ; {
+       ln -sf config-%{KVERREL} config
+       ln -sf initrd-%{KVERREL}.img initrd-boot
+       ln -sf vmlinuz-%{KVERREL} kernel-boot
 }
-popd
+popd > /dev/null
+
+# ask for a reboot
+mkdir -p /etc/planetlab
+touch /etc/planetlab/update-reboot
+
+%post devel
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
+  pushd /usr/src/kernels/%{KVERREL}-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
 fi
 
 %post smp
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}smp
-if [ -x /usr/sbin/hardlink ] ; then
-pushd /lib/modules/%{KVERREL}smp/build > /dev/null ; {
-       cd /lib/modules/%{KVERREL}smp/build
-       find . -type f | while read f; do hardlink -c /lib/modules/*/build/$f $f ; done
+# trick mkinitrd in case the current environment does not have device mapper
+rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' /etc/fstab)
+if echo $rootdev |grep -q /dev/mapper 2>/dev/null ; then
+    if [ ! -f $rootdev ]; then
+       fake_root_lvm=1
+       mkdir -p $(dirname $rootdev)
+       touch $rootdev
+    fi
+fi
+
+[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}smp
+#/sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
+# Older modutils do not support --package option
+/sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}smp
+
+# remove fake handle
+if [ -n "$fake_root_lvm" ]; then
+    rm -f $rootdev
+fi
+
+# make some useful links
+pushd /boot > /dev/null ; {
+       ln -sf config-%{KVERREL}smp configsmp
+       ln -sf initrd-%{KVERREL}smp.img initrd-bootsmp
+       ln -sf vmlinuz-%{KVERREL}smp kernel-bootsmp
 }
-popd
+popd > /dev/null
+
+# ask for a reboot
+mkdir -p /etc/planetlab
+touch /etc/planetlab/update-reboot
+
+%post smp-devel
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
+  pushd /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
+fi
+
+%post xenU
+[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade
+[ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
+
+%post xenU-devel
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
+  pushd /usr/src/kernels/%{KVERREL}-xenU-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
 fi
 
+%post uml-modules
+depmod -ae %{KVERREL}uml
 
-%preun 
+%preun
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
 
 %preun smp
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
-[ -x /sbin/new-kernel-pkg ] && /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
+
+%preun xenU
+/sbin/modprobe loop 2> /dev/null > /dev/null  || :
+/sbin/new-kernel-pkg --rmmoddep --remove %{KVERREL}xenU
+
+%preun uml-modules
+rm -f /lib/modules/%{KVERREL}uml/modules.*
 
 
 ###
@@ -445,11 +658,17 @@ fi
 /boot/config-%{KVERREL}
 %dir /lib/modules/%{KVERREL}
 /lib/modules/%{KVERREL}/kernel
-%verify(not mtime) /lib/modules/%{KVERREL}/build
+/lib/modules/%{KVERREL}/build
+/lib/modules/%{KVERREL}/source
+/lib/modules/%{KVERREL}/extra
+/lib/modules/%{KVERREL}/updates
 
+%files devel
+%defattr(-,root,root)
+%verify(not mtime) /usr/src/kernels/%{KVERREL}-%{_target_cpu}
 %endif
 
-%if %{buildsmp}
+%if %{buildsmp} && "%{_target_cpu}" == "i686"
 %files smp
 %defattr(-,root,root)
 /%{image_install_path}/vmlinuz-%{KVERREL}smp
@@ -457,289 +676,184 @@ fi
 /boot/config-%{KVERREL}smp
 %dir /lib/modules/%{KVERREL}smp
 /lib/modules/%{KVERREL}smp/kernel
-%verify(not mtime) /lib/modules/%{KVERREL}smp/build
+/lib/modules/%{KVERREL}smp/build
+/lib/modules/%{KVERREL}smp/source
+/lib/modules/%{KVERREL}smp/extra
+/lib/modules/%{KVERREL}smp/updates
 
+%files smp-devel
+%defattr(-,root,root)
+%verify(not mtime) /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu}
+/usr/src/kernels/%{KVERREL}smp-%{_target_cpu}
 %endif
 
-%if %{builduml}
+%if %{builduml} && "%{_target_cpu}" == "i686"
 %files uml
 %defattr(-,root,root)
+%{_bindir}/linux
 
-%endif
+%files uml-devel
+%defattr(-,root,root)
+%verify(not mtime) /usr/src/kernels/%{KVERREL}-uml-%{_target_cpu}
+/usr/src/kernels/%{KVERREL}uml-%{_target_cpu}
 
-# only some architecture builds need kernel-source and kernel-doc
+%files uml-modules
+%defattr(-,root,root)
+/boot/System.map-%{KVERREL}uml
+/boot/config-%{KVERREL}uml
+%dir /lib/modules/%{KVERREL}uml
+/lib/modules/%{KVERREL}uml/kernel
+/lib/modules/%{KVERREL}uml/build
+/lib/modules/%{KVERREL}uml/source
+/lib/modules/%{KVERREL}uml/extra
+/lib/modules/%{KVERREL}uml/updates
+%endif
 
-%if %{buildsource}
-%files sourcecode
+%if %{buildxen} && "%{_target_cpu}" == "i686"
+%files xenU
+%defattr(-,root,root)
+/%{image_install_path}/vmlinuz-%{KVERREL}xenU
+/boot/System.map-%{KVERREL}xenU
+/boot/config-%{KVERREL}xenU
+%dir /lib/modules/%{KVERREL}xenU
+/lib/modules/%{KVERREL}xenU/kernel
+/lib/modules/%{KVERREL}xenU/build
+/lib/modules/%{KVERREL}xenU/source
+/lib/modules/%{KVERREL}xenU/extra
+/lib/modules/%{KVERREL}xenU/updates
+/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
+
+%files xenU-devel
 %defattr(-,root,root)
-/usr/src/linux-%{KVERREL}/
+%verify(not mtime) /usr/src/kernels/%{KVERREL}-xenU-%{_target_cpu}
+/usr/src/kernels/%{KVERREL}xenU-%{_target_cpu}
 %endif
 
+%files vserver
+%defattr(-,root,root)
+# no files
+
+# only some architecture builds need kernel-doc
 
 %if %{builddoc}
 %files doc
 %defattr(-,root,root)
-/usr/share/doc/kernel-doc-%{kversion}/Documentation/*
+%{_datadir}/doc/kernel-doc-%{kversion}/Documentation/*
+%dir %{_datadir}/doc/kernel-doc-%{kversion}/Documentation
+%dir %{_datadir}/doc/kernel-doc-%{kversion}
 %endif
 
 %changelog
-* Thu Aug  5 2004 Mark Huang <mlhuang@cs.princeton.edu>
-- adapt for Fedora Core 2 based PlanetLab 3.0 (remove Source and Patch
-  sections, most non-x86 sections, and GPG sections)
-
-* Fri Jul 16 2004 Arjan van de Ven <arjanv@redhat.com>
-- ppc32 embedded updates
-
-* Thu Jul 15 2004 Arjan van de Ven <arjanv@redhat.com>
-- make USB modules again and add Alan's real fix for the SMM-meets-USB bug
-- 2.6.8-rc1-bk4
-
-* Wed Jul 14 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.8-rc1-bk3
-
-* Tue Jul 13 2004 Arjan van de Ven <arjanv@redhat.com>
-- add "enforcemodulesig" boot option to make the kernel load signed modules only
-
-* Mon Jul 12 2004 Arjan van de Ven <arjanv@redhat.com>
-- updated voluntary preempt
-- 2.6.8-rc1
-
-* Wed Jul 7 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix boot breakage that was hitting lots of people (Dave Jones)
-
-* Tue Jul 6 2004 Arjan van de Ven <arjanv@redhat.com>
-- add voluntary preemption patch from Ingo
-- 2.6.7-bk19
-
-* Tue Jun 29 2004 Arjan van de Ven <arjanv@redhat.com>
-- make a start at gpg signed modules support
-
-* Sat Jun 27 2004 Arjan van de Ven <arjanv@redhat.com>
-- experiment with making the hardlink call in post more efficient
-- 2.6.7-bk9
-
-* Thu Jun 24 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.7-bk7
-- Add wli's patch to allocate memory bottom up not top down
-- change some config options in the kernel-sourcecode package that are
-  good for rpm kernel builds but not for custom user builds to more appropriate 
-  default values.
-- reenable kernel-sourcecode again for a few builds 
-
-* Wed Jun 23 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.7-bk5
-- fix tux unresolved symbols (#126532)
-
-* Mon Jun 21 2004 Arjan van de Ven <arjanv@redhat.com>
-- make kernel-doc and kernel-sourcecode builds independent of eachother
-- disable kernel-sourcecode builds entirely, we'll be replacing it with documentation
-  on how to use the src.rpm instead for building your own kernel.
-
-* Sat Jun 19 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.7-bk2
-
-* Sun Jun 13 2004 Arjan van de Ven <arjanv@redhat.com>
-- add patch from DaveM to fix the ppp-keeps-iface-busy bug
-
-* Sat Jun 12 2004 Arjan van de Ven <arjanv@redhat.com>
-- add fix from Andi Kleen/Linus for the fpu-DoS
-
-* Thu Jun 10 2004 Arjan van de Ven <arjanv@redhat.com>
-- disable mlock-uses-rlimit patch, it has a security hole and needs more thought
-- revert airo driver to the FC2 one since the new one breaks
-
-* Tue Jun 8 2004 Dave Jones <davej@redhat.com>
-- Update to 2.6.7rc3
-
-* Fri Jun 4 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix the mlock-uses-rlimit patch
+* Tue Jul 11 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2142_FC4]
+- 2.6.17.4
+- Disable split pagetable lock.
 
-* Wed Jun 2 2004 David Woodhouse <dwmw2@redhat.com>
-- Add ppc64 (Mac G5)
+* Wed Jul  5 2006 Dave Jones <davej@redhat.com>
+- Get rid of stack backtrace on panic, which in most
+  cases actually caused a loss of info instead of a gain.
 
-* Wed Jun 2 2004 Arjan van de Ven <arjanv@redhat.com>
-- add a forward port of the mlock-uses-rlimit patch
-- add NX support for x86 (Intel, Ingo)
+* Fri Jun 30 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2141_FC4]
+- 2.6.17.3
 
-* Tue Jun 1 2004 Arjan van de Ven <arjanv@redhat.com>
-- refresh ext3 reservation patch
+* Fri Jun 30 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2140_FC4]
+- 2.6.17.2
+- Fix up the alsa list_add bug.
 
-* Sun May 30 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.7-rc2
-- set the ACPI OS name to "Microsoft Windows XP" for better compatibility
+* Mon Jun 26 2006 Dave Jones <davej@redhat.com>
+- Fix up various stupidities incurred by the last big rebase.
+  - Reenable SMP x86-64 builds.
+  - Reenable SMBFS.
+- Enable PCI fake hotplug driver.
+- Enable gameport/joystick on i586 builds. (#196581)
 
-* Thu May 27 2004 Pete Zaitcev <zaitcev@redhat.com>
-- Fix qeth and zfcp (s390 drivers): align qib by 256, embedded into qdio_irq.
+* Sat Jun 24 2006 Dave Jones <davej@redhat.com>
+- Enable profiling for 586 kernels.
 
-* Thu May 27 2004 Dave Jones <davej@redhat.com>
-- Fix the crashes on boot on Asus P4P800 boards. (#121819)
+* Fri Jun 23 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2139_FC4]
+- Rebuild with slab debug off.
 
-* Wed May 26 2004 Dave Jones <davej@redhat.com>
-- Lots more updates to the SCSI whitelist for various
-  USB card readers. (#112778, among others..)
+* Tue Jun 20 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2138_FC4]
+- 2.6.17.1
 
-* Wed May 26 2004 Arjan van de Ven <arjanv@redhat.com>
-- back out ehci suspend/resume patch, it breaks
-- add fix for 3c59x-meets-kudzu bug from Alan
+* Mon Jun  5 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2115_FC4]
+- 2.6.16.20
 
-* Tue May 25 2004 Arjan van de Ven <arjanv@redhat.com>
-- try improving suspend/resume by restoring more PCI state
-- 2.6.7-rc1-bk1
+* Tue May 30 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2114_FC4]
+- 2.6.16.19
 
-* Mon May 24 2004 Dave Jones <davej@redhat.com>
-- Add yet another multi-card reader to the whitelist (#85851)
+* Mon May 29 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2113_FC4]
+- Improved list_head debugging.
 
-* Sun May 23 2004 Dave Jones <davej@redhat.com>
-- Add another multi-card reader to the whitelist (#124048)
+* Tue May 23 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2112_FC4]
+- 2.6.16.18
 
-* Wed May 19 2004 Arjan van de Ven <arjanv@redhat.com>
-- put firewire race fix in (datacorruptor)
+* Sat May 20 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2111_FC4]
+- 2.6.16.17
 
-* Tue May 18 2004 Dave Jones <davej@redhat.com>
-- Fix typo in ibmtr driver preventing compile (#123391)
+* Wed May 10 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2110_FC4]
+- 2.6.16.16
 
-* Mon May 17 2004 Arjan van de Ven <arjanv@redhat.com>
-- update to 2.6.6-bk3
-- made kernel-source and kernel-doc noarch.rpm's since they are not
-  architecture specific.
+* Tue May  9 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2109_FC4]
+- 2.6.16.15
+- make 16C950 UARTs work (again). (#126403)
+- Fix exec-shield default, which should fix a few programs that
+  stopped running.
 
-* Sat May 08 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix non-booting on Transmeta cpus (Peter Anvin)
-- fix count leak in message queues
+* Thu May  4 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2108_FC4]
+- 2.6.16.14
 
-* Fri May 07 2004 Arjan van de Ven <arjanv@redhat.com>
-- more ide cache flush work
-- patch from scsi-bk to fix sd refcounting
+* Tue May  2 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2107_FC4]
+- 2.6.16.13
 
-* Thu May 06 2004 Arjan van de Ven <arjanv@redhat.com>
-- some more ide cache flush fixes 
+* Mon May  1 2006 Dave Jones <davej@redhat.com>
+- 2.6.16.12
 
-* Wed May 05 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix bug 122504
-- convert b44 to ethtool ops (jgarzik)
-- make IDE do a cache-flush on shutdown (me/Alan)
+* Tue Apr 25 2006 Dave Jones <davej@redhat.com>
+- Fix up SCSI errors with mymusix usb mp3 player (#186187)
 
-* Tue May 04 2004 Arjan van de Ven <arjanv@redhat.com>
-- work around i810/i830 DRM issue
+* Mon Apr 24 2006 Dave Jones <davej@redhat.com>
+- 2.6.16.11
 
-* Fri Apr 30 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.6-rc3-bk1
-- make amd64 boot again
-- fix vm86-vs-4g4g interaction (Ingo)
+* Wed Apr 19 2006 Dave Jones <davej@redhat.com>
+- Enable PCI MSI support.
 
-* Thu Apr 22 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.6-rc2
-* Tue Apr 20 2004 Arjan van de Ven <arjanv@redhat.com>
-- add the ext3 online resize patch
+* Tue Apr 18 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2096_FC4]
+- 2.6.16.9
 
-* Mon Apr 19 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.6-rc1-bk3
-- add the objrmap vm from the -mm tree; it needs testing
+* Tue Apr 18 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2093_FC4]
+- 2.6.16.7
 
-* Thu Apr 15 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-bk2
-- disable DISCONTIGMEM on ia64 for performance
-- fix sleep_on use in reiserfs (Chris Mason)
+* Mon Apr 17 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2092_FC4]
+- 2.6.16.6
 
-* Tue Apr 13 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-mc4
-- reenable sg driver for scsi tape changers and such
-- the sk98lin driver oopses on module unload, preven that
+* Sun Apr 16 2006 Dave Jones <davej@redhat.com>
+- 2.6.16.5
 
-* Mon Apr 12 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix "bad pmd" bug with patch from Ingo
+* Fri Apr  7 2006 Dave Jones <davej@redhat.com>
+- 2.6.16.2
 
-* Fri Apr 09 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-mc3
-- finish up the -mc2 merge
-- latest 4g/4g patch from Ingo
-- latest execshield patch from Ingo
-- fix a few framebuffer bugs
+* Tue Apr  4 2006 Dave Jones <davej@redhat.com>
+- Reenable non-standard serial ports. (#187466)
+- Reenable snd-es18xx for x86-32 (#187733)
 
-* Thu Apr 08 2004 Arjan van de Ven <arjanv@redhat.com>
-- first attempt at a 2.6.5-mc2 merge
+* Thu Mar 30 2006 Dave Jones <davej@redhat.com>
+- ship the .kernelrelease file in -devel too.
+- Disable EDAC debug.
 
-* Thu Apr 08 2004 Dave Jones <davej@redhat.com>
-- Add in missing SiS AGP fix.
+* Tue Mar 26 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2069_FC4]
+- 2.6.16.1
 
-* Tue Apr 06 2004 Dave Jones <davej@redhat.com>
-- More agpgart fixes.
+* Mon Mar 25 2006 Dave Jones <davej@redhat.com>
+- Include patches posted for review for inclusion in 2.6.16.1
+- Updated new audit msg types.
+- Reenable HDLC driver (#186257)
+- Make acpi-cpufreq 'sticky'
+- Fix broken x86-64 32bit vDSO (#186924)
 
-* Fri Apr 02 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix another 4g/4g-vs-resume bug
+* Tue Mar 21 2006 Dave Jones <davej@redhat.com>
+- Improve spinlock scalability on big machines.
 
-* Tue Mar 30 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-rc3
-- fix PCI posting bug in i830 DRM
+* Mon Mar 20 2006 Dave Jones <davej@redhat.com>
+- Sync with FC5's 2.6.16 kernel.
+- Update Tux & Exec-shield to latest.
 
-* Mon Mar 29 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-rc2-bk8
-
-* Mon Mar 29 2004 Dave Jones <davej@redhat.com>
-- Include latest agpgart fixes.
-
-* Thu Mar 25 2004 Arjan van de Ven <arjanv@redhat.com>
-- more DRM fixes
-- add the fsync patches from akpm
-
-* Tue Mar 23 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-rc2-bk3
-- fix direct userspace memory access in i830 drm driver
-
-* Mon Mar 22 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-rc2-bk2
-- some stackbloat reductions from Dave and me
-
-* Sat Mar 20 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.5-rc2
-
-* Tue Mar 16 2004 Dave Jones <davej@redhat.com>
-- 2.6.5-rc1
-
-* Mon Mar 15 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.4-bk3
-- fix oops in toshiba_acpi (Barry K. Nathan)
-
-* Sat Mar 13 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.4-bk2 merge 
-
-* Thu Mar 11 2004 Arjan van de Ven <arjanv@redhat.com>
-- renable sonypi driver that was off accidentally
-- 2.6.4-final 
-- fix the oops on alsa module unloads
-
-* Wed Mar 10 2004 Arjan van de Ven <arjanv@redhat.com>
-- add ppc64/iseries, ppc32 (powermac/ibook) and ia64 architectures
-- 2.6.4-rc3 
-
-* Tue Mar 09 2004 Arjan van de Ven <arjanv@redhat.com>
-- 2.6.4-rc2-bk5
-- fix nfs-vs-selinux issue
-- fix typo in URL as per #117849
-
-* Mon Mar 08 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix race in lp.c (#117710)
-- 2.6.4-rc2-bk3
-- attempt to fix S3 suspend-to-ram with 4g/4g split
-
-* Sat Mar 06 2004 Arjan van de Ven <arjanv@redhat.com>
-- fix reiserfs
-- set HZ to 1000 again for some tests
-
-* Wed Feb 25 2004 Arjan van de Ven <arjanv@redhat.com>
-- merge back a bunch of fedora fixes
-- disable audit
-
-* Tue Feb 24 2004 Arjan van de Ven <arjanv@redhat.com>
-- audit bugfixes
-- update tux to a working version
-- 2.6.3-bk5 merge
-
-* Fri Feb 20 2004 Arjan van de Ven <arjanv@redhat.com>
-- re-add and enable the Auditing patch
-- switch several cpufreq modules to built in since detecting in userspace
-  which to use is unpleasant
-* Thu Jul 03 2003 Arjan van de Ven <arjanv@redhat.com>
-- 2.6 start