General Software Tarball Usage Question

Hello,

I have a pretty basic question regarding tarballs and their usage. I think I somehow missed the part where this type of issue is discussed the first time around and I could not find the relevant information going back.

For example in emacs tarball (I think emacs use zip actually, so maybe not the best example, but the problem has the same general shape), you have directories like bin, etc, and include. Their names correspond to the various important system directories.

Are the files and under and sub-directories under these directories meant to be put into the system directories? If so, how is it done? If not, why are the tarballs structured the way it is?

FreeBSD has the port system. Mostly, I would just install from software using that. However, for something really obscure and I got such a tarball, what should I do with it to install the program?

Thanks in advance.
 
Are the files and under and sub-directories under these directories meant to be put into the system directories? If so, how is it done? If not, why are the tarballs structured the way it is?
It depends on the project, and one who made it.

The reason why the whole thing is structured in the way it is is to make it obvious which parts do what. Even without looking you'll know that the executable parts will be in the bin directory, libraries in lib, and so on. It's simply the most logical way to separate the whole lot.

Sure, you could dump it into a system folder. I'd recommend against it though because you'll never be able to easily tell where the stuff came from. A better way is to create a dedicated directory and extract the tarball in there. Still, in the end it heavily depends on the software itself.
 
  • Thanks
Reactions: yth
Tarballs are just generic archive files, they themselves have no information on how they were meant to be used unless you know that from the place you got the file from. They can contain sources and in that case they are meant to be extracted to a work directory and built into binaries, for example with FreeBSD ports(7) these tarballs are called distfiles. They can contain pre-packaged binary software that is meant to be installed on the system either by manual extraction or in case of FreeBSD binary packages with the pkg(8) package manager.

On FreeBSD however I wouldn't trust anything else but the official packages or the ports you build yourself, anything else should be treated with suspicion, either for brokenness or a shady source.
 
  • Thanks
Reactions: yth
Back
Top