📄 lustre-kernel-2.4.spec.in
字号:
Summary: The Linux kernel (the core of the Linux operating system)# Versions of various parts## Polite request for people who spin their own kernel rpms:# please modify the "release" field in a way that identifies# that the kernel isn't the stock RHL kernel, for example by# adding some text to the end of the version number.#%define kversion @KERNEL_VERSION@%define kextraver @KERNEL_EXTRA_VERSION@%define kextraverdelim @KERNEL_EXTRA_VERSION_DELIMITER@%define flavordelim "@KERNEL_TARGET_DELIMITER@"%define release @KERNEL_RELEASE@# /usr/src/%{kslnk} -> /usr/src/linux-%{KVERREL}%define kslnk linux-2.4# groups of related archs%define all_x86 i386 i686 i586 athlon#define all_x86 i686 i386 i586 athlon%define nptlarchs %{all_x86}#define nptlarchs noarch%define rhbuild @RHBUILD@%define susebuild @SUSEBUILD@%define linux26 @LINUX26@# disable build root strip policy%define __spec_install_post /usr/lib/rpm/brp-compress || :## RPM foo magic%define _missing_doc_files_terminate_build 0%define _unpackaged_files_terminate_build 0%define debug_package %{nil}# Enable this to build a board-specific kernel configuration # some architectures have LOTS of different setups and this # is a way to deal with that cleanly.##define targetboard assabet%define dashtargetboard %{?targetboard:-%{targetboard}}%define withtargetboard 0%{?targetboard: %{expand: %%define withtargetboard 1}} # Override generic defaults with per-arch defaults (which can# themselves be overridden with --with/--without). These must# ONLY be "0", never "1"%define buildbase 0%define buildbigmem 0%define buildBOOT 0%define buildjensen 0%define buildsmp 0%define buildbigsmp 0%define buildpseries64 0%define buildup 0%define buildsrc 0%ifarch @BASE_ARCHS@%define buildbase 1%endif%ifarch @BIGMEM_ARCHS@%define buildbigmem 1%endif%ifarch @BOOT_ARCHS@%define buildBOOT 1%endif%ifarch @JENSEN_ARCHS@%define buildjensen 1%endif%ifarch @SMP_ARCHS@%define buildsmp 1%endif%ifarch @BIGSMP_ARCHS@%define buildbigsmp 1%endif%ifarch @PSERIES64_ARCHS@%define buildpseries64 1%endif%ifarch @UP_ARCHS@%define buildup 1%endif# For board-specific kernels, build only the normal kernel (which may actually be smp, not up).%if %{withtargetboard}%define buildsmp 0%define buildbigsmp 0%define buildBOOT 0%define buildbigmem 0%define buildpseries64 0%define buildjensen 0%endif%if 0Second, per-architecture exclusions (ifarch)%ifarch i386%define buildsmp 0%endif%ifarch ia64%define buildBOOT 0%endif%endif# we can't test values inline, only whether a macro exists%{expand: %%define buildup_%{buildup} yadda}%{expand: %%define buildsmp_%{buildsmp} yadda}%{expand: %%define buildbigsmp_%{buildbigsmp} yadda}%{expand: %%define buildpseries64_%{buildpseries64} yadda}%{expand: %%define buildBOOT_%{buildBOOT} yadda}%{expand: %%define buildbigmem_%{buildbigmem} yadda}%{expand: %%define buildjensen_%{buildjensen} yadda}%{expand: %%define ikd_%{ikd} yadda}%{expand: %%define ibcs_%{ibcs} yadda}%{expand: %%define debuglevel_%{debugging} yadda}%{expand: %%define kernel_conflicts ppp <= 2.3.15, pcmcia-cs <= 3.1.20, isdn4k-utils <= 3.0, mount < 2.10r-5, nfs-utils < 0.3.1, cipe < 1.4.5, tux < 2.1.0, kudzu <= 0.92, e2fsprogs < 1.22, initscripts < 5.84, dev < 3.2-7, iptables < 1.2.5-3, bcm5820 < 1.81, nvidia-rh72 <= 1.0, oprofile < 0.4}%if %{rhbuild}%define BOOT_kernel_prereq fileutils, modutils >= 2.4.18%define kernel_prereq %{BOOT_kernel_prereq}, initscripts >= 5.83, mkinitrd >= 3.2.6%endif%ifarch ia64%define initrd_dir /boot/efi/redhat%else%define initrd_dir /boot%endif%ifarch %{all_x86} x86_64%define kernel_glob vmlinu?-%{KVERREL}%endif%ifarch ia64# <sigh>, no GLOB_BRACE for filelists, efi needs to be done separately%define kernel_glob vmlinuz-%{KVERREL}%endif%ifarch alpha%define kernel_glob vmlinu?-%{KVERREL}%endif%ifarch ppc ppc64%define kernel_glob vmlinu?-%{KVERREL}%endifName: kernel-lustreVersion: %{kversion}Release: %{release}%{?targetboard:%{targetboard}}%{?debuglevel_1:.dbg}%define KVERREL %{PACKAGE_VERSION}%{kextraverdelim}%{kextraver}%{?targetboard:%{targetboard}}%{?debuglevel_1:.dbg}License: GPLGroup: System Environment/KernelExclusiveArch: %{all_x86} x86_64 ia64 ppcExclusiveOS: LinuxObsoletes: kernel-modules, kernel-sparcProvides: kernel = %{version}BuildConflicts: rhbuildsys(DiscFree) < 500Mb%ifarch %{all_x86} ia64 x86_64Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3%endifAutoreqprov: no%if %{rhbuild}Prereq: %{kernel_prereq}Conflicts: %{kernel_conflicts}BuildPreReq: patch >= 2.5.4, bash >= 2.03, sh-utils, gnupg, tarBuildPreReq: bzip2, findutils, dev, gzip, m4%endifVendor: Cluster File Systems, Inc.URL: http://www.kernel.org/Buildroot: %{_tmppath}/%{name}-%{version}-rootSource0: @LUSTRE_SOURCE@Source1: @KERNEL_SOURCE@Source2: external-patches.tar.gzSource15: linux-rhconfig.hSource16: linux-merge-config.awkSource17: linux-merge-modules.awkSource25: suse-functions.shSource26: suse-post.shSource27: suse-postun.shSource28: suse-trigger-script.sh.inSource29: sles8-post.shSource30: sles8-postun.shSource31: sles8-pre.shSource32: sles8-update_INITRD_MODULES.shSource33: sles8-update_rcfile_setting.sh%package sourceSummary: The source code for the Linux kernel.Group: Development/SystemPrereq: fileutilsRequires: gawkRequires: gcc >= 2.96-98Autoreqprov: 0%package docSummary: Various documentation bits found in the kernel source.Group: Documentation%descriptionThe kernel package contains the Linux kernel (vmlinuz), the core of aLinux operating system. The kernel handles the basic functions of theoperating system: memory allocation, process allocation, device inputand output, etc.%description sourceThe kernel-source package contains the source code files for the Linuxkernel. These source files are needed to build custom/third party devicedrivers. The source files can also be used to build a custom kernel that isbetter tuned to your particular hardware, if you are so inclined (and youknow what you're doing).%description docThis package contains documentation files form the kernelsource. Various bits of information about the Linux kernel and thedevice drivers shipped with it are documented in these files. You'll want to install this package if you need a reference to theoptions that can be passed to Linux kernel modules at load time.%package smpSummary: The Linux kernel compiled for SMP machines.Group: System Environment/KernelProvides: module-info, kernel = %{version}%ifarch %{all_x86} ia64 x86_64Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3%endif%if %{rhbuild}Prereq: %{kernel_prereq}Conflicts: %{kernel_conflicts}%endif%description smpThis package includes a SMP version of the Linux kernel. It isrequired only on machines with two or more CPUs, although it shouldwork fine on single-CPU boxes.Install the kernel-smp package if your machine uses two or more CPUs.%package bigsmpSummary: The Linux kernel compiled for SMP machines.Group: System/KernelProvides: module-info, kernel = %{version}, k_smp4GObsoletes: k_smp4G%ifarch %{all_x86} ia64 x86_64Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3%endif%if %{rhbuild}Prereq: %{kernel_prereq}Conflicts: %{kernel_conflicts}%endif%description bigsmpThis package includes a SMP version of the Linux kernel. It isrequired only on machines with two or more CPUs, although it shouldwork fine on single-CPU boxes.Install the kernel-bigsmp package if your machine uses two or more CPUs.%package pseries64Summary: Standard Kernel for 64-bit Power based SMP and LPAR MachinesGroup: System/KernelProvides: module-info, kernel = %{version}, k_smp4G%ifarch %{all_x86} ia64 x86_64Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3%endif%if %{rhbuild}Prereq: %{kernel_prereq}Conflicts: %{kernel_conflicts}%endif%description pseries64The standard kernel for Power3, Power4 and PowerPC 970 64-bit SMPmachines.This kernel can be used for all 64bit RS/6000, pSeries and JS20machines.%package bigmemSummary: The Linux Kernel for machines with more than 4 Gigabyte of memory.Group: System Environment/KernelProvides: module-info, kernel = %{version}%ifarch %{all_x86} ia64 x86_64Provides: kernel-drm = 4.1.0, kernel-drm = 4.2.0, kernel-drm = 4.3.0, kernel-drm = 4.2.99.3%endif%if %{rhbuild}Prereq: %{kernel_prereq}Conflicts: %{kernel_conflicts}Obsoletes: kernel-enterprise <= 2.4.10%endif%description bigmemThis package includes a kernel that has appropriate configuration optionsenabled for Pentium III machines with 4 Gigabyte of memory or more.%package BOOTSummary: The version of the Linux kernel used on installation boot disks.Group: System Environment/KernelProvides: kernel = %{version}%if %{rhbuild}Prereq: %{BOOT_kernel_prereq}Conflicts: %{kernel_conflicts}%endif%description BOOTThis package includes a trimmed down version of the Linux kernel.This kernel is used on the installation boot disks only and should notbe used for an installed system, as many features in this kernel areturned off because of the size constraints.%package BOOTsmpSummary: The Linux kernel used on installation boot disks for SMP machines.Group: System Environment/KernelProvides: kernel = %{version}%if %{rhbuild}Prereq: %{BOOT_kernel_prereq}Conflicts: %{kernel_conflicts}%endif%description BOOTsmpThis package includes a trimmed down version of the Linux kernel. Thiskernel is used on the installation boot disks only and should not be usedfor an installed system, as many features in this kernel are turned offbecause of the size constraints. This kernel is used when booting SMPmachines that have trouble coming up to life with the uniprocessor kernel.%package jensenSummary: The Linux Kernel compiled for the Alpha Jensen platform.Group: System Environment/KernelProvides: kernel = %{version}%if %{rhbuild}Prereq: %{kernel_prereq}Conflicts: %{kernel_conflicts}%endif%description jensenThis package includes a kernel that has appropriate configurationoptions enabled for use on the Alpha Jensen platform. The Jensenplatform is not supported in the normal generic alpha kernel support.%package -n lustre-lite-utilsSummary: Lustre utils for LinuxGroup: Applications/System%description -n lustre-lite-utilsThe Lustre Lite file system utilities. This includes the tools neededto configure, mount, and administer a Lustre filesystem. This packageis necessary if you want to access a Lustre filesystem.# the lustre-doc files are just included as %doc with# lustre-lite-utils#%package -n lustre-doc#Summary: Sample Lustre configurations and documentation#Group: Documentation#%description -n lustre-doc#The Lustre book, sample configurations, and other documentation for#Lustre.# This is required in rpm >= 4.4.? and _should_ be set by the %setup macro# but isn't, at least for 4.4.2. Yay RPM.%define buildsubdir lustre-kernel-%{version}%define _buildsubdir lustre-kernel-%{version}%prep%setup -n lustre-kernel-%{version} -q -cif [ ! -d lustre ] ; then ln -sf lustre* lustrefipushd lustre >/dev/nullif [ -s "%{SOURCE2}" ] ; then tar zxf "%{SOURCE2}" -C lustre/kernel_patchesfish -x ./build/lmake \ --unpack-kernel \ --target @LUSTRE_TARGET@ \ --target-arch %{_target_cpu} \ --kerneldir $RPM_SOURCE_DIRpopd >/dev/null# handle both SuSE and Red Hat's new-kernel-pkg bitsfor flavor in "" smp bigmem bigsmp pseries64 BOOT jensen ; do [ -n "$flavor" ] && delim_flavor="%{flavordelim}$flavor" for when in pre preun post postun ; do script="${when}${flavor}.sh" cat %{SOURCE25} %{SOURCE32} %{SOURCE33} > ${script} echo "if [ -d /etc/susehelp.d ] ; then" >> ${script} sed -e "s/@when@/$when/g" -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" %{SOURCE28} >> ${script} case $when in pre) echo "if [ ! -f /etc/modprobe.conf ] ; then" >> ${script} cat %{SOURCE31} >> ${script} echo "fi" >> ${script} ;; post) # /sbin/update-modules.dep compares when the modules were built, rather # than installed, so force modules.dep to be recreated echo "rm -f /lib/modules/%{KVERREL}${delim_flavor}/modules.dep" >> ${script} echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" %{SOURCE26} >> ${script} echo "else" >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" -e "s^%%{cfg_name}^${delim_flavor}^g" %{SOURCE29} >> ${script} echo "fi" >> ${script} ;; postun) echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" %{SOURCE27} >> ${script} echo "else" >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" %{SOURCE30} >> ${script} echo "fi" >> ${script} ;; esac echo "exit 0; fi" >> ${script} case $when in post) if [ -z "${flavor}" ] ; then cat >> ${script} <<EOFcd /boot%ifnarch ia64 ln -sf vmlinuz-%{KVERREL} vmlinuz%endifln -sf System.map-%{KVERREL} System.mapln -sf module-info-%{KVERREL} module-infoEOF fi cat >> ${script} <<EOF[ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade[ -x /sbin/mkkerneldoth ] && /sbin/mkkerneldothif [ -x /sbin/new-kernel-pkg ] ; then if /sbin/new-kernel-pkg 2>&1 | grep package >/dev/null ; then PACKAGE_ARG="--package kernel-${flavor}" fi /sbin/new-kernel-pkg $PACKAGE_ARG --mkinitrd --depmod \ --install %{KVERREL}${delim_flavor}fiEOF ;; postun) ;; pre) cat >> ${script} <<EOF/sbin/modprobe loop 2>/dev/null >/dev/null || :exit 0EOF ;; preun) cat >> ${script} <<EOF/sbin/modprobe loop 2> /dev/null > /dev/null || :rm -f /lib/modules/%{KVERREL}${delim_flavor}/modules.*if [ -x /sbin/new-kernel-pkg ] ; then /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}${delim_flavor}fiEOF ;; esac done cat > "kernel$flavor.files" <<EOF%%defattr(-, root, root)/boot/%{kernel_glob}${delim_flavor}/boot/System.map-%{KVERREL}${delim_flavor}/boot/config-%{KVERREL}${delim_flavor}%%dir /lib/modules%%dir /dev/shm/lib/modules/%{KVERREL}${delim_flavor}%ifarch ia64/boot/efi/redhat/%{kernel_glob}${delim_flavor}%endif%if %{linux26}%if %{susebuild}/boot/Kerntypes-%{KVERREL}${delim_flavor}%endif/boot/symvers-%{KVERREL}-%{_target_cpu}${delim_flavor}.gz%endifEOFdonecat > kernel-source.files <<EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -