Introduce DKMS support for DEB packages
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
edc729bed8
commit
3060aaf95f
@ -2,9 +2,9 @@
|
|||||||
# Copyright(c) 2012-2020 Intel Corporation
|
# Copyright(c) 2012-2020 Intel Corporation
|
||||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
#
|
#
|
||||||
# If KERNELRELEASE is defined, we've been invoked from the
|
# If $(M) is defined, we've been invoked from the
|
||||||
# kernel build system and can use its language.
|
# kernel build system and can use its language.
|
||||||
ifneq ($(KERNELRELEASE),)
|
ifneq ($(M),)
|
||||||
|
|
||||||
include $(M)/config.mk
|
include $(M)/config.mk
|
||||||
|
|
||||||
@ -16,8 +16,9 @@ obj-y += cas_disk/
|
|||||||
else
|
else
|
||||||
|
|
||||||
OCFDIR=$(PWD)/../ocf
|
OCFDIR=$(PWD)/../ocf
|
||||||
KERNEL_DIR ?= "/lib/modules/$(shell uname -r)/build"
|
|
||||||
PWD=$(shell pwd)
|
PWD=$(shell pwd)
|
||||||
|
KERNEL_VERSION ?= "$(shell uname -r)"
|
||||||
|
KERNEL_DIR ?= "/lib/modules/$(KERNEL_VERSION)/build"
|
||||||
MODULES_DIR=/lib/modules/$(shell uname -r)/extra
|
MODULES_DIR=/lib/modules/$(shell uname -r)/extra
|
||||||
|
|
||||||
DISK_MODULE = cas_disk
|
DISK_MODULE = cas_disk
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Copyright(c) 2012-2020 Intel Corporation
|
# Copyright(c) 2012-2020 Intel Corporation
|
||||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||||
#
|
#
|
||||||
ifneq ($(KERNELRELEASE),)
|
ifneq ($(M),)
|
||||||
|
|
||||||
ifeq ($(CAS_EXT_EXP),1)
|
ifeq ($(CAS_EXT_EXP),1)
|
||||||
EXTRA_CFLAGS += -DWI_AVAILABLE
|
EXTRA_CFLAGS += -DWI_AVAILABLE
|
||||||
|
@ -32,7 +32,7 @@ DEPENDENCIES_TAR=(tar)
|
|||||||
DEPENDENCIES_ZIP=(zip)
|
DEPENDENCIES_ZIP=(zip)
|
||||||
DEPENDENCIES_RPM=(rpmbuild tar)
|
DEPENDENCIES_RPM=(rpmbuild tar)
|
||||||
DEPENDENCIES_SRPM=("${DEPENDENCIES_RPM[@]}")
|
DEPENDENCIES_SRPM=("${DEPENDENCIES_RPM[@]}")
|
||||||
DEPENDENCIES_DEB=(debuild dh fakeroot tar)
|
DEPENDENCIES_DEB=(debuild dh fakeroot tar dkms)
|
||||||
DEPENDENCIES_DSC=("${DEPENDENCIES_DEB[@]}")
|
DEPENDENCIES_DSC=("${DEPENDENCIES_DEB[@]}")
|
||||||
# List of relative submodule directories:
|
# List of relative submodule directories:
|
||||||
SUBMODULES=(
|
SUBMODULES=(
|
||||||
|
11
utils/pckgen.d/deb/debian/CAS_NAME-modules.dkms
Normal file
11
utils/pckgen.d/deb/debian/CAS_NAME-modules.dkms
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
PACKAGE_NAME="<CAS_NAME>-modules"
|
||||||
|
PACKAGE_VERSION="#MODULE_VERSION#"
|
||||||
|
BUILT_MODULE_NAME[0]="cas_disk"
|
||||||
|
BUILT_MODULE_NAME[1]="cas_cache"
|
||||||
|
BUILT_MODULE_LOCATION[0]="modules/cas_disk/"
|
||||||
|
BUILT_MODULE_LOCATION[1]="modules/cas_cache/"
|
||||||
|
DEST_MODULE_LOCATION[0]="/extra"
|
||||||
|
DEST_MODULE_LOCATION[1]="/extra"
|
||||||
|
PRE_BUILD="./configure"
|
||||||
|
MAKE[0]="make -j -C modules/ KERNEL_VERSION=$kernelver"
|
||||||
|
AUTOINSTALL=yes
|
@ -1 +1,9 @@
|
|||||||
lib/modules/
|
./.metadata/* usr/src/<CAS_NAME>-modules-<CAS_VERSION>/.metadata/
|
||||||
|
./modules/* usr/src/<CAS_NAME>-modules-<CAS_VERSION>/modules/
|
||||||
|
./ocf/* usr/src/<CAS_NAME>-modules-<CAS_VERSION>/ocf/
|
||||||
|
./utils/* usr/src/<CAS_NAME>-modules-<CAS_VERSION>/utils/
|
||||||
|
./configure.d/* usr/src/<CAS_NAME>-modules-<CAS_VERSION>/configure.d/
|
||||||
|
./configure usr/src/<CAS_NAME>-modules-<CAS_VERSION>/
|
||||||
|
./Makefile usr/src/<CAS_NAME>-modules-<CAS_VERSION>/
|
||||||
|
./LICENSE usr/src/<CAS_NAME>-modules-<CAS_VERSION>/
|
||||||
|
./version usr/src/<CAS_NAME>-modules-<CAS_VERSION>/
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
-- <PACKAGE_MAINTAINER> <PACKAGE_DATE>
|
-- <PACKAGE_MAINTAINER> <PACKAGE_DATE>
|
||||||
|
|
||||||
|
open-cas-linux (20.03.3.0303-1) trusty; urgency=medium
|
||||||
|
|
||||||
|
* Add DKMS support
|
||||||
|
|
||||||
|
-- Robert Baldyga <robert.baldyga@intel.com> Mon, 02 Nov 2020 18:47:04 +0200
|
||||||
|
|
||||||
open-cas-linux (20.03.2.0295-1) trusty; urgency=medium
|
open-cas-linux (20.03.2.0295-1) trusty; urgency=medium
|
||||||
|
|
||||||
* Initial OpenCAS DEB package release
|
* Initial OpenCAS DEB package release
|
||||||
|
@ -2,7 +2,7 @@ Source: <CAS_NAME>
|
|||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: <PACKAGE_MAINTAINER>
|
Maintainer: <PACKAGE_MAINTAINER>
|
||||||
Build-Depends: debhelper (>= 11), gawk, libelf-dev, linux-headers-generic
|
Build-Depends: debhelper (>= 11), gawk, libelf-dev, linux-headers-generic, dkms
|
||||||
Standards-Version: 4.1.2
|
Standards-Version: 4.1.2
|
||||||
Homepage: <CAS_HOMEPAGE>
|
Homepage: <CAS_HOMEPAGE>
|
||||||
Vcs-Git: <CAS_GIT>
|
Vcs-Git: <CAS_GIT>
|
||||||
@ -21,7 +21,7 @@ Description: Open Cache Acceleration Software
|
|||||||
|
|
||||||
Package: <CAS_NAME>-modules
|
Package: <CAS_NAME>-modules
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: ${misc:Depends}
|
Depends: ${misc:Depends}, debhelper (>= 9), dkms
|
||||||
Description: Open Cache Acceleration Software kernel modules (${kver})
|
Description: Open Cache Acceleration Software kernel modules (${kver})
|
||||||
Open Cache Acceleration Software (Open CAS) is an open source project
|
Open Cache Acceleration Software (Open CAS) is an open source project
|
||||||
encompassing block caching software libraries, adapters, tools and more.
|
encompassing block caching software libraries, adapters, tools and more.
|
||||||
|
@ -4,13 +4,23 @@
|
|||||||
#export DH_VERBOSE = 1
|
#export DH_VERBOSE = 1
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@ --with dkms
|
||||||
|
|
||||||
override_dh_auto_configure :
|
override_dh_auto_configure :
|
||||||
./configure
|
|
||||||
|
override_dh_auto_build :
|
||||||
|
(cd utils/; ./cas_version_gen build)
|
||||||
|
make -C casadm
|
||||||
|
|
||||||
override_dh_auto_install :
|
override_dh_auto_install :
|
||||||
make install_files DESTDIR="$(shell pwd)/debian/tmp"
|
make -C casadm install_files DESTDIR="$(shell pwd)/debian/tmp"
|
||||||
|
make -C utils install_files DESTDIR="$(shell pwd)/debian/tmp"
|
||||||
|
# clean and generate version again before installing sources for DKMS
|
||||||
|
make distclean
|
||||||
|
(cd utils/; ./cas_version_gen)
|
||||||
|
|
||||||
|
override_dh_dkms :
|
||||||
|
dh_dkms -V $(DEB_VERSION_UPSTREAM)
|
||||||
|
|
||||||
override_dh_installsystemd :
|
override_dh_installsystemd :
|
||||||
dh_installsystemd --no-start
|
dh_installsystemd --no-start
|
||||||
|
Loading…
Reference in New Issue
Block a user