[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:

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.
sounds like where I am going

Yes (according to the explanation in your other mail).

  1. Use (for instance) a cfengine skript that changes /etc/bind/named.conf
     that is provided by bind.
cfengine script ? is this some way of manipulating the config files ?

   apt-cache show cfengine2
   http://www.cfengine.org/

BTW, you probably want to have a look into FAI

   apt-cache show fai-quickstart

If I would have to set up >=3 servers to set up at the same time I
would go with FAI.  Sounds like a really great concept.  You have to
invest some time in the beginning, but once you have done the first
steps you will probably very happy. ;-)

  2. Provide /etc/bind/named.conf.my and copy it into the right place later
can I do this via postinst script - I would like to full automate the setup of
my box

Yes, but see below.  And "full automate" smells really strong like FAI. ;-)

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.

Which is a safer option, isn't post-inst order still un deterministic, so I am
guess pre-depends is better

Sorry I meant "Post-Invoke".  You drop a script into /etc/apt/apt.conf.d
that contains

DPkg {Post-Invoke {"Do-Your-Stuff-Script";};}

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.
I usually use .orig, but I have notice a lot of packages (slapd, aptitude)
placing there backups there, thought it might be the place to put them

Well, than use not 'orig', but 'orig_before_my_script' ...

Thanks, glad to hear that is has been successfully before

I guess FAI is done much more often and you might get quite good support
on FAI lists.  But regarding this topic I'm personally incompetent.

Kind regards

        Andreas.

--
http://fam-tille.de



Reply to: