Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Volker Armin Hemmann
On Freitag 02 Oktober 2009, Arthur D. wrote:
  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?
 

why is it always vim users who get their panties in a knot about nothing?

just set EDITOR, you are done. 

You might be surprised to know, that most people do not have vim installed. 
But you are forcing others to adhere to something?

Things change. Maybe vim users should realize that too



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Sebastian Beßler
Am 02.10.2009 07:29, schrieb Arthur D.:

 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?

I have VIM installed, set as default editor via EDITOR=/usr/bin/vim in
my /root/bashrc. If I run VISUDO as root (I never use sudo so all there
is vanilla and so my user can't use sudo visudo) runs it with VIM.

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.

Greetings

Sebastian



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Albert Hopkins
On Fri, 2009-10-02 at 08:06 +0200, Volker Armin Hemmann wrote:
 why is it always vim users who get their panties in a knot about
 nothing?
 
You are likely wrong about this.  I'm willing to bet that a lot of
people, even people responding to this thread, are vim users.  However
most of us know how to set an environment variable.

What you are witnessing is one person trolling and purporting that it is
always vim users.

 just set EDITOR, you are done. 
 
 You might be surprised to know, that most people do not have vim
 installed. 
 But you are forcing others to adhere to something?
 
 Things change. Maybe vim users should realize that too

I've actually never heard of any veteran Gentoo users who use vim
complain about anything.  Gentoo is *very* friendly to vim, just look
at /usr/portage/app-vim.  Maybe I've been completely blind but in the 7
years I've been using Gentoo this is the first time I've heard a vim
user get their panties in a knot and this can be easily discounted as
trollage.

So perhaps your apparent frustration is misdirected?






Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread Joshua Murphy
2009/10/2 Arthur D. spinal...@mail.ru:
 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

And everyone who has emacs has to do extra work too, in order to get
sudo to respect their chosen editor. Changing the default fallback for
visudo when the environment variable isn't defined will add in further
dependencies and/or put a dependency on a package that can't be
reasonably assumed to be on the system in the near future. You're not
being forced to do more work because you use vim, you're doing more
work because you remove the sane default editor from the system. As
does everyone removing nano and using pico and... how many others?
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. Or if you vary from
the instructions, choosing some other editor at sudo's build time,
you'll be running that. The ebuild does the logical thing in choosing
an editor that a) is in place by default and b) is less likely to be
on the system or off the system by the admin's whim. Most leave the
default in place. I suppose, really, the only more guaranteed editor
would be busybox vi ... because VERY few go about breaking the
default tools built into busybox... but what would that leave the many
who use nano by default, as... it IS the distro default, to do?
Compared to nano, vi (let alone a bare minimal vi like is in busybox)
is a pain to use for a person who's never seen it before.

Also, randomly, I could be wrong here, not being a sudo user myself
outside of my ubuntu laptop... but if you look into sudo ... it drops
the environment, aside from those chosen specifically to be preserved
by root, through its configuration, as a security measure. It's not an
ebuild problem, it's not a 'defaults' problem. From what you seem to
see as 'proper' behavior for sudo, it's an upstream security decision
problem.

-- 
Poison [BLX]
Joshua M. Murphy
Yet another vim user.



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Joshua Murphy
On Fri, Oct 2, 2009 at 2:30 AM, Joshua Murphy poiso...@gmail.com wrote:
 2009/10/2 Arthur D. spinal...@mail.ru:
 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

 And everyone who has emacs has to do extra work too, in order to get
 sudo to respect their chosen editor. Changing the default fallback for
 visudo when the environment variable isn't defined will add in further
 dependencies and/or put a dependency on a package that can't be
 reasonably assumed to be on the system in the near future. You're not
 being forced to do more work because you use vim, you're doing more
 work because you remove the sane default editor from the system. As
 does everyone removing nano and using pico and... how many others?
 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. Or if you vary from
 the instructions, choosing some other editor at sudo's build time,
 you'll be running that. The ebuild does the logical thing in choosing
 an editor that a) is in place by default and b) is less likely to be
 on the system or off the system by the admin's whim. Most leave the
 default in place. I suppose, really, the only more guaranteed editor
 would be busybox vi ... because VERY few go about breaking the
 default tools built into busybox... but what would that leave the many
 who use nano by default, as... it IS the distro default, to do?
 Compared to nano, vi (let alone a bare minimal vi like is in busybox)
 is a pain to use for a person who's never seen it before.

 Also, randomly, I could be wrong here, not being a sudo user myself
 outside of my ubuntu laptop... but if you look into sudo ... it drops
 the environment, aside from those chosen specifically to be preserved
 by root, through its configuration, as a security measure. It's not an
 ebuild problem, it's not a 'defaults' problem. From what you seem to
 see as 'proper' behavior for sudo, it's an upstream security decision
 problem.

 --
 Poison [BLX]
 Joshua M. Murphy
 Yet another vim user.


Oh! and 2 more things.

1) In answer to the subject-posed question (in case it wasn't clear in
my post just above)... yes.

2) And... your problem shouldn't be with the default set in the
ebuild, but rather, the lack of a sed line in the ebuild to adjust
sudo's initial configuration to retain, at the least, the EDITOR
environment variable. That would, were the answer to your
subject-posed question anything other than an unequivocal yes, be the
most universal resolution to the problem that you seem to think exists
in the setup as it is now. No ebuild should depend on an environment
variable like EDITOR at build time if they can, even remotely, avoid
it. That would require a rebuild every time the environment variable
changed and... that would be rather jarring to say the least.

-- 
Poison [BLX]
Joshua M. Murphy



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread Joshua Murphy
2009/10/2 Arthur D. spinal...@mail.ru:
 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

Since the upstream default and the, clearly stated multiple places
(and equally clearly stated chances of it changing in the near
future), distro default differ, yes. It shouldn't be strange that a
package, when it's out of options (and given the stripping of
environment done by sudo itself, it very much is in the given
circumstances), uses the distro-defined defaults. I repeat myself from
before... every Gentoo system has vi, there just isn't a direct
symlink with that name to busybox. And.. it's called so because it
uses a visual editor, which is all vi in vi/vim means and I'd
presume is all it really means in visudo's name. That the package
upstream uses vi by default goes back to the days when the two base
options were vi and emacs... and let's face it, visudo is far easier
to type than emacssudo. Nano is a visual editor, emacs, joe, pico..
all of those are too. Interestingly, it *could* use a line, rather
than visual, editor, if that were set as the default... but I get the
feeling nearly everyone here would be wholly lost using ed (a
perfectly valid and capable editor, incidentally). As a counter
argument to it defaulting to using vi if vi/vim is installed ... 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?

--
Poison [BLX]
Joshua M. Murphy



Re: [gentoo-user] Am I wrong?.. UPDATE

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread Arthur D.
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?..

2009-10-02 Thread Neil Bothwick
On Fri, 02 Oct 2009 08:29:30 +0300, Arthur D. wrote:

 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?

In your world, every user who does not have vim installed has to do extra
work, but I guess non-vim users don't count.

You are not trying to fix your problem, you are only taking the NIMBY
approach.


-- 
Neil Bothwick

Everything's back to normal. Damn.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Neil Bothwick
On Thu, 1 Oct 2009 19:34:25 -0500, forgottenwizard wrote:

 So instead it should set a non-existant editor to the configured
 default?

Nano is not non-existent by default.

 Another variable in make.conf may be a reasonable fix for this though
 I'm sure someone will bitch about having to set $EDITOR twice on their
 system.

A more sensible approach would be for the ebuild to check which ebuild
satisfies the virtual/editor dependency and set that. If the OP really
cared about this problem he'd investigate providing such solutions
instead of ranting about how Gentoo does not use his editor of choice by
default.


-- 
Neil Bothwick

.sig a .sog of sixpence.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Neil Bothwick
On Fri, 02 Oct 2009 09:44:26 +0300, Arthur D. wrote:

 That's right. But there are some reasons why visudo called so (do you
 see that short VI?),

What are those reasons?

Do they apply to Gentoo?

Is it possible that this is simply because the original coder used vi? Or
perhaps to maintain the naming convention or vipw etc? Neither of those
are reasons to force installation on a non-standard editor.


-- 
Neil Bothwick

Try to be the best of whatever you are, even if what you are is no good.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?.. UPDATE

2009-10-02 Thread Neil Bothwick
On Fri, 02 Oct 2009 10:17:26 +0300, Arthur D. wrote:

 I remind you, that an admin restricted the access to that ticket after  
 users started to vote for it.

Unless the reason for restriction was stated, your implication of
causality is invalid.


-- 
Neil Bothwick

Plagarism prohibited. Derive carefully.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread Neil Bothwick
On Fri, 02 Oct 2009 11:15:09 +0300, Arthur D. wrote:

  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?

Choose the most appropriate from a defined list.

 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.

Would you have the same argument if the vanilla default was emacs and the
ebuild changed it to vim? All you're complaining about is that a distro
that expects users to configure everything for themselves is expecting
you to add one line to a config file.

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?


-- 
Neil Bothwick

Everybody needs a little love sometime; stop hacking and fall in love!


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 09:07:20AM +0100, Neil Bothwick wrote:
 On Thu, 1 Oct 2009 19:34:25 -0500, forgottenwizard wrote:
 
  So instead it should set a non-existant editor to the configured
  default?
 
 Nano is not non-existent by default.
 

It isn't always on the users sytem. Providing a non-existent default
seems quite broken to me.

  Another variable in make.conf may be a reasonable fix for this though
  I'm sure someone will bitch about having to set $EDITOR twice on their
  system.
 
 A more sensible approach would be for the ebuild to check which ebuild
 satisfies the virtual/editor dependency and set that. If the OP really
 cared about this problem he'd investigate providing such solutions
 instead of ranting about how Gentoo does not use his editor of choice by
 default.
 
 
 -- 
 Neil Bothwick
 
 .sig a .sog of sixpence.

The problem there would be if multiple editors provide virtual/editor
(such as on my system, which has both vim and ed installed). The ebuild
trying to automagically select what should be the default editor is a
bad idea, if not just horrible.




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Sebastian Beßler
Am 02.10.2009 08:25, schrieb Arthur D.:
 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?

Maybe you should READ what people write BEFORE you answer.
I have written that I started it from root because I never before used
sudo on my system so that my non-root-user can't use sudo visudo.

 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??

Greetings

Sebastian



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.
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?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 09:23:38AM +0100, Neil Bothwick wrote:
 On Fri, 02 Oct 2009 11:15:09 +0300, Arthur D. wrote:
 
  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.
 
 Would you have the same argument if the vanilla default was emacs and the
 ebuild changed it to vim? All you're complaining about is that a distro
 that expects users to configure everything for themselves is expecting
 you to add one line to a config file.
 
 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?
 

USE flags is nice, except ls /usr/portage/app-editors/ | wc -l returns
76 packages (give or take a file or two). So we are looking at, uh, ~75
USE flags for the sudo ebuild, no counting the editors which aren't in
app-editor (like ed, which resides in sys-apps instead of app-editor).

The number of USE flags would be quite impressive for such a small
package.




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Sebastian Beßler
Am 02.10.2009 10:52, schrieb forgottenwizard:
 On Fri, Oct 02, 2009 at 09:07:20AM +0100, Neil Bothwick wrote:
 On Thu, 1 Oct 2009 19:34:25 -0500, forgottenwizard wrote:

 So instead it should set a non-existant editor to the configured
 default?

 Nano is not non-existent by default.

 
 It isn't always on the users sytem. Providing a non-existent default
 seems quite broken to me.

By DEFAULT it is on EVERY Gentoo-system.
If you CHOOSE to remove the default then you have to be prepared that
something may be broken after that.

You could never be certain that anything set as default is existent on
the system. Even if a distro would remove the possibility to uninstall
the default with the help of the package manager so is there always rm

So every default could be a non-existent default.

Greetings

Sebastian



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Dale
Arthur D. wrote:
 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.



The link to the patch doesn't work.  It did give a nice 404 error tho. 
;-)  Got to love those.

Dale

:-)  :-)



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 11:08:08AM +0200, Sebastian Be?ler wrote:
 Am 02.10.2009 10:52, schrieb forgottenwizard:
  It isn't always on the users sytem. Providing a non-existent default
  seems quite broken to me.
 
 By DEFAULT it is on EVERY Gentoo-system.
 If you CHOOSE to remove the default then you have to be prepared that
 something may be broken after that.
 
 You could never be certain that anything set as default is existent on
 the system. Even if a distro would remove the possibility to uninstall
 the default with the help of the package manager so is there always rm
 
 So every default could be a non-existent default.


So then I should keep everything installed on my system just in case it
might break a package in the future?

There have been ways mentioned that this can be solved. If nothing else
there should be a warning (and possibly a dependency) that nano IS the
default editor for sudo, whether you like it or not.




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Sebastian Beßler
Am 02.10.2009 11:04, schrieb forgottenwizard:

 The number of USE flags would be quite impressive for such a small
 package.

a vanilla-flag could be possible that disables every changes to the
upstream-package.

It even exists atm for a number of packages

metat...@darkstation ~ $ euse -i vanilla
global use flags (searching: vanilla)

[-] vanilla - Do not add extra patches which change default
behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of the
meaning changes drastically

Greetings

Sebastian





Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Neil Bothwick
On Fri, 2 Oct 2009 04:04:30 -0500, forgottenwizard wrote:

  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? 

 USE flags is nice, except ls /usr/portage/app-editors/ | wc -l returns
 76 packages (give or take a file or two). So we are looking at, uh, ~75
 USE flags for the sudo ebuild, no counting the editors which aren't in
 app-editor (like ed, which resides in sys-apps instead of app-editor).

It helps if you read what you are replying to. I suggested the use of
one, existing, USE flag, to address this trivial issue.


-- 
Neil Bothwick

Electricians DO IT until it Hz...


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Neil Bothwick
On Fri, 2 Oct 2009 03:52:24 -0500, forgottenwizard wrote:

  Nano is not non-existent by default.

 It isn't always on the users sytem. Providing a non-existent default
 seems quite broken to me.

That's true of every editor, so you have to choose the one that is most
likely to be there, the one that is installed for the stage tarballs and
is there unless the user has taken specific steps to remove it.

  A more sensible approach would be for the ebuild to check which ebuild
  satisfies the virtual/editor dependency and set that. If the OP really
  cared about this problem he'd investigate providing such solutions
  instead of ranting about how Gentoo does not use his editor of choice
  by default.

 The problem there would be if multiple editors provide virtual/editor
 (such as on my system, which has both vim and ed installed). The ebuild
 trying to automagically select what should be the default editor is a
 bad idea, if not just horrible.

You can't have it both ways. You want the program to default to an editor
that is guaranteed to be there, at least at installation time, yet the
only one that satisfies that is virtual/editor. It's only a default, it
only has to be available the first time you run the program, whether
it's your favourite editor or not. If you only want to use default
configurations without making any changes to suit yourself, I suggest you
may be better served by a distro that is a little browner.


-- 
Neil Bothwick

Gravity isn't easy, but it's the law.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 11:21:08AM +0200, Sebastian Be?ler wrote:
 Am 02.10.2009 11:04, schrieb forgottenwizard:
 
  The number of USE flags would be quite impressive for such a small
  package.
 
 a vanilla-flag could be possible that disables every changes to the
 upstream-package.
 
 It even exists atm for a number of packages
 
 metat...@darkstation ~ $ euse -i vanilla
 global use flags (searching: vanilla)
 
 [-] vanilla - Do not add extra patches which change default
 behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of the
 meaning changes drastically
 
 Greetings
 
 Sebastian
 
 
 

insert emacs user whining

Thats an option, but seems to be a poor one. All that will do is let you
use either vi(m) or nano for the default, which for emacs users will be
no diffrent than the current problem.




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 10:29:08AM +0100, Neil Bothwick wrote:
 On Fri, 2 Oct 2009 03:52:24 -0500, forgottenwizard wrote:
 
   Nano is not non-existent by default.
 
  It isn't always on the users sytem. Providing a non-existent default
  seems quite broken to me.
 
 That's true of every editor, so you have to choose the one that is most
 likely to be there, the one that is installed for the stage tarballs and
 is there unless the user has taken specific steps to remove it.

Or you could try to find a suitable default intelligently instead of
blindly compiling in a default that may or may not exist. Worse still is
blindly doing so without telling the user.

   A more sensible approach would be for the ebuild to check which ebuild
   satisfies the virtual/editor dependency and set that. If the OP really
   cared about this problem he'd investigate providing such solutions
   instead of ranting about how Gentoo does not use his editor of choice
   by default.
 
  The problem there would be if multiple editors provide virtual/editor
  (such as on my system, which has both vim and ed installed). The ebuild
  trying to automagically select what should be the default editor is a
  bad idea, if not just horrible.
 
 You can't have it both ways. You want the program to default to an editor
 that is guaranteed to be there, at least at installation time, yet the
 only one that satisfies that is virtual/editor. It's only a default, it
 only has to be available the first time you run the program, whether
 it's your favourite editor or not. If you only want to use default
 configurations without making any changes to suit yourself, I suggest you
 may be better served by a distro that is a little browner.

And if you, say, have two editors installed that satisfy virtual/editor?




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Sebastian Beßler
Am 02.10.2009 11:29, schrieb forgottenwizard:

 insert emacs user whining
 
 Thats an option, but seems to be a poor one. All that will do is let you
 use either vi(m) or nano for the default, which for emacs users will be
 no diffrent than the current problem.

joke
If you use emacs then you are to far away to be helped ;-)
/joke

Then maybe a custom_editor-flag that inserts

Defaultsenv_keep += EDITOR VISUAL PAGER

to /etc/sudoers

With that even emacs users would be satisfied.

Greetings

Sebastian



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Sebastian Beßler
Am 02.10.2009 11:40, schrieb Sebastian Beßler:
 Am 02.10.2009 11:29, schrieb forgottenwizard:
 
 insert emacs user whining

 Thats an option, but seems to be a poor one. All that will do is let you
 use either vi(m) or nano for the default, which for emacs users will be
 no diffrent than the current problem.
 
 joke
 If you use emacs then you are to far away to be helped ;-)
 /joke
 
 Then maybe a custom_editor-flag that inserts
 
 Defaultsenv_keep += EDITOR VISUAL PAGER
 
 to /etc/sudoers
 
 With that even emacs users would be satisfied.

After thinking about that..
To use such a flag the admin has to know what it does and then he can
also add Defaultsenv_keep += EDITOR VISUAL PAGER to
/etc/sudoers instead of adding app-editors/vim custom-editor to
/etc/portage/package.use

So there is no need for such a use-flag because it don't saves any work.
Adding a line is adding a line.

Greetings

Sebastian




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Volker Armin Hemmann
On Freitag 02 Oktober 2009, forgottenwizard wrote:
 On Fri, Oct 02, 2009 at 10:29:08AM +0100, Neil Bothwick wrote:
  On Fri, 2 Oct 2009 03:52:24 -0500, forgottenwizard wrote:
Nano is not non-existent by default.
  
   It isn't always on the users sytem. Providing a non-existent default
   seems quite broken to me.
 
  That's true of every editor, so you have to choose the one that is most
  likely to be there, the one that is installed for the stage tarballs and
  is there unless the user has taken specific steps to remove it.
 
 Or you could try to find a suitable default intelligently instead of
 blindly compiling in a default that may or may not exist. Worse still is
 blindly doing so without telling the user.
 
A more sensible approach would be for the ebuild to check which
ebuild satisfies the virtual/editor dependency and set that. If the
OP really cared about this problem he'd investigate providing such
solutions instead of ranting about how Gentoo does not use his editor
of choice by default.
  
   The problem there would be if multiple editors provide virtual/editor
   (such as on my system, which has both vim and ed installed). The ebuild
   trying to automagically select what should be the default editor is a
   bad idea, if not just horrible.
 
  You can't have it both ways. You want the program to default to an editor
  that is guaranteed to be there, at least at installation time, yet the
  only one that satisfies that is virtual/editor. It's only a default, it
  only has to be available the first time you run the program, whether
  it's your favourite editor or not. If you only want to use default
  configurations without making any changes to suit yourself, I suggest you
  may be better served by a distro that is a little browner.
 
 And if you, say, have two editors installed that satisfy virtual/editor?
 

then the more sensible one should be used by default.

Lets see:
nano, built in help, easy to use, small, good enough for most edits.

vim, whatthefuckisthatcrap? how do I quit this monstrum? what happened now? 
MODES?

nano wins, hands down. Because every idiot can use it long enough to edit the 
files needed to make vim default.



Re: [gentoo-user] Am I wrong?.. UPDATE

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 11:40:33AM +0200, Sebastian Be?ler wrote:
 Am 02.10.2009 11:29, schrieb forgottenwizard:
 
  insert emacs user whining
  
  Thats an option, but seems to be a poor one. All that will do is let you
  use either vi(m) or nano for the default, which for emacs users will be
  no diffrent than the current problem.
 
 joke
 If you use emacs then you are to far away to be helped ;-)
 /joke
At least 8 megs of RAM isn't a problem anymore.

 
 Then maybe a custom_editor-flag that inserts
 
 Defaultsenv_keep += EDITOR VISUAL PAGER
 
 to /etc/sudoers
 
 With that even emacs users would be satisfied.
 
 Greetings
 
 Sebastian
 

Didn't the maintainer/dev that was dealing with the bug say that he
wouldn't do that because it was insecure?

That also doesn't fix the problem that sudo thinks that nano is a safe
fallback.

How about a custom_editor flag, as you suggested, then an EDITOR
variable in make.conf? Thats the only way I could see being able to
solve this problem without invariably screwing someone. This would
provide a fairly sane default while giving the user the choice to use
something else.




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Neil Bothwick
On Fri, 2 Oct 2009 04:36:47 -0500, forgottenwizard wrote:

   It isn't always on the users sytem. Providing a non-existent default
   seems quite broken to me.
  
  That's true of every editor, so you have to choose the one that is
  most likely to be there, the one that is installed for the stage
  tarballs and is there unless the user has taken specific steps to
  remove it.
 
 Or you could try to find a suitable default intelligently instead of
 blindly compiling in a default that may or may not exist. Worse still is
 blindly doing so without telling the user.

The user is told. the handbook clearly explains how and why to set
EDITOR. nano is only used when EDITOR cannot be found, in other words its
a suitable default for a broken system.

 And if you, say, have two editors installed that satisfy virtual/editor?

How is this a problem? As long as a working editor is available to edit
sudoers, nothing else is important, because once you are editing sudoers
you can change the default in there.

I fail to see why this is an issue in the first place, if you can set and
environment variable or add a single line to a config file, you really
should reconsider your choice of distro.

At least I've learned one thing from this thread, I didn't even know that
visduo had a built-in default choice of editor, mainly because it's
always used the one I wanted it to.


-- 
Neil Bothwick

Deja Foobar: A feeling of having made the same mistake before.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Jesús Guerrero
This thread is really out of control, I doubt anything useful can be born
here, we are just running circles around a chair.

On Fri, 2 Oct 2009 04:54:42 -0500, forgottenwizard
phrexianrea...@hushmail.com wrote:
 On Fri, Oct 02, 2009 at 11:40:33AM +0200, Sebastian Be?ler wrote:
 Am 02.10.2009 11:29, schrieb forgottenwizard:
 
 Then maybe a custom_editor-flag that inserts
 
 Defaultsenv_keep += EDITOR VISUAL PAGER
 
 to /etc/sudoers
 
 With that even emacs users would be satisfied.
 
 Greetings
 
 Sebastian
 
 
 Didn't the maintainer/dev that was dealing with the bug say that he
 wouldn't do that because it was insecure?
 
 That also doesn't fix the problem that sudo thinks that nano is a safe
 fallback.

The problem is not in the editor, that's just one of the thousand
assumptions people make here that are incorrect. The developers were rather
pointing at the use of keep_env in the sudoers file, which is indeed risky,
and the usage of external variables in the ebuild, which is also not only
insecure, but very bad from every single viewpoint that I can think of.

And anyway, it's true that vimOS and emacOS are not the sanest and more
secure editors for config file, since they can do everything, and a bad
user config for any of these (specially emacs I gues) can put your system
at risk easier than nano could ever, because nano simply has not the needed
capabilities to act as a nuclear bomb. But as said, that wasn't the point
of the developers.

 How about a custom_editor flag, as you suggested, then an EDITOR
 variable in make.conf? Thats the only way I could see being able to
 solve this problem without invariably screwing someone. This would
 provide a fairly sane default while giving the user the choice to use
 something else.

That would be the only way that it would make sense to me. Just like we
have VIDEO_CARDS, some GENTOO_EDITOR variable would be nice for this. But
ebuilds and eclasses would need to be aware of this to push the correct
dependencies. It's not that trivial to addapt portage to a new portage
variable. The USE flag idea is non-viable and doesn't make sense.

It really isn't a big deal to configure yourself anyways. So unless some
developer is interested in this, I doubt they are going to do the job
unless some pristine and already working patch is sent to them, and someone
is willing to work on a collaborative way, and not just throwing
the-editor-I-preffer blindingly in the sudo ebuild.

-- 
Jesús Guerrero



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Neil Bothwick
On Fri, 02 Oct 2009 12:09:23 +0200, Jesús Guerrero wrote:

 The USE flag idea is non-viable and doesn't make sense.

Why not? The flag already exists for the very purpose the OP raised.


-- 
Neil Bothwick

PC DOS Error #01: Windows loading, come back tomorrow


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Jesús Guerrero
On Thu, 01 Oct 2009 23:12:36 +0300, Arthur D. spinal...@mail.ru wrote:
 James Ausmus james.aus...@gmail.com писал(а) в своём письме Thu, 01
Oct 
 
 2009 22:04:38 +0300:
 
 VI.
 Maybe it's called VIsudo because VIM is better alternative for VANILLA, 

 hah?

Maybe we should stick to the old devfs stuff instead of udev, because the
names matches. Maybe we should use fam as our file alteration monitor
instead of the newest gaim, because the names matches. Maybe we should
continue using xfree86 because a lot of tools are still named the xf* way.
Let's assume it: each distro has its defaults and times change. The origin
of the name of visudo is at best an extremely poor argument.

 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?

No, Gentoo assumes nano as a safe default. If you are ripping something
that's part of the base installation (in fact, it's part of the system
package set) then you should be prepared to handle it yourself. There's a
default editor just like there's a default syslogger, a default cron daemon
and a default package manager. Maybe we should also start debating about
there. Maybe, and following your logic, it would be better to set as
default something that might not even be installed because the first two
letter of vim and visudo are the same. 

If you truly want to find a solution, you will have to dig much deeper
than that, and not just put your preferred editor instead of the one that
comes in the gentoo stage files in the ebuild, because that's simply not
acceptable. Oh, and your ebuild patch doesn't even bother to check the vim
dependency. Oh, and to set a default is not the same than hardcoding.
They are very different concepts. All the programs have defaults on their
config files.

Assume it, your vim zealotry is getting in the middle. Try to look at it
from a distant perspective. Then let the ideas rest a couple of days and
come back if you have a proper suggestion other than set my beloved vim as
default.

-- 
Jesús Guerrero



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Dale
Volker Armin Hemmann wrote:

 then the more sensible one should be used by default.

 Lets see:
 nano, built in help, easy to use, small, good enough for most edits.

 vim, whatthefuckisthatcrap? how do I quit this monstrum? what happened now? 
 MODES?

 nano wins, hands down. Because every idiot can use it long enough to edit the 
 files needed to make vim default.


   

I agree with this.  Even *I* can use nano.  That says a lot right
there.  That is also pretty much what I said, same meaning anyway, when
I first saw vi.  It took me a bit to get out of that thing too. 

Dale

:-)  :-) 



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.

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?..

2009-10-02 Thread Jesús Guerrero
On Fri, 2 Oct 2009 11:21:53 +0100, Neil Bothwick n...@digimed.co.uk
wrote:
 On Fri, 02 Oct 2009 12:09:23 +0200, Jesús Guerrero wrote:
 
 The USE flag idea is non-viable and doesn't make sense.
 
 Why not? The flag already exists for the very purpose the OP raised.

Oh, you meant vanilla, sorry, I was talking about the other idea that I
read on I don't know which mail before about USE flags to set different
editors, which is not viable at all.

I'd have nothing against the vanilla flag, but surely everyone will want
a flag for their preferred editor. Using a var in make.conf is absolutely
better in my opinion, but as said, this is non-trivial. Portage would need
to adjust the dependencies, it's not as easy as to throw a random string
into the ebuild.

-- 
Jesús Guerrero



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Jesús Guerrero
On Fri, 02 Oct 2009 13:35:47 +0300, Arthur D. spinal...@mail.ru wrote:
 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.

That's irrelevant. Each ebuild should sort its dependencies. The scope of
the use flags is irrelevant.

 And it doesn't force user to install vim.
 You may want to make symlink /usr/bin/vi - /bin/busybox instead.

Right, you were complaining because it didn't work out of the box, but now
you don't care about that?

I fail to understand that reasoning. Oh, yes, I understand it: it doesn't
matter because *you* have vim installed so it won't bother you. 

I'd like to see why for you it's acceptable to symlink a file manually but
it's not acceptable to configure sudo... I also wonder what's the
difference between sudo complaining that it can be find nano and sudo
complaining that it can't find vim. 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?
-- 
Jesús Guerrero



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Arthur D.

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



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Jesús Guerrero
On Fri, 02 Oct 2009 13:57:44 +0300, Arthur D. spinal...@mail.ru wrote:
 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 ?

Obviously I did. Otherwise I couldn't have commented on your patch for the
ebuild. I also posted in that bug in case you missed it.

 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.

I don't have to open any bug this time, I am not the one that's not happy
with sudo. ;)
-- 
Jesús Guerrero



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread forgottenwizard
On Fri, Oct 02, 2009 at 12:09:23PM +0200, Jes??s Guerrero wrote:
 On Fri, 2 Oct 2009 04:54:42 -0500, forgottenwizard
 phrexianrea...@hushmail.com wrote:
  How about a custom_editor flag, as you suggested, then an EDITOR
  variable in make.conf? Thats the only way I could see being able to
  solve this problem without invariably screwing someone. This would
  provide a fairly sane default while giving the user the choice to use
  something else.
 
 That would be the only way that it would make sense to me. Just like we
 have VIDEO_CARDS, some GENTOO_EDITOR variable would be nice for this. But
 ebuilds and eclasses would need to be aware of this to push the correct
 dependencies. It's not that trivial to addapt portage to a new portage
 variable. The USE flag idea is non-viable and doesn't make sense.
 
 It really isn't a big deal to configure yourself anyways. So unless some
 developer is interested in this, I doubt they are going to do the job
 unless some pristine and already working patch is sent to them, and someone
 is willing to work on a collaborative way, and not just throwing
 the-editor-I-preffer blindingly in the sudo ebuild.
 
 -- 
 Jes??s Guerrero
 

Set an EDITOR var in make.conf, then set a USE-flag for sudo to honor
this setting. If you set EDITOR to a valid atom (app-admin/vim, for
example), then you may be able to use that as a direct dependency, or
have the ebuild spit out a warning that $EDITOR isn't installed if that
is the case.

I'm not suggesting a USE-flag for everything, but more as a simple
switch that tells the ebuild to use the users settings instead of the
distro default.




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Mike Edenfield

On 10/2/2009 1:29 AM, Arthur D. wrote:


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


So basically, you're entire silly argument boils down to I 
don't like nano, make it go away.


And yes, I also don't like nano, don't have it installed, 
and use vim for everything.  Shockingly enough, visudo works 
*exactly the way I want*. So lets not go lumping most if 
not all users who have vim into your little rant.  If I had 
to venture a guess, I'd say most, if not all, users who 
managed to get vim installed and nano removed are more than 
capable of configuring sudo appropriately.


--Mike



Re: [gentoo-user] Am I wrong?.. UPDATE

2009-10-02 Thread Etaoin Shrdlu
On Friday 02 October 2009 10:53:37 Arthur D. wrote:

=+ 3) And now the most interesting. I was banned by maintainer. Now I cannot
 access the ticket too.

Strange, uh?




Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Daniel da Veiga
2009/10/2 Mike Edenfield kut...@kutulu.org:
 On 10/2/2009 1:29 AM, Arthur D. wrote:

 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

 So basically, you're entire silly argument boils down to I don't like nano,
 make it go away.

 And yes, I also don't like nano, don't have it installed, and use vim for
 everything.  Shockingly enough, visudo works *exactly the way I want*. So
 lets not go lumping most if not all users who have vim into your little
 rant.  If I had to venture a guess, I'd say most, if not all, users who
 managed to get vim installed and nano removed are more than capable of
 configuring sudo appropriately.


Exactly.
Let's stop the flame (yeah, its all flame as this is HIS problem, and
we'll never change his mind).

SIMPLE:

Stage3 is the default way to install Gentoo.
Nano is in stage3.
Nano supplies EDITOR.
Sudo needs EDITOR.
Hardcode what we are SURE to have (nano).
Change de default if you don't like it (EDITOR variable or sudoers
file, or whatever of the dozen choices you have).

-- 
Daniel da Veiga



Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Albert Hopkins
This is an interesting thread to analyze, even though 90.9% of it is
basically BS and flaming.

I actually can side a little bit with the OP.  But as a user of Gentoo,
vi and sudo.

If it were all up to me, I'd have visudo look at EDITOR and fail if it
doesn't exist.  But this is likely not the aim of upstream.  The name
*vi*sudo implies a partiality to vi.

However Gentoo uses nano as the default editor, and so I can understand
why the maintainer may feel that changing the default to nano in the
ebuild makes sense.  If you drop Gentoo on a box and install sudo then
by default nano will be there and vi won't.  So I'm not going to argue
with that.

Still vi is a safe default.  I remember when I first started using
Gentoo and was surprised that the default editor was nano.  I'm was like
huh?  It's a distribution where you have to choose your own system
logger and compile your own kernel, but when it comes to the text editor
they decide to hold your hand with nano?  

Still, I remember a while back a friend of mine got a new job where she
had to use Unix/Linux for the first time.  She asked me what editor she
should learn to use.  I told her she should learn vi first because it's
guaranteed to be on all Unix/Linux systems.  Then I had to hold down my
head in shame and say except Gentoo. Nevertheless, that was someone's
choice, probably long ago, and it's easy to fix.  Life is short so we
have to choose our battles.  I actually have an ebuild in my overlay
that goes on all my systems. Among other things, it blocks nano,
installs vim and sets the appropriate EDITOR variable.  I'm quite happy
with this solution because it's is the Gentoo Way of doing things.

That's all analysis.  But this thread isn't about analysis really.  It's
about being heard and the louder you are and the more you blow things
out of proportion then the more chance you have of being heard. Children
learn this at an early age.  When I was a child I also learned that many
times it's more important how you ask for something than what you are
actually asking for.  Some parents spoil their children and give them
everything they want, and so as adults they lose this valuable life
lesson.

So while the OP may or may not have had an idea that was legitimate or
at least interesting, it will forever be overshadowed by his attitude
and lack of respect.  Perhaps the intention never was to bring about any
useful change but as a way of saying I'm here! Can you hear me?

We heard you.  Now let's move on.

-a





Re: [gentoo-user] Am I wrong?..

2009-10-02 Thread Joshua Murphy
2009/10/2 Arthur D. spinal...@mail.ru:
 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

Yeah... imagine that. A simple change to fix things to work as I want
when I deviate from the distro default. Interestingly, I already do
that, and into /bin/, on every lightweight system I build for myself
(more full fledged builds have vim, and none of my builds keep nano
around). Really, that seems just as simple to me as adjusting the
config file for sudo when deviating from the distro-offered default.
Simple solutions are an amazing thing, at least, when they're not
blown away as unacceptable because the world doesn't revolve around
every single person who think's they're at Burger King (oddly enough,
in my experience, you don't actually get your way their either).

I would apologize for my rather sarcastic mannerisms in my comments
here and there in the thread, but when the initial post is so terribly
combative, I just can't help myself.

-- 
Poison [BLX]
Joshua M. Murphy



[gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Mike Edenfield

On 10/1/2009 10:44 AM, Arthur D. wrote:


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



You have two options:

1. Tell sudo to preserve the EDITOR variable in /etc/sudoers:

Defaultsenv_keep += EDITOR VISUAL PAGER

Otherwise sudo will ignore your environment and use the defaults for the 
new user.


2. Change the default editor on your system by putting something in 
/etc/env.d:


apollo ~ # cat /etc/env.d/99editor
EDITOR=vim


--Mike



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Volker Armin Hemmann
On Donnerstag 01 Oktober 2009, Arthur D. wrote:
 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
 

and isn't the real upstream hard coded editor vim?

so.. how about... you know... don't get your panties in a knot about nothing?





Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Dan Cowsill
Arthur D. wrote:
 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
 

This behavior is controlled by the EDITOR environmental variable, which
you should change in /etc/rc.conf.  It's one of the first things I
change when I tackle a new build.  The reason why the default is what it
is is a good one:  the default agrees with the rest of the initial
Gentoo environment when you first build it.  Luckily for you, everything
in Gentoo is very easy to change.

Also, one should always pose ones queries in the form of a question
instead of an attack.  And for the love of God, don't feed the devs!

DC



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Albert Hopkins
On Thu, 2009-10-01 at 17:44 +0300, Arthur D. wrote:
[long post about something relatively trivial]

sudoedit (and others) use the EDITOR (or VISUAL or whatever) environment
variable to chose an editor.

Gentoo defaults to nano.  It's easy to change it (most experienced Linux
users do).

# emerge -C nano  emerge vim
# echo EDITOR=/usr/bin/vim  /etc/env.d/99local
# env-update


And he's right, as a meta distribution, it just works is generally
*not* regarded as a Gentoo principle to shoot for.




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Walker
Arthur D. wrote:
 Many of us prefer editors other than nano. 

Me included. I don't have nano installed here - I use LE.

 The package SUDO. It is one of the most mandatory packages in distro.

Hmm. It's not even installed on any of my 15 systems - no use for it
whatsoever.

The default editor is set in /etc/rc.conf. Never had a problem with that.

Methinks RTFM applies?


Be lucky,

Neil
http://www.neiljw.com





Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Joshua Murphy
On Thu, Oct 1, 2009 at 11:11 AM, Albert Hopkins mar...@letterboxes.org wrote:
 [very clear, consice, polite answer to the OP's question]

 And he's right, as a meta distribution, it just works is generally
 *not* regarded as a Gentoo principle to shoot for.

And oddly, in fact, it usually it's still a goal usually reached, or
at least rather easily attained in all of 2 steps past emerge (often
mentioned in emerge output) by the admin. It Just Works though, in
other distros, applies all the way up to the line where you start
trying to decide things for yourself, while the distro maintainers
have decided other things for you... I saw it back in Mandrake, I see
it now in Ubuntu. Wonderful distros for ease of use, but stripping
them down to a minimal system and expecting all my favorite pieces to
happily coexist never quite just works. I'm strongly considering,
now that I've the drive space (upped from 4gb to 16gb) in my netbook,
bringing the last of my 'nix boxes back to Gentoo for the very fact
that the system's been lacking in the It Just Works principle.

Randomly, an oddly fitting quote in my signature.

-- 
Poison [BLX]
Joshua M. Murphy
The price of greatness is responsibility. - Sir Winston Churchill



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 17:44:41 +0300, Arthur D. wrote:

 My quests leaded me to the ebuild
 of sudo. And I saw this nice shiny line there:
 --with-editor=/bin/nano

 P.S. Having defaults is not bad. But they should not override our
 favourites.

What you you think that line in the ebuild does? It changes the *default*
editor for visudo. If you want something else, all you need to do is set
your system up accordingly as described in the installation instructions
of the handbook.

PS Good luck getting anything changed to suit your demands with your
attitude. You don't pay the devs enough for them to put up with that.


-- 
Neil Bothwick

Why is the alphabet in that order? Is it because of that song?


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 15:44, Arthur D. wrote:

...

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


You seem to have alienated some responses with your posting manner,  
but it seems that folks are replying without reading the above.


Here, as user stroller, `sudo visudo` runs nano. If  I `su` to root,  
then vi is used.


In both environments `echo $EDITOR` now returns /usr/bin/vim.
(previously user stroller had just vi set as editor, but changing it  
 sourcing .bashrc doesn't make any difference)


I'm unclear why the user preference of editor seems to be ignored here.

If I `touch /etc/sudoers.tmp  touch /etc/sudoers.tmp  chmod 777 / 
etc/sudoers.tmp /etc/sudoers` then `visudo` does indeed seem to use vi.


So it seems to me that you're right. It appears like maybe when `sudo`  
detects that it's running `visudo` it does seem to ignore $EDITOR. I,  
too, disagree with this behaviour. IMO the ebuild (--with-editor=/bin/ 
nano) take the editor from /etc/rc.conf, but I'm extremely curious  
why upstream makes this behaviour, anyway.


Stroller.





Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 16:40, Stroller wrote:

...
So it seems to me that you're right. It appears like maybe when  
`sudo` detects that it's running `visudo` it does seem to ignore  
$EDITOR. I, too, disagree with this behaviour. IMO the ebuild (-- 
with-editor=/bin/nano) take the editor from /etc/rc.conf, but I'm  
extremely curious why upstream makes this behaviour, anyway.


Actually READING the bug actually showed a number of reasoned  
responses to the OP's complaint.


I don't think you'll have much luck debating this: since upstream  
hardcodes it, it comes down largely to the nano-as-default-editor  
argument, which was first made in the Paleolithic era and which has  
been hotly debated without change since.


I now appear unable to access that bug:
http://bugs.gentoo.org/show_bug.cgi?id=286017
Thanks for that.

Stroller.
 



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Dan Cowsill
Arthur D. wrote:
 The first option works fine, but ... how much time should the user
 spend to get things just work as expected?

Plainly put, Gentoo isn't an easy-to-use distro.  If it were, I don't
think I would be using it, paradoxically enough.  If spending a little
time learning about and playing with the config files is outside of the
purview of what you consider to be a functional distro, then perhaps you
should look elsewhere.

DC



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 18:58:43 +0300, Arthur D. wrote:

 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.


-- 
Neil Bothwick

In 1750 Issac Newton became discouraged when he fell up a flight of
stairs.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Daniel da Veiga
2009/10/1 Arthur D. spinal...@mail.ru:
 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.


Section 8.c of the Gentoo Handbook (called System Information) advises
you to edit /etc/rc.conf to change your preferences.

Either you missed that section or didn't read the documentation, the
dev has all the right to answer like that. Creating the bug before
asking here was also not a good idea.

-- 
Daniel da Veiga



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 19:21:07 +0300, Arthur D. wrote:

 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.


-- 
Neil Bothwick

Is it possible to be totally partial?


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Daniel da Veiga
2009/10/1 Arthur D. spinal...@mail.ru:
 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?


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...

-- 
Daniel da Veiga



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Arthur D.
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?..

2009-10-01 Thread James Ausmus
2009/10/1 Arthur D. spinal...@mail.ru

  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.



OK, for the Nth time on this thread - it is all about *YOUR* configuration
*IN YOUR SUDOERS FILE* - *by default*, sudo DOES NOT preserve the
environmental variables of the current user - it *DOES NOT* replace them
with variables from your profile, as *IT IS NOT RUNNING THE COMMAND IN AN
INTERACTIVE SHELL LOGIN* - if you want that behaviour, try using sudo -i.

To see *VERY EXPLICITLY* what you have been told *OVER AND OVER* on this
thread, do the following:

sudo env
sudo -i env


and look at the difference. Unless *YOU* configure sudo the *NOT* reset
environmental variables, it is configured *BY DEFAULT* to blank out all but
a very few - once again, *THIS INCLUDES THE EDITOR VARIABLE*.

Once again, to fix the issue, do one of the 3 following procedures:

1 - Make all users preserve env variables when using sudo (least secure):

sudo -i visudo   #This will start a visudo session *with vim*, since you are
using the -i option, which causes sudo to execute the command from an
interactive shell (which will read all env variables as you have configured)
comment out the line that reads:

Defaultsenv_reset

save, quit, and now your problem is solved.

2 - Make only users in the wheel group preserve env variables when using
sudo (more secure):

sudo -i visudo
uncomment out the line that reads:

#Defaults:%wheel!env_reset

save, quit
if your user is not already in the wheel group, add it into it:

gpasswd -a username wheel

then log out and log back in, and now your problem is solved.


3 - Make only the EDITOR env variable preserved when using sudo (even more
secure):

sudo -i visudo
add the following line:

Defaults env_delete-=EDITOR

save, quit


Now, there are *NUMEROUS* other ways that *YOU* can fix *YOUR CONFIG* to
solve *YOUR PROBLEM* - *HOWEVER*, continually ignoring the numerous fixes
that other users have replied to you with, and being hostile towards both
devs *and* the user community (Proof? WTF is your problem? You come here
asking for help, and then ignore the help you're given, and accuse a *very*
long-time user and *very* respected member of the community of *lying* to
you when he is trying to help you? Get your attitude fixed - seriously).

I hope that helps get your problem (and your hostility) resolved.

-James


 --
 Best regards, Spinal




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Volker Armin Hemmann
On Donnerstag 01 Oktober 2009, Arthur D. wrote:
 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.
 

wow, you must have been VERY obnoxious to have the bug closed for others.


First time I see that.

...

well.. vim users



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 19:07, Volker Armin Hemmann wrote:


On Donnerstag 01 Oktober 2009, Arthur D. wrote:
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


wow, you must have been VERY obnoxious to have the bug closed for  
others.


First time I see that.


I saw the bug earlier, must have been 30 minutes before it was closed.

It didn't seem obnoxious as such, but the dev considered the bug  
closed and I think it kept getting reopened as others added comments.  
There was certainly a request in the bug please do not reopen as I do  
not want to make this bug devs only when I saw it, but all was polite.


This is really a shame, as the discussion there was really more  
insightful that that here - lots of people here are echoing stuff that  
was already explained in the bug, and some of what is being echoed  
here is apparently wrong. It seemed to all be quite clearly explained  
in the responses to the bug report.


Stroller.



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 19:40, Stroller wrote:



On 1 Oct 2009, at 19:07, Volker Armin Hemmann wrote:


On Donnerstag 01 Oktober 2009, Arthur D. wrote:
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


wow, you must have been VERY obnoxious to have the bug closed for  
others.


First time I see that.


I saw the bug earlier, must have been 30 minutes before it was closed.

It didn't seem obnoxious as such, but the dev considered the bug  
closed and I think it kept getting reopened as others added  
comments. There was certainly a request in the bug please do not  
reopen as I do not want to make this bug devs only when I saw it,  
but all was polite.


This is really a shame, as the discussion there was really more  
insightful that that here - lots of people here are echoing stuff  
that was already explained in the bug, and some of what is being  
echoed here is apparently wrong. It seemed to all be quite clearly  
explained in the responses to the bug report.


I meant to add, the Google cache seems to be missing most of these  
useful comments. :(


http://209.85.229.132/search?q=cache:Ywvu1cqDSmcJ:bugs.gentoo.org/show_bug.cgi%3Fid%3D286017+gentoo+286017cd=1hl=enct=clnk
or http://preview.tinyurl.com/yborwyw

Stroller.



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 21:10:19 +0300, Arthur D. wrote:

 James Ausmus, I solved this proble long ago. I just curios,

So you're just ranting, you don't actually have a problem to solve and
your question was rhetorical venting?

 why it's not solved by portage?

What problem? That the default editor for visudo is set to the same as
the default editor for the rest of the system? I don't see that as a
problem. Lot's of people use Vim as their default editor. Gentoo lets you
use any editor you like, even something as arcane as Vim...


-- 
Neil Bothwick

I'll try being nicer if you'll try being smarter.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 20:34:15 +0300, Arthur D. wrote:

 Man, running sudo visudo and just running visudo is not the same.

True, but both call $EDITOR here.

 Be careful. Nano is hardcoded in sudo's ebuild.

Yes, as a default when no other editor is specified. That means no
$EDITOR variable visible to visudo and no default specified
in /etc/sudoers. It does NOT mean that visudo is hard coded to use nano,
merely that the Gentoo devs have set the fallback to something they
know will be on a default Gentoo install. That seems a sensible decision
to me.


-- 
Neil Bothwick

Why is the word abbreviation so long?


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread James Ausmus
2009/10/1 Arthur D. spinal...@mail.ru

 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?


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.

This being said, yes, the ebuild configures sudo to use /bin/nano as a
fallback, if no other editors are specified to visudo (either via env vars
or via the sudoers config file). This is a very sane thing to do by default,
as nano is part of the default stage3 install, has no easy-to-screw-up
dependencies, is very small, and, unless the user really knows what they are
doing, is pretty much always guaranteed to be on a Gentoo system and usable
- the key point being that the user really knows what they are doing, enough
to specifically unmerge nano after emerging a different editor that
satisfies the RDEPEND dependencies of virtual/editor (which, if you don't
have any satisfactory editor installed, will pull in nano - it's small, it
always works). There have been several times in the past where I have
screwed up my system to the point that vi/vim will not run, and having nano
around as an editor has saved me from having to reboot into a livecd.

All this all this said, if you want to modify the sudo ebuild to either be
smarter about specifying the fallback editor by looking at the available
editors on the system, or have USE-based editor flags (probably not a good
idea, as there are a lot of different console editors that will satisfy the
virtual/editor RDEPEND, and switching preferred editors is so trivial that I
don't think the Gentoo devs would be willing to justify another USE-expanded
flag in make.conf), then the maintainer for the sudo package might consider.
But, then again, since nano pretty much always works, it's trivial to change
your configs to never use nano, and nano is pretty much always guaranteed to
be there (unless, again, you really know what you're doing, in which case
you should know how to modify your configs to disregard nano), they most
likely wouldn't accept the change. But if you are passionate enough about
not having to trivially modify your configs, then you can create an overlay
with your modified ebuild, and be your own sudo ebuild maintainer.

See all the flexibility Gentoo gives you? A trivial amount of config
modification is an extremely small price to pay for all the power and
flexibility (not to mention the extremely helpful devs and community, when
you're willing to discuss and listen instead of just attack and provoke).


-James




 --
 Best regards, Spinal




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread forgottenwizard
On Thu, Oct 01, 2009 at 05:08:16PM +0100, Stroller wrote:
 
 On 1 Oct 2009, at 16:40, Stroller wrote:
  ...
  So it seems to me that you're right. It appears like maybe when  
  `sudo` detects that it's running `visudo` it does seem to ignore  
  $EDITOR. I, too, disagree with this behaviour. IMO the ebuild (-- 
  with-editor=/bin/nano) take the editor from /etc/rc.conf, but I'm  
  extremely curious why upstream makes this behaviour, anyway.
 
 Actually READING the bug actually showed a number of reasoned  
 responses to the OP's complaint.
 
 I don't think you'll have much luck debating this: since upstream  
 hardcodes it, it comes down largely to the nano-as-default-editor  
 argument, which was first made in the Paleolithic era and which has  
 been hotly debated without change since.
 
 I now appear unable to access that bug:
 http://bugs.gentoo.org/show_bug.cgi?id=286017
 Thanks for that.
 
 Stroller.
   
 

I'm unable to read the bug as well, which I find bothersome (how many
bugs have they hidden from users?).

However, I'm also wondering why the ebuild doesn't make use of the
EDITOR variable as was mentioned. This defaults to nano so it should
work fine in a default install, and would avoid issues like this which
seems to be an arguement that the dev(s) are trying to force specific
programs on the users.




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Walker
Arthur D. wrote:
 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?


Perhaps you should find a distribution more suited to your
abilities/expectations. Clearly,
Gentoo is not for you.


Neil
http://www.neiljw.com





Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Dirk Heinrichs
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. There are other possibilities, i.e. 
something like LINGUAS or VIDEO_CARDS, which are immediately visible.

Bye...

Dirk



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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?..

2009-10-01 Thread Arthur D.
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?..

2009-10-01 Thread Arthur D.
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?..

2009-10-01 Thread Mike Edenfield

On 10/1/2009 1:34 PM, Arthur D. wrote:

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.


Normal users cannot run visudo, so you must already be root to run it, 
or else use 'sudo visudo'.  In the first case, it uses your EDITOR 
variable and there is no problem.


In the second case, as already explained, it uses the first one of:

* The EDITOR variable, if you've told sudo to keep it set
* The default editor from the sudoers file, if you've set that
* The default editor from the ebuild, which is nano.

It is also not just visudo that has this behavior.  Just run this:

apollo ~ # sudo $EDITOR

and if you haven't explicitly told sudo to preserve the EDITOR variable 
it will fail.  As will any other program that reads EDITOR (or VISUAL, 
the other popular one).  Point being, the behavior you're seeing isn't a 
bug in the sudo ebuild --- it's intended and intentional behavior of 
sudo itself.


--Mike







Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Mike Edenfield

On 10/1/2009 3:32 PM, forgottenwizard wrote:


However, I'm also wondering why the ebuild doesn't make use of the
EDITOR variable as was mentioned. This defaults to nano so it should
work fine in a default install, and would avoid issues like this which
seems to be an arguement that the dev(s) are trying to force specific
programs on the users.


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?


--Mike



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.
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?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 21:28, Mike Edenfield wrote:


On 10/1/2009 3:32 PM, forgottenwizard wrote:


However, I'm also wondering why the ebuild doesn't make use of the
EDITOR variable as was mentioned. This defaults to nano so it should
work fine in a default install, and would avoid issues like this  
which

seems to be an arguement that the dev(s) are trying to force specific
programs on the users.


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?


I think it should get the $EDITOR variable set in rc.conf

Stroller.
 



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Volker Armin Hemmann
On Donnerstag 01 Oktober 2009, Stroller wrote:
 On 1 Oct 2009, at 21:28, Mike Edenfield wrote:
  On 10/1/2009 3:32 PM, forgottenwizard wrote:
  However, I'm also wondering why the ebuild doesn't make use of the
  EDITOR variable as was mentioned. This defaults to nano so it should
  work fine in a default install, and would avoid issues like this
  which
  seems to be an arguement that the dev(s) are trying to force specific
  programs on the users.
 
  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?
 
 I think it should get the $EDITOR variable set in rc.conf
 
 Stroller.
 

it is set in /etv/env.d - why is that not enough?



Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 22:01, Volker Armin Hemmann wrote:


On Donnerstag 01 Oktober 2009, Stroller wrote:

On 1 Oct 2009, at 21:28, Mike Edenfield wrote:

On 10/1/2009 3:32 PM, forgottenwizard wrote:

However, I'm also wondering why the ebuild doesn't make use of the
EDITOR variable as was mentioned. This defaults to nano so it  
should

work fine in a default install, and would avoid issues like this
which
seems to be an arguement that the dev(s) are trying to force  
specific

programs on the users.


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?


I think it should get the $EDITOR variable set in rc.conf


it is set in /etv/env.d - why is that not enough?


Uh, because the ebuild ignores that, too, and hard-codes it.

Stroller.




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 23:45:51 +0300, Arthur D. wrote:

 It's like, oh, please you install nano, or I refuse to run.

It's nothing like that at all. As long as you have an editor installed
and configured correctly, visudo will quite happily run without nano.


-- 
Neil Bothwick

Help put the fun back in dysfunctional !


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Thu, 01 Oct 2009 23:12:36 +0300, Arthur D. wrote:

 I think it's most reasonably to omit that hardcoding line from ebuild.

I think you need to re-read the ebuild. sudo depends on virtual/editor,
not nano. Nowhere is nano hardcoded to be a requirement of sudo. On the
other hand, if you went with the upstream settings, you'd need to add vim
as a dependency, even for those that don't wish to use it. Forcing such
things on the user is most definitely not the Gentoo Way.


-- 
Neil Bothwick

PCMCIA: People Can't Memorize Computer Industry Acronyms


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Stroller


On 1 Oct 2009, at 23:53, Neil Bothwick wrote:


On Thu, 01 Oct 2009 23:12:36 +0300, Arthur D. wrote:

I think it's most reasonably to omit that hardcoding line from  
ebuild.


I think you need to re-read the ebuild. sudo depends on virtual/ 
editor,
not nano. Nowhere is nano hardcoded to be a requirement of sudo. On  
the
other hand, if you went with the upstream settings, you'd need to  
add vim
as a dependency, even for those that don't wish to use it. Forcing  
such

things on the user is most definitely not the Gentoo Way.


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 \
829 ~ $

Stroller.




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neil Bothwick
On Fri, 2 Oct 2009 00:54:50 +0100, Stroller wrote:

  I think you need to re-read the ebuild. sudo depends on virtual/ 
  editor,
  not nano. Nowhere is nano hardcoded to be a requirement of sudo. On  
  the
  other hand, if you went with the upstream settings, you'd need to  
  add vim
  as a dependency, even for those that don't wish to use it. Forcing  
  such
  things on the user is most definitely not the Gentoo Way.  
 
 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.

visudo is not hard coded to use nano, or even $EDITOR, you can set it to
use whatever you want. The ebuild merely makes sure the default tallies
with the default for $EDITOR. 


-- 
Neil Bothwick

I have plenty of talent and vision. I just don't give a damn.


signature.asc
Description: PGP signature


Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread forgottenwizard
On Thu, Oct 01, 2009 at 09:45:40PM +0200, Dirk Heinrichs wrote:
 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. There are other possibilities, i.e. 
 something like LINGUAS or VIDEO_CARDS, which are immediately visible.
 
 Bye...
 
   Dirk
 

So instead it should set a non-existant editor to the configured
default?

Another variable in make.conf may be a reasonable fix for this though
I'm sure someone will bitch about having to set $EDITOR twice on their
system.




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread forgottenwizard
On Thu, Oct 01, 2009 at 12:04:38PM -0700, James Ausmus wrote:
 2009/10/1 Arthur D. spinal...@mail.ru
 
 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.
 

How many packages actually follow upstream without patching the source?




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Neal Hogan
In response to the subject and the OP . . .

YES!

If you'd rather have your free OS accommodate your needs, then perhaps
you should find/create one. Otherwise, shut up or make your
suggestions less obnoxious (realizing the non-native English issue).

The OP's position (from what I can tell) has been combative and less
than conducive to progress.

In the end, Gentoo is a distro that is free of charge and  . . . well.
. .  . pretty good.  Non-devs are welcome to make suggestions, but not
demands. If you'd rather have vim (or easier access to it), then go
somewhere else.

Nano is the editor of (default)choice. IF it is REALLY a situation
where Gentoo is not providing its users with a choice of editor and
this is a problem for you, then use something else.

To claim that I try to change things that are 'wrong' (I fight for
injustice) is silly, in this context.  This is not civil rights . . .
this is not genocide . . . this is an OS distro that is free and MAY
fit your needs. To complain about it on the scale that the OP has, is
just (again) SILLY! (you are not a saint)

To all of those who took the time to put this joker into his/her
place, I applaud you. It's amazing how often subtly fails.

On Thu, Oct 1, 2009 at 7:45 PM, forgottenwizard
phrexianrea...@hushmail.com wrote:
 On Thu, Oct 01, 2009 at 12:04:38PM -0700, James Ausmus wrote:
 2009/10/1 Arthur D. spinal...@mail.ru

 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.


 How many packages actually follow upstream without patching the source?






Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Albert Hopkins
On Thu, 2009-10-01 at 20:55 -0500, Neal Hogan wrote:
 To claim that I try to change things that are 'wrong' (I fight for
 injustice) is silly, in this context.  This is not civil rights . . .
 this is not genocide . . . this is an OS distro that is free and MAY
 fit your needs. To complain about it on the scale that the OP has, is
 just (again) SILLY! (you are not a saint)

Of course he is not a saint.  He is a martyr!




Re: [gentoo-user] Am I wrong?..

2009-10-01 Thread Arthur D.

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