Build: control archive in .deb package

The build process is responsible for creating the control archive file from the files found in the WPKG (or DEBIAN) directory. First of all, it ignores all the files in sub-directories, the control file itself (as it is mandatory and handled separately).

The following are the special handling and potential errors while creating the control.tar.gz archive:

  • conffiles

This file is handled in a special way and it will be added to the archive as required. The loop used to add all the files simply skips this file.

  • md5sums

If that file exists in the WPKG directory, then an error is generated. wpkg creates this file and thus it does not accept your version of it.

  • debian-binary

The debian-binary file appears in the final .deb file created by wpkg or dpkg. It represents the version of the package format. It is not linked to the version of the packager which generally evolve a lot faster than the file format. If a file with this name appears in the WPKG directory then an error occurs and the build process ends.

  • wpkg-version

The wpkg-version file appears inside a final .deb file when you select the wpkg format (opposed to the Debian format.) This file cannot appear in the WPKG directory and if found there an error is generated.

  • preinst, postinst, prerm, postrm scripts

We only support shell scripts or batch scripts under MS-Windows. These files do not generate errors, however, the packager will select Unix shell scripts only for Unix system packages (i.e. architecture other than win32 or win64) and vice versa.

  • data.tar.gz

We check this special case as a data archive should never be added to the control file. We want to avoid a duplicate and make sure that the packager doesn't get confused when installing. Note that all the compression extensions and also data.tar are all checked.

  • Directory

All directories are silently skipped. Note a directory named md5sums or some other file that the packager otherwise says it doesn't like will be ignored too. This may change in the future though.