mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxd_make_get: Support svn custom tunnel schemes and https
@ 2022-10-12  5:53 Gavin Schenk
  2022-10-12  5:57 ` [ptxdist] [PATCH v2] " Gavin Schenk
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin Schenk @ 2022-10-12  5:53 UTC (permalink / raw)
  To: ptxdist; +Cc: Gavin Schenk

---
I changed Svn in doc to uppercase SVN as well.


 doc/ref_make_variables.rst   | 7 ++++++-
 scripts/lib/ptxd_make_get.sh | 9 ++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
index 2ee34856d..beca984ed 100644
--- a/doc/ref_make_variables.rst
+++ b/doc/ref_make_variables.rst
@@ -196,9 +196,14 @@ Package Definition
   Git URLs must either start with 'git://' or end with '.git'. They have a
   mandatory ``tag=<tagname>`` option.
 
-  Svn URLs must start with 'svn://'. They have a mandatory
+  SVN URLs must start with 'svn://'. They have a mandatory
   ``rev=r<number>`` option.
 
+  SVN custom tunnel schemes (e.g. 'svn+ssh') are supported as
+  well. There is a special treatment for 'svn+https'. In this case
+  the URL is fixed and 'svn+' is removed from URL. This is useful to
+  work around firewalls that block 'svn' ports.
+
 ``<PKG>_SOURCE``
   The location of the downloaded source archive. There should be no reason
   to set this to anything other than
diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
index 77ac98c9e..2b0ad9307 100644
--- a/scripts/lib/ptxd_make_get.sh
+++ b/scripts/lib/ptxd_make_get.sh
@@ -434,7 +434,14 @@ ptxd_make_get() {
 			ptxd_make_get_download_permitted &&
 			ptxd_make_get_git && return
 			;;
-		svn://*)
+		svn://*|svn+*://*)
+			url=${url/svn+https/https}
+			if [[ "${url}" =~ ^https ]]; then
+				echo "svn+https is fixed in URL, using https directly"
+			fi
+			if [[ "${url}" =~ ^svn\+ ]]; then
+				echo "Custom SVN tunnel scheme detected"
+			fi
 			ptxd_make_get_download_permitted &&
 			ptxd_make_get_svn && return
 			;;
-- 
2.30.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [PATCH v2] ptxd_make_get: Support svn custom tunnel schemes and https
  2022-10-12  5:53 [ptxdist] [PATCH] ptxd_make_get: Support svn custom tunnel schemes and https Gavin Schenk
@ 2022-10-12  5:57 ` Gavin Schenk
  2022-10-19  5:41   ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin Schenk @ 2022-10-12  5:57 UTC (permalink / raw)
  To: ptxdist; +Cc: Gavin Schenk

Signed-off-by: Gavin Schenk <g.schenk@eckelmann.de>
---
I changed Svn in doc to uppercase SVN as well.
v1 -> V2: Added my Signed-off

 doc/ref_make_variables.rst   | 7 ++++++-
 scripts/lib/ptxd_make_get.sh | 9 ++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
index 2ee34856d..beca984ed 100644
--- a/doc/ref_make_variables.rst
+++ b/doc/ref_make_variables.rst
@@ -196,9 +196,14 @@ Package Definition
   Git URLs must either start with 'git://' or end with '.git'. They have a
   mandatory ``tag=<tagname>`` option.
 
-  Svn URLs must start with 'svn://'. They have a mandatory
+  SVN URLs must start with 'svn://'. They have a mandatory
   ``rev=r<number>`` option.
 
+  SVN custom tunnel schemes (e.g. 'svn+ssh') are supported as
+  well. There is a special treatment for 'svn+https'. In this case
+  the URL is fixed and 'svn+' is removed from URL. This is useful to
+  work around firewalls that block 'svn' ports.
+
 ``<PKG>_SOURCE``
   The location of the downloaded source archive. There should be no reason
   to set this to anything other than
diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
index 77ac98c9e..2b0ad9307 100644
--- a/scripts/lib/ptxd_make_get.sh
+++ b/scripts/lib/ptxd_make_get.sh
@@ -434,7 +434,14 @@ ptxd_make_get() {
 			ptxd_make_get_download_permitted &&
 			ptxd_make_get_git && return
 			;;
-		svn://*)
+		svn://*|svn+*://*)
+			url=${url/svn+https/https}
+			if [[ "${url}" =~ ^https ]]; then
+				echo "svn+https is fixed in URL, using https directly"
+			fi
+			if [[ "${url}" =~ ^svn\+ ]]; then
+				echo "Custom SVN tunnel scheme detected"
+			fi
 			ptxd_make_get_download_permitted &&
 			ptxd_make_get_svn && return
 			;;
-- 
2.30.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [APPLIED] ptxd_make_get: Support svn custom tunnel schemes and https
  2022-10-12  5:57 ` [ptxdist] [PATCH v2] " Gavin Schenk
@ 2022-10-19  5:41   ` Michael Olbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2022-10-19  5:41 UTC (permalink / raw)
  To: ptxdist; +Cc: Gavin Schenk

Thanks, applied as a3f49aa038778dc51886dce5482e15833b3294d5.

Michael

[sent from post-receive hook]

On Wed, 19 Oct 2022 07:41:25 +0200, Gavin Schenk <g.schenk@eckelmann.de> wrote:
> Signed-off-by: Gavin Schenk <g.schenk@eckelmann.de>
> Message-Id: <20221012055717.3853440-1-g.schenk@eckelmann.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
> index 2ee34856dd02..beca984edccc 100644
> --- a/doc/ref_make_variables.rst
> +++ b/doc/ref_make_variables.rst
> @@ -196,9 +196,14 @@ Package Definition
>    Git URLs must either start with 'git://' or end with '.git'. They have a
>    mandatory ``tag=<tagname>`` option.
>  
> -  Svn URLs must start with 'svn://'. They have a mandatory
> +  SVN URLs must start with 'svn://'. They have a mandatory
>    ``rev=r<number>`` option.
>  
> +  SVN custom tunnel schemes (e.g. 'svn+ssh') are supported as
> +  well. There is a special treatment for 'svn+https'. In this case
> +  the URL is fixed and 'svn+' is removed from URL. This is useful to
> +  work around firewalls that block 'svn' ports.
> +
>  ``<PKG>_SOURCE``
>    The location of the downloaded source archive. There should be no reason
>    to set this to anything other than
> diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
> index 77ac98c9e4bc..2b0ad9307476 100644
> --- a/scripts/lib/ptxd_make_get.sh
> +++ b/scripts/lib/ptxd_make_get.sh
> @@ -434,7 +434,14 @@ ptxd_make_get() {
>  			ptxd_make_get_download_permitted &&
>  			ptxd_make_get_git && return
>  			;;
> -		svn://*)
> +		svn://*|svn+*://*)
> +			url=${url/svn+https/https}
> +			if [[ "${url}" =~ ^https ]]; then
> +				echo "svn+https is fixed in URL, using https directly"
> +			fi
> +			if [[ "${url}" =~ ^svn\+ ]]; then
> +				echo "Custom SVN tunnel scheme detected"
> +			fi
>  			ptxd_make_get_download_permitted &&
>  			ptxd_make_get_svn && return
>  			;;



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-19  5:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12  5:53 [ptxdist] [PATCH] ptxd_make_get: Support svn custom tunnel schemes and https Gavin Schenk
2022-10-12  5:57 ` [ptxdist] [PATCH v2] " Gavin Schenk
2022-10-19  5:41   ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox