Skip to contentSkip to conversation

tools: Once again honour GIT_HTTP env var

PATCH In review Ian Jackson 3 participants 10 messages Nov 5, 2018 – Nov 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 tools: Once again honour GIT_HTTP env var

In "build: add autoconf to replace custom checks in tools/check" --enable-githttp was introduced. But that had the effect of uncondtionally setting GIT_HTTP from the configure variable.

But the env var is advertised in some places as the way to specify this behaviour, and overriding it is just unfriendly.

---
 config/Tools.mk.in    | 2 +-
 config/Toplevel.mk.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
config/Tools.mk.in +1 -1
index 1e5cc20bf7..d5985c0d09 100644
@@ -41,7 +41,7 @@ XEN_TOOLS_RPATH     := @rpath@
 # GIT's protocol is faster and more robust, when it works at all (firewalls
 # may block it). We make it the default, but if your GIT repository downloads
 # fail or hang, please specify GIT_HTTP=y in your environment.
-GIT_HTTP            := @githttp@
+GIT_HTTP            ?= @githttp@
 
 # Optional components
 XENSTAT_XENTOP      := @monitors@
config/Toplevel.mk.in +1 -1
index 1d991895ea..4ecacbb37d 100644
@@ -1,2 +1,2 @@
 SUBSYSTEMS               := @SUBSYSTEMS@
-GIT_HTTP                 := @githttp@
+GIT_HTTP                 ?= @githttp@
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

PATCH 2/3 tools: No longer advertise GIT_HTTP env var

In "build: add autoconf to replace custom checks in tools/check" --enable-githttp was introduced. But we missed this comment where it was advertised.

---
 config/Tools.mk.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
config/Tools.mk.in +1 -1
index d5985c0d09..98245f63c9 100644
@@ -40,7 +40,7 @@ XEN_TOOLS_RPATH     := @rpath@
 # Download GIT repositories via HTTP or GIT's own protocol?
 # GIT's protocol is faster and more robust, when it works at all (firewalls
 # may block it). We make it the default, but if your GIT repository downloads
-# fail or hang, please specify GIT_HTTP=y in your environment.
+# fail or hang, please pass --enable-githttp to configure.
 GIT_HTTP            ?= @githttp@
 
 # Optional components
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw

Re: [PATCH 2/3] tools: No longer advertise GIT_HTTP env var

Quoted 8 lines

-----Original Message-----
From: Ian Jackson [mailto:[email protected]]
Sent: 05 November 2018 18:43
To: [email protected]
Cc: Ian Jackson <[email protected]>; Paul Durrant <[email protected]>; Wei Liu <[email protected]>
Subject: [PATCH 2/3] tools: No longer advertise GIT_HTTP env var

Quoted 7 lines

In "build: add autoconf to replace custom checks in tools/check" --enable-githttp was introduced. But we missed this comment where it was advertised.

TBH I'd squash this into the previous patch. I think it's better to modify the comment at the same time as the behaviour.

Paul

Quoted 20 lines
---
 config/Tools.mk.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
config/Tools.mk.in +0 -0
index d5985c0d09..98245f63c9 100644
@@ -40,7 +40,7 @@ XEN_TOOLS_RPATH     := @rpath@
 # Download GIT repositories via HTTP or GIT's own protocol?
 # GIT's protocol is faster and more robust, when it works at all

(firewalls

 # may block it). We make it the default, but if your GIT repository
downloads
config/Tools.mk.in +1 -2
-# fail or hang, please specify GIT_HTTP=y in your environment.
+# fail or hang, please pass --enable-githttp to configure.
 GIT_HTTP            ?= @githttp@
 
 # Optional components
--
Quoted 1 line

2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] tools: No longer advertise GIT_HTTP env var

In reply to Ian Jackson
Quoted 5 lines · Ian Jackson

In "build: add autoconf to replace custom checks in tools/check" --enable-githttp was introduced. But we missed this comment where it was advertised.

Whether you squash this patch into previous one or not:

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw

PATCH 3/3 tools: ipxe: Correct download error handling

In reply to Ian Jackson

This shell fragment lacked set -e. So, eg if the download failed a broken ipxe.tar.gz would be left behind.

---
 tools/firmware/etherboot/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/firmware/etherboot/Makefile +1 -1
index 3868f876ea..fd8dfdf5a7 100644
@@ -33,7 +33,7 @@ $(ROM): $(ROMS)
 	$(MAKE) -C $D/src bin/$(*F).rom
 
 $T:
-	if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
+	set -e; if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
 		$(GIT) clone $(IPXE_GIT_URL) $D.git; \
 		(cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
 		$(IPXE_GIT_TAG) | gzip -n >../_$T); \
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] tools: ipxe: Correct download error handling

Quoted 8 lines

-----Original Message-----
From: Ian Jackson [mailto:[email protected]]
Sent: 05 November 2018 18:43
To: [email protected]
Cc: Ian Jackson <[email protected]>; Paul Durrant <[email protected]>; Wei Liu <[email protected]>
Subject: [PATCH 3/3] tools: ipxe: Correct download error handling

Quoted 6 lines

This shell fragment lacked set -e. So, eg if the download failed a broken ipxe.tar.gz would be left behind.

Quoted 19 lines
---
 tools/firmware/etherboot/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/firmware/etherboot/Makefile +1 -2
index 3868f876ea..fd8dfdf5a7 100644
@@ -33,7 +33,7 @@ $(ROM): $(ROMS)
 	$(MAKE) -C $D/src bin/$(*F).rom
 
 $T:
-	if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
+	set -e; if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
 		$(GIT) clone $(IPXE_GIT_URL) $D.git; \
 		(cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
 		$(IPXE_GIT_TAG) | gzip -n >../_$T); \
--
Quoted 1 line

2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Tested-by
#6 lore raw

Re: [PATCH 3/3] tools: ipxe: Correct download error handling

Quoted 17 lines

-----Original Message-----
From: Xen-devel [mailto:[email protected]] On Behalf Of Paul Durrant
Sent: 06 November 2018 08:44
To: Ian Jackson <[email protected]>; [email protected]
Cc: Ian Jackson <[email protected]>; Wei Liu <[email protected]>
Subject: Re: [Xen-devel] [PATCH 3/3] tools: ipxe: Correct download error handling

Quoted 8 lines

-----Original Message-----
From: Ian Jackson [mailto:[email protected]]
Sent: 05 November 2018 18:43
To: [email protected]
Cc: Ian Jackson <[email protected]>; Paul Durrant <[email protected]>; Wei Liu <[email protected]>
Subject: [PATCH 3/3] tools: ipxe: Correct download error handling

Quoted 8 lines
Quoted 6 lines

This shell fragment lacked set -e. So, eg if the download failed a broken ipxe.tar.gz would be left behind.

Also...

(using a poisoned tarball name and the fact that ipxe still can't be accessed via git://)

Quoted 13 lines
Quoted 13 lines
---
 tools/firmware/etherboot/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/firmware/etherboot/Makefile +0 -0
index 3868f876ea..fd8dfdf5a7 100644
@@ -33,7 +33,7 @@ $(ROM): $(ROMS)
 	$(MAKE) -C $D/src bin/$(*F).rom
 
Quoted 14 lines
Quoted 8 lines
tools/firmware/etherboot/Makefile +1 -2
 $T:
-	if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
+	set -e; if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
 		$(GIT) clone $(IPXE_GIT_URL) $D.git; \
 		(cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
 		$(IPXE_GIT_TAG) | gzip -n >../_$T); \
--

2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 3/3
#7 lore raw

Re: [PATCH 3/3] tools: ipxe: Correct download error handling

In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

This shell fragment lacked set -e. So, eg if the download failed a broken ipxe.tar.gz would be left behind.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/3
#8 lore raw
In reply to Ian Jackson
Quoted 12 lines

-----Original Message-----
From: Ian Jackson [mailto:[email protected]]
Sent: 05 November 2018 18:43
To: [email protected]
Cc: Ian Jackson <[email protected]>; Paul Durrant <[email protected]>; Wei Liu <[email protected]>
Subject: [PATCH 1/3] tools: Once again honour GIT_HTTP env var

In "build: add autoconf to replace custom checks in tools/check" --enable-githttp was introduced. But that had the effect of uncondtionally setting GIT_HTTP from the configure variable.

Quoted 6 lines

But the env var is advertised in some places as the way to specify this behaviour, and overriding it is just unfriendly.

Quoted 29 lines
---
 config/Tools.mk.in    | 2 +-
 config/Toplevel.mk.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
config/Tools.mk.in +0 -0
index 1e5cc20bf7..d5985c0d09 100644
@@ -41,7 +41,7 @@ XEN_TOOLS_RPATH     := @rpath@
 # GIT's protocol is faster and more robust, when it works at all

(firewalls

 # may block it). We make it the default, but if your GIT repository
downloads
 # fail or hang, please specify GIT_HTTP=y in your environment.
config/Tools.mk.in +1 -1
-GIT_HTTP            := @githttp@
+GIT_HTTP            ?= @githttp@
 
 # Optional components
 XENSTAT_XENTOP      := @monitors@
config/Toplevel.mk.in +1 -2
index 1d991895ea..4ecacbb37d 100644
@@ -1,2 +1,2 @@
 SUBSYSTEMS               := @SUBSYSTEMS@
-GIT_HTTP                 := @githttp@
+GIT_HTTP                 ?= @githttp@
--
Quoted 1 line

2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/3
#9 lore raw
In reply to Ian Jackson
Quoted 8 lines · Ian Jackson

In "build: add autoconf to replace custom checks in tools/check" --enable-githttp was introduced. But that had the effect of uncondtionally setting GIT_HTTP from the configure variable.

But the env var is advertised in some places as the way to specify this behaviour, and overriding it is just unfriendly.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel