Testing New and Updated Packages¶
About This Task¶
Once you create a new application package as described in Building the Application Package, you must test it to ensure that it installs correctly.
You can manually install the package locally to test, to help verify its functionality. Once installed, run the application to ensure it works as expected.
Before You Begin¶
You must have the necessary development tools installed. For details, see Development Tools Overview and Requirements.
You must have a built Debian package, such as fibonacci_1.0-1_amd64.deb. For details, see Building the Application Package.
Procedure¶
Install the package locally.
The following command assumes you are in the folder where the .deb package resides.
$ apt install ./fibonacci_1.0-1_amd64.deb Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'fibonacci' instead of './fibonacci_1.0-1_amd64.deb' The following packages were automatically installed and are no longer required: docker-scan-plugin enchant fonts-cantarell g++-9 gir1.2-clutter-1.0 gir1.2-clutter-gst-3.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-evince-3.0 gir1.2-gdata-0.0 gir1.2-gnomebluetooth-1.0 --Output truncated--- The following NEW packages will be installed: fibonacci 0 upgraded, 1 newly installed, 0 to remove and 255 not upgraded. Need to get 0 B/4,060 B of archives. After this operation, 26.6 kB of additional disk space will be used. Get:1 /home/mmorton/elxr-dev/fibonacci_1.0-1_amd64.deb fibonacci amd64 .0-1 [4,060 B] Selecting previously unselected package fibonacci. (Reading database ... 747034 files and directories currently installed.) Preparing to unpack .../fibonacci_1.0-1_amd64.deb ... Unpacking fibonacci (1.0-1) ... Setting up fibonacci (1.0-1) ...
Run the application to verify it works as intended.
$ fibonacci 5 0 1 1 2 3
Notice that the package runs directly from the console, and not the local folder, which indicates a successful installation.
Results¶
While this procedure provides a simplified method for testing your package, you can also use a local repository to test an installation remotely, or add it to an existing repository to share with others.
If you want to create your own repository, you can use reprepo. This tool, created specifically for Debian-style packaging, automates the steps required to prepare a package, including creating the necessary directory structure and PGP keys. Once set up, you can share the package directory using a http server, or mirror it to an existing server to share with other team members. For additional information on using reprepo, see Debian Wiki: Debian Repository: SetupWithReprepo.
To add to an existing repository, contact your repository maintainer for additional information.