Hi,

I needed to build an out of tree xfs kernel module for RHEL5.4 kernel,
I did it in the RHEL style ( like in http://driverupdateprogram.com/
).  The problems are:

1) The built binary kmod rpm is not stripped (size xfs.ko is 13M)
2) The built debuginfo package contains nothing

Then I added this line into my xfs.spec:

find ${INSTALL_MOD_PATH} -type f -name \*.ko -exec strip --strip-debug \{\} \;

After doing this, the built kmod package is stripped, but the
debuginfo package is still empty.

Any idea?

Below is my xfs.spec:

Name: xfs
Summary: XFS file system
Version: 1.0
Release: 9
License: GPL
Group: System Environment/Kernel
Source0: %name-%version.tar.bz2
BuildRequires: %kernel_module_package_buildreqs
BuildRoot: %{_tmppath}/%{name}-%{version}-build

%kernel_module_package

%description
XFS file system

%prep
%setup
set -- *
mkdir source
mv "$@" source/
mkdir obj

%build
for flavor in %flavors_to_build; do
        rm -rf obj/$flavor
        cp -r source obj/$flavor
        make -C %{kernel_source $flavor} M=$PWD/obj/$flavor
done

%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=extra/%{name}
for flavor in %flavors_to_build; do
        make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
done

# Strip the module(s).
find ${INSTALL_MOD_PATH} -type f -name \*.ko -exec strip --strip-debug \{\} \;

%clean
rm -rf %{buildroot}

%changelog


---
Regards,
Romu

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to