Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had a quick dpkg/debian-izing question. I am trying to create a .deb(by hand - mostly for learning purposes) and I have rolled up an ar-chive with the control.tar.gz, data.tar.gz and the debian-binary files.

This hand-rolled .deb works fine for regular installs, purges et al. However when I specify an --instdir at install time, dpkg reports a 'file not found' error when trying to run the postinst script. This is not an issue with the prerm script, btw(which works fine).

Running dpkg with --debug=2000 and looking at /var/log/dpkg.log didn't help much.

Any thoughts on why this could be happening?

TIA.


To give some more context and pose another question: I am trying to get --instdir to work mostly because the top level directory to which my package contents get installed is also a mount point and on doing dpkg -P foo, dpkg attempts to remove this directory. If anyone can suggest a workaround for this, that would serve my purpose too(i.e. I wouldn't need --instdir to work). Also, this top-level directory is not empty, so not sure why dpkg is attempting to remove it. Putting a .placeholder file in there didn't help either.

share|improve this question
add comment

1 Answer

As it is listed here (http://stackoverflow.com/questions/8921626/run-time-installation-directory-of-debian-package-contents) dynamic directory paths are not supported in deb packages with prepackaged binaries. But you can specify the directory path not at runtime but in your control file. And for easy making of packages you can use some graphical tools (ex., mentioned here: http://askubuntu.com/questions/8055/graphical-tool-for-creating-deb-packages).

share|improve this answer
add comment

Your Answer

 
discard

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.