[Popcon-developers] Bug#365681: popcon: using http_proxy

Bill Allombert Bill.Allombert at math.u-bordeaux1.fr
Fri Nov 30 10:50:10 UTC 2007


Hello Petter, 
you did not reply to the following

> So are you suggesting we apply my proposed change to
> /etc/cron.weekly/popularity-contest ?
> 
> if [ -n "$HTTP_PROXY" ]; then
>   export http_proxy="$HTTP_PROXY";
> fi
> 
> or something better ?

I propose we apply the attached patch to fix bug #365681.

Cheers,
-- 
Bill. <ballombe at debian.org>

Imagine a large red swirl here. 
-------------- next part --------------
? debian/popularity-contest
? debian/popularity-contest.postrm.debhelper
? debian/popularity-contest.substvars
Index: FAQ
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/FAQ,v
retrieving revision 1.15
diff -u -r1.15 FAQ
--- FAQ	30 Nov 2007 10:38:44 -0000	1.15
+++ FAQ	30 Nov 2007 10:47:46 -0000
@@ -81,6 +81,15 @@
 
   dpkg-reconfigure popularity-contest
 
+Q) How can I specify a HTTP proxy server for the HTTP submission ?
+
+Popularity-contest honors the environment variable http_proxy that you can
+set in /etc/environment. Alternatively you can specify a proxy server
+specifically for popularity-contest by adding a line 
+
+HTTP_PROXY="http://<proxy hostname>:<port>"
+to /etc/popularity-contest.conf.
+
 Q) How can I convert the timestamps in the popcon report to human-readable 
 dates ?
 
Index: default.conf
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/default.conf,v
retrieving revision 1.5
diff -u -r1.5 default.conf
--- default.conf	29 Jul 2006 07:35:40 -0000	1.5
+++ default.conf	30 Nov 2007 10:47:46 -0000
@@ -35,6 +35,10 @@
 # USEHTTP enables http reporting.   Set this to 'yes' to enable it.
 USEHTTP="yes"
 
+# HTTP_PROXY allows to specify an HTTP proxy server, the syntax is
+# HTTP_PROXY="http://proxy:port". This overrides the environment
+# variable http_proxy.
+
 # MY_HOSTID is a secret number that the popularity-contest receiver
 # uses to keep track of your submissions.  Whenever you send in a
 # new entry, it overwrites the last one that had the same HOSTID.
Index: debian/changelog
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/debian/changelog,v
retrieving revision 1.373
diff -u -r1.373 changelog
--- debian/changelog	30 Nov 2007 10:33:01 -0000	1.373
+++ debian/changelog	30 Nov 2007 10:47:46 -0000
@@ -12,8 +12,10 @@
   * cron.weekly, function run_popcon(): 
     - remove spurious 'sh -c'
     - add -s /bin/sh in case nobody has no shell. Closes: #429405, #431867.
+  * cron.weekly, default.conf, FAQ:
+    - Add support for HTTP_PROXY. Closes: #365681.
 
- -- Bill Allombert <ballombe at debian.org>  Tue, 19 Jun 2007 17:04:48 +0200
+ -- Bill Allombert <ballombe at debian.org>  Fri, 30 Nov 2007 11:33:58 +0100
 
 popularity-contest (1.42) unstable; urgency=low
 
Index: debian/cron.weekly
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/debian/cron.weekly,v
retrieving revision 1.21
diff -u -r1.21 cron.weekly
--- debian/cron.weekly	30 Nov 2007 10:15:09 -0000	1.21
+++ debian/cron.weekly	30 Nov 2007 10:47:46 -0000
@@ -22,6 +22,10 @@
 # don't run if PARTICIPATE is "no" or unset!
 [ "$PARTICIPATE" = "no" ] || [ -z "$PARTICIPATE" ] && exit 0
 
+if [ -n "$HTTP_PROXY" ]; then
+  export http_proxy="$HTTP_PROXY";
+fi
+
 # keep old logs
 cd /var/log
 umask 022


More information about the Popcon-developers mailing list