Skip to content

Commit b88365b

Browse files
committed
kbuild: deb-pkg: hard-code Build-Depends
The condition to require libelf-dev:native is stale because objtool is now enabled by CONFIG_OBJTOOL instead of CONFIG_UNWINDER_ORC. Not only objtool but also resolve_btfids requires libelf-dev:native; therefore, CONFIG_DEBUG_INFO_BTF should be checked as well. Similarly, CONFIG_SYSTEM_TRUSTED_KEYRING is not the only case that requires libssl-dev:native. Perhaps, the following code would provide better coverage, but it is hard to maintain (and may still be imperfect). if is_enabled CONFIG_OBJTOOL || is_enabled CONFIG_DEBUG_INFO_BTF; then build_depends="${build_depends}, libelf-dev:native" fi if is_enabled CONFIG_SYSTEM_TRUSTED_KEYRING || is_enabled CONFIG_SYSTEM_REVOCATION_LIST || is_enabled CONFIG_MODULE_SIG_FORMAT; then build_depends="${build_depends}, libssl-dev:native" fi Let's hard-code the build dependency. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
1 parent 9c65810 commit b88365b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/package/mkdebian

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ else
176176
fi
177177

178178
echo $debarch > debian/arch
179-
extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev:native)"
180-
extra_build_depends="$extra_build_depends, $(if_enabled_echo CONFIG_SYSTEM_TRUSTED_KEYRING libssl-dev:native)"
181179

182180
# Generate a simple changelog template
183181
cat <<EOF > debian/changelog
@@ -195,7 +193,8 @@ Section: kernel
195193
Priority: optional
196194
Maintainer: $maintainer
197195
Rules-Requires-Root: no
198-
Build-Depends: bc, debhelper, rsync, kmod, cpio, bison, flex $extra_build_depends
196+
Build-Depends: debhelper
197+
Build-Depends-Arch: bc, bison, cpio, flex, kmod, libelf-dev:native, libssl-dev:native, rsync
199198
Homepage: https://www.kernel.org/
200199
201200
Package: $packagename-$version

0 commit comments

Comments
 (0)