Skip to content

Commit

Permalink
package/linux-headers: license files hashes only valid for latest ver…
Browse files Browse the repository at this point in the history
…sion

Like we did for the linux kernel, change linux-headers to only check the
license hashes for the latest known version as the content of COPYING has
changed between versions.

To simplify the test, we introduce an intermediate, blind option that get
selected when the latest kernel sources are used.

Reported-by: Peter Korsgaard <[email protected]>
Signed-off-by: Yann E. MORIN <[email protected]>
Cc: Markus Mayer <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
  • Loading branch information
yann-morin-1998 authored and jacmet committed Feb 6, 2020
1 parent af33b1c commit c2009e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package/linux-headers/Config.in.host
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ choice
config BR2_KERNEL_HEADERS_AS_KERNEL
bool "Same as kernel being built"
depends on BR2_LINUX_KERNEL
select BR2_KERNEL_HEADERS_LATEST if BR2_LINUX_KERNEL_LATEST_VERSION

config BR2_KERNEL_HEADERS_4_4
bool "Linux 4.4.x kernel headers"
Expand Down Expand Up @@ -52,6 +53,7 @@ config BR2_KERNEL_HEADERS_4_19
config BR2_KERNEL_HEADERS_5_4
bool "Linux 5.4.x kernel headers"
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
select BR2_KERNEL_HEADERS_LATEST

config BR2_KERNEL_HEADERS_VERSION
bool "Manually specified Linux version"
Expand Down Expand Up @@ -83,6 +85,10 @@ config BR2_KERNEL_HEADERS_CUSTOM_GIT

endchoice

# Select this for the latest kernel headers version (for license hashes)
config BR2_KERNEL_HEADERS_LATEST
bool

config BR2_DEFAULT_KERNEL_VERSION
string "linux version"
depends on BR2_KERNEL_HEADERS_VERSION
Expand Down
7 changes: 6 additions & 1 deletion package/linux-headers/linux-headers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ endif
LINUX_HEADERS_DL_SUBDIR = linux

LINUX_HEADERS_LICENSE = GPL-2.0
LINUX_HEADERS_LICENSE_FILES = COPYING
ifeq ($(BR2_KERNEL_HEADERS_LATEST),y)
LINUX_HEADERS_LICENSE_FILES = \
COPYING \
LICENSES/preferred/GPL-2.0 \
LICENSES/exceptions/Linux-syscall-note
endif

LINUX_HEADERS_INSTALL_STAGING = YES

Expand Down

0 comments on commit c2009e9

Please sign in to comment.