From: Luis Lavena Date: 2008-05-15T11:00:05+09:00 Subject: Re: Can platform agnosticism be achieved? On May 14, 9:42 pm, "ara.t.howard" wrote: > On May 14, 2008, at 4:51 PM, Albert Schlef wrote: > > > > > How to gain root priviledge is the user's own business. I may install > > Ruby in my home directory, where I have write access to everything. > > Putting 'sudo' thingies in Makefiles seems very wrong to me. Everybody > > knows that when you install a unix program you do 'sudo make > > install' or > > 'su -c "make install"' *yourself*. It's *not* in the Makefile. > > no, you should *never* do this. you should always do > > ./configure --prefix=prefix > make > sudo make install > > although it's perhaps what you meant. this is a key point, because > programs like gems do all three. if you were required to type > > sudo gem install > > then certain things will not work (yes i know that you currently are > required to do so) because gcc, ld, and other programs will silently > behave differently when run as root, sometimes ignoring certain > environment variables. the inverse is also true - you cannot make a > setuid binary as a regular user. things like se-linux make this even > more confusing and then there are programs which need to be compiled > and owned by a certain user, like www, but which can only be written > into system space as root. > > in short i really think the issue is windows not playing nice with > everyone else and that projects like msys, which shim the windows os > to be mostly posix compliant are the answer. consider that msys > addresses not only the sudo issue but the ar one, the gcc one, the ld > one, the bison one, the sh one, etc, etc, etc. > Hmmn, are you talking about MSYS? $ uname -a MINGW32_NT-5.1 KEORE 1.0.11(0.46/3/2) 2007-07-29 17:16 i686 Msys Luis@KEORE ~ $ sudo sh: sudo: command not found > for years i've personally always considered msys a requirement for any > windows/ruby development, along side a hand compiled ruby, precisely > because it gives not only ruby, but the tools ruby and it's programs > require to operate at full speed. > > that said any script which uses sudo should at *least* do > > SUDO = ENV['SUDO'] > > so users can turn it off or possibly do some sort of test like > > SUDO = system('sudo ls') ? 'sudo' : '' > > etc. > > anyhow, i feel your pain but think sudo the tip of a posix iceberg > more cleanly addressed outside of ruby. > Yes, and you can add that sudo is not even there for other Linux or *nix implementations, like Tiago exposed too. I think is user responsibility, again. Regards, -- Luis Lavena