[arch-general] [pkgstats] Patch to allow pkgstats to submit info through a proxy (if this is setted on http_proxy)
Hi, I've been trying to submit my stats to the statistics page [1], then I realized that I wasn't submitting anything (I had pkgstats running on a cron). Then I decided to find the reason and it's simply I am behing a noisy and non-transparent proxy (ISA Server which is even worst). So, I decided to do a little patch to pkgstats, I've tested and now it's working .. (I am checking if the http_proxy env var is empty and else I am setting a variable called prox which have the value of the proxy). Just that ;), patch attached [1] https://www.archlinux.de/?page=PackageStatistics -- Angel Velásquez angvp @ irc.freenode.net Arch Linux Trusted User Linux Counter: #359909 http://www.angvp.com
Am Montag 21 Dezember 2009 15:13:53 schrieb Angel Velásquez:
So, I decided to do a little patch to pkgstats, I've tested and now it's working .. (I am checking if the http_proxy env var is empty and else I am setting a variable called prox which have the value of the proxy).
That shouldn't be needed because curl reads the env vars itself (at least according to its man page) Btw: pkgstats not that usable atm. -- Pierre Schmitz, https://users.archlinux.de/~pierre
On Mon, Dec 21, 2009 at 12:39 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Montag 21 Dezember 2009 15:13:53 schrieb Angel Velásquez:
So, I decided to do a little patch to pkgstats, I've tested and now it's working .. (I am checking if the http_proxy env var is empty and else I am setting a variable called prox which have the value of the proxy).
That shouldn't be needed because curl reads the env vars itself (at least according to its man page)
Btw: pkgstats not that usable atm.
Well curl wasn't reading the env vars, in fact I had to add this option --proxy. So if curl isn't reading the env vars there is a curl's bug. And why is not usable pkgstats? -- Angel Velásquez angvp @ irc.freenode.net Arch Linux Trusted User Linux Counter: #359909 http://www.angvp.com
On Mon, 21 Dec 2009 12:50:03 -0300, Angel Velásquez <angvp@archlinux.com.ve> wrote:
On Mon, Dec 21, 2009 at 12:39 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Montag 21 Dezember 2009 15:13:53 schrieb Angel Velásquez:
So, I decided to do a little patch to pkgstats, I've tested and now it's working .. (I am checking if the http_proxy env var is empty and else I am setting a variable called prox which have the value of the proxy).
That shouldn't be needed because curl reads the env vars itself (at least according to its man page)
Btw: pkgstats not that usable atm.
Well curl wasn't reading the env vars, in fact I had to add this option --proxy. So if curl isn't reading the env vars there is a curl's bug.
And why is not usable pkgstats?
Make sure your proxy support https and you have set https_proxy; the stats are sent via https; so setting just http_proxy does not work. -- Pierre Schmitz, https://users.archlinux.de/~pierre
On Mon, Dec 21, 2009 at 8:39 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
On Mon, 21 Dec 2009 12:50:03 -0300, Angel Velásquez <angvp@archlinux.com.ve> wrote:
On Mon, Dec 21, 2009 at 12:39 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Montag 21 Dezember 2009 15:13:53 schrieb Angel Velásquez:
So, I decided to do a little patch to pkgstats, I've tested and now it's working .. (I am checking if the http_proxy env var is empty and else I am setting a variable called prox which have the value of the proxy).
That shouldn't be needed because curl reads the env vars itself (at least according to its man page)
Btw: pkgstats not that usable atm.
Well curl wasn't reading the env vars, in fact I had to add this option --proxy. So if curl isn't reading the env vars there is a curl's bug.
And why is not usable pkgstats?
Make sure your proxy support https and you have set https_proxy; the stats are sent via https; so setting just http_proxy does not work.
Are you completely sure? [«avelasquez@avelasquez-desktop ~»]$ echo $http_proxy http://localhost:5865 [«avelasquez@avelasquez-desktop ~»]$ https_proxy=$http_proxy [«avelasquez@avelasquez-desktop ~»]$ echo $https_proxy http://localhost:5865 [«avelasquez@avelasquez-desktop ~»]$ pkgstats Creating package list... Submitting data... And never submit anything, note: I am using ntlmaps as a proxy server since I am behind a noisy ISA Server. With the patch that I've sent, that isn't happening to me, are you completely sure about the http_proxy env var and https_proxy are detected automatically by curl? is this a curl bug? -- Angel Velásquez angvp @ irc.freenode.net Arch Linux Trusted User Linux Counter: #359909 http://www.angvp.com
2009/12/23 Angel Velásquez <angvp@archlinux.com.ve>:
[«avelasquez@avelasquez-desktop ~»]$ echo $http_proxy http://localhost:5865 [«avelasquez@avelasquez-desktop ~»]$ https_proxy=$http_proxy [«avelasquez@avelasquez-desktop ~»]$ echo $https_proxy http://localhost:5865 [«avelasquez@avelasquez-desktop ~»]$ pkgstats Creating package list... Submitting data...
And never submit anything,
You need to export the var as well as set it I believe... `export https_proxy=$http_proxy` not just `https_proxy=$http_proxy`
On Tue, Dec 22, 2009 at 6:39 PM, Phillip Smith <arch-general@fukawi2.nl> wrote:
2009/12/23 Angel Velásquez <angvp@archlinux.com.ve>:
[«avelasquez@avelasquez-desktop ~»]$ echo $http_proxy http://localhost:5865 [«avelasquez@avelasquez-desktop ~»]$ https_proxy=$http_proxy [«avelasquez@avelasquez-desktop ~»]$ echo $https_proxy http://localhost:5865 [«avelasquez@avelasquez-desktop ~»]$ pkgstats Creating package list... Submitting data...
And never submit anything,
You need to export the var as well as set it I believe... `export https_proxy=$http_proxy` not just `https_proxy=$http_proxy`
Oops! I didn't say nothing! forget my useless patch /me is feeling very ashamed -- Angel Velásquez angvp @ irc.freenode.net Arch Linux Trusted User Linux Counter: #359909 http://www.angvp.com
participants (3)
-
Angel Velásquez
-
Phillip Smith
-
Pierre Schmitz