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

Re: Help With Custom Deb Package

On Thu, Nov 22, 2007 at 05:55:31PM -0500, Roberto C. Sánchez wrote:
> 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.
I am not sure how this is different from when I manually change a conf file 
like /etc/bind/named.conf. I would have presumed that the original package 
would ask if I wanted to overwrite or leave the file alone.

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

This mean I would have to repackage alot of packages, off the top of my head, 
apache, postgres, exim, squid, sshd, slapd, imap.

I hear the word about meta packages this seems to be the way forward, I just 
want to automate the configuration as well.  I was thinking a post inst script 
that placed the new config files in place - this is just about the same as me 
editing the files in place.

I would like to be able to 

1) install a new machine with net inst cd, do a bare minimum install
2) apt-get install alex-server-<servername>

and it be done, then I can keep the source for alex-server-<servername> in cvs 
and track any changes.

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

Attachment: signature.asc
Description: Digital signature

Reply to: