Where should I put my source code? [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This question already has an answer here:
Standard location for holding software source files
4 answers
I am using multiple tools developed by the suckless people which are not configured via a config file but via their source code (in this case C) and then simply installed through make install
. So I am maintaining my own repos (need continuous changes) of these programs. The question is where should i put these repos? Directorys like /usr
or /usr/local/share
are for reference purpose. Is it /opt
, /srv
or should i just collect them somewhere in my home directory?
filesystems source root-filesystem
marked as duplicate by thrig, Kusalananda, Stephen Kitt, Christopher, Isaac Aug 23 at 17:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
0
down vote
favorite
This question already has an answer here:
Standard location for holding software source files
4 answers
I am using multiple tools developed by the suckless people which are not configured via a config file but via their source code (in this case C) and then simply installed through make install
. So I am maintaining my own repos (need continuous changes) of these programs. The question is where should i put these repos? Directorys like /usr
or /usr/local/share
are for reference purpose. Is it /opt
, /srv
or should i just collect them somewhere in my home directory?
filesystems source root-filesystem
marked as duplicate by thrig, Kusalananda, Stephen Kitt, Christopher, Isaac Aug 23 at 17:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Also: unix.stackexchange.com/questions/56394/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/30/â¦
â Kusalananda
Aug 23 at 14:15
apparently i didn't make it clear enough that these projects need need constant editing/recompiling. i read these answers before posting and they more or less suggest to use/usr/src
. the FHS however says "only for reference purposes."
â protolyse
Aug 23 at 14:28
you should put it wherever makes you happy or most practical, there is no requirement, keeping thing simple and explicit is usually best. If it wasn't for how you worded your question i would not have commented; may i suggest/usr/local/bendover/
haha
â ron
Aug 23 at 15:52
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Standard location for holding software source files
4 answers
I am using multiple tools developed by the suckless people which are not configured via a config file but via their source code (in this case C) and then simply installed through make install
. So I am maintaining my own repos (need continuous changes) of these programs. The question is where should i put these repos? Directorys like /usr
or /usr/local/share
are for reference purpose. Is it /opt
, /srv
or should i just collect them somewhere in my home directory?
filesystems source root-filesystem
This question already has an answer here:
Standard location for holding software source files
4 answers
I am using multiple tools developed by the suckless people which are not configured via a config file but via their source code (in this case C) and then simply installed through make install
. So I am maintaining my own repos (need continuous changes) of these programs. The question is where should i put these repos? Directorys like /usr
or /usr/local/share
are for reference purpose. Is it /opt
, /srv
or should i just collect them somewhere in my home directory?
This question already has an answer here:
Standard location for holding software source files
4 answers
filesystems source root-filesystem
filesystems source root-filesystem
asked Aug 23 at 13:55
protolyse
82
82
marked as duplicate by thrig, Kusalananda, Stephen Kitt, Christopher, Isaac Aug 23 at 17:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by thrig, Kusalananda, Stephen Kitt, Christopher, Isaac Aug 23 at 17:19
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Also: unix.stackexchange.com/questions/56394/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/30/â¦
â Kusalananda
Aug 23 at 14:15
apparently i didn't make it clear enough that these projects need need constant editing/recompiling. i read these answers before posting and they more or less suggest to use/usr/src
. the FHS however says "only for reference purposes."
â protolyse
Aug 23 at 14:28
you should put it wherever makes you happy or most practical, there is no requirement, keeping thing simple and explicit is usually best. If it wasn't for how you worded your question i would not have commented; may i suggest/usr/local/bendover/
haha
â ron
Aug 23 at 15:52
add a comment |Â
Also: unix.stackexchange.com/questions/56394/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/30/â¦
â Kusalananda
Aug 23 at 14:15
apparently i didn't make it clear enough that these projects need need constant editing/recompiling. i read these answers before posting and they more or less suggest to use/usr/src
. the FHS however says "only for reference purposes."
â protolyse
Aug 23 at 14:28
you should put it wherever makes you happy or most practical, there is no requirement, keeping thing simple and explicit is usually best. If it wasn't for how you worded your question i would not have commented; may i suggest/usr/local/bendover/
haha
â ron
Aug 23 at 15:52
Also: unix.stackexchange.com/questions/56394/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/56394/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/30/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/30/â¦
â Kusalananda
Aug 23 at 14:15
apparently i didn't make it clear enough that these projects need need constant editing/recompiling. i read these answers before posting and they more or less suggest to use
/usr/src
. the FHS however says "only for reference purposes."â protolyse
Aug 23 at 14:28
apparently i didn't make it clear enough that these projects need need constant editing/recompiling. i read these answers before posting and they more or less suggest to use
/usr/src
. the FHS however says "only for reference purposes."â protolyse
Aug 23 at 14:28
you should put it wherever makes you happy or most practical, there is no requirement, keeping thing simple and explicit is usually best. If it wasn't for how you worded your question i would not have commented; may i suggest
/usr/local/bendover/
hahaâ ron
Aug 23 at 15:52
you should put it wherever makes you happy or most practical, there is no requirement, keeping thing simple and explicit is usually best. If it wasn't for how you worded your question i would not have commented; may i suggest
/usr/local/bendover/
hahaâ ron
Aug 23 at 15:52
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
If youâÂÂre installing the software in /usr/local
, I would use /usr/local/src
â thatâÂÂs the local variant of /usr/src
, of which the FHS says
Source code may be placed in this subdirectory, only for reference purposes.
with a footnote adding that
Generally, source should not be built within this hierarchy.
ItâÂÂs your system though so in my opinion /usr/local/src
is fair game.
What is the "/usr/local/src" folder meant for? has more on the topic; read this answer in particular.
The general idea is to do your work in your home directory, but ensure that the source code to anything installed in /usr/local
be at least copied for reference in /usr/local/src
, so that local binaries can be rebuilt without needing a specific userâÂÂs home directory.
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
Right,/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in/usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside/usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make/usr/local/src
owned by asrc
group, setgid, and add yourself to that group (Debian used to configure systems in that way).
â Stephen Kitt
Aug 23 at 14:31
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
add a comment |Â
up vote
0
down vote
I consulted the Linux manual, specifically the page about filesystem hierarchy (man hier
)
/usr/local/src
Source code for locally installed software.
[...]
/usr/src
Source files for different parts of the system, included with
some packages for reference purposes. Don't work here with
your own projects, as files below /usr should be read-only
except when installing software (optional).
/usr/src/linux
This was the traditional place for the kernel source. Some
distributions put here the source for the default kernel they
ship. You should probably use another directory when building
your own kernel.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
If youâÂÂre installing the software in /usr/local
, I would use /usr/local/src
â thatâÂÂs the local variant of /usr/src
, of which the FHS says
Source code may be placed in this subdirectory, only for reference purposes.
with a footnote adding that
Generally, source should not be built within this hierarchy.
ItâÂÂs your system though so in my opinion /usr/local/src
is fair game.
What is the "/usr/local/src" folder meant for? has more on the topic; read this answer in particular.
The general idea is to do your work in your home directory, but ensure that the source code to anything installed in /usr/local
be at least copied for reference in /usr/local/src
, so that local binaries can be rebuilt without needing a specific userâÂÂs home directory.
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
Right,/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in/usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside/usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make/usr/local/src
owned by asrc
group, setgid, and add yourself to that group (Debian used to configure systems in that way).
â Stephen Kitt
Aug 23 at 14:31
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
add a comment |Â
up vote
2
down vote
accepted
If youâÂÂre installing the software in /usr/local
, I would use /usr/local/src
â thatâÂÂs the local variant of /usr/src
, of which the FHS says
Source code may be placed in this subdirectory, only for reference purposes.
with a footnote adding that
Generally, source should not be built within this hierarchy.
ItâÂÂs your system though so in my opinion /usr/local/src
is fair game.
What is the "/usr/local/src" folder meant for? has more on the topic; read this answer in particular.
The general idea is to do your work in your home directory, but ensure that the source code to anything installed in /usr/local
be at least copied for reference in /usr/local/src
, so that local binaries can be rebuilt without needing a specific userâÂÂs home directory.
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
Right,/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in/usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside/usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make/usr/local/src
owned by asrc
group, setgid, and add yourself to that group (Debian used to configure systems in that way).
â Stephen Kitt
Aug 23 at 14:31
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
If youâÂÂre installing the software in /usr/local
, I would use /usr/local/src
â thatâÂÂs the local variant of /usr/src
, of which the FHS says
Source code may be placed in this subdirectory, only for reference purposes.
with a footnote adding that
Generally, source should not be built within this hierarchy.
ItâÂÂs your system though so in my opinion /usr/local/src
is fair game.
What is the "/usr/local/src" folder meant for? has more on the topic; read this answer in particular.
The general idea is to do your work in your home directory, but ensure that the source code to anything installed in /usr/local
be at least copied for reference in /usr/local/src
, so that local binaries can be rebuilt without needing a specific userâÂÂs home directory.
If youâÂÂre installing the software in /usr/local
, I would use /usr/local/src
â thatâÂÂs the local variant of /usr/src
, of which the FHS says
Source code may be placed in this subdirectory, only for reference purposes.
with a footnote adding that
Generally, source should not be built within this hierarchy.
ItâÂÂs your system though so in my opinion /usr/local/src
is fair game.
What is the "/usr/local/src" folder meant for? has more on the topic; read this answer in particular.
The general idea is to do your work in your home directory, but ensure that the source code to anything installed in /usr/local
be at least copied for reference in /usr/local/src
, so that local binaries can be rebuilt without needing a specific userâÂÂs home directory.
answered Aug 23 at 14:16
Stephen Kitt
146k22320386
146k22320386
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
Right,/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in/usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside/usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make/usr/local/src
owned by asrc
group, setgid, and add yourself to that group (Debian used to configure systems in that way).
â Stephen Kitt
Aug 23 at 14:31
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
add a comment |Â
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
Right,/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in/usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside/usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make/usr/local/src
owned by asrc
group, setgid, and add yourself to that group (Debian used to configure systems in that way).
â Stephen Kitt
Aug 23 at 14:31
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
So you're saying, since it is my system i can ignore the " ... source should not be built within this hierarchy" ?
â protolyse
Aug 23 at 14:23
Right,
/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in /usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside /usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make /usr/local/src
owned by a src
group, setgid, and add yourself to that group (Debian used to configure systems in that way).â Stephen Kitt
Aug 23 at 14:31
Right,
/usr/local
is really your domain; itâÂÂs helpful to use it in a way which matches the equivalents in /usr
, but you donâÂÂt have to. Where things get a bit complicated if you try to work inside /usr/local/src
is that you shouldnâÂÂt build software as root, only become root to install it; one way to deal with that is to make /usr/local/src
owned by a src
group, setgid, and add yourself to that group (Debian used to configure systems in that way).â Stephen Kitt
Aug 23 at 14:31
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
Ok thanks I think this solves my problem. I guess the question should've been "what is a proper workflow/setup"
â protolyse
Aug 23 at 14:47
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
@protolyse It's up to you. If several people are working against the same repository, it makes most sense for them to have private clones of it in their home directories somewhere.
â Kusalananda
Aug 23 at 15:41
add a comment |Â
up vote
0
down vote
I consulted the Linux manual, specifically the page about filesystem hierarchy (man hier
)
/usr/local/src
Source code for locally installed software.
[...]
/usr/src
Source files for different parts of the system, included with
some packages for reference purposes. Don't work here with
your own projects, as files below /usr should be read-only
except when installing software (optional).
/usr/src/linux
This was the traditional place for the kernel source. Some
distributions put here the source for the default kernel they
ship. You should probably use another directory when building
your own kernel.
add a comment |Â
up vote
0
down vote
I consulted the Linux manual, specifically the page about filesystem hierarchy (man hier
)
/usr/local/src
Source code for locally installed software.
[...]
/usr/src
Source files for different parts of the system, included with
some packages for reference purposes. Don't work here with
your own projects, as files below /usr should be read-only
except when installing software (optional).
/usr/src/linux
This was the traditional place for the kernel source. Some
distributions put here the source for the default kernel they
ship. You should probably use another directory when building
your own kernel.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I consulted the Linux manual, specifically the page about filesystem hierarchy (man hier
)
/usr/local/src
Source code for locally installed software.
[...]
/usr/src
Source files for different parts of the system, included with
some packages for reference purposes. Don't work here with
your own projects, as files below /usr should be read-only
except when installing software (optional).
/usr/src/linux
This was the traditional place for the kernel source. Some
distributions put here the source for the default kernel they
ship. You should probably use another directory when building
your own kernel.
I consulted the Linux manual, specifically the page about filesystem hierarchy (man hier
)
/usr/local/src
Source code for locally installed software.
[...]
/usr/src
Source files for different parts of the system, included with
some packages for reference purposes. Don't work here with
your own projects, as files below /usr should be read-only
except when installing software (optional).
/usr/src/linux
This was the traditional place for the kernel source. Some
distributions put here the source for the default kernel they
ship. You should probably use another directory when building
your own kernel.
answered Aug 23 at 16:38
loa_in_
22717
22717
add a comment |Â
add a comment |Â
Also: unix.stackexchange.com/questions/56394/â¦
â Kusalananda
Aug 23 at 14:15
Also: unix.stackexchange.com/questions/30/â¦
â Kusalananda
Aug 23 at 14:15
apparently i didn't make it clear enough that these projects need need constant editing/recompiling. i read these answers before posting and they more or less suggest to use
/usr/src
. the FHS however says "only for reference purposes."â protolyse
Aug 23 at 14:28
you should put it wherever makes you happy or most practical, there is no requirement, keeping thing simple and explicit is usually best. If it wasn't for how you worded your question i would not have commented; may i suggest
/usr/local/bendover/
hahaâ ron
Aug 23 at 15:52