How to create artifical package to circumvent dependency checking

Create simple artifical package to work around missing dependencies,

Install equivs utility.

$ sudo apt-get install equivs

Create configuration file for artifical package.

$ equivs-control libmissing

Inspect created configuration template.

$ cat libmissing
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2

Package: <package name; defaults to equivs-dummy>
# Version: <enter version here; defaults to 1.0>
# Maintainer: Your Name <[email protected]>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Architecture: all
# Multi-Arch: <one of: foreign|same|allowed>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
#  <more pairs, if there's more than one file to include. Notice the starting space>
Description: <short description; defaults to some wise words>
 long description and info
 second paragraph

Modify configuration file to reflect artifical package data.

$ cat libmissing
Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: libmissing
Version: 1.1.0+artificial
Description: lib missing
 satisfy dependency for libmissing

Build artificial package.

$ equivs-build libmissing
dh_install: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)
dpkg-deb: building package 'libmissing' in '../libmissing_1.1.0+artificial_all.deb'.

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!

Install created package.

$ sudo dpkg -i libmissing_1.1.0+artificial_all.deb
Selecting previously unselected package libmissing.
(Reading database ... 27043 files and directories currently installed.)
Preparing to unpack libmissing_1.1.0+artificial_all.deb ...
Unpacking libmissing (1.1.0+artificial) ...
Setting up libmissing (1.1.0+artificial) ...

Package will be marked as installed.

$ apt-cache policy libmissing
  Installed: 1.1.0+artificial
  Candidate: 1.1.0+artificial
  Version table:
 *** 1.1.0+artificial 100
        100 /var/lib/dpkg/status

Additional information

Template file used by equivs-control is located in /usr/share/equivs/template.ctl.

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system.