DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th May 2008
ducu_00 ducu_00 is offline
Real Name: Alexandru Cristea
Port Guard
 
Join Date: May 2008
Location: Romania
Posts: 12
Thanked 0 Times in 0 Posts
Default /usr/local and application directories

I want to install the ABC commercial application on a FreeBSD system. The installation script of the packed kit wants to create the ABC application directory with its own structure (ABC/bin, ABC/var, ABC/etc, etc). Where should I tell the script to make that directory? I want to make that application available for all of the system users, so my home directory is not an option.

Does the "/usr/local/ABC" directory comply with the hier specifications?

Man hier says:
......
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)
.......

There's no provision for "/usr/ABC" in hier, so "/usr/local/ABC" is illegitimate, too. Did I miss something?

So, where should I create my ABC/ directory?
Reply With Quote
  #2   (View Single Post)  
Old 18th May 2008
lvlamb's Avatar
lvlamb lvlamb is offline
Real Name: Louis V. Lambrecht
Spam Deminer
 
Join Date: May 2008
Location: .be
Posts: 221
Thanked 25 Times in 24 Posts
Default

Mail te maintainer for the ABC port.
Since we don't know what the ABC port stands for, neither do we know your OS version, or eventual error messages from your instlation, how do you expect anyone to help?
Further, if an author decides to put his own hierarchy under a given sub-tree, he might have reasons.
Formerly, under Linux, they used to use the /opt entry for these special setups.
__________________
da more I know I know I know nuttin'
Reply With Quote
  #3   (View Single Post)  
Old 18th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Well the age old rule in my book.

Administrators rule the hierarchy!

The depending on what it is proper place by convention would probably be /usr/local/ABC or /opt/ABC or /ABC -> note that FreeBSD doesn't create an /opt and I don't mind ;-)


I also tend to be quite strict on local system data residing separate from the rest of the system but people are generally free to do what they want.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #4   (View Single Post)  
Old 18th May 2008
ducu_00 ducu_00 is offline
Real Name: Alexandru Cristea
Port Guard
 
Join Date: May 2008
Location: Romania
Posts: 12
Thanked 0 Times in 0 Posts
Default

ABC is a pure hypothetical example. I simply want to know where to put an application directory if the *BSD hier does not mention such a case and the FHS /opt directory is subject of dispute between linux and *BSD gurus.
I know I could make the application directory wherever I want to (/ABC, /opt/ABC, /usr/local/ABC, /usr/ABC) but I want to be a "good citizen in the *BSD world", as I am in the linux world (/opt/ABC).
Reply With Quote
  #5   (View Single Post)  
Old 18th May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

Some ports like JDK, Acrobat reader, UnrealTournament etc. install everything to /usr/local/<portname>.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #6   (View Single Post)  
Old 18th May 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Quite a few programs install into /usr/local/ABC, but not all of them do, unless your package has a completely unique directory structure, Why not place binaries in /usr/local/bin(or sbin), man pages in /usr/local/man.. resources or default data in /usr/local/share/ABC/*

As for user specific configuration files, create a hidden directory in the users home directory... /home/user/.ABC/*

That's pretty much a safe default for most software, the whole /opt + FHS thing is so Linux-centric..
Reply With Quote
  #7   (View Single Post)  
Old 18th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

I believe TeXLive it's files by default as /usr/local/TeXLive/YYYY/* at least that's what I recall when installing it on my BSD machine.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #8   (View Single Post)  
Old 21st May 2008
ducu_00 ducu_00 is offline
Real Name: Alexandru Cristea
Port Guard
 
Join Date: May 2008
Location: Romania
Posts: 12
Thanked 0 Times in 0 Posts
Default

Thank you for your replies.

I want to conclude, if you don't mind.

If I want to install a non open-source application which wants to create an application directory on a *BSD system, I have NO standard BSD hier compliant solution but an accepted one - to install in /usr/local. Any other location is possible but not acceptable in the BSD world.

Please correct me if I'm wrong.
Reply With Quote
  #9   (View Single Post)  
Old 21st May 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Quote:
Originally Posted by ducu_00 View Post
Thank you for your replies.

I want to conclude, if you don't mind.

If I want to install a non open-source application which wants to create an application directory on a *BSD system, I have NO standard BSD hier compliant solution but an accepted one - to install in /usr/local. Any other location is possible but not acceptable in the BSD world.

Please correct me if I'm wrong.
Most BSD users assume 3rd party packages will be installed into /usr/local, and as such, /usr and/or /usr/local are often separate "larger" partitions.

The size of the / partition is not guaranteed, in fact, it's only 150M on my workstations.. as you can see, users might not be happy with you creating a /opt directory and using up all the available space.

That's my opinion.
Reply With Quote
Old 21st May 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

I like to keep things clean and separated on my systems:
  • / and /usr are for the OS
  • /usr/local is for stuff installed via ports/packages
  • /opt is for stuff I compile/install by hand
Everything is kept separate, there's no chance of anything I install messing things up with the system, and it's a simple "newfs /opt" to uninstall everything.

Of course, as the admin for my systems, I can make up whatever rules I like.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 21st May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

I believe the formal nature of things would be three hierarchies

/ level -> needed for starting the system, the real critical stuff. And probably holdovers from old unix days.

/usr level -> stuff that came with the OS but non-essential to starting the system, i.e. /bin/shd versus /usr/bin/vi

/usr/local level -> the local systems crap including /usr/local/bin/emacs.

Quote:
Originally Posted by phoenix
Of course, as the admin for my systems, I can make up whatever rules I like.
xD
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 23rd May 2008
ducu_00 ducu_00 is offline
Real Name: Alexandru Cristea
Port Guard
 
Join Date: May 2008
Location: Romania
Posts: 12
Thanked 0 Times in 0 Posts
Default

Let me reformulate: where should I/we put an application directory (which means a directory containing ALL of the application files, into it's own structure, under a common root, ABC/ for example) if the standard *BSD filesystem hierarchy provides no room for it?

Should we blame the application developers for packaging the port like that or the standard for being too restrictive?

An FreeBSD port example is bdc. It installs everything under /usr/local/bdc. Is this path hier compliant?

Quote:
I believe the formal nature of things would be three hierarchies

/ level -> needed for starting the system, the real critical stuff. And probably holdovers from old unix days.

/usr level -> stuff that came with the OS but non-essential to starting the system, i.e. /bin/shd versus /usr/bin/vi

/usr/local level -> the local systems crap including /usr/local/bin/emacs.
Reply With Quote
Old 23rd May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

${PREFIX}/${PORTNAME}
i.e. /usr/local/bdc

Some ports also install everything to ${DATADIR}
i.e. /usr/local/share/bdc

Use whatever you prefer, AFAIK here is no official guideline/rule
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 23rd May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

The manual doesn't define the contents of /usr/local in specific any way
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 23rd May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

hier(7) does:
Quote:
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).
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AIX: Which Application is Using a Specific Port vermaden Guides 5 12th April 2009 04:01 AM
Best Web Application Language JMJ_coder Programming 24 25th November 2008 12:25 PM
Kickstart-like application for ports stukov FreeBSD Ports and Packages 7 11th November 2008 04:33 PM
What include and shared library directories are searched by gcc kasse FreeBSD General 3 16th July 2008 08:44 PM
Home directories suddenly missing in Samba Dagoles FreeBSD General 4 22nd May 2008 12:50 AM


All times are GMT. The time now is 08:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick