Re: usage of /usr/bin

2010-04-08 Thread Polytropon
Allow me an addition:

On Wed, 7 Apr 2010 10:13:10 -0700, Charlie Kester corky1...@comcast.net wrote:
 On Wed 07 Apr 2010 at 00:24:51 PDT Fbsd1 wrote:
 Why are there RELEASE base files in /usr/bin. I thought /usr was to
 only contain binaries installed from ports or packages.
 
 In many configurations, /bin and /usr/bin are not in the same slice.  In
 some cases, they're not even on the same drive.  

I think you wanted to say that they often aren't on the
same partition (not slice), but it is possible to have
them on different slices, as well as disks, as you
mentioned.

Example:
/dev/ad0s1a /   - /bin, /sbin, /etc reside here
/dev/ad0s1f /usr- /usr/bin, as well as /usr/local

In this example, both are on the same disk and within
the same slice, but on different partitions. In case of
mount trouble, / would usually be available read-only,
to provide a kind of reduced maintenance mode, and /usr
wouldn't be mounted at all.



 Think about scenarios where /usr fails to mount for some reason.  Then
 look at what's in /bin compared to what's in /usr/bin, and perhaps
 you'll understand the logic of it.

The manpage man hier explains it very well.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-08 Thread Polytropon
On Wed, 07 Apr 2010 20:21:57 -0400, Lowell Gilbert 
freebsd-questions-lo...@be-well.ilk.org wrote:
 Fbsd1 fb...@a1poweruser.com writes:
  Your wrong. I installed the package of postfix and it installed it
  self into /usr/bin with out any help from me.
 
 Believe it or not, I checked before responding, so I'm *not* wrong.  I
 said that the port populates into /usr/local like it should, and having
 it on several machines for nearly a decade now, I knew that to be the
 case.  You then changed that to refer to a package rather than a port; I
 don't know where you got your packages from, but I checked the packages
 for 8-STABLE and for 8.0-RELEASE, and saw that they install into
 /usr/local as well.  So it sounds like your packages didn't come from
 the FreeBSD project, if they are really installing anything into
 /usr/bin.  
 
 Just as a sanity check:  what, specifically, is installed into /usr/bin
 on your system?  Most of the postfix executables go into sbin rather
 than bin anyway, so it's possible that something in the mailwrapper
 system is confusing you.  If you don't have a /usr/local/sbin/postfix,
 but have a /usr/sbin/postfix instead, then this is not the case.

A comfortable, maybe overcomplicated way to check what a package
will install - without actually installing it - is to use the
option -n for pkg_add (which obviously operates on packages,
not on ports).

So you could do:

pkg_add -fKnrv postfix  /tmp/postfix_add.txt

This even works if postfix is already installed. The options,
for a short reference, are: -f = force, -K = keep, -n = no
install, -r = remote and -v = verbose. You can then search
for lines that address specific locations in /usr/bin rather
than /usr/local/bin.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-08 Thread Ross Cameron
On Thu, Apr 8, 2010 at 1:06 AM, Fbsd1 fb...@a1poweruser.com wrote:
 Lowell Gilbert wrote:

 Fbsd1 fb...@a1poweruser.com writes:

 But that is not true. The postfix port populates /usr/bin.

 By default, it does not.  You have to enable the Install into /usr and
 /etc/postfix configuration option for it to do so.  I don't recommend
 that anyone do it without a *really* good reason.  Turn that option back
 off and you'll be fine.


 Your wrong. I installed the package of postfix and it installed it self into
 /usr/bin with out any help from me.

You're argument then is with the person who build that package as it
was obviously build incorrectly.

The supported manner to install postfix (at least from my
understanding) is from ports and that by default installs withing the
/usr/local subtree.





-- 
Opportunity is most often missed by people because it is dressed in
overalls and looks like work.
Thomas Alva Edison
Inventor of 1093 patents, including:
The light bulb, phonogram and motion pictures.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Polytropon
On Wed, 07 Apr 2010 15:24:51 +0800, Fbsd1 fb...@a1poweruser.com wrote:
 Why are there RELEASE base files in /usr/bin. I thought /usr was to only 
 contain binaries installed from ports or packages.

No. The /usr/local subtree (LOCAL) is for local additions (ports
and packages), while things outside this structure usually belong
to the system itself; I'm excluding mounted filesystem and other
things here for a moment.

 /usr/  contains the majority of user utilities and applications

bin/  common utilities, programming tools, and applica-
  tions

But:

   local/local executables, libraries, etc.  Also used as the
  default destination for the FreeBSD ports framework.
  Within local/, the general layout sketched out by
  hier for /usr should be used.  Exceptions are the
  man directory (directly under local/ rather than
  under local/share/), ports documentation (in
  share/doc/port/), and /usr/local/etc (mimics
  /etc).

Because we are on FreeBSD, there's excellent documentation
that shows how and why the system tree has a well intended
layout. :-)

The command

% man hier

will explain everything in detail.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Ivailo Tanusheff
Because /usr/local is used to store binaries installed from ports or 
packages :)
You should check the man pages or the handbook for this.

Regards,

Ivailo Tanusheff
Deputy Head of IT Department
ProCredit Bank (Bulgaria) AD




Fbsd1 fb...@a1poweruser.com 
Sent by: owner-freebsd-questi...@freebsd.org
07.04.2010 10:25

To
FreeBSD Questions freebsd-questions@freebsd.org
cc

Subject
usage of /usr/bin






Why are there RELEASE base files in /usr/bin. I thought /usr was to only 
contain binaries installed from ports or packages.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Fbsd1

Polytropon wrote:

On Wed, 07 Apr 2010 15:24:51 +0800, Fbsd1 fb...@a1poweruser.com wrote:
Why are there RELEASE base files in /usr/bin. I thought /usr was to only 
contain binaries installed from ports or packages.


No. The /usr/local subtree (LOCAL) is for local additions (ports
and packages), while things outside this structure usually belong
to the system itself; I'm excluding mounted filesystem and other
things here for a moment.

 /usr/  contains the majority of user utilities and applications

bin/  common utilities, programming tools, and applica-
  tions

But:

   local/local executables, libraries, etc.  Also used as the
  default destination for the FreeBSD ports framework.
  Within local/, the general layout sketched out by
  hier for /usr should be used.  Exceptions are the
  man directory (directly under local/ rather than
  under local/share/), ports documentation (in
  share/doc/port/), and /usr/local/etc (mimics
  /etc).

Because we are on FreeBSD, there's excellent documentation
that shows how and why the system tree has a well intended
layout. :-)

The command

% man hier

will explain everything in detail.




But that is not true. The postfix port populates /usr/bin. And I am sure 
postfix is not the only port to do this also. This intermingling of 
RELEASE binaries and port binaries in /usr/bin is a really big problem 
when trying to build jails. Any past ports which have been included into 
the base release should not be in /usr period.
Saying system user utilizes are in /user/bin then why is fdisk or 
sysinstall not there also. That don't make sense. It time to modernize 
the directory layout keeping all RELEASE binaries out of /usr.
I would think moving the /usr RELEASE binaries by the RELEASE 
development team is a far smaller task then reviewing all 21,500 ports 
for the bad ones that don't target /usr/local/bin and then correcting 
their make files. Before jails this problem was not a problem, But with 
the growing usage of jails this is becoming a major incentive to not use 
jails at all.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Jonathan McKeown
On Wednesday 07 April 2010 11:13:13 Fbsd1 wrote:
 Polytropon wrote:
  On Wed, 07 Apr 2010 15:24:51 +0800, Fbsd1 fb...@a1poweruser.com wrote:
  Why are there RELEASE base files in /usr/bin. I thought /usr was to only
  contain binaries installed from ports or packages.
 
  No. The /usr/local subtree (LOCAL) is for local additions (ports
  and packages), while things outside this structure usually belong
  to the system itself; I'm excluding mounted filesystem and other
  things here for a moment.
[snip]

 But that is not true. The postfix port populates /usr/bin.

I haven't installed postfix, but is this possibly related to the recently 
(2010-03-22) added option to install postfix into the base?

In which case the commit six days later claims to correct a problem with the 
default (non-base) install.

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Polytropon
On Wed, 07 Apr 2010 17:13:13 +0800, Fbsd1 fb...@a1poweruser.com wrote:
 But that is not true.

It is, and the example you're giving is one of the
exceptions that secures the truth of the statement
given in man hier. :-)



 The postfix port populates /usr/bin. And I am sure 
 postfix is not the only port to do this also. 

Basically, there are ports that can be installed
outside /usr/local, or are especially intended to
be. For example postfix, a MTA that can replace
the system one's (sendmail), so it takes its
position. Other ports also allow the setting of
a certain PREFIX variable that will override /usr/local,
which is the default setting. Note that it isn't
very often done, and if it is, it is intended
(as the postfix example you've given, or the
sometimes requested statically linked bash
within the base system).



 This intermingling of 
 RELEASE binaries and port binaries in /usr/bin is a really big problem 
 when trying to build jails.

Yes, understandable.



 Any past ports which have been included into 
 the base release should not be in /usr period.

It has been the system administrator who decides to
install them there. If he insists on replacing some
part of the base system with a port, or to add a
port outside of /usr/local, it's his decision to
do so. Of course, this can lead into problems.



 Saying system user utilizes are in /user/bin then why is fdisk or 
 sysinstall not there also.

Because the creators of FreeBSD have decided that
those programs to belong to different classes of
programs, and according to man hier:

/usr/sbin/sysinstall
 /usr/  contains the majority of user utilities and applications
sbin/ system daemons  system utilities (executed by
  users)

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

There are often decisions that aren't obvious (or even
don't make sense) at first sight.



 That don't make sense.

There are some historical reasons for that. Would you
believe me if I told you that the mount binary historically
was /etc/mount? Or /etc/fsck? Or how about /bin/adm?

Other kinds of UNIX have different hierarchy concepts
and naming conventions. And Linux has many more.



 It time to modernize 
 the directory layout keeping all RELEASE binaries out of /usr.

Hmmm... modernize... I know of some Linux that maps all
the historical locations into Programs/ or Config/
subtrees... I'm not sure if I would be happy with FreeBSd
going the same way, or even further, because I usually
find things when I need to search from them, and I can
mostly do it by brain - rather than /usr/bin/find. :-)



 I would think moving the /usr RELEASE binaries by the RELEASE 
 development team is a far smaller task then reviewing all 21,500 ports 
 for the bad ones that don't target /usr/local/bin and then correcting 
 their make files.

If should be relatively easy to spot them by variations
of Makefile, especially the mentioned PREFIX setting
which needs to be overridden in order to leave /usr/local.
If I have that in mond correctly, LOCALBASE is the name
of the variable that controls where things are put; there
was another one called X11BASE, which is deprecated because
/usr/X11R6 is now inside /usr/local.



 Before jails this problem was not a problem, But with 
 the growing usage of jails this is becoming a major incentive to not use 
 jails at all.

On the other hand, if you encounter such a problem by the
presence of a nonstandard - meaning not being part of
the base system - mail transfer agent, then maybe its
documentation should mention to pay attention when using
it instead of what the system brings, so further problems
with jails can be avoided, or at least cured (by a correct
procedure given in the documentation).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Lowell Gilbert
Fbsd1 fb...@a1poweruser.com writes:

 But that is not true. The postfix port populates /usr/bin.

By default, it does not.  You have to enable the Install into /usr and
/etc/postfix configuration option for it to do so.  I don't recommend
that anyone do it without a *really* good reason.  Turn that option back
off and you'll be fine.


-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Charlie Kester

On Wed 07 Apr 2010 at 00:24:51 PDT Fbsd1 wrote:

Why are there RELEASE base files in /usr/bin. I thought /usr was to
only contain binaries installed from ports or packages.


In many configurations, /bin and /usr/bin are not in the same slice.  In
some cases, they're not even on the same drive.  


Think about scenarios where /usr fails to mount for some reason.  Then
look at what's in /bin compared to what's in /usr/bin, and perhaps
you'll understand the logic of it.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Charlie Kester

On Wed 07 Apr 2010 at 10:13:10 PDT Charlie Kester wrote:


Think about scenarios where /usr fails to mount for some reason.  Then
look at what's in /bin compared to what's in /usr/bin, and perhaps
you'll understand the logic of it.


I should add that comparing the contents of /usr/sbin and /sbin is also
instructive.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Fbsd1

Lowell Gilbert wrote:

Fbsd1 fb...@a1poweruser.com writes:


But that is not true. The postfix port populates /usr/bin.


By default, it does not.  You have to enable the Install into /usr and
/etc/postfix configuration option for it to do so.  I don't recommend
that anyone do it without a *really* good reason.  Turn that option back
off and you'll be fine.


Your wrong. I installed the package of postfix and it installed it self 
into /usr/bin with out any help from me.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Fbsd1

Jonathan McKeown wrote:

On Wednesday 07 April 2010 11:13:13 Fbsd1 wrote:

Polytropon wrote:

On Wed, 07 Apr 2010 15:24:51 +0800, Fbsd1 fb...@a1poweruser.com wrote:

Why are there RELEASE base files in /usr/bin. I thought /usr was to only
contain binaries installed from ports or packages.

No. The /usr/local subtree (LOCAL) is for local additions (ports
and packages), while things outside this structure usually belong
to the system itself; I'm excluding mounted filesystem and other
things here for a moment.

[snip]

But that is not true. The postfix port populates /usr/bin.


I haven't installed postfix, but is this possibly related to the recently 
(2010-03-22) added option to install postfix into the base?


In which case the commit six days later claims to correct a problem with the 
default (non-base) install.


Jonathan

I installed the package of postfix and it installed is self into 
/usr/bin with out any help from me. Packages are frozen some time before 
the RELEASE is distributed to the public. The change you question would 
have never made it into the RELEASE 8.0 package.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Chuck Swiger
On Apr 7, 2010, at 4:06 PM, Fbsd1 wrote:
 Your wrong. I installed the package of postfix and it installed it self into 
 /usr/bin with out any help from me.

Unless you or whoever built the package changed $PREFIX:

% pkg_info -Lx postfix
Information for postfix-2.7.0,1:

Files:
/usr/local/man/man1/postalias.1.gz
/usr/local/man/man1/postcat.1.gz
/usr/local/man/man1/postconf.1.gz
/usr/local/man/man1/postdrop.1.gz
[ ... ]
/usr/local/share/doc/postfix/tlsmgr.8.html
/usr/local/share/doc/postfix/generic.5.html
/usr/local/etc/rc.d/postfix

...every file is under /usr/local.  Perhaps you set INST_BASE option?

[ ] INST_BASE  Install into /usr and /etc/postfix

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Fbsd1

Chuck Swiger wrote:

On Apr 7, 2010, at 4:06 PM, Fbsd1 wrote:

Your wrong. I installed the package of postfix and it installed it self into 
/usr/bin with out any help from me.


Unless you or whoever built the package changed $PREFIX:

% pkg_info -Lx postfix
Information for postfix-2.7.0,1:

Files:
/usr/local/man/man1/postalias.1.gz
/usr/local/man/man1/postcat.1.gz
/usr/local/man/man1/postconf.1.gz
/usr/local/man/man1/postdrop.1.gz
[ ... ]
/usr/local/share/doc/postfix/tlsmgr.8.html
/usr/local/share/doc/postfix/generic.5.html
/usr/local/etc/rc.d/postfix

...every file is under /usr/local.  Perhaps you set INST_BASE option?

[ ] INST_BASE  Install into /usr and /etc/postfix

Regards,



I installed the package of postfix and it installed is self into 
/usr/bin with out any help from me.


This is now I know that. I swapped a empty drive with my live system 
drive. Installed the sysinstall kern developer option to get full 
binaries and sources. After the install I set chflags schg /dir/ and 
/dir/* for these dir. /bin /boot /lib /libexec /sbin /usr/bin 
/usr/include /usr/lib /usr/libexec /usr/sbin. This should have protected 
all those RELEASE base directors and all the files in then. With the dir 
also having schg on, no files should have been able to be added to it. I 
then did a ls -lo /dir  file to save copy of their content. Then I did 
pkg_add -r postfix-current. After which i did another ls -lo /dir  file 
and to my surprise i see all these new files have been added to /usr/bin.


What am I to think? How else would you explain this?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Chuck Swiger
On Apr 7, 2010, at 4:41 PM, Fbsd1 wrote:
 I installed the package of postfix and it installed is self into /usr/bin 
 with out any help from me.

Hmm, a terrible surprise, I agree.

Please ask for a refund of your purchase price from whomever sold you such a 
package.  :-)

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: usage of /usr/bin

2010-04-07 Thread Lowell Gilbert
Fbsd1 fb...@a1poweruser.com writes:

 Lowell Gilbert wrote:
 Fbsd1 fb...@a1poweruser.com writes:

 But that is not true. The postfix port populates /usr/bin.

 By default, it does not.  You have to enable the Install into /usr and
 /etc/postfix configuration option for it to do so.  I don't recommend
 that anyone do it without a *really* good reason.  Turn that option back
 off and you'll be fine.


 Your wrong. I installed the package of postfix and it installed it
 self into /usr/bin with out any help from me.

Believe it or not, I checked before responding, so I'm *not* wrong.  I
said that the port populates into /usr/local like it should, and having
it on several machines for nearly a decade now, I knew that to be the
case.  You then changed that to refer to a package rather than a port; I
don't know where you got your packages from, but I checked the packages
for 8-STABLE and for 8.0-RELEASE, and saw that they install into
/usr/local as well.  So it sounds like your packages didn't come from
the FreeBSD project, if they are really installing anything into
/usr/bin.  

Just as a sanity check:  what, specifically, is installed into /usr/bin
on your system?  Most of the postfix executables go into sbin rather
than bin anyway, so it's possible that something in the mailwrapper
system is confusing you.  If you don't have a /usr/local/sbin/postfix,
but have a /usr/sbin/postfix instead, then this is not the case.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org