1 Building and Testing
liquibyte edited this page 2026-11-19 16:23:32 -06:00

Building and Testing

What Build does, step by step, from the clean copy of the source to lintian's report, and how Test Install tries the package in a throwaway system.

What a build does

Build (Control+B) saves the project first, then goes through these steps. The ones that run a program show its output in the Build Log, under a line that names the step.

The Build Log of a build

The Build Log of a build: each step under a heading of its own.

  1. Copy the source to a clean folder, when Build in a clean copy is on. The build's folder is ~/.cache/debwright/<name>; it is made again for each build.
  2. Build: your build command.
  3. Install into the package: your install command, with $ROOT set.
  4. Leave out the excluded files, add the copyright file and the changelog, and the menu entry, the icons, the software center entry and the service file of the Desktop and Scripts pages.
  5. Compress the changelog with gzip.
  6. Strip the programs, when Strip is on.
  7. Find the libraries the programs need with dpkg-shlibdeps.
  8. Write the control file, the maintainer scripts, and the list of configuration files: every file under /etc is one, so that a user's changes to it are kept on upgrades.
  9. Write the checksums of every file (DEBIAN/md5sums).
  10. Pack the .deb with dpkg-deb. Every file is owned by root in the package; Debwright needs no root rights and no fakeroot for this.
  11. Check the package with lintian, when lintian is installed. Its report is in the Build Log; the package is made whatever it says.

A step that fails stops the build, and the status bar names it; the Build Log shows why. Stop ends a build: the step's program gets Control+C, as if you typed it in the Build Log.

Every file in the package gets the date of the newest release, so the same project always makes the same package, byte for byte.

The Build Log is a terminal: you can select and copy its text, scroll back, and search it with Control+Shift+F. Its right-click menu has the rest.

Test Install

Build > Test Install (Control+T) tries the .deb of the last build where it can do no harm. mmdebstrap makes a small Debian system in a folder, without root rights; in it, the package is installed with apt (so its dependencies are installed too, as on a user's system), the test command of the Build page is run, and the package is removed and purged. Then every file of the package that is still there is named. The system is thrown away at the end. The Build Log shows each step, and the status bar says whether it passed.

After a build for several releases, each package is tried in a throwaway system of its own release, from its distribution's mirror, one after another. A package made with no release ticked is tried in this system's release (or the one Preferences names), from its distribution's mirror (or the one Preferences names).

It needs the mmdebstrap package, and it downloads the system each time, which takes a minute or two. mmdebstrap works without root through subordinate user IDs: your account needs a range of them in /etc/subuid and /etc/subgid. When it has none, Test Install says so and gives the command that adds them, which you run once.