Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353199 - kernel-2.eclass employs incorrect URI for retrieving longterm releases
Summary: kernel-2.eclass employs incorrect URI for retrieving longterm releases
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://kernel.org/pub/linux/kernel/v2...
Whiteboard:
Keywords:
: 349920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-30 05:54 UTC by kfm
Modified: 2011-02-20 18:40 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kernel-2-eclass-longterm.patch (kernel-2-eclass-longterm.patch,3.61 KB, patch)
2011-01-30 05:56 UTC, kfm
Details | Diff
kernel-2-eclass-longterm-alt.patch (kernel-2-eclass-longterm-alt.patch,3.44 KB, patch)
2011-01-30 09:38 UTC, kfm
Details | Diff
Patch using ebuild variable (kernel-2-longterm-var.patch,3.39 KB, patch)
2011-02-01 22:00 UTC, Mike Pagano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2011-01-30 05:54:51 UTC
Unfortunately, the assumption that all kernel tarballs and patches reside under "linux/kernel/" at kernel.org no longer holds true. The attached patch fixes that by removing the hardcoded paths and defining $kernel_base_uri in detect_version() just before it is required. Currently, 2.6.32, 2.6.34 and 2.6.35 are treated specially because they are longterm releases. This patch also includes two minor whitespace cleanups. It hasn't been heavily tested but it should be OK.
Comment 1 kfm 2011-01-30 05:56:07 UTC
Created attachment 261072 [details, diff]
kernel-2-eclass-longterm.patch
Comment 2 kfm 2011-01-30 09:35:24 UTC
Another expression which does the job and allows for the code to be somewhat more concise and re-usable:

[[ " 2.6.32 2.6.34 2.6.35 " = *" ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} "* ]]

There are more elegant ways to do it but, just as in the already submitted patch, this does not require any modern bash features and it gets the job done.

I'll attach an alternate (functionally identical) patch which uses the above method. It varies from the previous patch in one other respect: it safely replaces one instance of "linux-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.tar.bz2" with "linux-${OKV}.tar.bz" for reasons of legibility.
Comment 3 kfm 2011-01-30 09:38:58 UTC
Created attachment 261076 [details, diff]
kernel-2-eclass-longterm-alt.patch
Comment 4 kfm 2011-02-01 20:31:42 UTC
*** Bug 349920 has been marked as a duplicate of this bug. ***
Comment 5 kfm 2011-02-01 20:34:05 UTC
Adding back CC'd parties from earlier bug.
Comment 6 Mike Pagano gentoo-dev 2011-02-01 22:00:09 UTC
Created attachment 261300 [details, diff]
Patch using ebuild variable

I'm leaning towards an ebuild variable so that we don't have to maintain versions in the eclass.  I'm still testing this one.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-02-07 17:43:59 UTC
(In reply to comment #6)
> Created an attachment (id=261300) [details]
> Patch using ebuild variable
+1 on this version.
Comment 8 kfm 2011-02-08 15:00:04 UTC
As far as I can tell, none of the existing ebuilds would require modification (at the time of writing), which makes the process easier. Those ebuilds which use the 2.6.X.Y naming scheme are:

sys-kernel/linux-docs
sys-kernel/linux-headers
sys-kernel/mips-sources
sys-kernel/openvz-sources
sys-kernel/vanilla-sources
sys-kernel/xbox-sources

In all likelihood, only vanilla-sources will need to be considered in the short term:

>=vanilla-sources-2.6.32.28 < 2.6.33
>=vanilla-sources-2.6.34.8  < 2.6.35
>=vanilla-sources-2.6.35.10 < 2.6.36
Comment 9 Mike Pagano gentoo-dev 2011-02-20 18:40:04 UTC
Committed