package/xenomai: allow to pull git revisions
PATCH v3 1/1 package/xenomai: allow to pull git revisions
From: Jan Kiszka <[email protected]>
Default remains the latest stable release, expressed by BR2_PACKAGE_XENOMAI_USE_RELEASE=y and an empty BR2_PACKAGE_XENOMAI_VERSION.
---
Changes in v3:
- Replaced BR2_PACKAGE_XENOMAI_REV with BR2_PACKAGE_XENOMAI_VERSION
- Adopted logic suggested by Yann
package/xenomai/Config.in | 25 +++++++++++++++++-------- package/xenomai/xenomai.mk | 11 +++++++++-- 2 files changed, 26 insertions(+), 10 deletions(-)
package/xenomai/Config.in +17 -8
@@ -41,17 +41,26 @@ config BR2_PACKAGE_XENOMAI if BR2_PACKAGE_XENOMAI +choice + prompt "Xenomai origin" + default BR2_PACKAGE_XENOMAI_USE_RELEASE + +config BR2_PACKAGE_XENOMAI_USE_RELEASE + bool "Release" + +config BR2_PACKAGE_XENOMAI_USE_GIT + bool "Git" + +endchoice + config BR2_PACKAGE_XENOMAI_VERSION - string "Custom Xenomai version" + string "Xenomai version" help - Manually select Xenomai version. If left empty, the default - version will be used. + If downloading a release, leave empty for the default version, + or specify a valid release version. - Make sure that the selected version has a patch for your - selected Linux kernel. If it does not, download and select - a patch manually with - BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux - Kernel -> Linux Kernel Extensions menu. + If downloading from git, this can be any commit-ish (e.g. + a tag, or a hash). choice prompt "Xenomai core"
package/xenomai/xenomai.mk +9 -2
@@ -5,14 +5,21 @@ ################################################################################ XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) +XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 + +ifeq ($(BR2_PACKAGE_XENOMAI_USE_RELEASE),y) ifeq ($(XENOMAI_VERSION),) XENOMAI_VERSION = 3.0.10 else BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) endif - XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable -XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 +else +XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_VERSION) +BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) +XENOMAI_AUTORECONF = YES +endif + XENOMAI_LICENSE = GPL-2.0+ with exception (headers), LGPL-2.1+ (libraries), GPL-2.0+ (kernel), GFDL-1.2+ (docs), GPL-2.0 (ipipe patch, can driver) # GFDL is not included but refers to gnu.org XENOMAI_LICENSE_FILES = debian/copyright include/COPYING kernel/cobalt/COPYING \
Signature · 6 lines
2.16.4 -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
PATCH v3 1/1 package/xenomai: allow to pull git revisions
Jan, All,
On 2020-01-14 09:56 +0100, Jan Kiszka spake thusly:
Quoted 7 lines
From: Jan Kiszka <[email protected]>
Default remains the latest stable release, expressed by BR2_PACKAGE_XENOMAI_USE_RELEASE=y and an empty
BR2_PACKAGE_XENOMAI_VERSION.Signed-off-by Jan Kiszka <[email protected]>
After some feedback from Thomas on IRC, I sent an updated series with a truckoad of alternate download locations:
https://patchwork.ozlabs.org/project/buildroot/list/?series=153167
See below for some comments...
Quoted 3 lines
Changes in v3:
- ReplacedBR2_PACKAGE_XENOMAI_REVwithBR2_PACKAGE_XENOMAI_VERSION
- Adopted logic suggested by Yann
I've pushed the thing even further with some preliminary cleanups in how the version string is handled (patch 1 in the series).
package/xenomai/Config.in config BR2_PACKAGE_XENOMAI · line 52
Quoted 2 lines
package/xenomai/Config.in +2
-0+config BR2_PACKAGE_XENOMAI_USE_GIT + bool "Git"
When we offer a git option in a version choice, we also allow the user to set a custom git tree of their liking. So I adapted your patch accordingly (patch 3 in the series).
Quoted 11 lines
package/xenomai/xenomai.mk +3
-0@@ -5,14 +5,21 @@ ################################################################################ XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) +XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 + +ifeq ($(BR2_PACKAGE_XENOMAI_USE_RELEASE),y)
package/xenomai/xenomai.mk line 18
Quoted 10 lines
package/xenomai/xenomai.mk +2
-2ifeq ($(XENOMAI_VERSION),) XENOMAI_VERSION = 3.0.10 else BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) endif - XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable -XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 +else +XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_VERSION)
The repository is now configurable, but it default to the upstream one.
Your implementation would not allowusing anr arbitrary repository, so all it was doing in fact, was downloading a tarball from an alternate location.
Now, git really means git, that is, cloning a remote repository and using any arbitary cset from it.
You can achieve the behaviour of your implementation by using a custom tarball URL (patch 2 in the series), which is faster than cloning the full git tree (but not all git servers support generating archives on the fly).
Regards,
Yann E. MORIN.
Quoted 14 lines
package/xenomai/xenomai.mk +4
-0+BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) +XENOMAI_AUTORECONF = YES +endif + XENOMAI_LICENSE = GPL-2.0+ with exception (headers), LGPL-2.1+ (libraries), GPL-2.0+ (kernel), GFDL-1.2+ (docs), GPL-2.0 (ipipe patch, can driver) # GFDL is not included but refers to gnu.org XENOMAI_LICENSE_FILES = debian/copyright include/COPYING kernel/cobalt/COPYING \Signature · 6 lines
2.16.4 -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'