{"thread":{"id":"2990","subject":"Does git belong in root's $PATH?","startedAt":"2006-01-07T17:21:08Z","lastAt":"2006-01-08T03:00:23Z","messageCount":10,"participants":["walt","Andreas Ericsson","Linus Torvalds","H. Peter Anvin","Sam Ravnborg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14250","messageId":"Pine.LNX.4.64.0601070838470.6317@x2.ybpnyarg","threadId":"2990","inReplyTo":null,"subject":"Does git belong in root's $PATH?","fromName":"walt","fromEmail":"wa1ter@myrealbox.com","sentAt":"2006-01-07T17:21:08Z","receivedAt":"2006-01-07T17:21:08Z","isPatch":false,"sender":{"key":"wa1ter@myrealbox.com","avatar":null},"body":"When updated my kernel this morning, the same way I've been doing\nit for many months, I noticed that the -gxxxxxxx localversion\nstring was missing from the new kernel's name.\n\nI finally figured out that this happened because /usr/local/bin\nis not in my root's $PATH, and the setlocalversion script depends\non git.  (The only thing I do as root is 'make install').\n\nI suppose I'm asking a philosophical question here:  do you\nguys install git where root can find it (as a system tool)?\nDoes it really matter?  (The linux distribution I use is very\npicky about what it includes in root's path...)\n\nThanks!\n"},{"id":"14251","messageId":"43C0025A.9080406@op5.se","threadId":"2990","inReplyTo":"Pine.LNX.4.64.0601070838470.6317@x2.ybpnyarg","subject":"Re: Does git belong in root's $PATH?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-01-07T18:03:06Z","receivedAt":"2006-01-07T18:03:06Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"walt wrote:\n> When updated my kernel this morning, the same way I've been doing\n> it for many months, I noticed that the -gxxxxxxx localversion\n> string was missing from the new kernel's name.\n> \n> I finally figured out that this happened because /usr/local/bin\n> is not in my root's $PATH, and the setlocalversion script depends\n> on git.  (The only thing I do as root is 'make install').\n> \n> I suppose I'm asking a philosophical question here:  do you\n> guys install git where root can find it (as a system tool)?\n\n\nI install it in /usr/bin. I don't *use* the git-tools as root though, so \nI don't feel there's anything to worry about (well, at least no more \nthan for the other 2847 programs living in my $PATH).\n\n\n> Does it really matter?\n\n\nTheoretically, yes, but only if someone can trick you to, as root, doing \nsomething with git which triggers some yet undiscovered bug and makes it \nrun code it was never meant to.\n\n\n>  (The linux distribution I use is very\n> picky about what it includes in root's path...)\n> \n\nNot including /usr/local/{bin,sbin} in root's path is considered wise, \nsince, historically, that's where users would install their own versions \nof programs that the system doesn't provide. This use has largely been \nobsoleted by $HOME/bin as the default for user-specific programs, mainly \nbecause of disks getting larger and cheaper.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"14255","messageId":"Pine.LNX.4.64.0601071023250.3169@g5.osdl.org","threadId":"2990","inReplyTo":"Pine.LNX.4.64.0601070838470.6317@x2.ybpnyarg","subject":"Re: Does git belong in root's $PATH?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-01-07T18:31:52Z","receivedAt":"2006-01-07T18:31:52Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 7 Jan 2006, walt wrote:\n>\n> When updated my kernel this morning, the same way I've been doing\n> it for many months, I noticed that the -gxxxxxxx localversion\n> string was missing from the new kernel's name.\n> \n> I finally figured out that this happened because /usr/local/bin\n> is not in my root's $PATH, and the setlocalversion script depends\n> on git.  (The only thing I do as root is 'make install').\n\nOk, sounds like a build buglet to me. If you've done a \"make\" as a regular \nuser, and just do a \"make install\" as root, I'd argue that the \"make \ninstall\" should do as little as humanly possible, and literally just \ninstall the kernel. If it starts changing the version, that sounds a bit \nfishy.\n\nSam, anything we can do?\n\nThat said:\n\n> I suppose I'm asking a philosophical question here:  do you\n> guys install git where root can find it (as a system tool)?\n\nI don't, but I don't use \"make install\" anyway, I just do \"make \nmodules_install\". I install the kernel by hand, I always have.\n\nOf course, that's partly because I've always felt that \"make install\" does \ntoo much (I think \"make modules_install\" is better - it really only \ninstalls the already-built modules).\n\nMaybe it would be best to remove the \"vmlinux\" dependency from \"make \ninstall\" (so that \"make install\" will do exactly that: just install).  I \nthink all the documentation already tells you to do a \"make\" and then a \n\"make install\".\n\nThe other make targets really _are_ different: \"make fdimage\" depends on \nvmlinux, but that's because it literally just builds the image. \"make \ninstall\" is special.\n\nSam, what say you? I forget what the kbuild mailing list is, but maybe \nyou can forward this suggestion there..\n\n\t\tLinus\n"},{"id":"14259","messageId":"43C02725.2020702@zytor.com","threadId":"2990","inReplyTo":"43C0025A.9080406@op5.se","subject":"Re: Does git belong in root's $PATH?","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-07T20:40:05Z","receivedAt":"2006-01-07T20:40:05Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Andreas Ericsson wrote:\n> \n> Not including /usr/local/{bin,sbin} in root's path is considered wise, \n> since, historically, that's where users would install their own versions \n> of programs that the system doesn't provide. This use has largely been \n> obsoleted by $HOME/bin as the default for user-specific programs, mainly \n> because of disks getting larger and cheaper.\n> \n\nHmmm... I think that was /usr/bin (hence the eventual migration of the \nmeaning of /usr from what was originally the equivalent of /home.)\n\nToday /usr/local is strictly a location for site-local things; a place \nthat won't conflict with the distribution.\n\n\t-hpa\n"},{"id":"14261","messageId":"43C02940.9040606@zytor.com","threadId":"2990","inReplyTo":"Pine.LNX.4.64.0601071023250.3169@g5.osdl.org","subject":"Re: Does git belong in root's $PATH?","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-07T20:49:04Z","receivedAt":"2006-01-07T20:49:04Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Linus Torvalds wrote:\n> \n> Maybe it would be best to remove the \"vmlinux\" dependency from \"make \n> install\" (so that \"make install\" will do exactly that: just install).  I \n> think all the documentation already tells you to do a \"make\" and then a \n> \"make install\".\n> \n\nI would very much agree with this change; it's a nuisance that \"make \ninstall\" can't be cleanly run as root without leaving root turds in the \nbuild directory.\n\n(Speaking as the person who did the original \"make install\" patch about \n12 years ago.)\n\n\t-hpa\n"},{"id":"14271","messageId":"20060107230130.GA8335@mars.ravnborg.org","threadId":"2990","inReplyTo":"Pine.LNX.4.64.0601071023250.3169@g5.osdl.org","subject":"Re: Does git belong in root's $PATH?","fromName":"Sam Ravnborg","fromEmail":"sam@ravnborg.org","sentAt":"2006-01-07T23:01:30Z","receivedAt":"2006-01-07T23:01:30Z","isPatch":false,"sender":{"key":"sam@ravnborg.org","avatar":"https://gravatar.com/avatar/168a912606ed0742d840bb365e3cc21db390c36531a58341dc7a069cc1f15f62?d=mp&s=160"},"body":"On Sat, Jan 07, 2006 at 10:31:52AM -0800, Linus Torvalds wrote:\n> \n> \n> On Sat, 7 Jan 2006, walt wrote:\n> >\n> > When updated my kernel this morning, the same way I've been doing\n> > it for many months, I noticed that the -gxxxxxxx localversion\n> > string was missing from the new kernel's name.\n> > \n> > I finally figured out that this happened because /usr/local/bin\n> > is not in my root's $PATH, and the setlocalversion script depends\n> > on git.  (The only thing I do as root is 'make install').\n> \n> Ok, sounds like a build buglet to me. If you've done a \"make\" as a regular \n> user, and just do a \"make install\" as root, I'd argue that the \"make \n> install\" should do as little as humanly possible, and literally just \n> install the kernel. If it starts changing the version, that sounds a bit \n> fishy.\n> \n> Sam, anything we can do?\nToday kbuild uses same method to build KERNELRELEASE no matter what\ntarget is used, and I recently committed a change that used git tools as\nreplacement for direct manipulation with .git/*\nWhat I did not realise was that we now require git during make install\ntime - which is obviously plain wrong.\n\nI will try to look into a cleaner solution tomorrow where KERNELRELEASE\nis fetched somewhere else during make install time.\n\n> \n> That said:\n> \n> > I suppose I'm asking a philosophical question here:  do you\n> > guys install git where root can find it (as a system tool)?\n> \n> I don't, but I don't use \"make install\" anyway, I just do \"make \n> modules_install\". I install the kernel by hand, I always have.\n> \n> Of course, that's partly because I've always felt that \"make install\" does \n> too much (I think \"make modules_install\" is better - it really only \n> installs the already-built modules).\nThe big difference here is that \"make modules_install\" is part of\nkbuild, whereas \"make install\" almost just call installkernel which is\ndistribution specific - and the distributions does all sort of stuff in\ninstallkernel :-(\n\n> \n> Maybe it would be best to remove the \"vmlinux\" dependency from \"make \n> install\" (so that \"make install\" will do exactly that: just install).  I \n> think all the documentation already tells you to do a \"make\" and then a \n> \"make install\".\n\nI had a short chat with David Miller about something similar.\nWhat I really liked to do was to tell user if vmlinux needed an update.\nBut the implmentation of kbuild does make this almost impossible - I\nhave at least not seen how to do it.\n\nWhen I during early 2.6.12 removed the dependency on vmlinux from\nthe install target people were complaining that there scripts broke and\nthe solution that was implmented was a new target:\n\"make kernel_install\" and \"make install\" got back the vmlinux\ndependency.\n\nOnly difference between the two are that \"make kernel_install\" does NOT\nhave vmlinux as prerequisite. This was btw only done for i386 and\nthe only other architecture that have kernel_install is parisc with a\nvmlinux dependency.\n\n\nSo no, I'm very unlikely to remove the vmlinux dependency from the\n\"make install\" target - it results in too many suprises.\n\n> \n> The other make targets really _are_ different: \"make fdimage\" depends on \n> vmlinux, but that's because it literally just builds the image. \"make \n> install\" is special.\n> \n> Sam, what say you? I forget what the kbuild mailing list is, but maybe \n> you can forward this suggestion there..\n\nThese days it is named linux-kernel@vger.kernel.org ;-)\nkbuild-devel@lists.sourceforge.net is seldom used though I still monitor\nit. Talked with mec about discontinue it but he liked to keep it\naraound. He is btw still moderator on that list filtering away all spam.\n\n\tSam\n"},{"id":"14280","messageId":"43C05ED5.1090603@op5.se","threadId":"2990","inReplyTo":"43C02725.2020702@zytor.com","subject":"Re: Does git belong in root's $PATH?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-01-08T00:37:41Z","receivedAt":"2006-01-08T00:37:41Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"H. Peter Anvin wrote:\n> Andreas Ericsson wrote:\n> \n>>\n>> Not including /usr/local/{bin,sbin} in root's path is considered wise, \n>> since, historically, that's where users would install their own \n>> versions of programs that the system doesn't provide. This use has \n>> largely been obsoleted by $HOME/bin as the default for user-specific \n>> programs, mainly because of disks getting larger and cheaper.\n>>\n> \n> Hmmm... I think that was /usr/bin (hence the eventual migration of the \n> meaning of /usr from what was originally the equivalent of /home.)\n> \n\n\nI've been told that it's '/usr' simply because that's where user \ninterface tools that have nothing to do with boot-strapping resides. A \npoint emphasized by the fact that /bin, /sbin and /lib must not reside \non network-mounted media, while /usr may.\n\nIt seems so logical I never bothered to look in to find out for myself \nthough, so I may well be wrong, or at least younger. ;)\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"14285","messageId":"43C05F4C.8050908@zytor.com","threadId":"2990","inReplyTo":"43C05ED5.1090603@op5.se","subject":"Re: Does git belong in root's $PATH?","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-08T00:39:40Z","receivedAt":"2006-01-08T00:39:40Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Andreas Ericsson wrote:\n> \n> I've been told that it's '/usr' simply because that's where user \n> interface tools that have nothing to do with boot-strapping resides. A \n> point emphasized by the fact that /bin, /sbin and /lib must not reside \n> on network-mounted media, while /usr may.\n> \n> It seems so logical I never bothered to look in to find out for myself \n> though, so I may well be wrong, or at least younger. ;)\n> \n\n/usr used to be what is now called /home.  What you're describing above \nis the current usage.\n\n\t-hpa\n"},{"id":"14288","messageId":"dpppg4$qkd$1@sea.gmane.org","threadId":"2990","inReplyTo":"43C05F4C.8050908@zytor.com","subject":"Re: Does git belong in root's $PATH?","fromName":"walt","fromEmail":"wa1ter@myrealbox.com","sentAt":"2006-01-08T01:22:12Z","receivedAt":"2006-01-08T01:22:12Z","isPatch":false,"sender":{"key":"wa1ter@myrealbox.com","avatar":null},"body":"H. Peter Anvin wrote:\n\n> /usr used to be what is now called /home.  What you're describing above\n> is the current usage.\n\nHistory lessons are valuable for us youngsters ;o)  Can you give us a\nbrief description of what motivated such a change?  (Just as important,\nof course, is whether the original motives have changed or disappeared.)\n\nThanks!\n"},{"id":"14294","messageId":"43C08047.6090701@zytor.com","threadId":"2990","inReplyTo":"dpppg4$qkd$1@sea.gmane.org","subject":"Re: Does git belong in root's $PATH?","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2006-01-08T03:00:23Z","receivedAt":"2006-01-08T03:00:23Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"walt wrote:\n> H. Peter Anvin wrote:\n> \n>>/usr used to be what is now called /home.  What you're describing above\n>>is the current usage.\n> \n> History lessons are valuable for us youngsters ;o)  Can you give us a\n> brief description of what motivated such a change?  (Just as important,\n> of course, is whether the original motives have changed or disappeared.)\n> \n\nThis is the history as far as I understand it.  Keep in mind I was only \n8 years old in 1980, and I think I first learned about how Unix worked \nin 1985 or 1986, so not all of this is first-hand.\n\n/usr was initially used for home directories (user directories.)  Both \nfore reasons as have been previously discussed (remember, most easy \nmulti-user systems were a lot friendlier than one would expect today), \nand because the root disk often filled up, it became common for users to \nput binaries in /usr/bin, and often the sysadmin, too.\n\nAs the need for system security tightened, by the 80's this was a pretty \nunusable configuration.  Since home directories were specified in \n/etc/passwd, those could, and often were, located elsewhere -- much \neasier than trying to change the now-established conventions of /usr/bin \net al.  A lot of systems in the 80's were massively multiuser anyway \n(workstations were coming in but were rare), and so you'd frequently see \npaths like /u2/h/hpa for example (my actual home directory location on \nour college server.)\n\nThe convention of using /home for home directories seems to have evolved \nout of necessity when networking came in use on a large scale (NFS, \nautomounter, etc), probably in the late 80's-early 90's.  By the time \nLinux emerged in 1991 it was pretty well-established on smaller systems; \nlarger systems still tended to use local conventions inherited from \nprevious generation systems.\n\n\t-hpa\n"}]}