Bug 9870 - URPMI does not follow --proxy-user=ask parameter
Summary: URPMI does not follow --proxy-user=ask parameter
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL: https://forums.mageia.org/en/viewtopi...
Whiteboard: MAGEIA1TOO, MAGEIA2TOO
Keywords:
: 10003 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-25 20:54 CEST by Luzemário Dantas
Modified: 2013-06-13 20:40 CEST (History)
1 user (show)

See Also:
Source RPM: urpmi-6.48.3-2.mga2.noarch
CVE:
Status comment:


Attachments

Description Luzemário Dantas 2013-04-25 20:54:59 CEST
Description of problem: Despite described in the urpmi manual, urpmi does not asks for user and password when --proxy-user=ask parameter is issued in command line.


Version-Release number of selected component (if applicable):


How reproducible: setup a working proxy with authentication in your network and try to traverse proxy, specifying a user/password before downloading. Urpmi acts as if no "--proxy-user" clause was entered.


Steps to Reproduce:
1.Configure proxy settings correctly with drakproxy
2.try to install something still not installed specifying to ask for a proxy user/password, i.e. 'urpmi mc --proxy-user=ask'
3.urpmi calls downloader without proxy user and downloading will fail with HTTP error 407 (proxy authentication required).

As consequence, installs of Mageia on entrerprise will mostly not update if there is need to authenticate. Currently gurpmi DO NOT is succesful in passing saved proxy username and password to urpmi.

Reproducible: 

Steps to Reproduce:
Luzemário Dantas 2013-04-25 20:56:02 CEST

Whiteboard: (none) => MAGEIA1TOO, MAGEIA2TOO

Comment 1 Thierry Vignaud 2013-04-26 15:12:03 CEST
urpmi will only ask user/password if user is not set in config

CC: (none) => thierry.vignaud

Comment 2 Luzemário Dantas 2013-04-26 16:06:35 CEST
(In reply to Thierry Vignaud from comment #1)
> urpmi will only ask user/password if user is not set in config

Ignoring a command line parameter without advice makes no sense to me... If a user specify a additional parameter in command line, this parameter must take precedence to previous settings. The user explicitly says what he/she want. This behavior is not user friendly, and maybe not standard...
Comment 3 Luzemário Dantas 2013-04-26 16:19:20 CEST
(In reply to Thierry Vignaud from comment #1)
> urpmi will only ask user/password if user is not set in config

Update: urpmi DO NOT ask for user/password, despite config settings.

Conditions tested: urpmi xfce --curl --proxy-user-ask --proxy-ntlm     //(NTLM needed here)

prxoy environment variables unset (cleared) - Downloader do not download nor timeouts. Waiting forever;
prxoy environment variables set - Downloader gets a HTTP 407
drakproxy set - Downloader gets a HTTP 407
drakproxy unset (cleared) - Downloader do not download nor timeouts. Waiting forever;
Comment 4 Manuel Hiebel 2013-05-07 02:12:39 CEST
*** Bug 10003 has been marked as a duplicate of this bug. ***
Comment 5 Luzemário Dantas 2013-06-12 15:32:17 CEST
This bug was resolved with urpmi version included in original Mageia 3 release.

Thierry, feel free to reopen it if you want, i.e. if you plan to make a backport or another adjust.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 6 Thierry Vignaud 2013-06-12 16:28:36 CEST
There really was no change regarding this.
Maybe this was a transient issue in your network?
Comment 7 Luzemário Dantas 2013-06-12 17:01:58 CEST
No, it won't... I have two machines side by side in same network segment... The machine running mga3 can traverse proxy. Here we need NTLM, so I added 'curl-options: --proxy-ntlm' in urpmi.cfg and all went fine. Using the same setup on Mga2 makes urpmi 'not see' the --proxy-user=ask parameter.

I don't know if it was some obscure misconfig in my Mga2 installation. I simply filled in proxy config in drakrpm-edit-media in both machines then added curl option in urpmi.cfg to both. Mga3 works and Mga2 won't...

Adding 'proxy_user_ask' in urpmi.cfg of both setups brings the following:

- mga3 machine asks for password every time, in both urpmi and gurpmi, and all operations succeded, for both graphical and text updates;
- mga2 machine asks for password every time, but when using gurpmi curl gets a HTTP 407 from proxy. Text mode urpmi asks for user/password, parse urpmi.cfg and send this all to curl, and curl succeded.

The man pages of urpmi tools do not always list all switches accepted. For example, urpmi.addmedia accepts --debug switch, but it is not listed in urpmi.addmedia man page, and so on.

There is a --debug for gurpmi also?
Comment 8 Luzemário Dantas 2013-06-12 17:07:03 CEST
(In reply to Luzemário Dantas from comment #7)
> 
> Adding 'proxy_user_ask' in urpmi.cfg of both setups brings the following:
> 

Oops.. I mean proxy.cfg... ;)
Comment 9 Luzemário Dantas 2013-06-13 20:40:49 CEST
Some funny thing: drakrpm-edit-media issues twice proxy settings for curl... better twice than missing... :)

'/usr/bin/curl' '-q' '-x' 'proxy:3128' '-x' 'proxy:3128' '-U' 'myuser:mypass' '-H' 'Pragma:' '-s' '--location-trusted' '-R' '-f' '--disable-epsv' '--connect-timeout' '60' '--anyauth' '--proxy-ntlm' '--stderr' '-' '-O' 'http://mageia.fis.unb.br/distrib/3/x86_64/media/core/release/media_info/MD5SUM'

The '-x' parameter appear two times in curl command line. I in turn filled/removed drakproxy settings but had no effect on this.

Note You need to log in before you can comment on or make changes to this bug.