FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 11-23-2007, 05:55 AM
Andreas Tille
 
Default 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


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-23-2007, 06:20 AM
Jérôme Warnier
 
Default Help With Custom Deb Package

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

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


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 ?


Comments/ thoughts ?

I did this for Ubuntu clients some time ago. The principle is identical
though, and I suggest you have a look at it, and maybe ask me questions
would you have some.

http://apt.bxlug.be/ubuntu/dupedi/


Alex




--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-23-2007, 08:46 AM
Luca Capello
 
Default Help With Custom Deb Package

Hi Alex!

On Thu, 22 Nov 2007 22:20:12 +0100, Alex Samad wrote:
> 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.

Not that I'm an expert on it, but it seems that aj's implementation
could be useful, at least for the first point, i.e. a metapackage that
installs all the other packages you need:

http://azure.humbug.org.au/~aj/blog/2007/11/14#2007-11-14-hacking-equivs

Thx, bye,
Gismo / Luca


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-23-2007, 10:01 AM
Andreas Tille
 
Default Help With Custom Deb Package

On Fri, 23 Nov 2007, Luca Capello wrote:


http://azure.humbug.org.au/~aj/blog/2007/11/14#2007-11-14-hacking-equivs


Well, if you really want a system to create your meta packages you could
either use equivs or cdd-dev. AJ is right here that you add a little bit
more complexity to the system, but if you would have a look at the
debian-med sources as an example it is not that complex. The strategy
just depends from the complexity you need.

Kind regards

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
 
Old 11-23-2007, 08:07 PM
Alex Samad
 
Default Help With Custom Deb Package

On Fri, Nov 23, 2007 at 07:55:00AM +0100, Andreas Tille wrote:
> 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/

looks good

>
> BTW, you probably want to have a look into FAI
>
> apt-cache show fai-quickstart

looks interesting

But hey seem a bit like overkill for what I am wanting to do right now, maybe
it might evolving into using something like this

>
> 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.
thanks
>
> --
> 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
>
>
 
Old 11-23-2007, 08:12 PM
Alex Samad
 
Default Help With Custom Deb Package

On Fri, Nov 23, 2007 at 10:46:14AM +0100, Luca Capello wrote:
> Hi Alex!
>
> On Thu, 22 Nov 2007 22:20:12 +0100, Alex Samad wrote:
> > 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.
>
> Not that I'm an expert on it, but it seems that aj's implementation
> could be useful, at least for the first point, i.e. a metapackage that
> installs all the other packages you need:
>
> http://azure.humbug.org.au/~aj/blog/2007/11/14#2007-11-14-hacking-equivs

That looks really good, (i missed the link earlier to the bug report). I guess
for me, I am going to have a quite a few config files and placing them all in
one file would not be the best solution, but it give me the ground work for
creating my own meta-packages

>
> Thx, bye,
> Gismo / Luca
>
>
> --
> To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
 

Thread Tools




All times are GMT. The time now is 07:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org