Y
Y
yourisus2017-01-03 22:28:15
linux
yourisus, 2017-01-03 22:28:15

Is it possible to build a package from source?

Please answer a number of questions that interest me:
1) All software packages that the system needs are located in the main directories

/bin /sbin
?
2) All software packages that in no way affect the functioning of the system are installed in the folder
/usr (/sbin, /bin)
?
3) What role does the directory play
/var
? Do all programs use it: system and user?
4) How to organize the program and understand what to include in the folder
/bin | /lib | / share | /local/
?
5) Is it possible to build a package from source if there are no "makefile" files, but there are bare directories with files? In archive\github.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Eugene Wolf, 2017-01-03
@yourisus

one.

/bin /sbin
As far as I remember, there are programs necessary for the system to boot and function normally.
2. I will skip this paragraph, because. the answer is both "yes" and "no", it's quite difficult to say "globally". But for the most part you are right.
3. Constantly changing files, such as databases, are stored there. Short for "variable". But this is still a formality, it is not uncommon for the same data to be stored in a completely unexpected place. Incl. virtual machines can be stored there, for example, the degree of "changeability" of which is quite difficult to determine. Etc.
All - no, some - definitely use it.
/bin - we have already discussed above, most likely, nothing needs to be added there.
/lib - "shared libraries" are stored there, ala .DLL in Windows, moreover, libraries that the system already provides are stored there, so, in your case, you most likely do not need to add anything there.
/share - Shared documents/files/etc., such as the default wallpaper, available to all users.
/local and /usr/local - there can be either simple programs that are not part of the distribution kit, or an entire file system, incl. your /bin /var and so on. When you build a program from source, it usually goes there.
Perhaps of course. What could interfere with this process in your opinion?
PS The Linux file system, although standardized, but the standard operates at the "recommendation" level, and it's not uncommon to find quite noticeable differences in the logic of just about everything, from package naming to how and where these packages are installed, and what directories they use. Moreover, as I wrote above, it is not uncommon for programs built from source code to create / use their own file system in /usr/local.
The FHS standard - I recommend that you familiarize yourself with it, but again, do not forget that few distributions, and even more so the manufacturers of software / packages for these distributions, adhere to these rules 100%.

S
sim3x, 2017-01-03
@sim3x

5) Is it possible to build a package from source if there are no "makefile" files, but there are bare directories with files? In archive\github.
no, you need to write a makefile
Another issue is that deb-src packages have makefiles

K
kale, 2017-01-04
@kale

1. man hier
2. If you really need it, you can. BUT hemorrhoids..

Q
qlkvg, 2017-01-04
@qlkvg

In addition to the above, if you want to learn more about FHS, watch Kuryachiy's lecture - https://m.youtube.com/watch?v=_NYkCj6_Nro. He speaks very clearly and in detail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question