Skip to contentSkip to conversation

linux: Fix URL for release candidate versions

PATCH Superseded Luis Araneda 2 participants 3 messages Jul 26, 2017 – Aug 2, 2017

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 linux: Fix URL for release candidate versions

Starting with 4.12-rc1, tarballs are generated by cgit directly from Linus's tree.
Also, set LINUX_SOURCE only on non-rc kernels, and use <PKG>_SOURCE otherwise.

This method also applies to older release candidates.

---
Changes v1 -> v2:
- Set LINUX_SOURCE only on non-rc kernels (suggested by Arnout)

 linux/linux.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
linux/linux.mk +3 -5
index 032d64fc2..f02734102 100644
@@ -16,7 +16,9 @@ define LINUX_HELP_CMDS
 endef
 
 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
-ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
+ifneq ($(findstring -rc,$(LINUX_VERSION)),)
+LINUX_SITE := https://git.kernel.org/torvalds/t
+else 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))
@@ -43,10 +45,6 @@ LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
 else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.)
 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
 endif
-# release candidates are in testing/ subdir
-ifneq ($(findstring -rc,$(LINUX_VERSION)),)
-LINUX_SITE := $(LINUX_SITE)/testing
-endif # -rc
 endif
 
 ifeq ($(BR2_LINUX_KERNEL)$(BR2_LINUX_KERNEL_LATEST_VERSION),y)
Signature · 1 line
2.13.3
#1 lore raw

PATCH v2 1/1 linux: Fix URL for release candidate versions

Hello,

Quoted 21 lines · Luis Araneda

Starting with 4.12-rc1, tarballs are generated by cgit directly from Linus's tree.
Also, set LINUX_SOURCE only on non-rc kernels, and use <PKG>_SOURCE otherwise.

This method also applies to older release candidates.

---
Changes v1 -> v2:
- Set LINUX_SOURCE only on non-rc kernels (suggested by Arnout)

 linux/linux.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
linux/linux.mk +0 -0
index 032d64fc2..f02734102 100644

linux/linux.mk define LINUX_HELP_CMDS · line 19

Quoted 5 lines
linux/linux.mk +1 -1
@@ -16,7 +16,9 @@ define LINUX_HELP_CMDS
 endef
 
 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
-ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
+ifneq ($(findstring -rc,$(LINUX_VERSION)),)

I think this condition should go *inside* the ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) condition. Indeed with your current situation, if by any chance I have a Git tag such as this-is-a-rc-kernel, then it will match your condition, and ignore the Git repository address.

So I really think we want to test the -rc case inside the ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) condition, such as:

ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
ifneq ($(findstring -rc,$(LINUX_VERSION)),)
LINUX_SITE = https://git.kernel.org/torvalds/t
else
...
endif
endif # tarball

Also, please use "=" to assign variables, not ":=".

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 linux: Fix URL for release candidate versions

Hi,

You're right, I tested it with the following configuration:
BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="4.13-rc3"

It started downloading the tarball instead of cloning the repository.

But the the initial idea was to fix the support for the following configuration:
BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.rc3"

Which is working fine with rc-kernels before 4.12-rc1.

But, doesn't work when putting the condition inside the custom tarball as you suggested.

The solution I've found that works on all the cases I've tested is putting the condition after the ($(BR2_LINUX_KERNEL_LATEST_CIP_VERSION),y) condition.
like this:
...
else ifeq ($(BR2_LINUX_KERNEL_LATEST_CIP_VERSION),y)
LINUX_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-cip.git
+else ifneq ($(findstring -rc,$(LINUX_VERSION)),)
+LINUX_SITE = https://git.kernel.org/torvalds/t
else
...

If you like my new solution I can send a v3

Cheers,

Luis Araneda.

Quoted 56 lines · Thomas Petazzoni

Hello,

Quoted 21 lines · Luis Araneda

Starting with 4.12-rc1, tarballs are generated by cgit directly from Linus's tree.
Also, set LINUX_SOURCE only on non-rc kernels, and use <PKG>_SOURCE otherwise.

This method also applies to older release candidates.

---
Changes v1 -> v2:
- Set LINUX_SOURCE only on non-rc kernels (suggested by Arnout)

 linux/linux.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
linux/linux.mk +0 -0
index 032d64fc2..f02734102 100644

linux/linux.mk define LINUX_HELP_CMDS · line 19

Quoted 5 lines
linux/linux.mk +1 -1
@@ -16,7 +16,9 @@ define LINUX_HELP_CMDS
 endef
 
 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
-ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
+ifneq ($(findstring -rc,$(LINUX_VERSION)),)

I think this condition should go *inside* the ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) condition. Indeed with your current situation, if by any chance I have a Git tag such as this-is-a-rc-kernel, then it will match your condition, and ignore the Git repository address.

So I really think we want to test the -rc case inside the ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) condition, such as:

ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
ifneq ($(findstring -rc,$(LINUX_VERSION)),)
LINUX_SITE = https://git.kernel.org/torvalds/t
else
...
endif
endif # tarball

Also, please use "=" to assign variables, not ":=".

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com