[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help With Custom Deb Package

On Fri, 23 Nov 2007, Alex Samad wrote:
Any one else done this,

Yes, I'm doing this for years.  I ended up with binary packages
andreas-base, andreas-nox, andreas-x and andreas-laptop on my
local mirror and these packages will be installed on new boxes.

what hurdles might I face ?

I did not faced any hurdles.

How am i going to handle 2
packages owning a file, for example for bind and my custom package and the file
/etc/bind/named.conf ???

You should not do this.  There are several possibilities to accomplish the
same effect.  Two of them are:

  1. Use (for instance) a cfengine skript that changes /etc/bind/named.conf
     that is provided by bind.
  2. Provide /etc/bind/named.conf.my and copy it into the right place later

Please be aware that it is not guaranteed which postinst script is called
first and thus it might happen that the bind postinst can be called either
before or after your own one.  You have two chances to make sure that bind
postinst is called first:

  1. Use bind as Pre-Depends.
  2. Use an apt  Post-Inst hook that is called before apt ends its work
     for your own package.

I have come across the replaces option for file handling I think, although now
I am thinking that i should really just replace the files in the postinst
scripts, after backing up the files into /var/backup

You could save a backup there but I personally would prefer
/etc/bind/named.conf.orig because it is closer to the original location
in case you want to do later editing.  Its a matter of personal taste.

My other thought aswell is that i need to use pre-depends on all the packages
that I want, so that they are in place and configured before my packages tried
to do any thing ?

As I wrote above you can do this.  Pre-Depends are a thing that is for
several reasons not a thing that maintainers like in official Debian
packages, but for a local package you have in mind it is OK.

Comments/ thoughts ?

Good luck



Reply to: