Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account

2018-01-29 Thread Reinhard John

Am 29.01.2018 um 20:46 schrieb Brian Potkin:



That worked but you cannot expect a user to go through all of this.
Devising a solution still lies in the hands of the hplip team. Whether
they will implement one is another matter.

I tested the complete workaround and it really works! Thank you for your 
analysis, Brian! I learned a lot about the background processes of hplip.


To sum up my own experiences: It is not crucial to change the debian 
version to 8.6. hp-doctor will automatically fall back to version 8.6:

Checking for Deprecated items
error: This distro (i.e debian  9.3) is either deprecated or not yet 
supported.
The diagnosis is limited on unsupported platforms. Do you want to 
continue?(y=yes*, n=no):y

Checking for Dependencies
warning: 2-9.3 version is not supported. Using 2-8.6 versions 
dependencies to verify and install...

It is necessary to replace 'su' in line 35 with 'sudo' in password.py.
And to replace "su -c" and "su_sudo" with "sudo" in the lines 4118 to 
4122 in the file distros.dat.


Then the doctor is able to heal the missing dependencies. (Irrespective 
of the question how crucial these dependencies really are! I also wonder 
at the listing.)


But as Brian pointed out, this is just a workaround, not a solution. 
hp-doctor should be able to accept both types of verification. This is 
intended in the file /usr/share/hplip/doctor.py (line 102 to 122) and it 
doesn´t work, at least not with debian. And this is undoubtedly a bug. 
We will see whether the hplip developers will react to my bug report there.


Regards
Reinhard



Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account

2018-01-28 Thread Reinhard John
On Sat, 27 Jan 2018 16:15:55 + Brian Potkin  
wrote:

> On Sat 27 Jan 2018 at 16:09:32 +, Brian Potkin wrote:
>
> > Look for "AUTH_TYPES" and change
> >
> > 'debian':'su'
> >
> > to
> >
> > 'debian':'sudo'
>
> I forgot to mention: reports of success are welcome.
>
> Regards,
>
> Brian.
>
>

I removed two dependencies to test the proposed workaround. Besides: The 
correct path of the file is /usr/share/hplip/base/password.py.
Now the hp-doctor asked for the sudoer´s password. But: the installation 
of the missing dependencies failed.



ENTER SUDO PASSWORD
---
Please enter the sudoer (reinhard)'s password:
Do you want to update repository and Install missing/incompatible 
packages. (a=install all*, c=custom_install, s=skip):a

Updating repository
---
Installing Missing/Incompatible packages

cmd =libssl-dev
error: Failed to install 'libssl-dev' package, please install manually.
cmd =libsane-dev
error: Failed to install 'libsane-dev' package, please install manually.


Do you think this error results of a follow-up configuration problem in 
another file?


I will send a bug report to the hplip developers. If there are any 
solutions I will post them here.


Regards
Reinhard