LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-05-2006, 03:36 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Default prefix path when installing from source


Time to jump over to this forum for a question I really should have known the answer to a long time ago. Since I started with Linux (Slackware w/ installing from source), I've been extracting the source to /usr/local/src under the assumption that that was needed to have the program install in the /usr/local tree. I forget where I read about that being the "right" place to extract source, but recently I've been seeing more about putting packages in your home directory somewhere where the user account has access, rather than messing with permissions and giving users access to /usr/local/src.

1. Is there a "recommended" place to extract source destined for /usr/local that a user will be running "./configure" and "make" on?

2. Are there any circumstances where the source detects where it is and installs there, or should all source packages "make install" to the /usr/local tree regardless of where they are put in the first place?
 
Old 01-05-2006, 03:57 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by jrdioko
1. Is there a "recommended" place to extract source destined for /usr/local that a user will be running "./configure" and "make" on?
Merely a matter of taste, really.

Quote:
Originally Posted by jrdioko
2. Are there any circumstances where the source detects where it is and installs there, or should all source packages "make install" to the /usr/local tree regardless of where they are put in the first place?
That most commonly depends on the configure-script/Makefile ... I
haven't seen many apps that will install under the parent of the
current directory.


Cheers,
Tink
 
Old 01-05-2006, 04:06 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Ok. It seems to me, then, that it would be best to use /usr/local/src just for the oddball case where that does happen. Are there any downsides (no matter how small) with switching root:root to myuser:users on /usr/local/src and using that? Just wondering why I keep seeing people doing it in their home directory in the first place.
 
Old 01-05-2006, 09:21 PM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
I don't deal with /usr/local/src, but extract all of my tars to /usr/local/. That way, the bin files end up in usr/local/bin, and work for most users. The only change I have to make permission-wise is to add write ability for the group staff, as all my debain boxes have root:staff as the owner of /usr/local. The permissions by default on local are drwxr-xr-x, and by making them drwxrwxr-x, and making sure every "real" user is a member of the staff group, I can create what I need in local, yet keep things relatively safe. That way normal users can get through ./configure and make, and it still takes root power to get the package installed.

Peace,
JimBass
 
Old 01-05-2006, 09:39 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Quote:
Originally Posted by JimBass
The permissions by default on local are drwxr-xr-x, and by making them drwxrwxr-x, and making sure every "real" user is a member of the staff group, I can create what I need in local, yet keep things relatively safe. That way normal users can get through ./configure and make, and it still takes root power to get the package installed.

Peace,
JimBass
I'm curious: what constitutes a user as a "real user", and why
does he need write access to /usr/local? Thing is, if he has
write access to /usr/local he COULD be doing mischievous
things, like mv /usr/local/bin /usr/local/gotcha and
ln -s ~/bin /usr/local/bin ... I wouldn't want my users to be
able to do that.


Cheers,
Tink
 
Old 01-05-2006, 09:40 PM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by JimBass
That way, the bin files end up in usr/local/bin, and work for most users.
That's what I was saying I assumed was the case, but it sounds like almost everything should install to /usr/local/bin regardless of where the source is extracted. I'm just wondering if there are any potential problems with giving user access to /usr/local/src (i.e. why do many people choose to do it in their home directory instead).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to edit default PATH? davidas Linux - Newbie 2 03-20-2004 05:34 AM
accidently used wrong prefix when installing qt: how to move lib to right place? schatoor Linux - Software 2 02-10-2004 04:23 PM
Default PATH Itsu Linux - Software 5 01-30-2004 07:27 AM
Default path log Linux - Newbie 1 01-13-2003 09:13 AM
default path for licq glock19 Linux - General 1 01-03-2002 02:47 PM


All times are GMT -5. The time now is 01:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration