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

Re: Help With Custom Deb Package



On Fri, Nov 23, 2007 at 07:11:31AM +0100, Andreas Tille wrote:
> 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.
sounds like where I am going

>
>> 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.
cfengine script ? is this some way of manipulating the config files ?

>   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

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

>
>> 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.
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

>
>> 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
Thanks, glad to hear that is has been successfully before
>
>       Andreas.
>
> -- 
> http://fam-tille.de
>
>
> -- 
> To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact 
> listmaster@lists.debian.org
>
>

Attachment: signature.asc
Description: Digital signature


Reply to: