Binary package? How to build them

binarycompilingdebpackage-managementpackaging

I want to get detail about binary package and run them on linux. I am running Debian base (Ubuntu/Linux mint) Linux os.

  1. How to build binary package from source? And can I directly download
    binary package for applications (like firefox, etc.) and games (like
    boswars, etc.) ?
  2. I run some direct package which is in "xyz.linux.run" format What
    are these package? Are they independent of dependencies? or Is it
    pre-built binary packages?
  3. How to build them which can be run on linux operating system by
    directly "xyz.linux.run" on linux.
  4. What is diference between binary package and deb package?

Best Answer

In a strict sense a binary file is one which is not character encoded as human readable text. More colloquially, a "binary" refers to a file that is compiled, executable code, although the file itself may not be executable (referring not so much to permissions as to the capacity to be run alone; some binary code files such as libraries are compiled, but regardless of permissions, they cannot be executed all by themselves). A binary which runs as a standalone executable is an "executable", although not all executable files are binaries (and this is about permissions: executable text files which invoke an interpreter via a shebang such as #!/bin/sh are executables too).

What is a binary package?

A binary package in a linux context is an application package which contains (pre-built) executables, as opposed to source code.

Note that this does not mean a package file is itself an executable. A package file is an archive (sort of like a .zip) which contains other files, and a "binary" package file is one which specifically contains executables (although again, executables are not necessarily truly binaries, and in fact binary packages may be used for compiled libraries which are binary code, but not executables). However, the package must be unpacked in order for you to access these files.

Usually that is taken care of for you by a package management system (e.g. apt/dpkg) which downloads the package and unpacks and installs the binaries inside for you.

What is diference between binary package and deb package?

There isn't -- .deb packages are binary packages, although there are .debs which contain source instead, these usually have -src appended to their name.

I run some direct package which is in "xyz.linux.run" format What are these package?

Those are generally self-extracting binary packages; they work by embedding a binary payload into a shell script. "Self-extracting" means you don't have to invoke another application (such as a package manager) in order to unpack and use them. However, since they do not work with a package manager, resolving their dependencies may be more of a crapshoot and hence some such packages use statically linked executables (they have all necessary libraries built into them) which wastes a bit of memory when they are used.

Related Question