Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage multiple package dependencies with checkinstall?

I have a package that I've been building using checkinstall for a while now, and I wanted to automate it (pass the values in via command line instead of typing the selection, pasting the value in, etc...)

I am not sure if this is a checkinstall bug, or not, but how can I include multiple packages via the command line --requires option. It seems to barf if I include the minimum version of a package (for exmple --requires="libvte9 (>= 0.28.2)"), or multiple packages at once (for example --requires "libvte9, libc6")

Has anyone had better success with the command line arguments for multiple packages? Am I doing something wrong, or is this a bug.

Note: If I run the script, and choose the requires option (10), and paste my entire line with multiple packages and minimum versions (such as libvte9 (>= 0.28.2), libc6 (>= 2.13), it works fine, it just seems to be on the command line that it's having issues. Also this is with building a debian package, using the -D option.

like image 494
Jeff Geisperger Avatar asked Aug 21 '13 19:08

Jeff Geisperger


People also ask

What is CheckInstall package?

CheckInstall is a computer program for Unix-like operating systems which eases the installation and uninstallation of software compiled from source by making use of package management systems.

What is CheckInstall in Debian?

checkinstall keeps track of all the files created or modified by your installation script, builds a standard binary package (. deb, . rpm, . tgz) and installs it in your system giving you the ability to uninstall it with your distribution's standard package management utilities.

What are package dependencies?

A dependency is another package that your package needs in order to work. Dependencies are specified in your pubspec. You list only immediate dependencies—the software that your package uses directly.


1 Answers

After reading Aleks-Daniel Jakimenko-A.'s answer, Reallumpi's one and doing some tests on a real life case, here is what you should do:

  1. use , (comma) without spaces to separate required packages ;
  2. escape ( and ) parenthesis when specifying package's version ;
  3. escape > (greater sign) when specifying package's version ;

Example

make && sudo -k checkinstall \
    --pkgsource="https://github.com/raboof/nethogs/" \
    --pkglicense="GPL2" \
    --deldesc=no \
    --nodoc \
    --maintainer="$USER\\<$USER@$HOSTNAME\\>" \
    --pkgarch=$(dpkg \
    --print-architecture) \
    --pkgversion="0.8.1" \
    --pkgrelease="SNAPSHOT" \
    --pkgname=nethogs \
    --requires="libc6 \(\>= 2.4\),libgcc1 \(\>= 1:4.1.1\),libncurses5 \(\>= 5.5-5~\),libpcap0.8 \(\>= 0.9.8\),libstdc++6 \(\>= 4.1.1\),libtinfo5" \
    make install

Output

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 -  Maintainer: [ elopez<elopez@> ]
1 -  Summary: [ Net top tool grouping bandwidth per process ]
2 -  Name:    [ nethogs ]
3 -  Version: [ 0.8.1 ]
4 -  Release: [ SNAPSHOT ]
5 -  License: [ GPL2 ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ https://github.com/raboof/nethogs/ ]
9 -  Alternate source location: [  ]
10 - Requires: [ libc6 (>= 2.4),libgcc1 (>= 1:4.1.1),libncurses5 (>= 5.5-5~),libpcap0.8 (>= 0.9.8),libstdc++6 (>= 4.1.1),libtinfo5 ]
11 - Provides: [ nethogs ]
12 - Conflicts: [  ]
13 - Replaces: [  ]
like image 197
Édouard Lopez Avatar answered Oct 08 '22 04:10

Édouard Lopez