Skip to contentSkip to conversation

allow user to choose mirror to get kernel source

PATCH In review aq 2 participants 3 messages May 4, 2005 – May 7, 2005

lore
Share & tools
lore

aq

author
#0 lore raw

PATCH 1/1 allow user to choose mirror to get kernel source

hello,

This patch allows user to choose mirror to get linux kernel source instead of getting it from kernel.org (which set as default)

# diffstat xen.patch 
 Config.mk             |    3 +++
 buildconfigs/Rules.mk |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
Config.mk +3 -0
diff -Nurp -X ../dontdiff.aq xeno-unstable.bk/Config.mk xeno/Config.mk
@@ -37,3 +37,6 @@ endif
 
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
+
+# Choose the best mirror to download linux kernel
+KERNEL_REPO = http://www.kernel.org
buildconfigs/Rules.mk +1 -1
diff -Nurp -X ../dontdiff.aq xeno-unstable.bk/buildconfigs/Rules.mk xeno/buildconfigs/Rules.mk
@@ -24,7 +24,7 @@ vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
 linux-%.tar.bz2:
 	@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
-	wget http://www.kernel.org/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
+	wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
 
 # Expand NetBSD release to NetBSD version
 NETBSD_RELEASE  ?= 2.0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 10 lines

hello,

This patch allows user to choose mirror to get linux kernel source instead of getting it from kernel.org (which set as default)

# diffstat xen.patch 
 Config.mk             |    3 +++
 buildconfigs/Rules.mk |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
Quoted 6 lines

Press C-c C-c here to receive file transmission
_______________________________________________
Xen-devel mailing list [email protected]
http://lists.xensource.com/xen-devel

 -=- MIME -=- 

------=_Part_5670_21868458.1115240247040
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

hello,

This patch allows user to choose mirror to get linux kernel source instead of getting it from kernel.org (which set as default)

# diffstat xen.patch=20
 Config.mk             |    3 +++
 buildconfigs/Rules.mk |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

------=_Part_5670_21868458.1115240247040
Content-Type: application/octet-stream; name="xen.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="xen.patch"

ZGlmZiAtTnVycCAtWCAuLi9kb250ZGlmZi5hcSB4ZW5vLXVuc3RhYmxlLmJrL0NvbmZpZy5tayB4 ZW5vL0NvbmZpZy5tawotLS0geGVuby11bnN0YWJsZS5iay9Db25maWcubWsJMjAwNS0wNS0wNSAw NTo0NjozMS4wMDAwMDAwMDAgKzA5MDAKKysrIHhlbm8vQ29uZmlnLm1rCTIwMDUtMDUtMDUgMDU6 MzA6NDMuMDAwMDAwMDAwICswOTAwCkBAIC0zNywzICszNyw2IEBAIGVuZGlmCiAKIExERkxBR1Mg Kz0gJChmb3JlYWNoIGksICQoRVhUUkFfTElCKSwgLUwkKGkpKSAKIENGTEFHUyArPSAkKGZvcmVh Y2ggaSwgJChFWFRSQV9JTkNMVURFUyksIC1JJChpKSkKKworIyBDaG9vc2UgdGhlIGJlc3QgbWly cm9yIHRvIGRvd25sb2FkIGxpbnV4IGtlcm5lbAorS0VSTkVMX1JFUE8gPSBodHRwOi8vd3d3Lmtl cm5lbC5vcmcKZGlmZiAtTnVycCAtWCAuLi9kb250ZGlmZi5hcSB4ZW5vLXVuc3RhYmxlLmJrL2J1 aWxkY29uZmlncy9SdWxlcy5tayB4ZW5vL2J1aWxkY29uZmlncy9SdWxlcy5tawotLS0geGVuby11 bnN0YWJsZS5iay9idWlsZGNvbmZpZ3MvUnVsZXMubWsJMjAwNS0wNS0wNSAwNTo0NjozMS4wMDAw MDAwMDAgKzA5MDAKKysrIHhlbm8vYnVpbGRjb25maWdzL1J1bGVzLm1rCTIwMDUtMDUtMDUgMDU6 MzA6MzkuMDAwMDAwMDAwICswOTAwCkBAIC0yNCw3ICsyNCw3IEBAIHZwYXRoIGxpbnV4LSUudGFy LmJ6MiAkKExJTlVYX1NSQ19QQVRIKQogbGludXgtJS50YXIuYnoyOiBvdmVycmlkZSBfTElOVVhf VkRJUiA9ICQod29yZCAxLCQoc3Vic3QgLiwgLCQqKSkuJCh3b3JkIDIsJChzdWJzdCAuLCAsJCop KQogbGludXgtJS50YXIuYnoyOgogCUBlY2hvICJDYW5ub3QgZmluZCAkQCBpbiBwYXRoICQoTElO VVhfU1JDX1BBVEgpIgotCXdnZXQgaHR0cDovL3d3dy5rZXJuZWwub3JnL3B1Yi9saW51eC9rZXJu ZWwvdiQoX0xJTlVYX1ZESVIpLyRAIC1PLi8kQAorCXdnZXQgJChLRVJORUxfUkVQTykvcHViL2xp bnV4L2tlcm5lbC92JChfTElOVVhfVkRJUikvJEAgLU8uLyRACiAKICMgRXhwYW5kIE5ldEJTRCBy ZWxlYXNlIHRvIE5ldEJTRCB2ZXJzaW9uCiBORVRCU0RfUkVMRUFTRSAgPz0gMi4wCg== ------=_Part_5670_21868458.1115240247040
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

------=_Part_5670_21868458.1115240247040--

Isn't it just as easy to change the address directly in buildconfigs/Rules.mk? Alternatively you can download the kernel from wherever you like and place it at the root of the build tree, or in the immediate parent directory, and the build process will automatically pick it up rather than contact www.kernel.org.

I don't think adding yet another build variable is worthwhile.

-- Keir

author
#2 lore raw
Quoted 10 lines · Keir Fraser
Quoted 10 lines

hello,

This patch allows user to choose mirror to get linux kernel source instead of getting it from kernel.org (which set as default)

# diffstat xen.patch
 Config.mk             |    3 +++
 buildconfigs/Rules.mk |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
Quoted 4 lines
Quoted 1 line

Isn't it just as easy to change the address directly in buildconfigs/Rules.mk?

hmm.. I dont think so. Just declare to everyone that if they want to customize a little bit the building process, they can come there (I suppose that Config.mk is fine for this purpose) to mess up, and they dont need to look further. Isnt it much easier for users if you put this variable (and those alike) to one place, and for all needs, users can go there to customize them?

Besides, we should not expect that everyone want/be-able to hack up the code to modify the right place to get this job done. That is cleary more difficult than modifying a variable.

Quoted 4 lines

Alternatively you can download the kernel from
wherever you like and place it at the root of the build tree, or in the immediate parent directory, and the build process will automatically pick it up rather than contact www.kernel.org.

Then you want your users to do some other things before compiling? That is a little bit more incovenient, isnt it?

My idea is that if users have a better mirror than kernel.org, they can modify this variable (easily, without needing to mess with anything else) and go on building Xen. Just imagine one needs to install dozen systems, they would get the kernel source and put it in a local server, then let all others to get it from there.

So I think it is worthwhy. Or there is no harm at all to have this variable.

Anyway, if you apply this patch, I think other names (like LINUX_KERNEL_MIRROR) might be better than "KERNEL_REPO".

Thank you,
aq