[Lustre-discuss] Announce: Lustre 1.6.5 is available!

David Brown dmlb2000 at gmail.com
Sun Jun 15 17:24:21 PDT 2008


On Sun, Jun 15, 2008 at 3:25 PM, Erich Focht <efocht at hpce.nec.com> wrote:
>
> A related question: is there an easy way of building the Lustre kernel
> RPMs for the RHEL 5.2 kernel? Maybe a bug in bugzilla with patches or so?
>

In the past I've simply added the appropriate things to the rhel
kernel spec file, the CFS guys have a very different build suite (I'm
unsure how it works I've never been able to reproduce it). After
modifying the rhel spec and putting the added 'lustre' config and
lustre kernel patches in the SOURCE directory all you have to do is
call rpmbuild.

This patch was made against an old 2.6.18-5x kernel not the 2.6.18-9x
of rhel 5.2. So Some things in the patch will have to be modified.
Also, this was used with 1.6.4 not 1.6.5 so if they added some extra
patches in the series those need to be added to the appropriate part
of the spec file.

rpmbuild -ba --with lustre kernel-2.6.spec

--- kernel-2.6.spec	2007-11-14 07:26:34.000000000 -0800
+++ kernel-2.6-lustre.spec	2008-01-10 14:34:30.000000000 -0800
@@ -15,6 +15,8 @@
 %define with_smp     %{?_without_smp:     0} %{?!_without_smp:     1}
 # kernel-PAE (only valid for i686)
 %define with_pae     %{?_without_pae:     0} %{?!_without_pae:     1}
+# kernel-lustre (only for lustre servers)
+%define with_lustre  %{?_without_lustre:  0} %{?!_without_lustre:  1}
 # kernel-xen (only valid for i686, x86_64 and ia64)
 %define with_xen     %{?_without_xen:     0} %{?!_without_xen:     1}
 # kernel-kdump (only valid for ppc64)
@@ -84,6 +86,7 @@
 %if %{with_baseonly}
 %define with_smp 0
 %define with_pae 0
+%define with_lustre 0
 %define with_xen 0
 %define with_kdump 0
 %define with_debug 0
@@ -367,6 +370,9 @@
 #Source67: kernel-%{kversion}-sparc64.config
 #Source68: kernel-%{kversion}-sparc64-smp.config

+Source70: kernel-%{kversion}-x86_64-lustre.config
+Source71: kernel-%{kversion}-i686-lustre.config
+
 Source80: config-rhel-generic
 Source82: config-rhel-ppc64-generic
 Source83: config-olpc-generic
@@ -1601,6 +1607,22 @@
 Patch21879: linux-2.6-isdn-i4l-fix-memory-overruns.patch
 Patch21880: linux-2.6-ppc-chrp-fix-possible-strncmp-null-pointer-usage.patch
 Patch21881: linux-2.6-nfs-potential-file-corruption-issue-when-writing.patch
+
+# lustre patches
+patch25000: lustre_version.patch
+patch25001: vfs_races-2.6-rhel5.patch
+patch25002: i_filter_data.patch
+patch25003: jbd-jcberr-2.6.18-vanilla.patch
+patch25004: export_symbols-2.6.18-vanilla.patch
+patch25005: dev_read_only-2.6.18-vanilla.patch
+patch25006: export-2.6.18-vanilla.patch
+patch25007: 8kstack-2.6.12.patch
+patch25008: export-show_task-2.6.18-vanilla.patch
+patch25009: sd_iostats-2.6-rhel4.patch
+patch25010: export_symbol_numa-2.6-fc5.patch
+patch25011: jbd-stats-2.6-rhel5.patch
+# end lustre patches
+
 # adds rhel version info to version.h
 Patch99990: linux-2.6-rhel-version-h.patch
 # empty final patch file to facilitate testing of kernel patches
@@ -1738,6 +1760,42 @@
 This package provides kernel headers and makefiles sufficient to build modules
 against the SMP kernel package.

+%package lustre
+Summary: The Linux kernel compiled for Lustre.
+Group: System Environment/Kernel
+Provides: kernel = %{version}
+Provides: kernel-drm = 4.3.0
+Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}lustre
+Prereq: %{kernel_prereq}
+Conflicts: %{kernel_dot_org_conflicts}
+Conflicts: %{package_conflicts}
+# upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called
kernel-enterprise
+# now that the smp kernel offers this capability, obsolete the old kernel
+Obsoletes: kernel-enterprise < 2.4.10
+# We can't let RPM do the dependencies automatic because it'll then pick up
+# a correct but undesirable perl dependency from the module headers which
+# isn't required for the kernel proper to function
+AutoReq: no
+AutoProv: yes
+
+%description lustre
+This package includes a Lustre version of the Linux kernel. It is
+required only on machines that want to be lustre servers.
+
+%package lustre-devel
+Summary: Development package for building kernel modules to match the
Lustre kernel.
+Group: System Environment/Kernel
+Provides: kernel-lustre-devel-%{_target_cpu} = %{rpmversion}-%{release}
+Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}lustre
+Provides: kernel-devel = %{rpmversion}-%{release}lustre
+AutoReqProv: no
+Prereq: /usr/bin/find
+
+%description lustre-devel
+This package provides kernel headers and makefiles sufficient to build modules
+against the Lustre kernel.
+
+
 %if %{?debugbuildsenabled}
 %package debug
 Summary: The Linux kernel compiled with extra debugging enabled.
@@ -3217,6 +3275,20 @@
 %patch21879 -p1
 %patch21880 -p1
 %patch21881 -p1
+
+#lustre patches
+%patch25000 -p1
+%patch25001 -p1
+%patch25002 -p1
+%patch25003 -p1
+%patch25004 -p1
+%patch25005 -p1
+%patch25006 -p1
+%patch25007 -p1
+%patch25008 -p1
+%patch25009 -p1
+%patch25010 -p1
+%patch25011 -p1
 # correction of SUBLEVEL/EXTRAVERSION in top-level source tree Makefile
 # patch the Makefile to include rhel version info
 %patch99990 -p1
@@ -3582,6 +3654,10 @@
 BuildKernel %make_target %kernel_image smp
 %endif

+%if %{with_lustre}
+BuildKernel %make_target %kernel_image lustre
+%endif
+
 %if %{includexen}
 %if %{with_xen}
 BuildKernel %xen_target %xen_image xen
@@ -3739,6 +3815,24 @@
     /sbin/weak-modules --add-kernel %{KVERREL}smp || exit $?
 fi

+%post lustre
+/sbin/new-kernel-pkg --package kernel-lustre --mkinitrd --depmod
--install %{KVERREL}lustre || exit $?
+if [ -x /sbin/weak-modules ]
+then
+    /sbin/weak-modules --add-kernel %{KVERREL}lustre || exit $?
+fi
+
+%post lustre-devel
+if [ -f /etc/sysconfig/kernel ]
+then
+    . /etc/sysconfig/kernel || exit $?
+fi
+if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
+  pushd /usr/src/kernels/%{KVERREL}-lustre-%{_target_cpu} > /dev/null
+  /usr/bin/find . -type f | while read f; do hardlink -c
/usr/src/kernels/*FC*/$f $f ; done
+  popd > /dev/null
+fi
+
 %post smp-devel
 if [ -f /etc/sysconfig/kernel ]
 then
@@ -3854,6 +3948,13 @@
     /sbin/weak-modules --remove-kernel %{KVERREL}smp || exit $?
 fi

+%preun lustre
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}lustre || exit $?
+if [ -x /sbin/weak-modules ]
+then
+    /sbin/weak-modules --remove-kernel %{KVERREL}lustre || exit $?
+fi
+
 %preun PAE
 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}PAE || exit $?
 if [ -x /sbin/weak-modules ]
@@ -4026,6 +4127,49 @@
 /usr/src/kernels/%{KVERREL}smp-%{_target_cpu}
 %endif

+%if %{with_lustre}
+%if "%{_enable_debug_packages}" == "1"
+%ifnarch noarch
+%package lustre-debuginfo
+Summary: Debug information for package %{name}-lustre
+Group: Development/Debug
+Requires: %{name}-debuginfo-common-%{_target_cpu} = %{KVERREL}
+Provides: %{name}-%lustre-debuginfo-%{_target_cpu} = %{KVERREL}
+%description lustre-debuginfo
+This package provides debug information for package %{name}-lustre
+This is required to use SystemTap with %{name}-lustre-%{KVERREL}.
+%files lustre-debuginfo
+%defattr(-,root,root)
+%if "%{elf_image_install_path}" != ""
+/usr/lib/debug/%{elf_image_install_path}/*-%{KVERREL}lustre.debug
+%endif
+/usr/lib/debug/lib/modules/%{KVERREL}lustre
+/usr/lib/debug/usr/src/kernels/%{KVERREL}-lustre-%{_target_cpu}
+%endif
+%endif
+
+%files lustre
+%defattr(-,root,root)
+/%{image_install_path}/vmlinuz-%{KVERREL}lustre
+/boot/System.map-%{KVERREL}lustre
+/boot/symvers-%{KVERREL}lustre.gz
+/boot/config-%{KVERREL}lustre
+%dir /lib/modules/%{KVERREL}lustre
+/lib/modules/%{KVERREL}lustre/kernel
+/lib/modules/%{KVERREL}lustre/build
+/lib/modules/%{KVERREL}lustre/source
+/lib/modules/%{KVERREL}lustre/extra
+/lib/modules/%{KVERREL}lustre/updates
+/lib/modules/%{KVERREL}lustre/weak-updates
+%ghost /boot/initrd-%{KVERREL}lustre.img
+%config(noreplace) /etc/modprobe.d/blacklist-firewire
+
+%files lustre-devel
+%defattr(-,root,root)
+%verify(not mtime) /usr/src/kernels/%{KVERREL}-lustre-%{_target_cpu}
+/usr/src/kernels/%{KVERREL}lustre-%{_target_cpu}
+%endif
+
 %if %{debugbuildsenabled}
 %if %{with_debug}
 %if "%{_enable_debug_packages}" == "1"



More information about the lustre-discuss mailing list