From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.eckelmann.de ([217.19.183.94]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TDVcZ-00081X-Pz for ptxdist@pengutronix.de; Mon, 17 Sep 2012 09:19:57 +0200 Received: from mail.eckelmann.de (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 6038C178AC71_56CF1BB for ; Mon, 17 Sep 2012 07:19:55 +0000 (GMT) Received: from dag.eckelmann.group (ex-dag01.eckelmann.group [192.168.13.8]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "*.eckelmann.group", Issuer "Eckelmann Root CA" (not verified)) by mail.eckelmann.de (Sophos Email Appliance) with ESMTPS id EBF3D178AC1D_56CF1AF for ; Mon, 17 Sep 2012 07:19:54 +0000 (GMT) From: "Schenk, Gavin" Date: Mon, 17 Sep 2012 07:19:54 +0000 Message-ID: Content-Language: de-DE MIME-Version: 1.0 Subject: [ptxdist] making HTTP proxy timeout adjustable Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0317027754==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: "ptxdist@pengutronix.de" --===============0317027754== Content-Language: de-DE Content-Type: multipart/alternative; boundary="_000_D415CD2EC4182C4EAB90A76B7D9F16DCA96F26DFEXDAG02eckelman_" --_000_D415CD2EC4182C4EAB90A76B7D9F16DCA96F26DFEXDAG02eckelman_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, I recently migrated to 2012-09 and as usual I had to work around our compan= ies HTTP proxy ... ... so what about something like: diff -Naur orig/ptxdist-2012.09.0/config/setup/Kconfig ptxdist-2012.09.0/co= nfig/setup/Kconfig --- orig/ptxdist-2012.09.0/config/setup/Kconfig 2012-09-06 18:13:48.000000= 000 +0200 +++ ptxdist-2012.09.0/config/setup/Kconfig 2012-09-17 09:12:02.2744011= 51 +0200 @@ -56,6 +56,14 @@ http://your.proxy.org:80 +config SETUP_HTTP_PROXY_TIMEOUT + prompt "HTTP Proxy timeout" + int + default "30" + help + Set maximum timeout for downloads via a http proxy + + endmenu menu "Project Searchpath" diff -Naur orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default ptxdist-20= 12.09.0/config/setup/ptxdistrc.default --- orig/ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-06 18:13:= 48.000000000 +0200 +++ ptxdist-2012.09.0/config/setup/ptxdistrc.default 2012-09-17 09:11:4= 3.399225416 +0200 @@ -18,7 +18,7 @@ # PTXCONF_SETUP_FTP_PROXY=3D"" PTXCONF_SETUP_HTTP_PROXY=3D"" - +PTXCONF_SETUP_HTTP_PROXY_TIMEOUT=3D"30" # # Project Searchpath # diff -Naur orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh ptxdist-2012= .09.0/scripts/lib/ptxd_make_get.sh --- orig/ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh 2012-09-06 18:13:4= 8.000000000 +0200 +++ ptxdist-2012.09.0/scripts/lib/ptxd_make_get.sh 2012-09-17 09:03:42= .069850814 +0200 @@ -43,6 +43,13 @@ # local file=3D"${url##*/}" + # + # Proxy timeout + local proxytimeout=3D ${PTXCONF_SETUP_HTTP_PROXY_TIMEOUT} + if [ -z proxytimeout ]; then + proxytimeout=3D30 + fi + # remove any pending or half downloaded files rm -f -- "${path}."* @@ -50,7 +57,7 @@ wget \ --passive-ftp \ --progress=3Dbar:force \ - --timeout=3D30 \ + --timeout=3D${proxytimeout} \ --tries=3D5 \ ${PTXDIST_QUIET:+--quiet} \ "${opts[@]}" \ Regards Gavin Eckelmann Aktiengesellschaft Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender) Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert Vorsitzender des Aufsichtsrats: Hubertus G. Krossa Sitz der Gesellschaft: Wiesbaden Amtsgericht Wiesbaden HRB 12636 --_000_D415CD2EC4182C4EAB90A76B7D9F16DCA96F26DFEXDAG02eckelman_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,

 

I recently migrated to 20= 12-09 and as usual I had to work around our companies HTTP proxy ...=

... so what about somethi= ng like:

 

diff -Naur orig/ptxdist-2= 012.09.0/config/setup/Kconfig ptxdist-2012.09.0/config/setup/Kconfig=

--- orig/ptxdist-2012.09.= 0/config/setup/Kconfig  2012-09-06 18:13:48.000000000 +0200=

+++ ptxdist-2= 012.09.0/config/setup/Kconfig      2012-09-17 09:1= 2:02.274401151 +0200

@@ -56,6 +56,14 @@

    &= nbsp;            &nb= sp;        http://your.proxy.org:80=

+config SETUP_HTTP_PR= OXY_TIMEOUT

+   &n= bsp;      prompt "HTTP Proxy timeout"

+   &n= bsp;      int

+   &n= bsp;      default "30"

+   &n= bsp;      help

+   &n= bsp;        Set maximum timeout for downloads= via a http proxy

+   &n= bsp;     

+

endmenu

 menu "Project = Searchpath"

diff -Naur orig/ptxdist-2= 012.09.0/config/setup/ptxdistrc.default ptxdist-2012.09.0/config/setup/ptxd= istrc.default

--- orig/ptxdist-2012.09.= 0/config/setup/ptxdistrc.default 2012-09-06 18:13:48.000000000 +0200

+++ ptxdist-2= 012.09.0/config/setup/ptxdistrc.default     2012-09-17 = 09:11:43.399225416 +0200

@@ -18,7 +18,7 @@

#

PTXCONF_SETUP_FTP_PROXY= =3D""

PTXCONF_SETUP_HTTP_PROXY= =3D""

-

+PTXCONF_SETUP_HTTP_P= ROXY_TIMEOUT=3D"30"

#

# Project Searchpath

#

diff -Naur orig/ptxdist-2= 012.09.0/scripts/lib/ptxd_make_get.sh ptxdist-2012.09.0/scripts/lib/ptxd_ma= ke_get.sh

--- orig/ptxdist-2012.09.= 0/scripts/lib/ptxd_make_get.sh  2012-09-06 18:13:48.000000000 +020= 0

+++ ptxdist-2= 012.09.0/scripts/lib/ptxd_make_get.sh      2012-09= -17 09:03:42.069850814 +0200

@@ -43,6 +43,13 @@

    &= nbsp;      #

    &= nbsp;      local file=3D"${url##*/}"

+   &n= bsp;      #

+   &n= bsp;      # Proxy timeout

+   &n= bsp;      local proxytimeout=3D ${PTXCONF_SETUP_HT= TP_PROXY_TIMEOUT}

+   &n= bsp;      if [ -z proxytimeout ]; then

+   &n= bsp;            = ;      proxytimeout=3D30

+   &n= bsp;      fi

+

    &= nbsp;      # remove any pending or half downloaded= files

    &= nbsp;      rm -f -- "${path}."*

@@ -50,7 +57,7 @@

    &= nbsp;      wget \

    &= nbsp;          --passive-ftp \=

    &= nbsp;          --progress=3Dba= r:force \

-    =            --timeout=3D30 \

+   &n= bsp;          --timeout=3D${proxyti= meout} \

    &= nbsp;          --tries=3D5 \

    &= nbsp;          ${PTXDIST_QUIET= :+--quiet} \

    &= nbsp;          "${opts[@]= }" \

 

 

Regards

 

Eckelmann Aktiengesellschaft
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Wiesbaden Amtsgericht Wiesbaden HRB 12636
--_000_D415CD2EC4182C4EAB90A76B7D9F16DCA96F26DFEXDAG02eckelman_-- --===============0317027754== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0317027754==--