Using Debreate

This page is a work-in-progress. See this old PDF file for any information that may be missing here.

take me back

Contents

Packages & Package Managers

Most Linux and BSD based operating systems use package managers to install & organize software. This software is bundled in compressed archives. Debian based systems use the Debian Package Management System (dpkg) and the Advanced Packaging Tool (apt). There are also a number of GUI front-ends such as Synaptic that can be used as well.

Binary Packages

The term "binary package" refers to a software archive assembled for deployment & active use within a system. Not only do binary packages serve to distribute software applications, they can also be used for non-executable media such as images, audio, fonts, configuration files, etc.

Source Packages

Source packages require steps to prepare the contents for system use. Often part of the process includes compiling text source code into machine code to be executed on the host system or targeted at another platform (cross-compiling). Many source packages include instructions for build systems on how the contents the archive should be installed to the system. This allows the build tools to stage files in preparation for inclusion into a binary package.

Debreate's Role

As of yet, Debreate does not support creating source packages or the creation of binary packages from source. It is currently only capable of the manual creation of .deb packages using specified files ready for system deployment.

Debreate's UI

Startup

If the app's configuration file is not found on the system a dialog will display with a first time run message. A new configuration with default values will be created in ${HOME}/.config/debreate.conf. Close the dialog to access the main interface.

The UI implements a wizard-like layout. Navigation is done via the & buttons to the top-right of the window or from the "Page" menu. For a[n old] video tutorial, click the link labelled "Building a Debian Package with Debreate" on the Information page.

Menu

Description of menu options:

Control File

.deb packages contain the file DEBIAN/control. This file contains meta information about the package. Such as the package name, package version, author, & requirements. This page is the first half of filling out the control file information.

It is divided into three sections: Required, recommended, & optional. Fields under the required section must be filled out to build a package.

The three buttons on the top-right of the page allow you to do the following:

For more information see the binary package control files section of the Debian Policy Manual.

Dependencies & Conflicts

Though on a separate page, dependencies & conflicts are part of the control file.

To add an entry, select the type of dependency or conflict from the available categories. Enter the name of the package & optionally version information. Press the button to add it to the list. If there is an alternative that can be used in place of a package, fill out the fields for the alternative package (category must be the same), then select the item from the list of packages already added & press the button. Individual packages can be removed from the list with the button. And the entire list can be emptied with the button.

The three buttons in upper-right of this page have the same functions as on the Control page.

For more information see the binary dependencies section of the Debian Policy Manual.

Files

This section is for the main contents of the package that will be installed to the target system (currently some of the features are broken). Files are organized by where they will reside on the system directory tree when installed.

Files & directories can be added to the target list via the built-in directory tree on the left panel or by drag-and-drop from a system file manager. To use the directory tree, select the files & directories you want to add. Set the target path from one of the pre-defined options or use the custom path input. When ready, press to import the selection into to file list. Or right-click the directory tree to bring up a context menu & select "Add to project". The app will try to detect file MimeTypes & executability. Executable files are denoted by red text. It should be noted that files cannot be set as executable from within the app (yet). It must be executable on the filesystem before importing.

can be used to delete selected items from the item list. will remove all items. is used to open a dialog to select a path to be used for the target directory.

Directory Options:

Scripts

Debian packages support four scripts that are executed at different points during the install or uninstall process. These scripts can be useful for handling operations outside the scope of package contents, such as dynamically creating or removing symbolic links or setting up configuration files, or executing commands to update system information such as the MimeTypes database.

The supported scripts are:

These files can be formatted in the syntax of any supported scripting language & must start with the proper shebang line (#!).

Debian policy supports using binary executables in place of executable scripts, but Debreate currently does not.

Debreate also offers an Auto-Link Executables feature. This will detect executables listed on the Files page and generate a postinst script that will create symbolic links to them in the specified path. This is useful if you are installing executables to a directory that is not located on the system PATH but want to access it from the command line without requiring inputting the absolute path to the file. Auto-Link also creates a prerm script that will delete the link upon uninstalling the package.

How to use Auto-Link:

Press the button to copy any executables from the Files page. They will be listed in the right side panel. Then press the button. Post-Install and Pre-Remove scripts will be enabled & text added that when executed will place symbolic links to your executables in the path designated by the "Path" option. Any executables you do not want linked can be removed from the list with the button before generation.

For more information see the maintainer scripts section of the Debian Policy Manual.

Changelog

A changelog file is not required by Debian policy, but is useful to inform users of fixes & new features to your package. This page will generate changes information formatted according to Debian standards.

Fields Explanation:

For more information see the changelog section of Debian Policy Manual.

Copyright

Inclusion of a copyright/license file notifies end users of how the software they are receieving may be used & redistributed. The text may contain any licensing information but Debreate includes a selection of templates of commonly used free software licenses that can be generated. Some of which are detected on the host system & others are packaged with the app.

As with the changelog, the license file is installed to /usr/share/doc/<package>. If you need to install multiple licenses you should add them using the Files page.

To use a pre-defined template select the desired type from the available list. Use the button to import the entire text. Optionally edit to add copyright holder name & email address. If a "short" template is available for the selected license, you can use the button to import the path to the referenced license file.

The button can be used to refresh the list with new templates added in the ${HOME}/.local/share/debreate/templates/licenses directory. Or a custom text can be imported with the button.

For more information see the copyright considerations section of the Debian Policy Manual.

Menu

This section is for an optional menu entry to be included with the package. Adding a menu file places an icon in the system menu upon installation.

TODO: fields descriptions

Debian packages actually support multiple menu entry files using the .desktop filename extenstion. Currently, only creation of a single file is supported by this page. But as an alternative to filling out the information here, the pre-formatted files can be added on the Files page targeting either the directory /usr/share/applications or /usr/local/share/applications.

As with control files, the , , & buttons can be used to import, export, or preview a .desktop menu entry file.

For more information see the freedesktop.org Desktop Entry Specification.

Build

The final step in building the package. Press the button to begin. A dialog will open to select the output package name & location. After selecting "save" a new dialog will open displaying progress of the build. Any errors or warnings that occur during the process should be displayed after completion.

Options on this page:

Dialogs

Quick Build

The Quick Build dialog can be used to build a .deb package using a pre-formatted directory tree. The directory must include a top-level DEBIAN directory containing meta information for the package.

Fields

Update Dist Names Cache

The dist names cache is used for updating the list of available distributions on the changelog page. Distribution names are parsed from the system's /etc/lsb-release file. Updating the cache adds additional names using predefined standards or from remote sources for Ubuntu, Debian, & Linux Mint (broken).

By default the following is included for each system:

Options:

back to top