Hello community, here is the log from the commit of package crash for openSUSE:Factory checked in at Thu Oct 13 00:09:16 CEST 2011.
-------- --- openSUSE:Factory/crash/crash.changes 2011-10-02 09:53:29.000000000 +0200 +++ /mounts/work_src_done/STABLE/crash/crash.changes 2011-10-11 15:35:04.000000000 +0200 @@ -1,0 +2,16 @@ +Tue Oct 11 13:24:38 UTC 2011 - [email protected] + +- Add Requires: kernel-$flavor to new-style KMP packages. +- Provide old-styl crash-kmp (for SLES9). + +------------------------------------------------------------------- +Mon Oct 10 16:04:01 UTC 2011 - [email protected] + +- Build the crash memory driver kernel module as a KMP. + +------------------------------------------------------------------- +Mon Oct 10 15:48:55 UTC 2011 - [email protected] + +- Change the license from GPLv3 (only) to GPLv3 or higher. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- crash-kmp-preamble depmod.sh get-kernel-flavors.sh mkinitrd.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crash.spec ++++++ --- /var/tmp/diff_new_pack.rjWQFp/_old 2011-10-13 00:09:10.000000000 +0200 +++ /var/tmp/diff_new_pack.rjWQFp/_new 2011-10-13 00:09:10.000000000 +0200 @@ -33,17 +33,22 @@ %else %define build_gcore 0 %endif +%define build_kmp 1 Url: http://people.redhat.com/anderson/ Summary: Crash utility for live systems; netdump, diskdump, LKCD or mcore dumpfiles Version: %{crash_version} Release: 1 -License: GPLv3; GFDLv1.2 +License: GPLv3+; GFDLv1.2 Group: Development/Tools/Debuggers Source: %{name}-%{version}.tar.gz Source2: crash_whitepaper-%{whitepaper_version}.tar.bz2 Source3: README.SUSE Source4: sial-scripts-%{scripts_version}.tar.bz2 Source5: gcore-%{gcore_version}.tar.bz2 +Source95: get-kernel-flavors.sh +Source96: depmod.sh +Source97: mkinitrd.sh +Source98: %{name}-kmp-preamble Source99: rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch1: %{name}-make-emacs-default.diff @@ -58,6 +63,27 @@ ExclusiveArch: %ix86 x86_64 ia64 s390 s390x ppc64 alpha # Source code says it can do ppc32. Excluded here? ExcludeArch: ppc +# crash driver KMP +%if %build_kmp +BuildRequires: kernel-syms module-init-tools +%if 0%{?suse_version} >= 1130 +BuildRequires: kernel-devel +%endif +%endif + +%if %build_kmp +%if 0%{?suse_version} >= 920 +%suse_kernel_module_package -n crash -p %_sourcedir/%{name}-kmp-preamble um +%define arch %_target_cpu +%define kmp_pkg KMP +%else +%define kver %(rpm -q --qf '%{VERSION}-%{RELEASE}' kernel-source) +%define kver_ %(rpm -q --qf '%{VERSION}_%{RELEASE}' kernel-source) +%define arch %(echo %_target_cpu | sed -e 's/i.86/i386/') +%define flavors_to_build %(sh %_sourcedir/get-kernel-flavors.sh %arch) +%define kmp_pkg kmp +%endif +%endif %description The core analysis suite is a self-contained tool that can be used to @@ -149,6 +175,30 @@ %endif +%if %build_kmp + +%package %kmp_pkg +Group: System/Kernel +License: GPL v2 only +Summary: Memory driver for the crash utility +%if 0%{?suse_version} < 920 +Version: %{version}_%{kver_} + + +Requires: kernel = %kver +%endif + +%description %kmp_pkg +To run the crash utility on a live system, a memory device must be present. +Due to many limitations of the /dev/mem interface, a separate kernel module +is provided to access all RAM through the /dev/crash device. + +Authors: +-------- + David Anderson <[email protected]> + +%endif + %prep %setup -q -a 2 -a 4 %patch1 -p1 @@ -166,11 +216,21 @@ tar xfvj %{S:5} cd - cp %{S:3} . +mkdir kbuild %build export CFLAGS="$RPM_OPT_FLAGS -fno-builtin-memset -fno-strict-aliasing" make RPMPKG="`cat .rh_rpm_package`" %{?jobs:-j%jobs} make extensions %{?jobs:-j%jobs} +%if %build_kmp +export EXTRA_CFLAGS='-DVERSION=\"%version\"' +for flavor in %flavors_to_build; do + rm -rf kbuild/$flavor + cp -r memory_driver kbuild/$flavor + make -C /usr/src/linux-obj/%arch/$flavor modules \ + M=$PWD/kbuild/$flavor +done +%endif %install mkdir -p %{buildroot}%{_bindir} @@ -195,6 +255,41 @@ install -m 0644 sial-scripts-%{scripts_version}/*.c \ $RPM_BUILD_ROOT/%{_datadir}/sial/crash %endif +%if %build_kmp +# memory driver module +export INSTALL_MOD_PATH=$RPM_BUILD_ROOT +export INSTALL_MOD_DIR=updates +for flavor in %flavors_to_build; do + make -C /usr/src/linux-obj/%arch/$flavor modules_install \ + M=$PWD/kbuild/$flavor +done + +# Ugly SLES9-style KMP +%if 0%{?suse_version} < 920 +set -- $(ls $RPM_BUILD_ROOT/lib/modules) +KERNELRELEASES=$* + +set -- $(find $RPM_BUILD_ROOT/lib/modules -type f -name '*.ko' \ + | sed -e 's:.*/::' -e 's:\.ko$::' | sort -u) +MODULES=$* + +( cat <<-EOF + # IMPORTANT: Do not change the KERNELRELEASES definition; it will be + # replaced during driver reuse! + KERNELRELEASES="$KERNELRELEASES" + MODULES="$MODULES" + EOF + cat %_sourcedir/depmod.sh + cat %_sourcedir/mkinitrd.sh +) > post_postun.sh + +%post kmp -f post_postun.sh + +%postun kmp -f post_postun.sh + +%endif + +%endif %clean rm -rf %{buildroot} @@ -233,4 +328,13 @@ %doc extensions/README.gcore %endif +%if build_kmp +%if 0%{?suse_version} < 920 + +%files %kmp_pkg +%defattr(-,root,root) +/lib/modules/* +%endif +%endif + %changelog ++++++ crash-kmp-preamble ++++++ Requires: kernel-%1 ++++++ depmod.sh ++++++ # Need to call depmod when the list of modules changes for kernelrelease in $KERNELRELEASES; do if [ -e /boot/System.map-$kernelrelease ]; then depmod -a -F /boot/System.map-$kernelrelease $kernelrelease fi done ++++++ get-kernel-flavors.sh ++++++ #! /bin/sh arch=$1 flavors= for flavor in $(ls /usr/src/linux-obj/$arch 2>/dev/null); do if [ "$flavor" = um ]; then continue fi flavors="$flavors $flavor" done echo $flavors ++++++ mkinitrd.sh ++++++ # If one of the modules in this package is in the initrd, # we need to recreate the initrd. if [ -e /etc/sysconfig/kernel -a -f /etc/fstab ]; then source /etc/sysconfig/kernel run_mkinitrd= for module in $INITRD_MODULES; do case " $MODULES " in *" $module "*) run_mkinitrd=1 break ;; esac done if [ -n "$run_mkinitrd" ]; then for kernelrelease in $KERNELRELEASES; do for image in vmlinuz image vmlinux linux bzImage; do if [ -f /boot/$image-$kernelrelease ]; then /sbin/mkinitrd -k /boot/$image-$kernelrelease \ -i /boot/initrd-$kernelrelease \ || exit 1 fi done done fi fi ++++++ rpmlintrc ++++++ --- /var/tmp/diff_new_pack.rjWQFp/_old 2011-10-13 00:09:11.000000000 +0200 +++ /var/tmp/diff_new_pack.rjWQFp/_new 2011-10-13 00:09:11.000000000 +0200 @@ -1,3 +1,4 @@ addFilter("devel-file-in-non-devel-package .*/usr/share/sial/crash.*") # crash-5.1.6.tar compresses better with gzip than with bzip2 +addFilter(" source-or-patch-not-bzipped crash-5.1.6.tar.gz") addFilter(" source-or-patch-not-compressed bz2 crash-5.1.6.tar.gz") continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
