autotools: fix deb package versioning to include target kernel version#448
Conversation
2b30f2f to
875f802
Compare
| ;; | ||
| configure) | ||
| ACTION="$1" | ||
| if [ ! -z "$2" ]; then |
There was a problem hiding this comment.
Please chec k and fix alignment once.
| # Fall back to UTS_RELEASE if not found, then uname -r | ||
| TARGET_KERN_VER=@DOLLAR_SIGN@(shell cat @DOLLAR_SIGN@(KLIB_BUILD)/include/generated/autoconf.h 2>/dev/null | grep 'CONFIG_BUILD_SALT' | cut -d '"' -f2 2>/dev/null || cat @DOLLAR_SIGN@(KLIB_BUILD)/include/generated/utsrelease.h 2>/dev/null | grep UTS_RELEASE | cut -d '"' -f2 || uname -r) | ||
| FULL_KERN_STR=@DOLLAR_SIGN@(shell echo "@DOLLAR_SIGN@(TARGET_KERN_VER)" | sed 's/\.el[0-9]*_[0-9]*\.x86_64//' | sed 's/\.x86_64//' | tr -d '+') | ||
| # Extract kernel version from utsrelease.h |
There was a problem hiding this comment.
better we have the argument of BUILD_VERSION , similar to i915. along with README update.
There was a problem hiding this comment.
I ran similar way how in CI its being ran: make xe-dkms-deb-pkg KLIB="/lib/modules/6.14.0-37-generic/" KLIB_BUILD=/lib/modules/6.14.0-37-generic/build
Generated deb-pkg:
intel-xe-dkms_6.14.0.37-6.17.13.62.260409.9+i102-1_all.deb
| # Versions file will not be cleaned-up to maintain built kernel versions. | ||
| #------------------------------------------------------------------------------ | ||
| .PHONY: mrproper | ||
| mrproper: |
There was a problem hiding this comment.
Check if we have make help target. not in scope of this jira
| ``` | ||
| Above command will create Debian package in parent folder. **intel-xe-dkms_<**release version**>.<**kernel-version**>.deb** | ||
| Above command will create Debian package in parent folder. **intel-xe-dkms_\<kernel-version\>-\<release-version\>+i1-1_all.deb** | ||
|
|
There was a problem hiding this comment.
Lets add sections for Debian and RPM and move examples under individual sections
There was a problem hiding this comment.
Added, have a look once
875f802 to
55beafc
Compare
| Example: intel-xe-dkms_6.14.0.37-6.17.13.62.260409.9+i102-1_all.deb | ||
| ``` | ||
|
|
||
| #### Redhat / RHEL |
There was a problem hiding this comment.
Should be RPM as rpm is not specific to Redhat/RHEL
| KLIB ?= /lib/modules/@DOLLAR_SIGN@(shell uname -r) | ||
| KLIB_BUILD ?= @DOLLAR_SIGN@(KLIB)/build | ||
|
|
||
| ifneq ($(BUILD_VERSION), ) |
There was a problem hiding this comment.
I cherry-picked these changes and hit a packaging failure during xe-dkms-deb-pkg. The error points to the Automake input, and it looks like a syntax issue in the conditional block:
m4/xe.m4:1: AC_XE_CONFIG is expanded from...
configure.ac:18: the top level
Makefile.am:29: error: else without if
Makefile.am:31: error: endif without if
Could you please check this? I may be missing a required step, but based on the log it seems the if/else/endif block in autotools/Makefile.am is not being parsed correctly by automake.
There was a problem hiding this comment.
Raju, I checked the issue was automake recognizes else and endif as automake directives but doesn't treat ifneq as a matching if, causing "else/endif without if".
55beafc to
7b52f58
Compare
7b52f58 to
bb9e561
Compare
The xe-dkms-deb package previously used only the backport release version in its name to include the target kernel version. So the fixes by aligning the deb package versioning are as follows: Makefile.am: - change XE_PKG_VERSION from 0.<BKPT_VER> to <KER_VER>-<RELEASE_VERSION> - resulting deb name: intel-xe-dkms_<kernel-ver>-<dev_tag>.<bkpt_ver>+i1-1_all.deb Makefile: - add xe_deb_pkg_ver=$(KER_VER)-$(DEV_TAG).$(BKPT_VER) and supporting variables. - replace broken xe-dkms-deb-pkg delegation to src/ with a full target implementation matching the Makefile.am logic resultant package:intel-xe-dkms_6.6.135-6.17.13.54.260409.3+i1-1_all.deb Reviewed-by: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com> Reviewed-by: Syed Abdul Muqthyar Ahmed <syed.abdul.muqthyar.ahmed@intel.com> Signed-off-by: Akanksha Hotta <akanksha.hotta@intel.com>
If as user passes only KLIB as input, current KLIB_BUILD is not consuming the input, but taking the default value. This is causing issue in case if uname is different than what is passed to KLIB and ultimately leading to unknown failures if headers are not properly set for the uname. Also Add support in compile script to take headers as input for configure command; if not passed, compile.sh script considers deafult uname -r HEADERS and configure make. Reviewed-by: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com> Signed-off-by: S A Muqthyar Ahmed <syed.abdul.muqthyar.ahmed@intel.com>


No description provided.