Gentoo Archives: gentoo-user

From: James Ausmus <james.ausmus@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Am I wrong?..
Date: Thu, 01 Oct 2009 19:04:41
Message-Id: b79f23070910011204r476299d1mf3ca63ce00b0103b@mail.gmail.com
In Reply to: Re: [gentoo-user] Am I wrong?.. by "Arthur D."
1 2009/10/1 Arthur D. <spinal.by@××××.ru>
2
3 > James Ausmus, I solved this proble long ago. I just curios,
4 > why it's not solved by portage? So the users should spend their
5 > time diggin in manuals to find why is sudo not working in Gentoo
6 > like it does in LFS or any other distro?.. Is this the Gentoo way
7 > or something?
8 >
9
10 The Gentoo Way of doing things is to stick as close to "vanilla" upstream as
11 possible, and to enable you to have complete control over your box,
12 including configurations. In other words, if you want something configured
13 differently than vanilla, you have to do the work.
14
15 This being said, yes, the ebuild configures sudo to use /bin/nano as a
16 fallback, if no other editors are specified to visudo (either via env vars
17 or via the sudoers config file). This is a very sane thing to do by default,
18 as nano is part of the default stage3 install, has no easy-to-screw-up
19 dependencies, is very small, and, unless the user really knows what they are
20 doing, is pretty much always guaranteed to be on a Gentoo system and usable
21 - the key point being that the user really knows what they are doing, enough
22 to specifically unmerge nano after emerging a different editor that
23 satisfies the RDEPEND dependencies of virtual/editor (which, if you don't
24 have any satisfactory editor installed, will pull in nano - it's small, it
25 always works). There have been several times in the past where I have
26 screwed up my system to the point that vi/vim will not run, and having nano
27 around as an editor has saved me from having to reboot into a livecd.
28
29 All this all this said, if you want to modify the sudo ebuild to either be
30 smarter about specifying the fallback editor by looking at the available
31 editors on the system, or have USE-based editor flags (probably not a good
32 idea, as there are a lot of different console editors that will satisfy the
33 virtual/editor RDEPEND, and switching preferred editors is so trivial that I
34 don't think the Gentoo devs would be willing to justify another USE-expanded
35 flag in make.conf), then the maintainer for the sudo package might consider.
36 But, then again, since nano pretty much always works, it's trivial to change
37 your configs to never use nano, and nano is pretty much always guaranteed to
38 be there (unless, again, you really know what you're doing, in which case
39 you should know how to modify your configs to disregard nano), they most
40 likely wouldn't accept the change. But if you are passionate enough about
41 not having to trivially modify your configs, then you can create an overlay
42 with your modified ebuild, and be your own sudo ebuild maintainer.
43
44 See all the flexibility Gentoo gives you? A trivial amount of config
45 modification is an extremely small price to pay for all the power and
46 flexibility (not to mention the extremely helpful devs and community, when
47 you're willing to discuss and listen instead of just attack and provoke).
48
49
50 -James
51
52
53
54 >
55 > --
56 > Best regards, Spinal
57 >
58 >

Replies

Subject Author
Re: [gentoo-user] Am I wrong?.. "Arthur D." <spinal.by@××××.ru>
Re: [gentoo-user] Am I wrong?.. forgottenwizard <phrexianreaper@××××××××.com>