[Apt-listbugs-commits] [apt-listbugs] 01/02: support Proxy-Auto-Detect (Closes: #726430)
Francesco Poli
frx-guest at moszumanska.debian.org
Wed Jan 14 22:17:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
frx-guest pushed a commit to branch master
in repository apt-listbugs.
commit 6d4f02e08f21a54fd6d9864a8a62bf5cf26950eb
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Mon Jan 12 23:22:14 2015 +0100
support Proxy-Auto-Detect (Closes: #726430)
---
apt-listbugs | 11 +++++++++--
debian/changelog | 8 ++++++++
debian/copyright | 2 +-
lib/apt-listbugs/logic.rb | 17 ++++++++++++++++-
4 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/apt-listbugs b/apt-listbugs
index dc97d33..c4fdb44 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -5,7 +5,7 @@
# Copyright (C) 2002 Masato Taruishi <taru at debian.org>
# Copyright (C) 2006-2008 Junichi Uekawa <dancer at debian.org>
# Copyright (C) 2007 Famelis George <famelis at otenet.gr>
-# Copyright (C) 2008-2014 Francesco Poli <invernomuto at paranoici.org>
+# Copyright (C) 2008-2015 Francesco Poli <invernomuto at paranoici.org>
# Copyright (C) 2009 Ryan Niebur <ryan at debian.org>
# Copyright (C) 2012 Justin B Rye <jbr at edlug.org.uk>
# Copyright (C) 2013 Google Inc
@@ -208,9 +208,16 @@ notable configuration options are
value).
An empty string or the special keyword 'DIRECT' will disable proxy.
+: Acquire::HTTP::Proxy-Auto-Detect
+
+ Automatic HTTP Proxy discovery (overrides the default HTTP Proxy setting
+ and any http_proxy environment variable value).
+ It can be used to specify an external command that is expected to output
+ the proxy on stdout.
+
: Acquire::HTTP::Proxy::bugs.debian.org
- Specific HTTP Proxy setting (overrides the default HTTP Proxy setting).
+ Specific HTTP Proxy setting (overrides any other proxy setting).
Useful for setting HTTP proxy for apt-listbugs.
The special keyword 'DIRECT' will disable proxy.
diff --git a/debian/changelog b/debian/changelog
index 8c853fc..d044af5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+apt-listbugs (0.1.17) UNRELEASED; urgency=medium
+
+ * fixed "Does not uses proxy from Acquire::http::ProxyAutoDetect":
+ implemented support for the Acquire::http::Proxy-Auto-Detect
+ APT configuration option (Closes: #726430)
+
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sun, 04 Jan 2015 11:42:30 +0100
+
apt-listbugs (0.1.16) unstable; urgency=medium
* updated French translation, thanks to Jean-Baka Domelevo Entfellner!
diff --git a/debian/copyright b/debian/copyright
index 32a655c..b7a236b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -8,7 +8,7 @@ Copyright (C) 2002-2004 Masato Taruishi <taru at debian.org>
Copyright (C) 2006-2008 Junichi Uekawa <dancer at debian.org>
Copyright (C) 2007 Jean Lepropre <jlepropre at gmail.com>
Copyright (C) 2007 Famelis George <famelis at otenet.gr>
-Copyright (C) 2008-2014 Francesco Poli <invernomuto at paranoici.org>
+Copyright (C) 2008-2015 Francesco Poli <invernomuto at paranoici.org>
Copyright (C) 2009-2010 Ryan Niebur <ryan at debian.org>
Copyright (C) 2012 Justin B Rye <jbr at edlug.org.uk>
Copyright (C) 2013 Google Inc
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index 9b29d5c..67e993c 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -5,7 +5,7 @@
# Copyright (C) 2002 Masato Taruishi <taru at debian.org>
# Copyright (C) 2006-2008 Junichi Uekawa <dancer at debian.org>
# Copyright (C) 2007 Famelis George <famelis at otenet.gr>
-# Copyright (C) 2008-2014 Francesco Poli <invernomuto at paranoici.org>
+# Copyright (C) 2008-2015 Francesco Poli <invernomuto at paranoici.org>
# Copyright (C) 2009-2010 Ryan Niebur <ryan at debian.org>
# Copyright (C) 2013 Google Inc
#
@@ -249,6 +249,21 @@ class AppConfig
ENV["soap_use_proxy"] = "on"
end
end
+ if /proxy_detect='(.*)'/ =~ `apt-config #{@apt_conf} shell proxy_detect acquire::http::proxy-auto-detect`
+ puts "auto proxy detect command from apt.conf: #{$1}" if $DEBUG
+ if FileTest.executable?("#{$1}")
+ detected_proxy = `#{$1}`.chomp
+ puts "auto detected proxy: #{detected_proxy}" if $DEBUG
+ if /^http/ =~ detected_proxy
+ ENV["http_proxy"] = detected_proxy
+ ENV["soap_use_proxy"] = "on"
+ else
+ puts "Ignoring auto detected proxy not beginning with 'http'" if $DEBUG
+ end
+ else
+ STDERR.puts _("W: ") + sprintf(_("Cannot execute auto proxy detect command %s"), $1)
+ end
+ end
if /http_proxy='(.*)'/ =~ `apt-config #{@apt_conf} shell http_proxy acquire::http::proxy::bugs.debian.org`
puts "proxy configuration from apt.conf, specific for bugs.debian.org: #{$1}" if $DEBUG
if $1 == 'DIRECT'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git
More information about the Apt-listbugs-commits
mailing list