Re: pybuild and proxies -- could we make prohibition optional?

2015-07-27 Thread Piotr Ożarowski
  I already followed Dimitri's suggestion to add no_proxy=localhost and
  will add your PYBUILD_FAKE_PROXY later today
 
 awesome!  feel free to tune the name to whatever you feel more appropriate.

I simply do not forward empty http{,s}_proxy, is that good enough?

https://anonscm.debian.org/cgit/dh-python/dh-python.git/commit/?id=052138369f866d5c09b44433f0023950dae28a74
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc
Description: Digital signature


Re: pybuild and proxies -- could we make prohibition optional?

2015-07-27 Thread Dimitri John Ledkov
On 27 July 2015 at 21:31, Piotr Ożarowski pi...@debian.org wrote:
  I already followed Dimitri's suggestion to add no_proxy=localhost and
  will add your PYBUILD_FAKE_PROXY later today

 awesome!  feel free to tune the name to whatever you feel more appropriate.

 I simply do not forward empty http{,s}_proxy, is that good enough?

 https://anonscm.debian.org/cgit/dh-python/dh-python.git/commit/?id=052138369f866d5c09b44433f0023950dae28a74

way too pythonic, proceed to go, collect 200.

-- 
Regards,

Dimitri.


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/canbhluhtu7ciizgahtyom1t_yfca_h6fpk6leadswsgyz7z...@mail.gmail.com



Re: pybuild and proxies -- could we make prohibition optional?

2015-07-22 Thread Piotr Ożarowski
[Yaroslav Halchenko, 2015-07-21]
 As I have mentioned some tools might not be smart about empty values
 in http_proxy, try e.g. git-annex under such settings 

ah, sorry, I only quickly scanned you email.

I already followed Dimitri's suggestion to add no_proxy=localhost and
will add your PYBUILD_FAKE_PROXY later today
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150722080202.gp18...@sar0.p1otr.com



Re: pybuild and proxies -- could we make prohibition optional?

2015-07-22 Thread Ansgar Burchardt
On 07/21/2015 10:21 PM, Dimitri John Ledkov wrote:
 In practice however we do allow accessing debian ftp archive and
 localhost services, thus:
 
 no_proxy=localhost,*.debian.org
 
 would probably be better imho for the balance of don't allow general
 network access, yet allow sensible networking test-suites to run.

I think no_proxy=localhost would be okay, but *.debian.org should not be
allowed. Packages don't have to be built for Debian after all.

(And yes, I know there is at least one special case that needs to
download data from *.debian.org, but that doesn't imply *.d.o should be
allowed by default.)

Ansgar


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55af7779.3050...@debian.org



Re: pybuild and proxies -- could we make prohibition optional?

2015-07-22 Thread Yaroslav Halchenko

On Wed, 22 Jul 2015, Piotr Ożarowski wrote:

 [Yaroslav Halchenko, 2015-07-21]
  As I have mentioned some tools might not be smart about empty values
  in http_proxy, try e.g. git-annex under such settings 

 ah, sorry, I only quickly scanned you email.

 I already followed Dimitri's suggestion to add no_proxy=localhost and
 will add your PYBUILD_FAKE_PROXY later today

awesome!  feel free to tune the name to whatever you feel more appropriate.
Just an additional piece of support to allow simply disabling automatic
assignment of fake proxies and that no_proxy doesn't work for some
libs/packages: Daniel Stender tried export no_proxy=localhost on pytest-tornado
without success.

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150722134501.gq28...@onerussian.com



Re: pybuild and proxies -- could we make prohibition optional?

2015-07-22 Thread Daniel Stender
On 22.07.2015 15:45, Yaroslav Halchenko wrote:
 
 On Wed, 22 Jul 2015, Piotr Ożarowski wrote:
 
 [Yaroslav Halchenko, 2015-07-21]
 As I have mentioned some tools might not be smart about empty values
 in http_proxy, try e.g. git-annex under such settings 
 
 ah, sorry, I only quickly scanned you email.
 
 I already followed Dimitri's suggestion to add no_proxy=localhost and
 will add your PYBUILD_FAKE_PROXY later today
 
 awesome!  feel free to tune the name to whatever you feel more appropriate.
 Just an additional piece of support to allow simply disabling automatic
 assignment of fake proxies and that no_proxy doesn't work for some
 libs/packages: Daniel Stender tried export no_proxy=localhost on 
 pytest-tornado
 without success.

... pytest-localserver currently (in the multiple package dep solving approach 
for vcr.py),
dh-python 2.20150719.

DS

-- 
http://www.danielstender.com/blog/
4096R/DF5182C8
46CB 1CA8 9EA3 B743 7676 1DB9 15E0 9AF4 DF51 82C8



-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55afa0ec.5070...@danielstender.com



pybuild and proxies -- could we make prohibition optional?

2015-07-21 Thread Yaroslav Halchenko
talking about this ;-) :

$ grep -A3 http_proxy pybuild 
if 'http_proxy' not in env:
env['http_proxy'] = 'http://127.0.0.1:9/'
if 'https_proxy' not in env:
env['https_proxy'] = 'https://127.0.0.1:9/'

which is overall GREAT since now I can drop off all those manual http*_proxy
exports in debian/rules where I know that the application has nothing to do
with the network.  BUT such settings forbid e.g. running any tests even if
those start/use local server specifically initiated for testing.  This is not
forbidden AFAIK by the policy and the only concern is our buildd farm which
says that even local interface might not be available.  Some
tools/libraries are smart enough to not try accessing proxy if http_proxy is
set but empty, but some don't.

So, long story short... would it be ok if I propose/commit a change like

diff --git a/pybuild b/pybuild
index d7bd35a..4edc175 100755
--- a/pybuild
+++ b/pybuild
@@ -50,10 +50,12 @@ def main(cfg):
 env = environ.copy()
 if 'LC_ALL' not in env:
 env['LC_ALL'] = 'C.UTF-8'
-if 'http_proxy' not in env:
-env['http_proxy'] = 'http://127.0.0.1:9/'
-if 'https_proxy' not in env:
-env['https_proxy'] = 'https://127.0.0.1:9/'
+
+if environ.get('PYBUILD_FAKE_PROXY', '1') == '1':
+if 'http_proxy' not in env:
+env['http_proxy'] = 'http://127.0.0.1:9/'
+if 'https_proxy' not in env:
+env['https_proxy'] = 'https://127.0.0.1:9/'
 
 if cfg.system:
 certainty = 99

to enable testing when it is feasible to do it without external interactions
etc?

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist,Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834   Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150721191750.ga24...@onerussian.com



Re: pybuild and proxies -- could we make prohibition optional?

2015-07-21 Thread Dimitri John Ledkov
On 21 July 2015 at 20:17, Yaroslav Halchenko deb...@onerussian.com wrote:
 talking about this ;-) :

 $ grep -A3 http_proxy pybuild
 if 'http_proxy' not in env:
 env['http_proxy'] = 'http://127.0.0.1:9/'
 if 'https_proxy' not in env:
 env['https_proxy'] = 'https://127.0.0.1:9/'

 which is overall GREAT since now I can drop off all those manual http*_proxy
 exports in debian/rules where I know that the application has nothing to do
 with the network.  BUT such settings forbid e.g. running any tests even if
 those start/use local server specifically initiated for testing.  This is not
 forbidden AFAIK by the policy and the only concern is our buildd farm which
 says that even local interface might not be available.  Some
 tools/libraries are smart enough to not try accessing proxy if http_proxy is
 set but empty, but some don't.

 So, long story short... would it be ok if I propose/commit a change like

 diff --git a/pybuild b/pybuild
 index d7bd35a..4edc175 100755
 --- a/pybuild
 +++ b/pybuild
 @@ -50,10 +50,12 @@ def main(cfg):
  env = environ.copy()
  if 'LC_ALL' not in env:
  env['LC_ALL'] = 'C.UTF-8'
 -if 'http_proxy' not in env:
 -env['http_proxy'] = 'http://127.0.0.1:9/'
 -if 'https_proxy' not in env:
 -env['https_proxy'] = 'https://127.0.0.1:9/'
 +
 +if environ.get('PYBUILD_FAKE_PROXY', '1') == '1':
 +if 'http_proxy' not in env:
 +env['http_proxy'] = 'http://127.0.0.1:9/'
 +if 'https_proxy' not in env:
 +env['https_proxy'] = 'https://127.0.0.1:9/'

  if cfg.system:
  certainty = 99

 to enable testing when it is feasible to do it without external interactions
 etc?

In practice however we do allow accessing debian ftp archive and
localhost services, thus:

no_proxy=localhost,*.debian.org

would probably be better imho for the balance of don't allow general
network access, yet allow sensible networking test-suites to run.

-- 
Regards,

Dimitri.


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/canbhlugfezfqrw4zjndr5rrqysdbye2epv1kkou85xnavwo...@mail.gmail.com



Re: pybuild and proxies -- could we make prohibition optional?

2015-07-21 Thread Yaroslav Halchenko
As I have mentioned some tools might not be smart about empty values in 
http_proxy, try e.g. git-annex under such settings

On July 21, 2015 4:16:11 PM EDT, Piotr Ożarowski pi...@debian.org wrote:
 So, long story short... would it be ok if I propose/commit a change
like

no need, if you want to disable it, just set https_proxy to empty
string

f.e. if you want to enable it only in tests:

  override_dh_auto_test:
http_proxy='' dh_auto_test
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

-- 
Sent from a phone which beats iPhone.

Re: pybuild and proxies -- could we make prohibition optional?

2015-07-21 Thread Piotr Ożarowski
 So, long story short... would it be ok if I propose/commit a change like

no need, if you want to disable it, just set https_proxy to empty string

f.e. if you want to enable it only in tests:

  override_dh_auto_test:
http_proxy='' dh_auto_test
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc
Description: Digital signature