title: Sourcing common functions in debian maintainer scripts
body: <p>I have a number of common functions that I would like to source, so it's available in the debian maintainer scripts (preinst/postinst/prerm/postrm), call it common.sh.</p>
  
  <p>If I add "common.sh" to the DEBIAN directory, dpkg complains:</p>
  
  <pre><code>dpkg-deb: warning: conffile '' is not a plain file
  dpkg-deb: warning: ignoring 1 warning about the control file(s)
  </code></pre>
  
  <p>However, the package builds properly. </p>
  
  <p>When I install, it's difficult to find the proper directory where my common.sh exists. In preinst it seems to be looking for <code>/var/lib/dpkg/tmp.ci</code>, while in postinst it seems to look for <code>/var/lib/dpkg/info</code>.</p>
  
  <p>I could stick the common.sh in a tmp directory and delete it later, but I get the feeling that files installed to the OS should remain their until dpkg can remove them.</p>
  
  <p>At any rate, I'm wondering what the true 'debian' way of doing this would be?</p>