The strangeness called `sbin'

Doug Barton dougb at FreeBSD.org
Sat Nov 12 23:23:48 UTC 2011


On 11/12/2011 02:39, Ed Schouten wrote:
> Hi Doug,
> 
> * Doug Barton <dougb at FreeBSD.org>, 20111112 01:40:
>>> But the point is: there are quite some tools in */sbin that should be
>>> moved to */bin. I can at least point out 15 of them.
>>
>> Why don't we discuss those specifics first?
> 
> In my opinion at least the following binaries are candidates of apps
> that can be moved from sbin to bin, as they all work to some degree
> without root privileges:

The idea behind sbin isn't "needs root privileges." From hier(7):

/sbin/     system programs and administration utilities fundamental to
           both single-user and multi-user environments

> - ac
> - arp
> - config
> - daemon
> - dmesg
> - ifconfig
> - jls
> - kldstat
> - lastlogin
> - md5
> - mtree
> - ping
> - ping6
> - pkg_info
> - pkg_version
> - pstat
> - rcorder
> - rmd160
> - sendmail
> - sha1
> - sha256
> - sysctl

Except for the hash tools (md5, etc.) those are all properly located in
sbin.

>> For those individual tools, yes. But you're discounting the collateral
>> damage.
> 
> Being?

User confusion, conflict between how things are done in the base vs. how
they are done in ports, problems for users who install stuff in /sbin
and/or /usr/sbin, and the other problems that have been mentioned in
this thread.

>> Um, if 'make installworld' were to delete existing stuff that would be
>> an overwhelming POLA violation.
> 
> But my patch doesn't do that. Please take a look at what it does. The
> user is kindly asked to move the binaries himself. Otherwise `make
> installworld' simply refuses to run.

Yeah, I saw that, which is why I was confused. I would argue that what
you're proposing is also a POLA violation, although perhaps less so.

> Unrelated to that, `make installworld' already deletes existing files
> from the DESTDIR:
> 
> - /.profile
> - /.cshrc

Do you have a reference? I had to add code to mergemaster to handle
installing updates to them, fixing the symlinks, etc.

> - /sys

Are you sure that this happens on an already installed system? I know
I've had to update this link on systems where I've moved my src tree.

> - Some man/nls-related files.

Not sure about these.


Doug

-- 

		"We could put the whole Internet into a book."
		"Too practical."

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/



More information about the freebsd-arch mailing list