hashes: add more custom versions to the exclusion list (branch yem/no-hash-custom)
v2 cover hashes: add more custom versions to the exclusion list (branch yem/no-hash-custom)
Hello All!
This series adds more custom versions to the list of files excluded from the hash check.
It first fixes the way we declare the BR_NO_CHECK_HASH_FOR variable, goes on to exclude custom versions for the bootloaders and the kernel, and ads a hash for Xenomai.
Thanks to Arnout for his thorough review of the first iteration! :-)
Changes v1 -> v2:
- smaller'n'better test-case for BR_NO_CHECK_HASH_FOR (Arnout)
- fix'n'tweak some commit logs (Arnout)
- handle same-as-headers kernel version (Arnout)
Regards,
Yann E. MORIN.
The following changes since commit 40df43ac667bf6fff9ec7072ade19cb3a311a1da:
network-manager: needs (e)glibc (2015-05-02 10:23:05 +0200)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/no-hash-custom
for you to fetch changes up to 60d37b8077174e14c662179b863d4f5045a8ffd1:
linux: do not check hashes for custom versions and tarballs (2015-05-02 10:57:26 +0200)
----------------------------------------------------------------
Yann E. MORIN (7):
pkg-infra: assign BR_NO_CHECK_HASH_FOR so it is recursively-expanded boot/uboot: do not check hash for custom versions boot/barebox: do not check hash for custom versions boot/mxs-bootlets: do not check hash of custom tarball package/xenomai: ignore custom versions
package/xenomai: add hash file
linux: do not check hashes for custom versions and tarballs
boot/barebox/barebox.mk | 4 ++++ boot/mxs-bootlets/mxs-bootlets.mk | 1 + boot/uboot/uboot.mk | 4 ++++ linux/linux.mk | 7 +++++++ package/pkg-download.mk | 4 +++- package/xenomai/xenomai.hash | 2 ++ package/xenomai/xenomai.mk | 2 ++ 7 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 package/xenomai/xenomai.hash
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/7 pkg-infra: assign BR_NO_CHECK_HASH_FOR so it is recursively-expanded
Currently, assigning to BR_NO_CHECK_HASH_FOR but referencing variable assigned to later, fails. Here's a failing test-case, which is the reduced test-case of how we handle BR_NO_CHECK_HASH_FOR for now (warning added for test-case):
export BR_NO_CHECK_HASH_FOR
BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
XENOMAI_VERSION = 2.6.4
XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2
$(warning BR_NO_CHECK_HASH_FOR='$(BR_NO_CHECK_HASH_FOR)')
all:Run it with simply make:
$ make
BR_NO_CHECK_HASH_FOR=' 'Now, change the first line to read:
export BR_NO_CHECK_HASH_FOR =
And we now get:
$ make
BR_NO_CHECK_HASH_FOR=' xenomai-2.6.4.tar.bz2'This new behaviour will be needed later for Xenomai, which handles the version string in an unusual way, so we can exclude its custom versions.
---
Changes v1 -> v2:
- update comment about the reason for assigning (Arnout)
- further reduce the test-case (Arnout)
- drop comment about leading space (Arnout)
--- package/pkg-download.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/pkg-download.mk +3 -1
@@ -56,7 +56,9 @@ domainseparator = $(if $(1),$(1),/) github = https://github.com/$(1)/$(2)/archive/$(3) # Expressly do not check hashes for those files -export BR_NO_CHECK_HASH_FOR +# Exported variables default to immediately expanded in some versions of +# make, but we need it to be recursively-epxanded, so explicitly assign it. +export BR_NO_CHECK_HASH_FOR = ################################################################################ # The DOWNLOAD_* helpers are in charge of getting a working copy
Signature · 1 line
1.9.1
PATCH v2 2/7 boot/uboot: do not check hash for custom versions
In reply to Yann E. MORINFor custom tarballs, it's quite obvious we can not check hashes.
For custom versions, that's not so obvious. One might think we could have hashes for all the official releases, but that's not possible: if the user uses a released version of Buildroot (say 2015.05) much later in the future, and wants to use the then-released 2038.02 U-Boot. It now seems pretty obvious that Buildroot 2015.02 can't know the hash for U-Boot 2038.02.
So, disable checking the hash for custom tarballs and custom versions.
--- boot/uboot/uboot.mk | 4 ++++ 1 file changed, 4 insertions(+)
boot/uboot/uboot.mk +4 -0
@@ -17,6 +17,7 @@ ifeq ($(UBOOT_VERSION),custom) UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL))) UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y) UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) UBOOT_SITE_METHOD = git
@@ -27,6 +28,9 @@ else # Handle stable official U-Boot versions UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2 +ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) +endif endif ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
Signature · 1 line
1.9.1
PATCH v2 3/7 boot/barebox: do not check hash for custom versions
In reply to Yann E. MORINAs we recently did for U-Boot, disable checking hashes for custom versions of barebox.
Note that we currently have no hash file for barebox, but avoiding the check will already be in place when we do add it.
--- boot/barebox/barebox.mk | 4 ++++ 1 file changed, 4 insertions(+)
boot/barebox/barebox.mk +4 -0
@@ -11,6 +11,7 @@ ifeq ($(BAREBOX_VERSION),custom) BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION)) BAREBOX_SITE = $(patsubst %/,%,$(dir $(BAREBOX_TARBALL))) BAREBOX_SOURCE = $(notdir $(BAREBOX_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE) else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y) BAREBOX_SITE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL)) BAREBOX_SITE_METHOD = git
@@ -18,6 +19,9 @@ else # Handle stable official Barebox versions BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 BAREBOX_SITE = http://www.barebox.org/download +ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE) +endif endif BAREBOX_DEPENDENCIES = host-lzop
Signature · 1 line
1.9.1
PATCH v2 4/7 boot/mxs-bootlets: do not check hash of custom tarball
In reply to Yann E. MORIN---
by adding an empty .hash file and checking that it fails for the default
version but not for a custom version.
--- boot/mxs-bootlets/mxs-bootlets.mk | 1 + 1 file changed, 1 insertion(+)
boot/mxs-bootlets/mxs-bootlets.mk +1 -0
@@ -8,6 +8,7 @@ ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL),y) MXS_BOOTLETS_TARBALL = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL)) MXS_BOOTLETS_SITE = $(patsubst %/,%,$(dir $(MXS_BOOTLETS_TARBALL))) MXS_BOOTLETS_SOURCE = $(notdir $(MXS_BOOTLETS_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(MXS_BOOTLETS_SOURCE) else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT),y) MXS_BOOTLETS_SITE = $(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL) MXS_BOOTLETS_SITE_METHOD = git
Signature · 1 line
1.9.1
PATCH v2 5/7 package/xenomai: ignore custom versions
In reply to Yann E. MORINWe can safely reference XENOMAI_SOURCE, even though it is defined later, because BR_NO_CHECK_HASH_FOR is a recursively-expanded variable, so its content is only evaluated when the variable is referenced.
--- package/xenomai/xenomai.mk | 2 ++ 1 file changed, 2 insertions(+)
package/xenomai/xenomai.mk +2 -0
@@ -7,6 +7,8 @@ XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) ifeq ($(XENOMAI_VERSION),) XENOMAI_VERSION = 2.6.4 +else +BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) endif XENOMAI_SITE = http://download.gna.org/xenomai/stable
Signature · 1 line
1.9.1
PATCH v2 6/7 package/xenomai: add hash file
In reply to Yann E. MORINNow that custom versions are properly excluded from the list, we can add a hash for the version we package.
---
Also verified the .sig file (against Gilles' unfortunately expired key).
--- package/xenomai/xenomai.hash | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 package/xenomai/xenomai.hash
package/xenomai/xenomai.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed; +sha256 b6ff723cb0f3b1c2c4e15bccfd114b248dea1b4164a0ac0e612815379ce7caf8 xenomai-2.6.4.tar.bz2
Signature · 1 line
1.9.1
PATCH v2 7/7 linux: do not check hashes for custom versions and tarballs
In reply to Yann E. MORINThis one is a bit tricky, as the version can come from the linux-headers package, so we must also account for that.
We currently have no hash file for linux, but better do the change now, which allows us to later add a hash file.
---
Changes v1 -> v2;
- handle same-as-headers custom version (Arnout)
--- linux/linux.mk | 7 +++++++ 1 file changed, 7 insertions(+)
linux/linux.mk +7 -0
@@ -13,6 +13,7 @@ ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL))) LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH)) LINUX_SITE_METHOD = local
@@ -24,6 +25,12 @@ LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) LINUX_SITE_METHOD = hg else LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) +endif +ifeq ($(BR2_LINUX_KERNEL_SAME_AS_HEADERS)$(BR2_KERNEL_HEADERS_VERSION),yy) +BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) +endif # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order # to use the $(word) function. We support versions such as 4.0, 3.1, # 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
Signature · 1 line
1.9.1
v2 cover hashes: add more custom versions to the exclusion list (branch yem/no-hash-custom)
In reply to Yann E. MORINYann,
Quoted 8 lines · Yann E. MORIN
Yann E. MORIN (7):
pkg-infra: assignBR_NO_CHECK_HASH_FORso it is recursively-expanded boot/uboot: do not check hash for custom versions boot/barebox: do not check hash for custom versions boot/mxs-bootlets: do not check hash of custom tarball package/xenomai: ignore custom versions
package/xenomai: add hash file
linux: do not check hashes for custom versions and tarballs
Series applied, thanks. Special thanks to Arnout for the thorough review and commenting of this patch series.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com