Make/Install (as root) problems

Andreas Pakulat apaku at gmx.de
Mon Jul 5 15:56:15 UTC 2010


On 05.07.10 18:23:44, Andras Mantia wrote:
> On Monday 05 July 2010, Andreas Pakulat wrote:
> > Had a quick look at the diff and I don't really see any problem with
> > this. Regarding the "runs longer with cmake", you could just skip
> > the dependency-check for the make install phase by using make
> > install/fast. Might need an extension of the IMakeBuilder interface
> > so cmake support can tell it to run install/fast target as
> > superuser.
> 
> It would be probably better to have an installAsRoot() method in the 
> interface, but that is not BC.

We don't care about BC for master.
 
> > > Add the possibility to run sudo, not only kdesu/kdesudo. 
> > 
> > How does it work if sudo asks for a password then? Thats the reason
> > we require kdesu/kdesudo as all standard sudo-installs require
> > providing the password of the current user.
> 
> It is possible to configure it to not ask for a password.

Right, but its not the default and its not something that "ordinary" users
should use (from a security pov). We need to support that use-case, but I
just see this is possible relatively easily as sudo provides a way to read
the password from stdin (unlike ssh).

> 1) I don't have kdesudo. What is that? I heard it might be kubuntu 
> specific, but it is not in openSuse's install and it doesn't get 
> installed if you build kde from source.

It runs sudo and provides a KDE GUI on top of it. In particular it allows
the user to type its password and stores that in kwallet (IIRC) in a safe
way. Its developed by Kubuntu developers, but at least also packaged in
Debian.

> 2) kdesu doesn't work at all. Yes, it should be fixed, but I didn't get 
> there yet, mainly because I used sudo so far (eg. to do install from 
> kdesvn-build).

Hmm, I know I read bugreports related to kdesu, but I thought that those
werent' specific to kdesu, but more specific to the apps launched under
root or something like that... Don't have kdesu around here.
 
> > > Don't pass 'make install' together to sudo, it seems to fail, while
> > > separately works.
> > 
> > That part I don't understand. 
> 
> Without this change I get an error when trying to install as root from 
> within kdevelop:
> sudo: make install command not found
> 
> It probably passes "make install" as the command option to sudo, while 
> the command itself is "make".
> I can reproduce on a konsole as well:
> sudo "make install"
> sudo: make install: command not found

Hmm, I could swear that sudo "make install" worked this morning on my
laptop. It doesn't here at work and it does make sense that it doesn't.
 
> > Also it doesn't seem you've tested
> > this, at least my sudo doesn't have a clue about a -t or -c option.
> 
> Obviously I tested, as I use sudo to install KDE :). I can remove those 
> options when passing to sudo, as they are optional (hm, -t might be even 
> wrong indeed, -c is acceptable there).

~/src/build/kdevelop>sudo -t -c make install
usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-p prompt]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U username] [-u
username|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s]
            [<command>]
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
username|#uid] file ...
 
Same thing when only using one of the two options, so both need to be
removed when using plain sudo.

Andreas

-- 
Don't get to bragging.




More information about the KDevelop-devel mailing list