Whamcloud - gitweb
LU-5614 build: use %kernel_module_package in rpm spec 63/12063/50
authorStephen Champion <schamp@sgi.com>
Tue, 6 Oct 2015 10:16:25 +0000 (15:46 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 27 Jun 2016 18:55:03 +0000 (18:55 +0000)
commit3b7d27ea22faf1c6d0a37afa724fd9b5c3240322
tree38e3ce64589e2b525dc10682520bb1904b0d5c0f
parenta84250b902515e7f5c9c4cd44885ca98b738b392
LU-5614 build: use %kernel_module_package in rpm spec

Replace module packages definitions with calls to the vendor defined
%kernel_module_package macro.  This results in many of the rpm packages
changing names from what we are used to in the past.  Each Linux
distribution may name the modules packages slightly differently, most
notably RHEL and SLES choose different naming schemes.  The
%kernel_module_package macro handles these details for us.

For instance, on RHEL7 the packages that contain lustre's kernel modules
become:

  kmod-lustre             (previously in "lustre-modules" package)
  kmod-lustre-osd-ldiskfs (previously in "lustre-osd-ldiskfs" package)
  kmod-lustre-osd-zfs     (previously in "lustre-osd-zfs" package)
  kmod-lustre-tests       (previously in "lustre-tests" package)

On SLES12, the same packages are instead named:

  lustre-kmp-default
  lustre-osd-ldiskfs-kmp-default
  lustre-osd-zfs-kmp-default
  lustre-tests-kmp-default

These kernel module packages give us what is known as "weak-updates".
Instead of compiling Lustre for every minor kernel that is installed,
the weak-updates will automatically symlink the Lustre modules into
and kernel's modules subdirectories if that kernel offers the required
kernel symbols with exactly the same symbol versions.

In addition to changing the package names for all of the Lustre packages
containing kernel modules, the location of the modules in /lib/modules
changes as well.  Each package will put its modules in a subdirectory
matching part of the package name itself (required by the macros on RHEL
systems).  The path name is also different on RHEL and SLES systems
(e.g. "extra" vs. "updates").

Some further path examples are:

  RHEL7, kmod-lustre package:
    /lib/modules/3.10.0-327.18.2.el7_lustre.x86_64/extra/lustre/fs/ost.ko

  SLES12, lustre-kmp-default package:
    /lib/modules/3.12.57-60.35_lustre-default/updates/lustre/fs/ost.ko

  RHEL7, kmod-lustre-osd-ldiskfs package:
    /lib/modules/3.10.0-327.18.2.el7_lustre.x86_64/extra/lustre-osd-ldiskfs/fs/osd_ldiskfs.ko

  SLES12, lustre-osd-ldiskfs-kmp-default package:
    /lib/modules/3.12.57-60.35_lustre-default/updates/lustre-osd-ldiskfs/fs/osd_ldiskfs.ko

Test-Parameters: trivial clientdistro=el6.7 mdsdistro=el6.7 ossdistro=el6.7
Signed-off-by: Stephen Champion <schamp@sgi.com>
Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Change-Id: Ic5351f4bda94eae80eaf349c8490a2c758b15c80
Signed-off-by: Minh Diep <minh.diep@intel.com>
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/12063
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
16 files changed:
autoMakefile.am
config/lustre-build-linux.m4
config/lustre-build.m4
contrib/lbuild/lbuild
contrib/lbuild/lbuild-rhel7
contrib/lbuild/rhel7/.gitignore [new file with mode: 0644]
contrib/lbuild/rhel7/kmodtool.patch [new file with mode: 0644]
contrib/lbuild/rhel7/rpmmacros.template [new file with mode: 0644]
lustre.spec.in
rpm/kmp-lustre-osd-ldiskfs.files [new file with mode: 0644]
rpm/kmp-lustre-osd-ldiskfs.preamble [new file with mode: 0644]
rpm/kmp-lustre-osd-zfs.files [new file with mode: 0644]
rpm/kmp-lustre-osd-zfs.preamble [new file with mode: 0644]
rpm/kmp-lustre-tests.files [new file with mode: 0644]
rpm/kmp-lustre.files [new file with mode: 0644]
rpm/kmp-lustre.preamble [new file with mode: 0644]