Hello community, here is the log from the commit of package kernel-source checked in at Tue Sep 30 00:23:54 CEST 2008. -------- --- kernel-source/kernel-debug.changes 2008-09-29 21:59:34.000000000 +0200 +++ /mounts/work_src_done/STABLE/kernel-source/kernel-debug.changes 2008-09-29 23:42:34.368924000 +0200 @@ -1,0 +2,11 @@ +Mon Sep 29 23:39:20 CEST 2008 - agruen@suse.de + +- Update config files after Swap-over-NFS backout. + +------------------------------------------------------------------- +Mon Sep 29 23:06:02 CEST 2008 - agruen@suse.de + +- kernel-vanilla and kernel-p3 are not split into main, -base, and + -extra packages. Fix the bogus dependencies on those packages. + +------------------------------------------------------------------- @@ -68,0 +80,33 @@ +Mon Sep 29 17:34:11 CEST 2008 - ptesarik@suse.cz + +- patches.arch/x86-tracehook: x86 tracehook (FATE#304321). + Provide the base infrastructure for utrace on x86. + +------------------------------------------------------------------- +Mon Sep 29 17:15:46 CEST 2008 - schwab@suse.de + +- config/powerpc/vanilla: configure to 64bit. + +------------------------------------------------------------------- +Mon Sep 29 17:00:43 CEST 2008 - schwab@suse.de + +- rpm/functions.sh: remove readlink emulation. + +------------------------------------------------------------------- +Mon Sep 29 16:55:45 CEST 2008 - hare@suse.de + +- patches.drivers/lpfc-8.2.8.3-update: Update lpfc to 8.2.8.3 + (bnc#420767). + +------------------------------------------------------------------- +Mon Sep 29 16:28:18 CEST 2008 - rw@suse.de + +- Update ia64 config files. (bnc#429881) + +------------------------------------------------------------------- +Mon Sep 29 16:06:06 CEST 2008 - jjolly@suse.de + +- patches.drivers/ehca-flush-cqe.patch: adds software flush CQE + generation (bnc#430344) + +------------------------------------------------------------------- @@ -41156,36073 +41199,0 @@ -------------------------------------------------------------------- -Fri Dec 21 23:10:38 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc6. - -------------------------------------------------------------------- -Thu Dec 20 20:48:11 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc5-git7. - -------------------------------------------------------------------- -Wed Dec 19 03:15:13 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc5-git5. - -------------------------------------------------------------------- -Wed Dec 19 02:57:35 CET 2007 - jeffm@suse.de - -- Per Kay's advice changed config settings to the following: - - CONFIG_UEVENT_HELPER_PATH="" - - CONFIG_LEGACY_PTY_COUNT=0 - -------------------------------------------------------------------- -Tue Dec 18 13:02:49 CET 2007 - bwalle@suse.de - -- patches.drivers/igb-2007-12-11: - Add igb (PCI-Express 82575 Gigabit Ethernet driver) -- Update config files: Enable CONFIG_IGB for all flavours. - -------------------------------------------------------------------- -Mon Dec 17 22:54:02 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc5-git4. - -------------------------------------------------------------------- -Mon Dec 17 05:47:08 CET 2007 - neilb@suse.de - -- patches.fixes/nfs-unmount-leak.patch: NFSv2/v3: Fix a memory - leak when using -onolock (336253). - -------------------------------------------------------------------- -Sun Dec 16 00:22:28 CET 2007 - sdietrich@suse.de - -- Update config files: rt_debug and rt for powerpc. -- config.conf: - -------------------------------------------------------------------- -Sat Dec 15 04:49:46 CET 2007 - sdietrich@suse.de - -- patches.rt/rt-list-mods-more-fixes.patch: - 2.6.24-rc5-rt1 drivers/dma/ioat_dma.c compile fix (list_splice). - -------------------------------------------------------------------- -Sat Dec 15 04:17:03 CET 2007 - sdietrich@suse.de - -- Update RT to 2.6.24-rc5-rt1 (many files in patches.rt omitted) - -------------------------------------------------------------------- -Thu Dec 13 00:46:54 CET 2007 - ak@suse.de - -- patches.fixes/fix-nfs-oops: NFS: Fix an Oops in NFS unmount. - -------------------------------------------------------------------- -Wed Dec 12 20:18:25 CET 2007 - jeffm@suse.de - -- patches.kernel.org/v4l-dvb-re-add-videobuf_read_start_export: - V4L/DVB (6609): Re-adds lock safe videobuf_read_start. - -------------------------------------------------------------------- -Wed Dec 12 19:54:05 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc5-git2. - -------------------------------------------------------------------- -Wed Dec 12 17:57:32 CET 2007 - jeffm@suse.de - -- rpm/kernel-source.spec.in: Worked around fix introduced in git - commits 1cacc9ab8bf10e60b3ed93d7a10b070c4cbc6c9f and - 18c32dac75b187d1a4e858f3cfdf03e844129f5e that caused linux-obj's - Makefile not to be generated. - -------------------------------------------------------------------- -Wed Dec 12 09:13:15 CET 2007 - jbeulich@novell.com - -- Update Xen patches to 2.6.24-rc4 and Linux c/s 355. -- Update config files. -- config.conf: Re-enable Xen flavors. - -------------------------------------------------------------------- -Tue Dec 11 22:14:55 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc5. - -------------------------------------------------------------------- -Tue Dec 11 14:39:57 CET 2007 - bwalle@suse.de - -- rpm/kernel-binary.spec.in: Let the kernel build fail when - generating the vmcoreinfo file fails - -------------------------------------------------------------------- -Mon Dec 10 17:40:13 CET 2007 - jeffm@suse.de - -- Update config files for -rt. - -------------------------------------------------------------------- -Mon Dec 10 17:27:38 CET 2007 - jeffm@suse.de - -- Enabled CONFIG_USB_SUSPEND on non-debug flavors. - -------------------------------------------------------------------- -Mon Dec 10 17:18:39 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc4-git6. - -------------------------------------------------------------------- -Thu Dec 6 18:25:52 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc4-git3. - -------------------------------------------------------------------- -Thu Dec 6 17:29:25 CET 2007 - trenn@suse.de - -- patches.fixes/acpi_autoload_baydock.patch: autloading of dock - module (302482). - Fixed a general bug with linux specific hids there. - -------------------------------------------------------------------- -Thu Dec 6 15:38:47 CET 2007 - bk@suse.de - -- patches.drivers/early-firewire.diff: Update to latest version, - reallows to compile juju firewire stack and adds documentation - -------------------------------------------------------------------- -Thu Dec 6 14:08:09 CET 2007 - jblunck@suse.de - -- scripts/tar-up.sh: small fix for patches.addon creation - -------------------------------------------------------------------- -Wed Dec 5 17:03:50 CET 2007 - jeffm@suse.de - -- Update to 2.6.24-rc4-git2. - -------------------------------------------------------------------- -Wed Dec 5 12:34:07 CET 2007 - ak@suse.de - -- Update config files to disable CONFIG_PRINTK_TIME again. If you want - the timestamps again you can always boot with printk.time=1 - -------------------------------------------------------------------- -Wed Dec 5 02:10:57 CET 2007 - trenn@suse.de - ++++ 35922 more lines (skipped) ++++ between kernel-source/kernel-debug.changes ++++ and /mounts/work_src_done/STABLE/kernel-source/kernel-debug.changes kernel-default.changes: same change kernel-dummy.changes: same change kernel-kdump.changes: same change kernel-pae.changes: same change kernel-ppc64.changes: same change kernel-ps3.changes: same change kernel-s390.changes: same change kernel-source.changes: same change kernel-syms.changes: same change kernel-trace.changes: same change kernel-vanilla.changes: same change kernel-xen.changes: same change calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kernel-debug.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:18.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:18.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-debug debug $(case debug in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/debug$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-debug Summary: A Debug Version of the Kernel Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-debug-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-debug-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -184,18 +198,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-debug debug $(case debug in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/debug$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -214,8 +216,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -230,12 +231,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -438,20 +439,20 @@ -e "s:@FLAVOR""@:debug:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:debug:g" \ -e "s:@SUBPACKAGE@:kernel-debug$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:debug:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-debug %endif @@ -473,11 +474,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -587,7 +588,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-debug. + # All supported modules which are not core modules belong in kernel-debug. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -602,7 +603,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -619,8 +620,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -643,19 +643,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -667,6 +662,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-debug-base Summary: A Debug Version of the Kernel - base modules @@ -687,8 +683,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-debug-base -f pre-base.sh @@ -696,6 +691,7 @@ %if %split_packages %files -n kernel-debug-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-debug-extra @@ -718,11 +714,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-debug-extra -f post-extra.sh %if %split_packages %files -n kernel-debug-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-default.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:19.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:19.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-default default $(case default in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/default$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-default Summary: The Standard Kernel for both Uniprocessor and Multiprocessor Systems Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-default-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-default-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -203,18 +217,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-default default $(case default in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/default$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -232,8 +234,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -248,12 +249,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -456,20 +457,20 @@ -e "s:@FLAVOR""@:default:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:default:g" \ -e "s:@SUBPACKAGE@:kernel-default$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:default:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-default %endif @@ -491,11 +492,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -605,7 +606,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-default. + # All supported modules which are not core modules belong in kernel-default. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -620,7 +621,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -637,8 +638,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -661,19 +661,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -685,6 +680,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-default-base Summary: The Standard Kernel for both Uniprocessor and Multiprocessor Systems - base modules @@ -704,8 +700,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-default-base -f pre-base.sh @@ -713,6 +708,7 @@ %if %split_packages %files -n kernel-default-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-default-extra @@ -734,11 +730,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-default-extra -f post-extra.sh %if %split_packages %files -n kernel-default-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-dummy.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:20.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:20.000000000 +0200 @@ -23,7 +23,7 @@ Name: kernel-dummy Summary: Internal dummy package for synchronizing release numbers Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel AutoReqProv: off @@ -36,8 +36,7 @@ -------- Andreas Gruenbacher <agruen@suse.de> -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %install rm -rf %buildroot ++++++ kernel-kdump.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:20.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:21.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-kdump kdump $(case kdump in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/kdump$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-kdump Summary: kernel for kdump Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-kdump-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-kdump-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -181,18 +195,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-kdump kdump $(case kdump in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/kdump$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -213,8 +215,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -229,12 +230,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -437,20 +438,20 @@ -e "s:@FLAVOR""@:kdump:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:kdump:g" \ -e "s:@SUBPACKAGE@:kernel-kdump$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:kdump:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-kdump %endif @@ -472,11 +473,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -586,7 +587,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-kdump. + # All supported modules which are not core modules belong in kernel-kdump. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -601,7 +602,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -618,8 +619,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -642,19 +642,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -666,6 +661,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-kdump-base Summary: kernel for kdump - base modules @@ -688,8 +684,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-kdump-base -f pre-base.sh @@ -697,6 +692,7 @@ %if %split_packages %files -n kernel-kdump-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-kdump-extra @@ -721,11 +717,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-kdump-extra -f post-extra.sh %if %split_packages %files -n kernel-kdump-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-pae.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:21.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:21.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-pae pae $(case pae in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/pae$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-pae Summary: Kernel with PAE Support Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-pae-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-pae-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -178,18 +192,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-pae pae $(case pae in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/pae$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -214,8 +216,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -230,12 +231,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -438,20 +439,20 @@ -e "s:@FLAVOR""@:pae:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:pae:g" \ -e "s:@SUBPACKAGE@:kernel-pae$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:pae:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-pae %endif @@ -473,11 +474,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -587,7 +588,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-pae. + # All supported modules which are not core modules belong in kernel-pae. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -602,7 +603,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -619,8 +620,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -643,19 +643,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -667,6 +662,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-pae-base Summary: Kernel with PAE Support - base modules @@ -693,8 +689,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-pae-base -f pre-base.sh @@ -702,6 +697,7 @@ %if %split_packages %files -n kernel-pae-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-pae-extra @@ -730,11 +726,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-pae-extra -f post-extra.sh %if %split_packages %files -n kernel-pae-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-ppc64.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:22.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:22.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-ppc64 ppc64 $(case ppc64 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/ppc64$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-ppc64 Summary: Kernel for ppc64 Systems Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-ppc64-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-ppc64-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -183,18 +197,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-ppc64 ppc64 $(case ppc64 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/ppc64$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -226,8 +228,7 @@ Tom Gall <tom_gall@vnet.ibm.com> see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -242,12 +243,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -450,20 +451,20 @@ -e "s:@FLAVOR""@:ppc64:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:ppc64:g" \ -e "s:@SUBPACKAGE@:kernel-ppc64$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:ppc64:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-ppc64 %endif @@ -485,11 +486,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -599,7 +600,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-ppc64. + # All supported modules which are not core modules belong in kernel-ppc64. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -614,7 +615,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -631,8 +632,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -655,19 +655,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -679,6 +674,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-ppc64-base Summary: Kernel for ppc64 Systems - base modules @@ -712,8 +708,7 @@ Tom Gall <tom_gall@vnet.ibm.com> see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-ppc64-base -f pre-base.sh @@ -721,6 +716,7 @@ %if %split_packages %files -n kernel-ppc64-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-ppc64-extra @@ -756,11 +752,11 @@ Tom Gall <tom_gall@vnet.ibm.com> see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-ppc64-extra -f post-extra.sh %if %split_packages %files -n kernel-ppc64-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-ps3.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:23.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:23.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-ps3 ps3 $(case ps3 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/ps3$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-ps3 Summary: kernel for ps3 bootloader Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-ps3-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-ps3-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -181,18 +195,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-ps3 ps3 $(case ps3 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/ps3$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -212,8 +214,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -228,12 +229,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -436,20 +437,20 @@ -e "s:@FLAVOR""@:ps3:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:ps3:g" \ -e "s:@SUBPACKAGE@:kernel-ps3$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:ps3:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-ps3 %endif @@ -471,11 +472,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -585,7 +586,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-ps3. + # All supported modules which are not core modules belong in kernel-ps3. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -600,7 +601,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -617,8 +618,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -641,19 +641,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -665,6 +660,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-ps3-base Summary: kernel for ps3 bootloader @@ -684,8 +680,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-ps3-base -f pre-base.sh @@ -693,6 +688,7 @@ %if %split_packages %files -n kernel-ps3-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-ps3-extra @@ -714,11 +710,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-ps3-extra -f post-extra.sh %if %split_packages %files -n kernel-ps3-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-s390.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:23.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:23.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-s390 s390 $(case s390 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/s390$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-s390 Summary: The Standard Kernel Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-s390-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-s390-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -178,18 +192,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-s390 s390 $(case s390 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/s390$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -207,8 +209,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -223,12 +224,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -431,20 +432,20 @@ -e "s:@FLAVOR""@:s390:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:s390:g" \ -e "s:@SUBPACKAGE@:kernel-s390$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:s390:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-s390 %endif @@ -466,11 +467,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -580,7 +581,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-s390. + # All supported modules which are not core modules belong in kernel-s390. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -595,7 +596,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -612,8 +613,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -636,19 +636,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -660,6 +655,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-s390-base Summary: The Standard Kernel - base modules @@ -679,8 +675,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-s390-base -f pre-base.sh @@ -688,6 +683,7 @@ %if %split_packages %files -n kernel-s390-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-s390-extra @@ -709,11 +705,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-s390-extra -f post-extra.sh %if %split_packages %files -n kernel-s390-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-source.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:24.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:24.000000000 +0200 @@ -30,7 +30,7 @@ Name: kernel-source Summary: The Linux Kernel Sources Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: Development/Sources AutoReqProv: off @@ -120,8 +120,7 @@ see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -318,8 +317,7 @@ see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-source-rt -f source-post-rt.sh %if %with_rt ++++++ kernel-syms.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:25.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:25.000000000 +0200 @@ -29,7 +29,7 @@ Name: kernel-syms Summary: Kernel Symbol Versions (modversions) Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: Development/Sources AutoReqProv: off @@ -99,8 +99,7 @@ see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep echo "Architecture symbol(s):" %symbols ++++++ kernel-trace.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:25.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:25.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-trace trace $(case trace in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/trace$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-trace Summary: The Realtime Linux Kernel Version: 2.6.27 -Release: 3 +Release: 4 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-trace-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-trace-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -184,18 +198,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-trace trace $(case trace in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/trace$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -219,8 +221,7 @@ see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -235,12 +236,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -443,20 +444,20 @@ -e "s:@FLAVOR""@:trace:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:trace:g" \ -e "s:@SUBPACKAGE@:kernel-trace$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:trace:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-trace %endif @@ -478,11 +479,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -592,7 +593,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-trace. + # All supported modules which are not core modules belong in kernel-trace. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -607,7 +608,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -624,8 +625,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -648,19 +648,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -672,6 +667,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-trace-base Summary: The Realtime Linux Kernel @@ -695,8 +691,7 @@ see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-trace-base -f pre-base.sh @@ -704,6 +699,7 @@ %if %split_packages %files -n kernel-trace-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-trace-extra @@ -729,11 +725,11 @@ see /usr/src/linux/CREDITS for more details. -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-trace-extra -f post-extra.sh %if %split_packages %files -n kernel-trace-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-vanilla.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:26.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:26.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-vanilla vanilla $(case vanilla in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/vanilla$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-vanilla Summary: The Standard Kernel - without any SUSE patches Version: 2.6.27 -Release: 10 +Release: 11 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-vanilla-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-vanilla-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -195,18 +209,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-vanilla vanilla $(case vanilla in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/vanilla$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -224,8 +226,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -240,12 +241,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -448,20 +449,20 @@ -e "s:@FLAVOR""@:vanilla:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:vanilla:g" \ -e "s:@SUBPACKAGE@:kernel-vanilla$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:vanilla:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-vanilla %endif @@ -483,11 +484,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -597,7 +598,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-vanilla. + # All supported modules which are not core modules belong in kernel-vanilla. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -612,7 +613,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -629,8 +630,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -653,19 +653,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -677,6 +672,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-vanilla-base Summary: The Standard Kernel - without any SUSE patches @@ -694,8 +690,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-vanilla-base -f pre-base.sh @@ -703,6 +698,7 @@ %if %split_packages %files -n kernel-vanilla-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-vanilla-extra @@ -722,11 +718,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-vanilla-extra -f post-extra.sh %if %split_packages %files -n kernel-vanilla-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ kernel-xen.spec ++++++ --- /var/tmp/diff_new_pack.l26529/_old 2008-09-30 00:18:27.000000000 +0200 +++ /var/tmp/diff_new_pack.l26529/_new 2008-09-30 00:18:27.000000000 +0200 @@ -42,18 +42,32 @@ %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif +%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) +%define symbols %(set -- kernel-xen xen $(case xen in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) +%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/xen$') +# Define some CONFIG variables as rpm macros as well. (rpm cannot handle +# defining them all at once.) +%define config_vars CONFIG_MODULES +%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%if %build_vanilla || %CONFIG_MODULES != "y" +%define split_packages 0 +%else +%define split_packages 1 +%endif Name: kernel-xen Summary: The Xen Kernel Version: 2.6.27 -Release: 8 +Release: 9 License: GPL v2 only Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes +%if %split_packages Requires: kernel-xen-base = %version-%release +%endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a @@ -66,7 +80,7 @@ Requires(post): perl-Bootloader Requires(post): mkinitrd Recommends: kerneloops -%if ! %sles_version +%if ! %sles_version && %split_packages Recommends: kernel-xen-extra %endif #!BuildIgnore: perl-Bootloader mkinitrd @@ -181,18 +195,6 @@ Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp -%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks}) -%define symbols %(set -- kernel-xen xen $(case xen in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) -%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/xen$') -# Define some CONFIG variables as rpm macros as well. (rpm cannot handle -# defining them all at once.) -%define config_vars CONFIG_MODULES -%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} -%if %build_vanilla || %CONFIG_MODULES != "y" -%define split_packages 0 -%else -%define split_packages 1 -%endif # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash @@ -213,8 +215,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %prep if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then @@ -229,12 +230,12 @@ %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported -( supported_conf base +{ supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done -) | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported +} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ @@ -437,20 +438,20 @@ -e "s:@FLAVOR""@:xen:g" \ %_sourcedir/pre.sh > ../pre-base.sh for sub in '-base' '' '-extra'; do - ( cat %_sourcedir/functions.sh + { cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:xen:g" \ -e "s:@SUBPACKAGE@:kernel-xen$sub:g" \ %_sourcedir/post.sh - ) > ../post$sub.sh + } > ../post$sub.sh done -( cat %_sourcedir/functions.sh +{ cat %_sourcedir/functions.sh sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:xen:g" \ %_sourcedir/postun.sh -) > ../postun.sh +} > ../postun.sh %if %build_kdump || %build_um || %build_xen || %build_vanilla suffix=-xen %endif @@ -472,11 +473,11 @@ [ -e $old_symsets ] || old_symsets= # Group the exported symbols listed in symvers.gz by directory, and # create a database of sets. - ( grep -v $'\tvmlinux$' Module.symvers + { grep -v $'\tvmlinux$' Module.symvers # Find out in which built-in.o files the exported symbols that ended # up in vmlinux were defined. grep $'\tvmlinux$' Module.symvers | %_sourcedir/built-in-where - ) | %_sourcedir/make-symsets \ + } | %_sourcedir/make-symsets \ %buildroot/boot/symsets-$KERNELRELEASE.tar.gz \ $old_symsets || [ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ] @@ -586,7 +587,7 @@ # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules - # All supported modules which are not core modules belong in kernel-kernel-xen. + # All supported modules which are not core modules belong in kernel-xen. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ > %my_builddir/main-modules @@ -601,7 +602,7 @@ fi add_dirs_to_filelist() { local filelist - filelist=$(cat) + filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros @@ -618,8 +619,7 @@ | sed -e 's:^:%%%%dir :' } # Collect the file lists. -( cd %buildroot - echo "%%%%defattr(-, root, root)" +{ cd %buildroot find boot \ \( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \ -type f -printf '/%%p\n' @@ -642,19 +642,14 @@ if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi -) | add_dirs_to_filelist > %my_builddir/kernel-base.files +} | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/main-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-main.files - ( echo "%%%%defattr(-, root, root)" - cat %my_builddir/unsupported-modules - ) | add_dirs_to_filelist > %my_builddir/kernel-extra.files + add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files + add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif -# Hardlink duplicate files automatically (from package fdupes): It doesn't safe +# Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT -cd %my_builddir # it helps if rpm can find the file lists ... %post -f post.sh @@ -666,6 +661,7 @@ %files -f kernel-base.files %endif +%defattr(-, root, root) %package -n kernel-xen-base Summary: The Xen Kernel - base modules @@ -688,8 +684,7 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %pre -n kernel-xen-base -f pre-base.sh @@ -697,6 +692,7 @@ %if %split_packages %files -n kernel-xen-base -f kernel-base.files +%defattr(-, root, root) %endif %package -n kernel-xen-extra @@ -721,11 +717,11 @@ -Source Timestamp: 2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +Source Timestamp: 2008-09-29 23:39:54 +0200 %post -n kernel-xen-extra -f post-extra.sh %if %split_packages %files -n kernel-xen-extra -f kernel-extra.files +%defattr(-, root, root) %endif ++++++ build-source-timestamp ++++++ --- kernel-source/build-source-timestamp 2008-09-29 21:59:30.000000000 +0200 +++ /mounts/work_src_done/STABLE/kernel-source/build-source-timestamp 2008-09-29 23:42:34.180122000 +0200 @@ -1,2 +1 @@ -2008-09-29 15:31:19 +0200 -CVS Date: 2008.09.29.13.40.06 +2008-09-29 23:39:54 +0200 ++++++ config.tar.bz2 ++++++ ++++ 2878 lines of diff (skipped) ++++++ functions.sh ++++++ --- kernel-source/functions.sh 2008-09-29 21:59:39.000000000 +0200 +++ /mounts/work_src_done/STABLE/kernel-source/functions.sh 2008-09-29 23:42:36.246379000 +0200 @@ -1,14 +1,3 @@ -# Readlink is not present on some older distributions: emulate it. -readlink() { - local path=$1 ll - - if [ -L "$path" ]; then - ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" && - echo "${ll/* -> }" - else - return 1 - fi -} relink() { if [ -h "$2" ]; then local old=$(readlink "$2") ++++++ kabi.tar.bz2 ++++++ ++++++ needed_space_in_mb ++++++ --- kernel-source/needed_space_in_mb 2008-09-29 22:56:29.000000000 +0200 +++ /mounts/work_src_done/STABLE/kernel-source/needed_space_in_mb 2008-09-29 23:42:44.513457000 +0200 @@ -1 +1 @@ -6000 +6144 ++++++ patches.addon.tar.bz2 ++++++ ++++++ patches.apparmor.tar.bz2 ++++++ ++++++ patches.arch.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.arch/x86-tracehook new/patches.arch/x86-tracehook --- old/patches.arch/x86-tracehook 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.arch/x86-tracehook 2008-09-29 17:35:05.000000000 +0200 @@ -0,0 +1,507 @@ +From: Roland McGrath <roland@redhat.com> +Date: Sun Apr 20 14:35:12 2008 -0700 +Subject: x86 tracehook +References: FATE#304321 +Patch-mainline: no + +Apply the changes from x86-utrace branch of +git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace +plus later cleanups. + +Signed-off-by: Roland McGrath <roland@redhat.com> +Signed-off-by: Petr Tesarik <ptesarik@suse.cz> + +--- + arch/x86/Kconfig | 1 + arch/x86/kernel/ptrace.c | 34 +----- + arch/x86/kernel/signal_32.c | 11 +- + arch/x86/kernel/signal_64.c | 49 ++------- + include/asm-x86/ptrace.h | 5 + include/asm-x86/syscall.h | 211 ++++++++++++++++++++++++++++++++++++++++++ + include/asm-x86/thread_info.h | 4 + 7 files changed, 249 insertions(+), 66 deletions(-) + +--- linux-2.6.26.orig/arch/x86/Kconfig 2008-09-26 16:09:57.000000000 +0200 ++++ linux-2.6.26/arch/x86/Kconfig 2008-09-26 16:10:35.000000000 +0200 +@@ -29,6 +29,7 @@ config X86 + select HAVE_FTRACE + select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) + select HAVE_ARCH_KGDB if !X86_VOYAGER ++ select HAVE_ARCH_TRACEHOOK + select HAVE_GENERIC_DMA_COHERENT if X86_32 + select HAVE_EFFICIENT_UNALIGNED_ACCESS + +--- linux-2.6.26.orig/arch/x86/kernel/ptrace.c 2008-09-26 16:09:57.000000000 +0200 ++++ linux-2.6.26/arch/x86/kernel/ptrace.c 2008-09-26 16:10:35.000000000 +0200 +@@ -14,6 +14,7 @@ + #include <linux/errno.h> + #include <linux/ptrace.h> + #include <linux/regset.h> ++#include <linux/tracehook.h> + #include <linux/user.h> + #include <linux/elf.h> + #include <linux/security.h> +@@ -1375,30 +1376,6 @@ void send_sigtrap(struct task_struct *ts + force_sig_info(SIGTRAP, &info, tsk); + } + +-static void syscall_trace(struct pt_regs *regs) +-{ +- if (!(current->ptrace & PT_PTRACED)) +- return; +- +-#if 0 +- printk("trace %s ip %lx sp %lx ax %d origrax %d caller %lx tiflags %x ptrace %x\n", +- current->comm, +- regs->ip, regs->sp, regs->ax, regs->orig_ax, __builtin_return_address(0), +- current_thread_info()->flags, current->ptrace); +-#endif +- +- ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) +- ? 0x80 : 0)); +- /* +- * this isn't the same as continuing with a signal, but it will do +- * for normal use. strace only continues with a signal if the +- * stopping signal is not SIGTRAP. -brl +- */ +- if (current->exit_code) { +- send_sig(current->exit_code, current, 1); +- current->exit_code = 0; +- } +-} + + #ifdef CONFIG_X86_32 + # define IS_IA32 1 +@@ -1443,8 +1420,9 @@ asmregparm long syscall_trace_enter(stru + if (unlikely(test_thread_flag(TIF_SYSCALL_EMU))) + ret = -1L; + +- if (ret || test_thread_flag(TIF_SYSCALL_TRACE)) +- syscall_trace(regs); ++ if ((ret || test_thread_flag(TIF_SYSCALL_TRACE)) && ++ tracehook_report_syscall_entry(regs)) ++ ret = -1L; + + if (unlikely(current->audit_context)) { + if (IS_IA32) +@@ -1473,7 +1451,7 @@ asmregparm void syscall_trace_leave(stru + audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); + + if (test_thread_flag(TIF_SYSCALL_TRACE)) +- syscall_trace(regs); ++ tracehook_report_syscall_exit(regs, 0); + + /* + * If TIF_SYSCALL_EMU is set, we only get here because of +@@ -1489,6 +1467,6 @@ asmregparm void syscall_trace_leave(stru + * system call instruction. + */ + if (test_thread_flag(TIF_SINGLESTEP) && +- (current->ptrace & PT_PTRACED)) ++ tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL)) + send_sigtrap(current, regs, 0); + } +--- linux-2.6.26.orig/arch/x86/kernel/signal_32.c 2008-09-26 16:09:57.000000000 +0200 ++++ linux-2.6.26/arch/x86/kernel/signal_32.c 2008-09-26 16:10:35.000000000 +0200 +@@ -17,6 +17,7 @@ + #include <linux/errno.h> + #include <linux/sched.h> + #include <linux/wait.h> ++#include <linux/tracehook.h> + #include <linux/elf.h> + #include <linux/smp.h> + #include <linux/mm.h> +@@ -558,8 +559,6 @@ handle_signal(unsigned long sig, siginfo + * handler too. + */ + regs->flags &= ~X86_EFLAGS_TF; +- if (test_thread_flag(TIF_SINGLESTEP)) +- ptrace_notify(SIGTRAP); + + spin_lock_irq(¤t->sighand->siglock); + sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); +@@ -573,6 +572,9 @@ handle_signal(unsigned long sig, siginfo + current->instrumentation &= ~PTS_SELF; + } + ++ tracehook_signal_handler(sig, info, ka, regs, ++ test_thread_flag(TIF_SINGLESTEP)); ++ + return 0; + } + +@@ -666,5 +668,10 @@ do_notify_resume(struct pt_regs *regs, v + if (thread_info_flags & _TIF_SIGPENDING) + do_signal(regs); + ++ if (thread_info_flags & _TIF_NOTIFY_RESUME) { ++ clear_thread_flag(TIF_NOTIFY_RESUME); ++ tracehook_notify_resume(regs); ++ } ++ + clear_thread_flag(TIF_IRET); + } +--- linux-2.6.26.orig/arch/x86/kernel/signal_64.c 2008-09-26 16:09:57.000000000 +0200 ++++ linux-2.6.26/arch/x86/kernel/signal_64.c 2008-09-26 16:10:35.000000000 +0200 +@@ -15,6 +15,7 @@ + #include <linux/errno.h> + #include <linux/wait.h> + #include <linux/ptrace.h> ++#include <linux/tracehook.h> + #include <linux/unistd.h> + #include <linux/stddef.h> + #include <linux/personality.h> +@@ -26,6 +27,7 @@ + #include <asm/proto.h> + #include <asm/ia32_unistd.h> + #include <asm/mce.h> ++#include <asm/syscall.h> + #include "sigframe.h" + + #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) +@@ -355,35 +357,6 @@ give_sigsegv: + } + + /* +- * Return -1L or the syscall number that @regs is executing. +- */ +-static long current_syscall(struct pt_regs *regs) +-{ +- /* +- * We always sign-extend a -1 value being set here, +- * so this is always either -1L or a syscall number. +- */ +- return regs->orig_ax; +-} +- +-/* +- * Return a value that is -EFOO if the system call in @regs->orig_ax +- * returned an error. This only works for @regs from @current. +- */ +-static long current_syscall_ret(struct pt_regs *regs) +-{ +-#ifdef CONFIG_IA32_EMULATION +- if (test_thread_flag(TIF_IA32)) +- /* +- * Sign-extend the value so (int)-EFOO becomes (long)-EFOO +- * and will match correctly in comparisons. +- */ +- return (int) regs->ax; +-#endif +- return regs->ax; +-} +- +-/* + * OK, we're invoking a handler + */ + +@@ -394,9 +367,9 @@ handle_signal(unsigned long sig, siginfo + int ret; + + /* Are we from a system call? */ +- if (current_syscall(regs) >= 0) { ++ if (syscall_get_nr(current, regs) >= 0) { + /* If so, check system call restarting.. */ +- switch (current_syscall_ret(regs)) { ++ switch (syscall_get_error(current, regs)) { + case -ERESTART_RESTARTBLOCK: + case -ERESTARTNOHAND: + regs->ax = -EINTR; +@@ -453,8 +426,6 @@ handle_signal(unsigned long sig, siginfo + * handler too. + */ + regs->flags &= ~X86_EFLAGS_TF; +- if (test_thread_flag(TIF_SINGLESTEP)) +- ptrace_notify(SIGTRAP); + + spin_lock_irq(¤t->sighand->siglock); + sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); +@@ -462,6 +433,9 @@ handle_signal(unsigned long sig, siginfo + sigaddset(¤t->blocked,sig); + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); ++ ++ tracehook_signal_handler(sig, info, ka, regs, ++ test_thread_flag(TIF_SINGLESTEP)); + } + + if (current->instrumentation & PTS_SELF) { +@@ -523,9 +497,9 @@ static void do_signal(struct pt_regs *re + } + + /* Did we come from a system call? */ +- if (current_syscall(regs) >= 0) { ++ if (syscall_get_nr(current, regs) >= 0) { + /* Restart the system call - no handlers present */ +- switch (current_syscall_ret(regs)) { ++ switch (syscall_get_error(current, regs)) { + case -ERESTARTNOHAND: + case -ERESTARTSYS: + case -ERESTARTNOINTR: +@@ -563,6 +537,11 @@ void do_notify_resume(struct pt_regs *re + /* deal with pending signal delivery */ + if (thread_info_flags & _TIF_SIGPENDING) + do_signal(regs); ++ ++ if (thread_info_flags & _TIF_NOTIFY_RESUME) { ++ clear_thread_flag(TIF_NOTIFY_RESUME); ++ tracehook_notify_resume(regs); ++ } + } + + void signal_fault(struct pt_regs *regs, void __user *frame, char *where) +--- linux-2.6.26.orig/include/asm-x86/ptrace.h 2008-09-26 12:02:48.000000000 +0200 ++++ linux-2.6.26/include/asm-x86/ptrace.h 2008-09-26 16:10:35.000000000 +0200 +@@ -213,6 +213,11 @@ static inline unsigned long frame_pointe + return regs->bp; + } + ++static inline unsigned long user_stack_pointer(struct pt_regs *regs) ++{ ++ return regs->sp; ++} ++ + /* + * These are defined as per linux/ptrace.h, which see. + */ +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.26/include/asm-x86/syscall.h 2008-09-29 10:53:04.000000000 +0200 +@@ -0,0 +1,211 @@ ++/* ++ * Access to user system call parameters and results ++ * ++ * Copyright (C) 2008 Red Hat, Inc. All rights reserved. ++ * ++ * This copyrighted material is made available to anyone wishing to use, ++ * modify, copy, or redistribute it subject to the terms and conditions ++ * of the GNU General Public License v.2. ++ * ++ * See asm-generic/syscall.h for descriptions of what we must do here. ++ */ ++ ++#ifndef _ASM_SYSCALL_H ++#define _ASM_SYSCALL_H 1 ++ ++#include <linux/sched.h> ++#include <linux/err.h> ++ ++static inline long syscall_get_nr(struct task_struct *task, ++ struct pt_regs *regs) ++{ ++ /* ++ * We always sign-extend a -1 value being set here, ++ * so this is always either -1L or a syscall number. ++ */ ++ return regs->orig_ax; ++} ++ ++static inline void syscall_rollback(struct task_struct *task, ++ struct pt_regs *regs) ++{ ++ regs->ax = regs->orig_ax; ++} ++ ++static inline long syscall_get_error(struct task_struct *task, ++ struct pt_regs *regs) ++{ ++ unsigned long error = regs->ax; ++#ifdef CONFIG_IA32_EMULATION ++ /* ++ * TS_COMPAT is set for 32-bit syscall entries and then ++ * remains set until we return to user mode. ++ */ ++ if (task_thread_info(task)->status & TS_COMPAT) ++ /* ++ * Sign-extend the value so (int)-EFOO becomes (long)-EFOO ++ * and will match correctly in comparisons. ++ */ ++ error = (long) (int) error; ++#endif ++ return IS_ERR_VALUE(error) ? error : 0; ++} ++ ++static inline long syscall_get_return_value(struct task_struct *task, ++ struct pt_regs *regs) ++{ ++ return regs->ax; ++} ++ ++static inline void syscall_set_return_value(struct task_struct *task, ++ struct pt_regs *regs, ++ int error, long val) ++{ ++ regs->ax = (long) error ?: val; ++} ++ ++#ifdef CONFIG_X86_32 ++ ++static inline void syscall_get_arguments(struct task_struct *task, ++ struct pt_regs *regs, ++ unsigned int i, unsigned int n, ++ unsigned long *args) ++{ ++ BUG_ON(i + n > 6); ++ memcpy(args, ®s->bx + i, n * sizeof(args[0])); ++} ++ ++static inline void syscall_set_arguments(struct task_struct *task, ++ struct pt_regs *regs, ++ unsigned int i, unsigned int n, ++ const unsigned long *args) ++{ ++ BUG_ON(i + n > 6); ++ memcpy(®s->bx + i, args, n * sizeof(args[0])); ++} ++ ++#else /* CONFIG_X86_64 */ ++ ++static inline void syscall_get_arguments(struct task_struct *task, ++ struct pt_regs *regs, ++ unsigned int i, unsigned int n, ++ unsigned long *args) ++{ ++# ifdef CONFIG_IA32_EMULATION ++ if (task_thread_info(task)->status & TS_COMPAT) ++ switch (i + n) { ++ case 6: ++ if (!n--) break; ++ *args++ = regs->bp; ++ case 5: ++ if (!n--) break; ++ *args++ = regs->di; ++ case 4: ++ if (!n--) break; ++ *args++ = regs->si; ++ case 3: ++ if (!n--) break; ++ *args++ = regs->dx; ++ case 2: ++ if (!n--) break; ++ *args++ = regs->cx; ++ case 1: ++ if (!n--) break; ++ *args++ = regs->bx; ++ case 0: ++ if (!n--) break; ++ default: ++ BUG(); ++ break; ++ } ++ else ++# endif ++ switch (i + n) { ++ case 6: ++ if (!n--) break; ++ *args++ = regs->r9; ++ case 5: ++ if (!n--) break; ++ *args++ = regs->r8; ++ case 4: ++ if (!n--) break; ++ *args++ = regs->r10; ++ case 3: ++ if (!n--) break; ++ *args++ = regs->dx; ++ case 2: ++ if (!n--) break; ++ *args++ = regs->si; ++ case 1: ++ if (!n--) break; ++ *args++ = regs->di; ++ case 0: ++ if (!n--) break; ++ default: ++ BUG(); ++ break; ++ } ++} ++ ++static inline void syscall_set_arguments(struct task_struct *task, ++ struct pt_regs *regs, ++ unsigned int i, unsigned int n, ++ const unsigned long *args) ++{ ++# ifdef CONFIG_IA32_EMULATION ++ if (task_thread_info(task)->status & TS_COMPAT) ++ switch (i + n) { ++ case 6: ++ if (!n--) break; ++ regs->bp = *args++; ++ case 5: ++ if (!n--) break; ++ regs->di = *args++; ++ case 4: ++ if (!n--) break; ++ regs->si = *args++; ++ case 3: ++ if (!n--) break; ++ regs->dx = *args++; ++ case 2: ++ if (!n--) break; ++ regs->cx = *args++; ++ case 1: ++ if (!n--) break; ++ regs->bx = *args++; ++ case 0: ++ if (!n--) break; ++ default: ++ BUG(); ++ } ++ else ++# endif ++ switch (i + n) { ++ case 6: ++ if (!n--) break; ++ regs->r9 = *args++; ++ case 5: ++ if (!n--) break; ++ regs->r8 = *args++; ++ case 4: ++ if (!n--) break; ++ regs->r10 = *args++; ++ case 3: ++ if (!n--) break; ++ regs->dx = *args++; ++ case 2: ++ if (!n--) break; ++ regs->si = *args++; ++ case 1: ++ if (!n--) break; ++ regs->di = *args++; ++ case 0: ++ if (!n--) break; ++ default: ++ BUG(); ++ } ++} ++ ++#endif /* CONFIG_X86_32 */ ++ ++#endif /* _ASM_SYSCALL_H */ +--- linux-2.6.26.orig/include/asm-x86/thread_info.h 2008-09-26 12:02:24.000000000 +0200 ++++ linux-2.6.26/include/asm-x86/thread_info.h 2008-09-26 16:10:35.000000000 +0200 +@@ -71,6 +71,7 @@ struct thread_info { + * Warning: layout of LSW is hardcoded in entry.S + */ + #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ ++#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ + #define TIF_SIGPENDING 2 /* signal pending */ + #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ + #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ +@@ -93,6 +94,7 @@ struct thread_info { + #define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */ + + #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) ++#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) + #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) + #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) + #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +@@ -133,7 +135,7 @@ struct thread_info { + + /* Only used for 64 bit */ + #define _TIF_DO_NOTIFY_MASK \ +- (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) ++ (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_NOTIFY_RESUME) + + /* flags to check in __switch_to() */ + #define _TIF_WORK_CTXSW \ ++++++ patches.drivers.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.drivers/ehca-flush-cqe.patch new/patches.drivers/ehca-flush-cqe.patch --- old/patches.drivers/ehca-flush-cqe.patch 1970-01-01 01:00:00.000000000 +0100 +++ new/patches.drivers/ehca-flush-cqe.patch 2008-09-29 16:26:33.000000000 +0200 @@ -0,0 +1,757 @@ +From: Alexander Schmidt <ALEXSCHM@de.ibm.com> +Subject: Adds software flush CQE generation to the ehca driver. +References: bnc#430344 + +When a QP goes into error state, it is required that flush CQEs are +delivered to the application for any outstanding work requests. eHCA does not +do this in hardware, so this patch adds software flush CQE generation to the +ehca driver. + +Whenever a QP gets into error state, it is added to the QP error list of its +respective CQ. If the error QP list of a CQ is not empty, poll_cq() +generates flush CQEs before polling the actual CQ. + +Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com> +Acked-by: John Jolly <jjolly@suse.de> +--- +Applies on top of 2.6.27-rc3, please consider this for 2.6.28. + + drivers/infiniband/hw/ehca/ehca_classes.h | 14 + + drivers/infiniband/hw/ehca/ehca_cq.c | 3 + drivers/infiniband/hw/ehca/ehca_iverbs.h | 2 + drivers/infiniband/hw/ehca/ehca_qp.c | 225 ++++++++++++++++++++++++++++-- + drivers/infiniband/hw/ehca/ehca_reqs.c | 211 ++++++++++++++++++++++++---- + 5 files changed, 412 insertions(+), 43 deletions(-) + +--- infiniband.git.orig/drivers/infiniband/hw/ehca/ehca_classes.h ++++ infiniband.git/drivers/infiniband/hw/ehca/ehca_classes.h +@@ -164,6 +164,13 @@ struct ehca_qmap_entry { + u16 reported; + }; + ++struct ehca_queue_map { ++ struct ehca_qmap_entry *map; ++ unsigned int entries; ++ unsigned int tail; ++ unsigned int left_to_poll; ++}; ++ + struct ehca_qp { + union { + struct ib_qp ib_qp; +@@ -173,8 +180,9 @@ struct ehca_qp { + enum ehca_ext_qp_type ext_type; + enum ib_qp_state state; + struct ipz_queue ipz_squeue; +- struct ehca_qmap_entry *sq_map; ++ struct ehca_queue_map sq_map; + struct ipz_queue ipz_rqueue; ++ struct ehca_queue_map rq_map; + struct h_galpas galpas; + u32 qkey; + u32 real_qp_num; +@@ -204,6 +212,8 @@ struct ehca_qp { + atomic_t nr_events; /* events seen */ + wait_queue_head_t wait_completion; + int mig_armed; ++ struct list_head sq_err_node; ++ struct list_head rq_err_node; + }; + + #define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ) +@@ -233,6 +243,8 @@ struct ehca_cq { + /* mmap counter for resources mapped into user space */ + u32 mm_count_queue; + u32 mm_count_galpa; ++ struct list_head sqp_err_list; ++ struct list_head rqp_err_list; + }; + + enum ehca_mr_flag { +--- infiniband.git.orig/drivers/infiniband/hw/ehca/ehca_reqs.c ++++ infiniband.git/drivers/infiniband/hw/ehca/ehca_reqs.c +@@ -53,9 +53,25 @@ + /* in RC traffic, insert an empty RDMA READ every this many packets */ + #define ACK_CIRC_THRESHOLD 2000000 + ++static u64 replace_wr_id(u64 wr_id, u16 idx) ++{ ++ u64 ret; ++ ++ ret = wr_id & ~QMAP_IDX_MASK; ++ ret |= idx & QMAP_IDX_MASK; ++ ++ return ret; ++} ++ ++static u16 get_app_wr_id(u64 wr_id) ++{ ++ return wr_id & QMAP_IDX_MASK; ++} ++ + static inline int ehca_write_rwqe(struct ipz_queue *ipz_rqueue, + struct ehca_wqe *wqe_p, +- struct ib_recv_wr *recv_wr) ++ struct ib_recv_wr *recv_wr, ++ u32 rq_map_idx) + { + u8 cnt_ds; + if (unlikely((recv_wr->num_sge < 0) || +@@ -69,7 +85,7 @@ static inline int ehca_write_rwqe(struct + /* clear wqe header until sglist */ + memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list)); + +- wqe_p->work_request_id = recv_wr->wr_id; ++ wqe_p->work_request_id = replace_wr_id(recv_wr->wr_id, rq_map_idx); + wqe_p->nr_of_data_seg = recv_wr->num_sge; + + for (cnt_ds = 0; cnt_ds < recv_wr->num_sge; cnt_ds++) { +@@ -146,6 +162,7 @@ static inline int ehca_write_swqe(struct + u64 dma_length; + struct ehca_av *my_av; + u32 remote_qkey = send_wr->wr.ud.remote_qkey; ++ struct ehca_qmap_entry *qmap_entry = &qp->sq_map.map[sq_map_idx]; + + if (unlikely((send_wr->num_sge < 0) || + (send_wr->num_sge > qp->ipz_squeue.act_nr_of_sg))) { +@@ -158,11 +175,10 @@ static inline int ehca_write_swqe(struct + /* clear wqe header until sglist */ + memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list)); + +- wqe_p->work_request_id = send_wr->wr_id & ~QMAP_IDX_MASK; +- wqe_p->work_request_id |= sq_map_idx & QMAP_IDX_MASK; ++ wqe_p->work_request_id = replace_wr_id(send_wr->wr_id, sq_map_idx); + +- qp->sq_map[sq_map_idx].app_wr_id = send_wr->wr_id & QMAP_IDX_MASK; +- qp->sq_map[sq_map_idx].reported = 0; ++ qmap_entry->app_wr_id = get_app_wr_id(send_wr->wr_id); ++ qmap_entry->reported = 0; + + switch (send_wr->opcode) { + case IB_WR_SEND: +@@ -496,7 +512,9 @@ static int internal_post_recv(struct ehc + struct ehca_wqe *wqe_p; + int wqe_cnt = 0; + int ret = 0; ++ u32 rq_map_idx; + unsigned long flags; ++ struct ehca_qmap_entry *qmap_entry; + + if (unlikely(!HAS_RQ(my_qp))) { + ehca_err(dev, "QP has no RQ ehca_qp=%p qp_num=%x ext_type=%d", +@@ -524,8 +542,15 @@ static int internal_post_recv(struct ehc + } + goto post_recv_exit0; + } ++ /* ++ * Get the index of the WQE in the recv queue. The same index ++ * is used for writing into the rq_map. ++ */ ++ rq_map_idx = start_offset / my_qp->ipz_rqueue.qe_size; ++ + /* write a RECV WQE into the QUEUE */ +- ret = ehca_write_rwqe(&my_qp->ipz_rqueue, wqe_p, cur_recv_wr); ++ ret = ehca_write_rwqe(&my_qp->ipz_rqueue, wqe_p, cur_recv_wr, ++ rq_map_idx); + /* + * if something failed, + * reset the free entry pointer to the start value +@@ -540,6 +565,11 @@ static int internal_post_recv(struct ehc + } + goto post_recv_exit0; + } ++ ++ qmap_entry = &my_qp->rq_map.map[rq_map_idx]; ++ qmap_entry->app_wr_id = get_app_wr_id(cur_recv_wr->wr_id); ++ qmap_entry->reported = 0; ++ + wqe_cnt++; + } /* eof for cur_recv_wr */ + +@@ -596,10 +626,12 @@ static const u8 ib_wc_opcode[255] = { + /* internal function to poll one entry of cq */ + static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) + { +- int ret = 0; ++ int ret = 0, qmap_tail_idx; + struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq); + struct ehca_cqe *cqe; + struct ehca_qp *my_qp; ++ struct ehca_qmap_entry *qmap_entry; ++ struct ehca_queue_map *qmap; + int cqe_count = 0, is_error; + + repoll: +@@ -674,27 +706,52 @@ repoll: + goto repoll; + wc->qp = &my_qp->ib_qp; + +- if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT)) { +- struct ehca_qmap_entry *qmap_entry; ++ if (is_error) { + /* +- * We got a send completion and need to restore the original +- * wr_id. ++ * set left_to_poll to 0 because in error state, we will not ++ * get any additional CQEs + */ +- qmap_entry = &my_qp->sq_map[cqe->work_request_id & +- QMAP_IDX_MASK]; ++ ehca_add_to_err_list(my_qp, 1); ++ my_qp->sq_map.left_to_poll = 0; + +- if (qmap_entry->reported) { +- ehca_warn(cq->device, "Double cqe on qp_num=%#x", +- my_qp->real_qp_num); +- /* found a double cqe, discard it and read next one */ +- goto repoll; +- } +- wc->wr_id = cqe->work_request_id & ~QMAP_IDX_MASK; +- wc->wr_id |= qmap_entry->app_wr_id; +- qmap_entry->reported = 1; +- } else ++ if (HAS_RQ(my_qp)) ++ ehca_add_to_err_list(my_qp, 0); ++ my_qp->rq_map.left_to_poll = 0; ++ } ++ ++ qmap_tail_idx = get_app_wr_id(cqe->work_request_id); ++ if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT)) ++ /* We got a send completion. */ ++ qmap = &my_qp->sq_map; ++ else + /* We got a receive completion. */ +- wc->wr_id = cqe->work_request_id; ++ qmap = &my_qp->rq_map; ++ ++ qmap_entry = &qmap->map[qmap_tail_idx]; ++ if (qmap_entry->reported) { ++ ehca_warn(cq->device, "Double cqe on qp_num=%#x", ++ my_qp->real_qp_num); ++ /* found a double cqe, discard it and read next one */ ++ goto repoll; ++ } ++ ++ wc->wr_id = replace_wr_id(cqe->work_request_id, qmap_entry->app_wr_id); ++ qmap_entry->reported = 1; ++ ++ /* this is a proper completion, we need to advance the tail pointer */ ++ if (++qmap->tail == qmap->entries) ++ qmap->tail = 0; ++ ++ /* if left_to_poll is decremented to 0, add the QP to the error list */ ++ if (qmap->left_to_poll > 0) { ++ qmap->left_to_poll--; ++ if ((my_qp->sq_map.left_to_poll == 0) && ++ (my_qp->rq_map.left_to_poll == 0)) { ++ ehca_add_to_err_list(my_qp, 1); ++ if (HAS_RQ(my_qp)) ++ ehca_add_to_err_list(my_qp, 0); ++ } ++ } + + /* eval ib_wc_opcode */ + wc->opcode = ib_wc_opcode[cqe->optype]-1; +@@ -733,13 +790,88 @@ poll_cq_one_exit0: + return ret; + } + ++static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq, ++ struct ib_wc *wc, int num_entries, ++ struct ipz_queue *ipz_queue, int on_sq) ++{ ++ int nr = 0; ++ struct ehca_wqe *wqe; ++ u64 offset; ++ struct ehca_queue_map *qmap; ++ struct ehca_qmap_entry *qmap_entry; ++ ++ if (on_sq) ++ qmap = &my_qp->sq_map; ++ else ++ qmap = &my_qp->rq_map; ++ ++ qmap_entry = &qmap->map[qmap->tail]; ++ ++ while ((nr < num_entries) && (qmap_entry->reported == 0)) { ++ /* generate flush CQE */ ++ memset(wc, 0, sizeof(*wc)); ++ ++ offset = qmap->tail * ipz_queue->qe_size; ++ wqe = (struct ehca_wqe *)ipz_qeit_calc(ipz_queue, offset); ++ if (!wqe) { ++ ehca_err(cq->device, "Invalid wqe offset=%#lx on " ++ "qp_num=%#x", offset, my_qp->real_qp_num); ++ return nr; ++ } ++ ++ wc->wr_id = replace_wr_id(wqe->work_request_id, ++ qmap_entry->app_wr_id); ++ ++ if (on_sq) { ++ switch (wqe->optype) { ++ case WQE_OPTYPE_SEND: ++ wc->opcode = IB_WC_SEND; ++ break; ++ case WQE_OPTYPE_RDMAWRITE: ++ wc->opcode = IB_WC_RDMA_WRITE; ++ break; ++ case WQE_OPTYPE_RDMAREAD: ++ wc->opcode = IB_WC_RDMA_READ; ++ break; ++ default: ++ ehca_err(cq->device, "Invalid optype=%x", ++ wqe->optype); ++ return nr; ++ } ++ } else ++ wc->opcode = IB_WC_RECV; ++ ++ if (wqe->wr_flag & WQE_WRFLAG_IMM_DATA_PRESENT) { ++ wc->ex.imm_data = wqe->immediate_data; ++ wc->wc_flags |= IB_WC_WITH_IMM; ++ } ++ ++ wc->status = IB_WC_WR_FLUSH_ERR; ++ ++ wc->qp = &my_qp->ib_qp; ++ ++ /* mark as reported and advance tail pointer */ ++ qmap_entry->reported = 1; ++ if (++qmap->tail == qmap->entries) ++ qmap->tail = 0; ++ qmap_entry = &qmap->map[qmap->tail]; ++ ++ wc++; nr++; ++ } ++ ++ return nr; ++ ++} ++ + int ehca_poll_cq(struct ib_cq *cq, int num_entries, struct ib_wc *wc) + { + struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq); + int nr; ++ struct ehca_qp *err_qp; + struct ib_wc *current_wc = wc; + int ret = 0; + unsigned long flags; ++ int entries_left = num_entries; + + if (num_entries < 1) { + ehca_err(cq->device, "Invalid num_entries=%d ehca_cq=%p " +@@ -749,15 +881,40 @@ int ehca_poll_cq(struct ib_cq *cq, int n + } + + spin_lock_irqsave(&my_cq->spinlock, flags); +- for (nr = 0; nr < num_entries; nr++) { ++ ++ /* generate flush cqes for send queues */ ++ list_for_each_entry(err_qp, &my_cq->sqp_err_list, sq_err_node) { ++ nr = generate_flush_cqes(err_qp, cq, current_wc, entries_left, ++ &err_qp->ipz_squeue, 1); ++ entries_left -= nr; ++ current_wc += nr; ++ ++ if (entries_left == 0) ++ break; ++ } ++ ++ /* generate flush cqes for receive queues */ ++ list_for_each_entry(err_qp, &my_cq->rqp_err_list, rq_err_node) { ++ nr = generate_flush_cqes(err_qp, cq, current_wc, entries_left, ++ &err_qp->ipz_rqueue, 0); ++ entries_left -= nr; ++ current_wc += nr; ++ ++ if (entries_left == 0) ++ break; ++ } ++ ++ for (nr = 0; nr < entries_left; nr++) { + ret = ehca_poll_cq_one(cq, current_wc); + if (ret) + break; + current_wc++; + } /* eof for nr */ ++ entries_left -= nr; ++ + spin_unlock_irqrestore(&my_cq->spinlock, flags); + if (ret == -EAGAIN || !ret) +- ret = nr; ++ ret = num_entries - entries_left; + + poll_cq_exit0: + return ret; +--- infiniband.git.orig/drivers/infiniband/hw/ehca/ehca_cq.c ++++ infiniband.git/drivers/infiniband/hw/ehca/ehca_cq.c +@@ -276,6 +276,9 @@ struct ib_cq *ehca_create_cq(struct ib_d + for (i = 0; i < QP_HASHTAB_LEN; i++) + INIT_HLIST_HEAD(&my_cq->qp_hashtab[i]); + ++ INIT_LIST_HEAD(&my_cq->sqp_err_list); ++ INIT_LIST_HEAD(&my_cq->rqp_err_list); ++ + if (context) { + struct ipz_queue *ipz_queue = &my_cq->ipz_queue; + struct ehca_create_cq_resp resp; +--- infiniband.git.orig/drivers/infiniband/hw/ehca/ehca_qp.c ++++ infiniband.git/drivers/infiniband/hw/ehca/ehca_qp.c +@@ -396,6 +396,50 @@ static void ehca_determine_small_queue(s + queue->is_small = (queue->page_size != 0); + } + ++/* needs to be called with cq->spinlock held */ ++void ehca_add_to_err_list(struct ehca_qp *qp, int on_sq) ++{ ++ struct list_head *list, *node; ++ ++ /* TODO: support low latency QPs */ ++ if (qp->ext_type == EQPT_LLQP) ++ return; ++ ++ if (on_sq) { ++ list = &qp->send_cq->sqp_err_list; ++ node = &qp->sq_err_node; ++ } else { ++ list = &qp->recv_cq->rqp_err_list; ++ node = &qp->rq_err_node; ++ } ++ ++ if (list_empty(node)) ++ list_add_tail(node, list); ++ ++ return; ++} ++ ++static void del_from_err_list(struct ehca_cq *cq, struct list_head *node) ++{ ++ unsigned long flags; ++ ++ spin_lock_irqsave(&cq->spinlock, flags); ++ ++ if (!list_empty(node)) ++ list_del_init(node); ++ ++ spin_unlock_irqrestore(&cq->spinlock, flags); ++} ++ ++static void reset_queue_map(struct ehca_queue_map *qmap) ++{ ++ int i; ++ ++ qmap->tail = 0; ++ for (i = 0; i < qmap->entries; i++) ++ qmap->map[i].reported = 1; ++} ++ + /* + * Create an ib_qp struct that is either a QP or an SRQ, depending on + * the value of the is_srq parameter. If init_attr and srq_init_attr share +@@ -407,12 +451,11 @@ static struct ehca_qp *internal_create_q + struct ib_srq_init_attr *srq_init_attr, + struct ib_udata *udata, int is_srq) + { +- struct ehca_qp *my_qp; ++ struct ehca_qp *my_qp, *my_srq = NULL; + struct ehca_pd *my_pd = container_of(pd, struct ehca_pd, ib_pd); + struct ehca_shca *shca = container_of(pd->device, struct ehca_shca, + ib_device); + struct ib_ucontext *context = NULL; +- u32 nr_qes; + u64 h_ret; + int is_llqp = 0, has_srq = 0; + int qp_type, max_send_sge, max_recv_sge, ret; +@@ -457,8 +500,7 @@ static struct ehca_qp *internal_create_q + + /* handle SRQ base QPs */ + if (init_attr->srq) { +- struct ehca_qp *my_srq = +- container_of(init_attr->srq, struct ehca_qp, ib_srq); ++ my_srq = container_of(init_attr->srq, struct ehca_qp, ib_srq); + + has_srq = 1; + parms.ext_type = EQPT_SRQBASE; +@@ -716,15 +758,19 @@ static struct ehca_qp *internal_create_q + "and pages ret=%i", ret); + goto create_qp_exit2; + } +- nr_qes = my_qp->ipz_squeue.queue_length / ++ ++ my_qp->sq_map.entries = my_qp->ipz_squeue.queue_length / + my_qp->ipz_squeue.qe_size; +- my_qp->sq_map = vmalloc(nr_qes * ++ my_qp->sq_map.map = vmalloc(my_qp->sq_map.entries * + sizeof(struct ehca_qmap_entry)); +- if (!my_qp->sq_map) { ++ if (!my_qp->sq_map.map) { + ehca_err(pd->device, "Couldn't allocate squeue " + "map ret=%i", ret); + goto create_qp_exit3; + } ++ INIT_LIST_HEAD(&my_qp->sq_err_node); ++ /* to avoid the generation of bogus flush CQEs */ ++ reset_queue_map(&my_qp->sq_map); + } + + if (HAS_RQ(my_qp)) { +@@ -736,6 +782,25 @@ static struct ehca_qp *internal_create_q + "and pages ret=%i", ret); + goto create_qp_exit4; + } ++ ++ my_qp->rq_map.entries = my_qp->ipz_rqueue.queue_length / ++ my_qp->ipz_rqueue.qe_size; ++ my_qp->rq_map.map = vmalloc(my_qp->rq_map.entries * ++ sizeof(struct ehca_qmap_entry)); ++ if (!my_qp->rq_map.map) { ++ ehca_err(pd->device, "Couldn't allocate squeue " ++ "map ret=%i", ret); ++ goto create_qp_exit5; ++ } ++ INIT_LIST_HEAD(&my_qp->rq_err_node); ++ /* to avoid the generation of bogus flush CQEs */ ++ reset_queue_map(&my_qp->rq_map); ++ } else if (init_attr->srq) { ++ /* this is a base QP, use the queue map of the SRQ */ ++ my_qp->rq_map = my_srq->rq_map; ++ INIT_LIST_HEAD(&my_qp->rq_err_node); ++ ++ my_qp->ipz_rqueue = my_srq->ipz_rqueue; + } + + if (is_srq) { +@@ -799,7 +864,7 @@ static struct ehca_qp *internal_create_q + if (ret) { + ehca_err(pd->device, + "Couldn't assign qp to send_cq ret=%i", ret); +- goto create_qp_exit6; ++ goto create_qp_exit7; + } + } + +@@ -825,25 +890,29 @@ static struct ehca_qp *internal_create_q + if (ib_copy_to_udata(udata, &resp, sizeof resp)) { + ehca_err(pd->device, "Copy to udata failed"); + ret = -EINVAL; +- goto create_qp_exit7; ++ goto create_qp_exit8; + } + } + + return my_qp; + +-create_qp_exit7: ++create_qp_exit8: + ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num); + +-create_qp_exit6: ++create_qp_exit7: + kfree(my_qp->mod_qp_parm); + ++create_qp_exit6: ++ if (HAS_RQ(my_qp)) ++ vfree(my_qp->rq_map.map); ++ + create_qp_exit5: + if (HAS_RQ(my_qp)) + ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue); + + create_qp_exit4: + if (HAS_SQ(my_qp)) +- vfree(my_qp->sq_map); ++ vfree(my_qp->sq_map.map); + + create_qp_exit3: + if (HAS_SQ(my_qp)) +@@ -1035,6 +1104,101 @@ static int prepare_sqe_rts(struct ehca_q + return 0; + } + ++static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue, ++ struct ehca_queue_map *qmap) ++{ ++ void *wqe_v; ++ u64 q_ofs; ++ u32 wqe_idx; ++ ++ /* convert real to abs address */ ++ wqe_p = wqe_p & (~(1UL << 63)); ++ ++ wqe_v = abs_to_virt(wqe_p); ++ ++ if (ipz_queue_abs_to_offset(ipz_queue, wqe_p, &q_ofs)) { ++ ehca_gen_err("Invalid offset for calculating left cqes " ++ "wqe_p=%#lx wqe_v=%p\n", wqe_p, wqe_v); ++ return -EFAULT; ++ } ++ ++ wqe_idx = q_ofs / ipz_queue->qe_size; ++ if (wqe_idx < qmap->tail) ++ qmap->left_to_poll = (qmap->entries - qmap->tail) + wqe_idx; ++ else ++ qmap->left_to_poll = wqe_idx - qmap->tail; ++ ++ return 0; ++} ++ ++static int check_for_left_cqes(struct ehca_qp *my_qp, struct ehca_shca *shca) ++{ ++ u64 h_ret; ++ void *send_wqe_p, *recv_wqe_p; ++ int ret; ++ unsigned long flags; ++ int qp_num = my_qp->ib_qp.qp_num; ++ ++ /* this hcall is not supported on base QPs */ ++ if (my_qp->ext_type != EQPT_SRQBASE) { ++ /* get send and receive wqe pointer */ ++ h_ret = hipz_h_disable_and_get_wqe(shca->ipz_hca_handle, ++ my_qp->ipz_qp_handle, &my_qp->pf, ++ &send_wqe_p, &recv_wqe_p, 4); ++ if (h_ret != H_SUCCESS) { ++ ehca_err(&shca->ib_device, "disable_and_get_wqe() " ++ "failed ehca_qp=%p qp_num=%x h_ret=%li", ++ my_qp, qp_num, h_ret); ++ return ehca2ib_return_code(h_ret); ++ } ++ ++ /* ++ * acquire lock to ensure that nobody is polling the cq which ++ * could mean that the qmap->tail pointer is in an ++ * inconsistent state. ++ */ ++ spin_lock_irqsave(&my_qp->send_cq->spinlock, flags); ++ ret = calc_left_cqes((u64)send_wqe_p, &my_qp->ipz_squeue, ++ &my_qp->sq_map); ++ spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags); ++ if (ret) ++ return ret; ++ ++ ++ spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags); ++ ret = calc_left_cqes((u64)recv_wqe_p, &my_qp->ipz_rqueue, ++ &my_qp->rq_map); ++ spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, flags); ++ if (ret) ++ return ret; ++ } else { ++ spin_lock_irqsave(&my_qp->send_cq->spinlock, flags); ++ my_qp->sq_map.left_to_poll = 0; ++ spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags); ++ ++ spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags); ++ my_qp->rq_map.left_to_poll = 0; ++ spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, flags); ++ } ++ ++ /* this assures flush cqes being generated only for pending wqes */ ++ if ((my_qp->sq_map.left_to_poll == 0) && ++ (my_qp->rq_map.left_to_poll == 0)) { ++ spin_lock_irqsave(&my_qp->send_cq->spinlock, flags); ++ ehca_add_to_err_list(my_qp, 1); ++ spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags); ++ ++ if (HAS_RQ(my_qp)) { ++ spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags); ++ ehca_add_to_err_list(my_qp, 0); ++ spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, ++ flags); ++ } ++ } ++ ++ return 0; ++} ++ + /* + * internal_modify_qp with circumvention to handle aqp0 properly + * smi_reset2init indicates if this is an internal reset-to-init-call for +@@ -1539,10 +1703,27 @@ static int internal_modify_qp(struct ib_ + goto modify_qp_exit2; + } + } ++ if ((qp_new_state == IB_QPS_ERR) && (qp_cur_state != IB_QPS_ERR)) { ++ ret = check_for_left_cqes(my_qp, shca); ++ if (ret) ++ goto modify_qp_exit2; ++ } + + if (statetrans == IB_QPST_ANY2RESET) { + ipz_qeit_reset(&my_qp->ipz_rqueue); + ipz_qeit_reset(&my_qp->ipz_squeue); ++ ++ if (qp_cur_state == IB_QPS_ERR) { ++ del_from_err_list(my_qp->send_cq, &my_qp->sq_err_node); ++ ++ if (HAS_RQ(my_qp)) ++ del_from_err_list(my_qp->recv_cq, ++ &my_qp->rq_err_node); ++ } ++ reset_queue_map(&my_qp->sq_map); ++ ++ if (HAS_RQ(my_qp)) ++ reset_queue_map(&my_qp->rq_map); + } + + if (attr_mask & IB_QP_QKEY) +@@ -1958,6 +2139,16 @@ static int internal_destroy_qp(struct ib + idr_remove(&ehca_qp_idr, my_qp->token); + write_unlock_irqrestore(&ehca_qp_idr_lock, flags); + ++ /* ++ * SRQs will never get into an error list and do not have a recv_cq, ++ * so we need to skip them here. ++ */ ++ if (HAS_RQ(my_qp) && !IS_SRQ(my_qp)) ++ del_from_err_list(my_qp->recv_cq, &my_qp->rq_err_node); ++ ++ if (HAS_SQ(my_qp)) ++ del_from_err_list(my_qp->send_cq, &my_qp->sq_err_node); ++ + /* now wait until all pending events have completed */ + wait_event(my_qp->wait_completion, !atomic_read(&my_qp->nr_events)); + +@@ -1983,7 +2174,7 @@ static int internal_destroy_qp(struct ib + if (qp_type == IB_QPT_GSI) { + struct ib_event event; + ehca_info(dev, "device %s: port %x is inactive.", +- shca->ib_device.name, port_num); ++ shca->ib_device.name, port_num); + event.device = &shca->ib_device; + event.event = IB_EVENT_PORT_ERR; + event.element.port_num = port_num; +@@ -1991,11 +2182,15 @@ static int internal_destroy_qp(struct ib + ib_dispatch_event(&event); + } + +- if (HAS_RQ(my_qp)) ++ if (HAS_RQ(my_qp)) { + ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue); ++ ++ vfree(my_qp->rq_map.map); ++ } + if (HAS_SQ(my_qp)) { + ipz_queue_dtor(my_pd, &my_qp->ipz_squeue); +- vfree(my_qp->sq_map); ++ ++ vfree(my_qp->sq_map.map); + } + kmem_cache_free(qp_cache, my_qp); + atomic_dec(&shca->num_qps); +--- infiniband.git.orig/drivers/infiniband/hw/ehca/ehca_iverbs.h ++++ infiniband.git/drivers/infiniband/hw/ehca/ehca_iverbs.h +@@ -197,6 +197,8 @@ void ehca_poll_eqs(unsigned long data); + int ehca_calc_ipd(struct ehca_shca *shca, int port, + enum ib_rate path_rate, u32 *ipd); + ++void ehca_add_to_err_list(struct ehca_qp *qp, int on_sq); ++ + #ifdef CONFIG_PPC_64K_PAGES + void *ehca_alloc_fw_ctrlblock(gfp_t flags); + void ehca_free_fw_ctrlblock(void *ptr); +-- +To unsubscribe from this list: send the line "unsubscribe linux-kernel" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html +Please read the FAQ at http://www.tux.org/lkml/ ++++++ patches.fixes.tar.bz2 ++++++ ++++++ patches.kernel.org.tar.bz2 ++++++ kernel-source/patches.kernel.org.tar.bz2 /mounts/work_src_done/STABLE/kernel-source/patches.kernel.org.tar.bz2 differ: byte 11, line 1 ++++++ patches.rpmify.tar.bz2 ++++++ ++++++ patches.rt.tar.bz2 ++++++ ++++++ patches.suse.tar.bz2 ++++++ ++++++ patches.trace.tar.bz2 ++++++ ++++++ patches.uml.tar.bz2 ++++++ ++++++ patches.xen.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.xen/xen3-patch-2.6.18 new/patches.xen/xen3-patch-2.6.18 --- old/patches.xen/xen3-patch-2.6.18 2008-09-23 11:10:33.000000000 +0200 +++ new/patches.xen/xen3-patch-2.6.18 2008-09-29 22:30:10.000000000 +0200 @@ -282,7 +282,7 @@ --- head-2008-09-15.orig/include/asm-x86/thread_info.h 2008-09-15 14:14:49.000000000 +0200 +++ head-2008-09-15/include/asm-x86/thread_info.h 2008-09-15 14:20:59.000000000 +0200 @@ -136,12 +136,16 @@ struct thread_info { - (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) + (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_NOTIFY_RESUME) /* flags to check in __switch_to() */ +#ifndef CONFIG_XEN diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.xen/xen3-patch-2.6.25 new/patches.xen/xen3-patch-2.6.25 --- old/patches.xen/xen3-patch-2.6.25 2008-09-25 16:47:40.000000000 +0200 +++ new/patches.xen/xen3-patch-2.6.25 2008-09-29 22:30:10.000000000 +0200 @@ -17,8 +17,8 @@ - select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) + select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) && !XEN select HAVE_ARCH_KGDB if !X86_VOYAGER + select HAVE_ARCH_TRACEHOOK select HAVE_GENERIC_DMA_COHERENT if X86_32 - select HAVE_EFFICIENT_UNALIGNED_ACCESS @@ -207,14 +207,12 @@ config X86_TRAMPOLINE default y @@ -29452,7 +29452,7 @@ +#endif #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) - #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) + #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) @@ -112,6 +115,7 @@ struct thread_info { #define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR) #define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.xen/xen3-patch-2.6.26 new/patches.xen/xen3-patch-2.6.26 --- old/patches.xen/xen3-patch-2.6.26 2008-09-25 16:47:40.000000000 +0200 +++ new/patches.xen/xen3-patch-2.6.26 2008-09-29 22:30:11.000000000 +0200 @@ -15,10 +15,10 @@ select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) && !XEN - select HAVE_ARCH_KGDB if !X86_VOYAGER + select HAVE_ARCH_KGDB if !X86_VOYAGER && !XEN + select HAVE_ARCH_TRACEHOOK select HAVE_GENERIC_DMA_COHERENT if X86_32 select HAVE_EFFICIENT_UNALIGNED_ACCESS - -@@ -481,6 +481,7 @@ config PARAVIRT_DEBUG +@@ -482,6 +482,7 @@ config PARAVIRT_DEBUG config MEMTEST bool "Memtest" @@ -26,7 +26,7 @@ help This option adds a kernel parameter 'memtest', which allows memtest to be set. -@@ -1903,6 +1904,4 @@ source "crypto/Kconfig" +@@ -1904,6 +1905,4 @@ source "crypto/Kconfig" source "arch/x86/kvm/Kconfig" ++++++ series.conf ++++++ --- kernel-source/series.conf 2008-09-29 21:59:06.000000000 +0200 +++ /mounts/work_src_done/STABLE/kernel-source/series.conf 2008-09-29 23:42:34.176125000 +0200 @@ -129,6 +129,7 @@ patches.arch/x86-disable-AMD-ATI-boot-interrupt-generation.patch patches.arch/x86-introduce-config-option-for-pci-reroute-quirks.patch patches.arch/x86-self-ptrace.patch + patches.arch/x86-tracehook ######################################################## @@ -499,6 +500,8 @@ # Add support for Montevina hardware; series mainlined 2.6.26 + patches.drivers/ehca-flush-cqe.patch + ######################################################## # Storage ######################################################## ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de