Ubuntu packages

Ubuntu natively supports Debian packages, which usually have a filename ending in .deb and contain the files needed to implement a set of related commands or features.

There are two types of Debian packages: binary and source packages.

  • Binary packages contain executable files, configuration files, man/info pages, copyright information and other documentation. The binary packages are directly used by dpkg during .deb package installation.
  • Source packages contain the source code as well as the instructions for building binary packages. Source packages are not installable; they are just unpacked in whatever directory you want to build the binary packages they produce.

SA exclusively uses Debian binary packages, which have the following characteristics:

  • They conform to the following naming convention:
    <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb

By convention, the .deb package names should be lowercase. When a package that does not conform to the naming convention is uploaded to SA, the package name is converted to respect the convention. The original file name will still be displayed in the SA Client, however. This difference has no impact on the compliance.

They have the following structure:

debian-binary
control.tar.gz
data.tar.gz

Where:

  • debian-binary - This is a text file which simply indicates the version of the .deb file used.
  • control.tar.gz - This archive file contains all of the available meta-information, such as the name and version of the package. Some of this meta-information is used by the package management tools during package operations. For example, it may be used to determine if it is possible to install or uninstall the package according to the list of packages already on the machine. Usually, this archive contains a control file, the manifest of the .deb package, and some executable scripts (preinst, postinst, prerm and postrm) that are automatically run before or after a package is installed.

SA will not honor the reboot requests in the preinst, postinst, prerm and postrm scripts. By default, when a DEB package is imported to SA, the "Reboot Required" option is set to No. If the Reboot Required option is enabled in the installation/remediation job, the system will be rebooted as requested.

data.tar.gz - This archive contains all of the files to be extracted from the package; this is where the executable files, documentation, etc., are all stored.

By default, if you want to install package A on your Ubuntu system and this package recommends package B, if package B is available, it will be installed as side-effect. However, because package B is not an explicit dependency, it will not be uninstalled when package A is uninstalled. This behavior is due to the Ubuntu native tools.

Debian metadata

The package metadata is available in the control.tar.gz archive file, described in Ubuntu packages.