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

Re: Help With Custom Deb Package



On Fri, Nov 23, 2007 at 08:20:12AM +1100, Alex Samad wrote:
> Hi
> 
> I am in the process of rebuilding one of my servers and I thought hey why not
> build a package, that links all the other packages I need, and the
> corresponding configuration files.
> 
> I am guessing this has been thought of before but haven't seen anything for it,
> so I thought I would come to the list (tried debian-user first but realised
> that might have been the wrong place to ask the question)
> 
> I am having a look at debhelper, debian policy  and maint-guide.
> for example for server test.acme.com
> 
> I was going to create a package test.acme.com  and making it dependant on the
> required packages (I can specific a base minimum).
> 
> Any one else done this, what hurdles might I face ?  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 ???
> 
In the general case, two packages owning the same file is handled with
dpkg-divert.  I cannot remember if conffiles can be handled that way,
however.

> 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
> 
That is bad.  The next time the package whose you file replace is
upgraded, it will probably cause an error.  If not, it will want to
replace your file with the one from the package.

> 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 ?
> 
You are going about this the wrong way.  Having a meta package that
depends on other packages is fine (I use this).  However, configuration
files are a different animal.  In that case, you might be better off
repackaging the specific packages whose configuration files you want to
modify.

Regards,

-Roberto

-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Attachment: signature.asc
Description: Digital signature


Reply to: