3

Using a third-party install generation tool, I created a .deb package for my application.

There are several dependencies that are required to be present on user’s Linux OS for my application to run properly. Specifically, “make”, and several “.so” libraries, like libgcc.so, libc.so etc.

Not all of our Ubuntu users may have required dependencies installed prior to running my package installer.

This third-party installer tool that I used, generates DEB package, but does not include dependency checks.

As members of the Ubuntu community, could you please comment on how a custom .DEB package without dependency checks may be received by Linux-Ubuntu users?

Is it acceptable enough to deliver .deb for a custom application that does not check dependencies? Or is it uncommon enough to ‘anger’ Linux users?

2 Answers 2

1

Disclaimer: This is almost identical to my other answer.

Since your program won't generate dependency information, we'll add it in ourselves. For example, you will need to edit the line that starts with Depends: in the format:

 Depends: package1, package2|package3

if you need package one, and one of package 2 OR package 3.

Open gedit or nano and paste:

#!/bin/bash

if [[ -z "$1" ]]; then
  echo "Syntax: $0 debfile"
  exit 1
fi

DEBFILE="$1"
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb

if [[ -e "$OUTPUT" ]]; then
  echo "$OUTPUT exists."
  rm -r "$TMPDIR"
  exit 1
fi

dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN

if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then
  echo DEBIAN/control not found.

  rm -r "$TMPDIR"
  exit 1
fi

CONTROL="$TMPDIR"/DEBIAN/control

MOD=`stat -c "%y" "$CONTROL"`
vi "$CONTROL"

if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then
  echo Not modfied.
else
  echo Building new deb...
  dpkg -b "$TMPDIR" "$OUTPUT"
fi

rm -r "$TMPDIR"

Same the file as debedit.sh, and make it executable with chmod +x debedit.sh.

Then, run debedit.sh deb_file_output.deb for the file, and edit the correct line (or add it). Save, and then use your newly created .deb file to distribute.

Source: http://ubuntuforums.org/showthread.php?t=636724

0

One answer already tells you how to add dependencies, I will try to answer your question about the perception of DEBs without dependency checks:

There are two reasons for DEB files (in this context and as I see it):

  1. Provide a combination of "tar", "make" and "make install". By that I mean that the software comes in a single file, as other software comes in a tar-archive and can be installed with a single command, like other software, which often comes with an installation script. So aunpack <packagename>.tar.gz; cd <packagename>; make; make install can be replaced with dpkg -i <packagename>.deb.
  2. Make sure, via dependencies and previous tests with the OS version it is provided for, that everything just works and that everything can be managed (installed, uninstalled) without problems.

While the command in 1) is slightly shorter than its alternative, it is from my point of view not worth the trouble and only point 2) makes a deb package useful.

SO: if you want to create a DEB package, you have to take care of both: dependency checks and tests with the OS version. If you do not include dependency checks or tests, your users (Ubuntu or Debian) will be very disappointed. Creating a DEB package without dependency checks is like cheating, making the user belief you did something for them which you did not.

My advice would be: if you don't want to add the checks by hand, do not generate a DEB package at all. Provide a short line of information that says something like "Install the software by running install.sh.". Then users know what to expect.

2
  • Thank you very much for your answers. It gives me a good insight on the subject matter. Much appreciated.
    – user98662
    Oct 24, 2012 at 0:25
  • Thanks. Feel free to upvote my answer, which is usually to way to say "the answer is good". If after a while you feel like one answer is good enough so that the question can be considered answered, you can also accept one of the answer (then click on the check mark beside the question).
    – xubuntix
    Oct 24, 2012 at 7:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .