Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Support building a zfs-modules-dkms sub package
This commit adds support for building a zfs-modules-dkms sub package
built around Dynamic Kernel Module Support. This is to allow building
packages using the DKMS infrastructure which is intended to ease the
burden of kernel version changes, upgrades, etc.
By default zfs-modules-dkms-* sub package will be built as part of
the 'make rpm' target. Alternately, you can build only the DKMS
module package using the 'make rpm-dkms' target.
Examples:
# To build packaged binaries as well as a dkms packages
$ ./configure && make rpm
# To build only the packaged binary utilities and dkms packages
$ ./configure && make rpm-utils rpm-dkms
Note: Only the RHEL 5/6, CHAOS 5, and Fedora distributions are
supported for building the dkms sub package.
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #535- Loading branch information
1 parent
5085d55
commit 26e0895
Showing
9 changed files
with
266 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,7 @@ AC_CONFIG_FILES([ | |
| PKGBUILD-zfs-modules | ||
| zfs-script-config.sh | ||
| zfs.release | ||
| dkms.conf | ||
| ]) | ||
|
|
||
| AC_OUTPUT | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| AUTOINSTALL="yes" | ||
| PACKAGE_NAME="@PACKAGE@" | ||
| PACKAGE_VERSION="@VERSION@" | ||
| PRE_BUILD="configure | ||
| --prefix=/usr | ||
| --with-config=kernel | ||
| --with-linux=$(case `lsb_release -is` in | ||
| (Debian) echo ${kernel_source_dir/%build/source} ;; | ||
| (*) echo ${kernel_source_dir} ;; | ||
| esac) | ||
| --with-linux-obj=${kernel_source_dir} | ||
| --with-spl-timeout=180 | ||
| " | ||
| POST_INSTALL="dkms.postinst -a ${arch} -k ${kernelver} -t ${dkms_tree} | ||
| -n ${PACKAGE_NAME} -v ${PACKAGE_VERSION} | ||
| " | ||
| REMAKE_INITRD="no" | ||
| MAKE[0]="make" | ||
| BUILT_MODULE_NAME[0]="zavl" | ||
| BUILT_MODULE_LOCATION[0]="module/avl/" | ||
| DEST_MODULE_LOCATION[0]="/extra/avl/avl" | ||
| BUILT_MODULE_NAME[1]="znvpair" | ||
| BUILT_MODULE_LOCATION[1]="module/nvpair/" | ||
| DEST_MODULE_LOCATION[1]="/extra/nvpair/znvpair" | ||
| BUILT_MODULE_NAME[2]="zunicode" | ||
| BUILT_MODULE_LOCATION[2]="module/unicode/" | ||
| DEST_MODULE_LOCATION[2]="/extra/unicode/zunicode" | ||
| BUILT_MODULE_NAME[3]="zcommon" | ||
| BUILT_MODULE_LOCATION[3]="module/zcommon/" | ||
| DEST_MODULE_LOCATION[3]="/extra/zcommon/zcommon" | ||
| BUILT_MODULE_NAME[4]="zfs" | ||
| BUILT_MODULE_LOCATION[4]="module/zfs/" | ||
| DEST_MODULE_LOCATION[4]="/extra/zfs/zfs" | ||
| BUILT_MODULE_NAME[5]="zpios" | ||
| BUILT_MODULE_LOCATION[5]="module/zpios/" | ||
| DEST_MODULE_LOCATION[5]="/extra/zpios/zpios" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/bash | ||
|
|
||
| PROG=$0 | ||
|
|
||
| while getopts "a:k:n:t:v:" opt; do | ||
| case $opt in | ||
| a) arch=$OPTARG ;; | ||
| k) kver=$OPTARG ;; | ||
| n) pkgname=$OPTARG ;; | ||
| t) tree=$OPTARG ;; | ||
| v) pkgver=$OPTARG ;; | ||
| esac | ||
| done | ||
|
|
||
| if [ -z "${arch}" -o -z "${kver}" -o -z "${pkgname}" -o \ | ||
| -z "${tree}" -o -z "${pkgver}" ]; then | ||
| echo "Usage: $PROG -a <arch> -k <kver> -n <pkgname>" \ | ||
| "-t <tree> -v <pkgver>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| cp ${tree}/${pkgname}/${pkgver}/build/zfs_config.h \ | ||
| ${tree}/${pkgname}/${pkgver}/build/module/Module.symvers \ | ||
| ${tree}/${pkgname}/${pkgver}/${kver}/${arch}/ |
Oops, something went wrong.