Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where to install user stuff

2 views
Skip to first unread message

William A. Mahaffey III

unread,
Jul 16, 2015, 12:29:42 PM7/16/15
to


.... On various SGI, Linux & FreeBSD boxen, I have always installed
in-house software under /usr/local. I notice no such directory on my
NetBSD 6.1.5 box. I did notice that pkg_add installed sudo under
/usr/pkg. Is that the recommended/standard/canonical place to install
user software under NetBSD ? I'd like to keep everything as tidy &
buttoned-down as possible :-). TIA & have a good one.


--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Greg Troxel

unread,
Jul 16, 2015, 12:42:54 PM7/16/15
to

"William A. Mahaffey III" <w...@hiwaay.net> writes:

> .... On various SGI, Linux & FreeBSD boxen, I have always installed
> in-house software under /usr/local. I notice no such directory on my
> NetBSD 6.1.5 box. I did notice that pkg_add installed sudo under
> /usr/pkg. Is that the recommended/standard/canonical place to install
> user software under NetBSD ? I'd like to keep everything as tidy &
> buttoned-down as possible :-). TIA & have a good one.

/usr/local is reserved for bits managed locally per system. Hence
pkgsrc does not use it. My view is that because pkgsrc manages
/usr/pkg, you should not hand install anything in /usr/pkg. So if you
build something not with pkgsrc, /usr/local is a fine place for it.

But really if you need something, and it's not in pkgsrc, the best thing
is to add it to pkgsrc.

Jeff Rizzo

unread,
Jul 16, 2015, 12:43:18 PM7/16/15
to
On 7/16/15 9:28 AM, William A. Mahaffey III wrote:
>
>
> .... On various SGI, Linux & FreeBSD boxen, I have always installed
> in-house software under /usr/local. I notice no such directory on my
> NetBSD 6.1.5 box. I did notice that pkg_add installed sudo under
> /usr/pkg. Is that the recommended/standard/canonical place to install
> user software under NetBSD ? I'd like to keep everything as tidy &
> buttoned-down as possible :-). TIA & have a good one.
>
>

/usr/local is a fine place to install stuff. It doesn't exist because,
well, you don't have any local stuff yet. :) /usr/pkg is where
_packages_ get installed, which are not really "local" software, because
they're standardized by pkgsrc.

Basically, install stuff anywhere you want that *isn't* allocated for
another purpose in hier(7).

Jeremy C. Reed

unread,
Jul 16, 2015, 1:14:29 PM7/16/15
to
On Thu, 16 Jul 2015, Greg Troxel wrote:

> > .... On various SGI, Linux & FreeBSD boxen, I have always installed
> > in-house software under /usr/local. I notice no such directory on my
> > NetBSD 6.1.5 box. I did notice that pkg_add installed sudo under
> > /usr/pkg. Is that the recommended/standard/canonical place to install
> > user software under NetBSD ? I'd like to keep everything as tidy &
> > buttoned-down as possible :-). TIA & have a good one.
>
> /usr/local is reserved for bits managed locally per system. Hence
> pkgsrc does not use it. My view is that because pkgsrc manages
> /usr/pkg, you should not hand install anything in /usr/pkg. So if you
> build something not with pkgsrc, /usr/local is a fine place for it.

To add to Jeff's and Greg's responses ... commonly most open source
software defaults to /usr/local for installations. So if you download
some source and use their default recipes to install, commonly they will
end up in /usr/local/.

(As an example the default autoconf m4 macros contain
ac_default_prefix=/usr/local which ends up in the default ./configure
scripts.)

If you mix and match, the package system may get some incompatibilities
or when you try to clean up you may lose some dependencies, for example.

And yes, /usr/pkg/ is the standard place to install packages on NetBSD.
Even the default configurations for executable search paths and man
pages include directories under /usr/pkg/.

> But really if you need something, and it's not in pkgsrc, the best thing
> is to add it to pkgsrc.

That's what I try to do ... hundreds of times :)
The first times add extra time and difficulty, but later cleanup or
reinstalls (or installs on others systems) it saves lots of time. And
when it hits pkgsrc officially it helps others too.

Gerard Lally

unread,
Jul 16, 2015, 5:28:52 PM7/16/15
to
At date and time Thu, 16 Jul 2015 11:35:37 +0000, William A. Mahaffey III wrote:
>
> .... On various SGI, Linux & FreeBSD boxen, I have always installed
> in-house software under /usr/local. I notice no such directory on my
> NetBSD 6.1.5 box. I did notice that pkg_add installed sudo under
> /usr/pkg. Is that the recommended/standard/canonical place to install
> user software under NetBSD ?

If you are doing ./configure, make and make install then /usr/local
will be created automatically. If you are using pkgsrc then /usr/pkg
will be the default location. You can also bootstrap pkgsrc so that it
operates in unprivileged mode; this way pkgsrc installs to bin, sbin and
so on in /home/william/pkg/ , no root user or sudo required. This is a
very nice feature of pkgsrc which honours the principle of least
privilege.

Just extract the pkgsrc tarball to $HOME and cd to ~/pkgsrc/bootstrap.
Then do
./bootstrap --unprivileged
and the configuration file ~/pkg/etc/mk.conf will be adjusted
accordingly so that software is installed to ~/pkg/bin and ~/pkg/sbin.

--
Gerard Lally
0 new messages