Re: [gentoo-user] Am I wrong?..
I really don't see your problem. All that was needed here on my box was setting VIM as my editor of choice (I preferer to do that per-user so no setting of anything in rc or /etc/env.d) and VISUDO accepted it. No magic involved. Sebastian, I already fixed the problem for my local host. But I know other users have same problem. That's strange for me that you first login as root to use visudo program. What is the matter of having sudo then? Once again, try running sudo visudo as unprivileged user (that's right, sudo is used to make root stuff without logging with root ;-) ) -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Go to LFS, build it all, build emacs, set EDITOR to emacs, and run sudo visudo. Please. I have a rather good guess that you'll be, amazingly, using the default that was set at build time for the sane default editor, in LFS's case vim (whether called by that or the vi symlink to it), that the distro creators chose. That's right. But there are some reasons why visudo called so (do you see that short VI?), so the user should expect it to run using vim if it's present on system and the sudo is configured by default. That was put-up by sudo creator in vanilla package, though it's configured in compile time. OK. That default behaviour was changed. Without any notification, except bash comment, in sudo ebuild. Do you consider that to be right? -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?.. UPDATE
if I run a server with 50 users, 48 of which use emacs, one of which uses vim, and I choose to use pico, why should I be forced to use vi for it by default just because I have vim to satisfy someone else's desires? That's really funny, Joshua. Do you provide 50 users of your company with access to visudo? LOL For thouse who are interested in the ticket particulars, you may review it's copy here: http://www.rootshell.be/~spinal/gentoo_bug_report/286017.html I remind you, that an admin restricted the access to that ticket after users started to vote for it. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Joshua Murphy poiso...@gmail.com писал(а) в своём письме Fri, 02 Oct 2009 09:58:33 +0300: every Gentoo system has vi, there just isn't a direct symlink with that name to busybox. Wow, that's a really great problem. $ ln `which busybox` vi $ ./vi -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
A more sensible approach would be for the ebuild to check which ebuild satisfies the virtual/editor dependency and set that. Not clever. What if there are several editors installed? And, yes, I prefer VIM. And I don't like when the package which vanilla defaults were always to be using vim as editor is overwritten without any notifications and causing the enduser to investigate how to fix that. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Neil Bothwick n...@digimed.co.uk писал(а) в своём письме Fri, 02 Oct 2009 11:23:38 +0300: This problem could also be fixed by USE flags. Instead of whining why not submit a patch that has the ebuild respect the vanilla USE flag? Thanks for the idea. I will try this. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Once again, try running sudo visudo as unprivileged user (that's right, sudo is used to make root stuff without logging with root ;-) ) Ok, I comment out %wheel ALL=(ALL) ALL so that my user could use sudo visudo. Hey.. Great.. It started visudo with VIM. So again.. What are you complaining about?? Sebastian, I repeat especially for you once more: http://www.rootshell.be/~spinal/gentoo_bug_report/286017.html Just check what you did wrong. P.S. BTW, I send the patch for sudo to respect vanilla USE flag. The description you will find on link above.
Re: [gentoo-user] Am I wrong?.. UPDATE
OK. Now the latest update. 1) Here's a copy (just a copy, all links are useless) of bug report done by me. I was forced to copy that page to hosting because package maintainer restricted access to users who began to vote for this bug. +-==+ | http://www.rootshell.be/~spinal/gentoo_bug_report/286017.html | +===+ 2) Here's a link for the patch, that I attached to the patch in my last post: +===+ | http://www.rootshell.be/~spinal/gentoo_bug_report/sudo-resp-vanilla.patch | +===+ 3) And now the most interesting. I was banned by maintainer. Now I cannot access the ticket too. == Access Denied You are not authorized to access bug #286017. Please press Back and try again. == I think the maintainer was not aware about the bug report was copied to the hosting and about my posts in mail-list. Any ideas?.. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Oh, and your ebuild patch doesn't even bother to check the vim dependency. The vanilla USE flag is not global, it's local, man. And it doesn't force user to install vim. You may want to make symlink /usr/bin/vi - /bin/busybox instead. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
So, if it can't find vim, we should go fix that ourselves and that is acceptable, but if it can't find nano then that's unacceptable for you, did I get it right? Did you visit http://www.rootshell.be/~spinal/gentoo_bug_report/286017.html ? I was forced to offer the maintainer to respect at least vanilla sudo behaviour. You don't like something? Go ahead create a ticket and speak with Diego. -- Best regards, Spinal
[gentoo-user] Am I wrong?..
Hello, happy Gentoo users! I'm new on this distro, so I'm sorry if you consider to be stupid what I gonna say. Many of us prefer editors other than nano. Some of us believe in ideas of freedom and choice which Gentoo provides us with. But... There're ones who prefer primitive hardcoding over giving the enduser to choose. There're defaults set by someone, that you should respect. Because... Just because he wants so. Because you are nothing. Just another ungrateful user... An example? The package SUDO. It is one of the most mandatory packages in distro. But it totally ignores the enduser's favor in editing. It just hardcodes what the ebuild's maintainer decided. Once and forever. Do you want to remove nano from your system? DON'T DO THAT! Or you gonna get some issues, you shouldn't get, if the things work as expected. I just installed VIM with emerge, and removed nano because I considered it to be absolutely unnecessary in my system. Why I need nano? I am a VIM fan. And here the troubles begin... Run sudo visudo and you get this: ~ $ sudo visudo visudo: no editor found (editor path = /bin/nano) ~ $ env | grep -i edit EDITOR=/usr/bin/vim What a surprise! Hm... Possibly I did something wrong when setting my system, that terminates me with this error?.. So I was forced to spend my time analysing what is wrong with the package and how to fix that. Because I remember it was working as expected in my previous LFS (linuxfromscratch) system. My quests leaded me to the ebuild of sudo. And I saw this nice shiny line there: --with-editor=/bin/nano Stop. I don't use nano. I even don't have it! But the ebuild doesn't check if nano is installed. No care. It was just like said to me: Hey, you are just a stupid moron! Who removes default editor? He-he... I asked the ebuild maintainer to fix this behaviour. And what did he say? You should read manual page of sudo in order to make it work as expected. To make it respect your preferences. And I don't care what editor you prefer. Nano is Gentoo default editor!!! You understand? Stop boring me! I will not change anything! Ha-ha... Actually it was said in other words but the idea is same. Looks like the principle it just works is not for Gentoo users. If you don't agree with ignoring of your preferences, please vote for this bug: http://bugs.gentoo.org/votes.cgi?action=show_userbug_id=286017#vote_286017 P.S. Having defaults is not bad. But they should not override our favourites. Thank you. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Thanks for your replies, guys. 2. Change the default editor on your system by putting something in /etc/env.d: apollo ~ # cat /etc/env.d/99editor EDITOR=vim --Mike === spi...@supervisor ~ $ cat /etc/env.d/99editor # Configuration file for eselect # This file has been automatically generated. EDITOR=/usr/bin/vim spi...@supervisor ~ $ sudo visudo visudo: no editor found (editor path = /bin/nano) === The first option works fine, but ... how much time should the user spend to get things just work as expected? Yes, there are such geeks like me and you, who will spend his time doing what should already be done by maintainers. Look in the man page, it's far from obvious why isn't EDITOR variable respected. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
1. emerge -C nano 2. emerge vim 3. export EDITOR=`which vim` 4. Or do eselect editor - env-update ; or edit /etc/rc.conf - env-update 5. Reemerge sudo if you wish (it will not change anything) 6. Relogin 7. Run sudo visudo You get this: visudo: no editor found (editor path = /bin/nano) No I don't. I get /etc/sudoers loaded into joe, which is set in $EDITOR. You seem to be the only one suffering with this problem, so it seems reasonable to conclude that this is peculiar to your setup and that shouting at devs and other users will not fix it. I gonna bet you added magic line to your sudoers previously or make some other crutches to make it work: Defaults env_keep=EDITOR -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
I gonna bet you added magic line to your sudoers previously or make some other crutches to make it work: Defaults env_keep=EDITOR You lost that bet. Proof? Section 8.c of the Gentoo Handbook (called System Information) advises you to edit /etc/rc.conf to change your preferences. Daniel, I read the book carefully and did all that was need. Also I commented #EDITOR=/bin/nano And set EDITOR=/usr/bin/vim there Any more suggestions? -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
I'm using a 4 years old system, and if I change that line, log out and in again, it changes the env variable and everything works (that means the behavior is probably caused by your configuration). If visudo is still using that configuration, maybe that's because some configuration file has precedence over environment variables. In that case, you gotta find that file and change it. Not an easy task, anyway... I just did an grep -r /bin/nano in /etc. LOL, I know there's a better way, I'm just too lazy to look for it... Man, running sudo visudo and just running visudo is not the same. Be careful. Nano is hardcoded in sudo's ebuild. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
As the access to the bug was denied by the admin please use this link for discussion: http://forums.gentoo.org/viewtopic-t-795069.html Thanks. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
James Ausmus, I solved this proble long ago. I just curios, why it's not solved by portage? So the users should spend their time diggin in manuals to find why is sudo not working in Gentoo like it does in LFS or any other distro?.. Is this the Gentoo way or something? -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
Perhaps you should find a distribution more suited to your abilities/expectations. Clearly, Gentoo is not for you. Really? Do you just give up and eat what people tell you to eat? I don't respect such people, really. I prefer to change the things, that I think are not right. Obtruding the default editor (not just fallbacking but hardcoding) is bad tendency for sure.
Re: [gentoo-user] Am I wrong?..
Dirk Heinrichs dirk.heinri...@online.de писал(а) в своём письме Thu, 01 Oct 2009 22:45:40 +0300: Am Donnerstag 01 Oktober 2009 21:32:56 schrieb forgottenwizard: However, I'm also wondering why the ebuild doesn't make use of the EDITOR variable as was mentioned. Because that's the worst thing to do. An ebuild's behaviour should not depend on env variables (like it's still the case for this stupid grub ebuild), because the user never get's to see this. Oh, really? Snipped from sudo's ebuild: econf --with-secure-path=${ROOTPATH} What do you think about this line? There's an issue connected with that string by the way. You may want to check it: http://bugs.gentoo.org/show_bug.cgi?id=286014 The maintainer didn't even notice user about hardcoding ROOTPATH in sudo. And, even more, he didn't check that manual page is saying that secure_path is unset by default. And again I (the enduser) was forced to go check the ebuilds to see why sudo doesn't work as expected. -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
James Ausmus james.aus...@gmail.com писал(а) в своём письме Thu, 01 Oct 2009 22:04:38 +0300: The Gentoo Way of doing things is to stick as close to vanilla upstream as possible, and to enable you to have complete control over your box, including configurations. In other words, if you want something configured differently than vanilla, you have to do the work. James, what vanilla are you speaking about? I used vanilla sudo in my LinuxFromScratch system for several years and I nevert noticed that VIsudo tries to force me with some other editor than VI. Maybe it's called VIsudo because VIM is better alternative for VANILLA, hah? I think it's most reasonably to omit that hardcoding line from ebuild. I'm sure visudo will notice the user about what should be done to make it work as expected and that's better behaviour than complaining about missing /bin/nano, don't u think so?
Re: [gentoo-user] Am I wrong?..
I would be hesitant to use a user-specific variable like EDITOR to define the system-wide default on an ebuild. For example, what if my EDITOR was set to gvim or emacs when I installed sudo, then some other remote user tried to run visudo over ssh? Consider that gvim will be just a fallback, as said before. And at least visudo will not complaint about missing gvim binary... The worst thing that can happen, it will just complaint about missing X server on the local side. Though, it's better than complaining about missing binary that was not supposed by enduser to be in place at all... It's like, oh, please you install nano, or I refuse to run. Obtrusively, no? -- Best regards, Spinal
Re: [gentoo-user] Am I wrong?..
You appear to be demonstrating that you don't fully understand the problem: 828 ~ $ grep nano /usr/portage/app-admin/sudo/sudo-1.7.2_p1.ebuild # XXX: /bin/vi may not be available, make nano visudo's default. --with-editor=/bin/nano \ How so? That config option for sudo sets the DEFAULT editor, what to use if nothing is defined in the config file or environment variable. That's what both my text and the portion of the ebuild that you have quoted state. It in no way forces the use of nano in order to use visudo. If that were the case, DEPENDS would specify nano instead of accepting virtual/editor. Agree. There's no need in making vim as depends. But in other hand in vanilla sudo package there's VI hardcoded by default. And MOST if not ALL users who have VIM installed on their shiny Gentoo systems expect that VIsudo will behave as it did for long tim ago. There are historical (or some other) reasons for making VI default editor for this utility. It's like they don't respect not only endusers favours but the developers' too, no? WHY NOT CHECK if vim binary is in place and ONLY THEN (when it's obviously absent) hardcode the Gentoo Best Award of Choice Editor? I repeat once more. Every user who has VIM installed on theirs systems is forced to do extra configuration, to make sudo work as expected, just because someone prefer other editor and thinks that vanilla choice is bad. Isn't that just stupid? -- Best regards, Spinal