Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a deb package of a product which is part open source and part proprietary. In order to reuse the built in functionality of some distributions like Ubuntu to monitor a list of repositories and update the package when a new version comes available I will probably create such a repository.

The problem is that the proprietary part of the package depends on licenses which are valid for a limited interval versions (valid for all the versions in a course of a year). Which means that at some point of time when a new version is available it will be nice to at least warn the user that his license will not be valid for the new version.

Is there a way to do that check and interact with the user? I see that there are scripts in the deb package itself that can be executed before installation, but I have no idea if they can interact with the user and abort the package installation.

Any suggestions on how such a functionality can be created are appreciated.

share|improve this question
I know it's possible because the Java package used to do exactly this. It would present the EULA for the user to accept upon install or upgrade, and the installation would fail if the EULA was not accepted. I'm only commenting because I don't know how it worked. – supercheetah Sep 21 '10 at 20:19

If this is possible or not depends on the package management of the specific linux distribution. Usually you can include your own scripts which are called pre/post installation of the package.

See the Debian Policy Manual - Chapter 6 Package maintainer scripts for example.

Anyway, every user with a little bit of experience will be able to bypass this "protection".

If you really want to include such kind of protection (which IMHO is useless and will do more harm then good) do it in the binary of the file.

share|improve this answer
The intention of this is not to do any protection against pirates, but protection for the users so they don't get automatically updated to a new version where their license will not work any more. Because the Ubuntu (Debian) update-manager does check for updates and directly offers to install them, my question is more about control over this behavior so the users don't feel "tricked" into buying a new license to continue their normal work. – flipm0de Sep 22 '10 at 11:17

What you want is debconf. See http://www.fifi.org/doc/debconf-doc/tutorial.html

share|improve this answer

You could set up and remove your repository by asking a debconf question and copying/removing a file to/from source.list.d if the answer is positive. Users normally expect a high level of control on where we get updates from, and adding a source has security implications beyond the security of the current package, so make this easy to disable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.