Skip to content

autotools: fix deb package versioning to include target kernel version#448

Merged
akanksh5-intc merged 2 commits into
intel-gpu:oot-backport/mainfrom
akanksh5-intc:re-revert_deb_changes
Jul 7, 2026
Merged

autotools: fix deb package versioning to include target kernel version#448
akanksh5-intc merged 2 commits into
intel-gpu:oot-backport/mainfrom
akanksh5-intc:re-revert_deb_changes

Conversation

@akanksh5-intc

Copy link
Copy Markdown
Contributor

No description provided.

@akanksh5-intc akanksh5-intc force-pushed the re-revert_deb_changes branch from 2b30f2f to 875f802 Compare July 2, 2026 07:13
@akanksh5-intc akanksh5-intc requested a review from smuqthya July 2, 2026 07:13
Comment thread autotools/compile.sh
;;
configure)
ACTION="$1"
if [ ! -z "$2" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please chec k and fix alignment once.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Its aligned.

Comment thread autotools/Makefile.am
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better we have the argument of BUILD_VERSION , similar to i915. along with README update.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread autotools/Makefile.am
# Versions file will not be cleaned-up to maintain built kernel versions.
#------------------------------------------------------------------------------
.PHONY: mrproper
mrproper:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if we have make help target. not in scope of this jira

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Added have a look.

Comment thread autotools/README.md
```
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**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add sections for Debian and RPM and move examples under individual sections

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, have a look once

@akanksh5-intc akanksh5-intc force-pushed the re-revert_deb_changes branch from 875f802 to 55beafc Compare July 2, 2026 09:29

@smuqthya smuqthya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread autotools/README.md
Example: intel-xe-dkms_6.14.0.37-6.17.13.62.260409.9+i102-1_all.deb
```

#### Redhat / RHEL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be RPM as rpm is not specific to Redhat/RHEL

Comment thread autotools/Makefile.am Outdated
KLIB ?= /lib/modules/@DOLLAR_SIGN@(shell uname -r)
KLIB_BUILD ?= @DOLLAR_SIGN@(KLIB)/build

ifneq ($(BUILD_VERSION), )

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

@akanksh5-intc akanksh5-intc force-pushed the re-revert_deb_changes branch from 55beafc to 7b52f58 Compare July 7, 2026 09:23
@akanksh5-intc akanksh5-intc force-pushed the re-revert_deb_changes branch from 7b52f58 to bb9e561 Compare July 7, 2026 14:36
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>
@akanksh5-intc akanksh5-intc merged commit 2897360 into intel-gpu:oot-backport/main Jul 7, 2026
@akanksh5-intc akanksh5-intc deleted the re-revert_deb_changes branch July 7, 2026 14:37
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants