Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16682 - Add a kernel mirror to thirdpartymirrors
Summary: Add a kernel mirror to thirdpartymirrors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Jon Portnoy (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-02 14:50 UTC by Andy Dustman
Modified: 2003-05-09 16:52 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Dustman 2003-03-02 14:50:46 UTC
Most of the gentoo kernel packages specify their original kernel sources as:

SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2"

For a 2.4-based kernel, this is not so much of a problem because all the gentoo
mirrors have copies of recent 2.4 kernels. However, in the case of
development-sources (2.5), these kernels are never on the gentoo mirrors, and
so a trip to www.kernel.org is always required.

I propose adding an additional mirror to /usr/portage/profiles/thirdpartymirrors:

kernel http://www.us.kernel.org/pub/linux/kernel
http://www.kernel.org/pub/linux/kernel

(and possibly some other non-US sites that are fast)

Then in the ebuilds,

OKVS=(${OKV//\./ })
SRC_URI="mirror://kernel/v${OKVS[0]}.${OKVS[1]}/linux-${OKV}.tar.bz2"

Better still, this can be set in the kernel eclass. (development-sources does
not use the kernel eclass at the moment)
Comment 1 Brandon Low (RETIRED) gentoo-dev 2003-03-03 17:15:07 UTC
I agree completely, but I'm not the dude to do it, cuz I have NO IDEA how to set that up and no real urge to know.
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-03 17:27:38 UTC
I'll add them to the mirror descriptions
Comment 3 Jon Portnoy (RETIRED) gentoo-dev 2003-03-28 22:24:50 UTC
I just committed this. lostlogic, could you please test this change on kernel ebuilds? CC'ing pfeifer for the same reason.
Comment 4 Jon Portnoy (RETIRED) gentoo-dev 2003-03-30 12:18:22 UTC
Should be all set, in any case.
Comment 5 Andy Dustman 2003-03-30 13:04:22 UTC
Quick follow-up: Is the order of mirror sites significant? The new line lists 
www.kernel.org as the first mirror. If they are tried in the listed order, then 
the main site will be hit first, which is not exactly what I had in mind. We ought
to try mirror sites first. If they are tried in reverse or random order, then it's
probably fine.

From my testing, it appears to try them in the listed order. To test, I changed the ebuild for development-sources to use:

SRC_URI="mirror://kernel/v2.5/linux-${OKV}.tar.bz2 ${PATCH_URI}"

It went to www.kernel.org first (after the GENTOO_MIRRORS). I would think the best policy would be to randomize the list of mirrors before fetching sources so as to spread the load, but for all I know, it's Gentoo's policy to list the primary site first.

kernel          http://www.kernel.org/pub/linux/kernel/ http://www.us.kernel.org/pub/linux/kernel/ http://www.de.kernel.org/pub/linux/kernel/ http://www.fr.kernel.org/pub/linux/kernel/ http://www.uk.kernel.org/pub/linux/
Comment 6 Jon Portnoy (RETIRED) gentoo-dev 2003-03-30 13:12:29 UTC
I did that because kernel.org has a significantly massive amount of bandwidth and my assessment was that the only time we should need to use a different mirror is when kernel.org is down for whatever reason.

If you don't agree with that, I have no problem with adjusting the order.
Comment 7 Martin Holzer (RETIRED) gentoo-dev 2003-03-30 14:39:08 UTC
this is as good as it is

your wish is in bug #9321
adding yourself cc to watch it
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2003-03-31 13:04:49 UTC
how about remove /kernel from the thirdpartymirrors, cause then we could use this mirror for some other ebuilds.

eg. modutils

now:
mirror://kernel -> http://www.us.kernel.org/pub/linux/kernel

my idea mirror://kernel -> http://www.us.kernel.org/pub/linux

then in modutils we could use mirror://kernel/utils/kernel/${PN}
and in kernel mirror://kernel/${PN}/2.4/${P}.tar.bz2
Comment 9 Andy Dustman 2003-04-02 08:22:39 UTC
I don't object to this (much), though for fetching kernel sources, we would need:

OKVS=(${OKV//\./ })
SRC_URI="mirror://kernel/kernel/v${OKVS[0]}.${OKVS[1]}/linux-${OKV}.tar.bz2"

If it's legal to put periods in the mirror name, then I would suggest an additional thirdpartymirrors line for this function:

kernel.org http://www.kernel.org/pub/linux ...

Or, is this legal? (assuming current line):

SRC_URI="mirror://kernel/../utils/kernel/${PN}/v2.4/${P}.tar.bz2"

My testing indicates that it works:

# GENTOO_MIRRORS="" emerge -f modutils
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/modutils-2.4.25 to /
>>> Downloading http://www.kernel.org/pub/linux/kernel//../utils/kernel/modutils/v2.4/modutils-2.4.25.tar.bz2
--08:19:35--  http://www.kernel.org/pub/linux/utils/kernel/modutils/v2.4/modutils-2.4.25.tar.bz2
           => `/usr/portage/distfiles/modutils-2.4.25.tar.bz2'
Resolving www.kernel.org... done.
Connecting to www.kernel.org[204.152.189.116]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 220,530 [application/x-bzip2]
 
100%[====================================>] 220,530       66.06K/s    ETA 00:00
 
08:19:39 (66.06 KB/s) - `/usr/portage/distfiles/modutils-2.4.25.tar.bz2' saved [220530/220530]
 
The question is, which is uglier: having mirror://kernel/kernel/... for getting kernel sources, or having mirror://kernel/../... for getting other things
Comment 10 Martin Holzer (RETIRED) gentoo-dev 2003-05-09 16:52:51 UTC
ok
modutils uses now mirror://kernel

mirror://kernel/../... is uglier for tools