A Kippo debian package

103 views
Skip to first unread message

mig5

unread,
Jul 16, 2011, 10:31:06 AM7/16/11
to kippo users
Hey folks,

I recently had a requirement to roll out servers automatically with
Kippo installed. Since I use Puppet for this sort of thing, I wrote a
quick deb package for Kippo and dropped it onto my personal Debian
repository.

It's not at all a perfect Debian package e.g it doesn't abide by the
various strict rules laid out in the Debian maintainer's guide/
policies, but it does work (for me, anyway :) ) so I make no pretense
about this being something I'd try to get into Debian proper (not even
sure if BSD-licensed software can do so in Debian? Maybe.)

Anyway, if you're interested in a simple 'apt-get install kippo' for
any reason, feel free to take a look at my article here: http://mig5.net/node/333

I'll probably refine it a bit more over the coming weeks. (postinst/
postrm scripts etc need a bit of cleanup / documentation)

Cheers,

mig5

Leon v/d Eijk

unread,
Jul 16, 2011, 12:42:39 PM7/16/11
to kippo...@googlegroups.com
Sweet ! Will check it out this week if time permits. This could come
in handy for me mate. Nice work

> --
> You received this message because you are subscribed to the Google Groups "kippo users" group.
> To post to this group, send email to kippo...@googlegroups.com.
> To unsubscribe from this group, send email to kippousers+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/kippousers?hl=en.
>
>

Upi Tamminen

unread,
Jul 16, 2011, 6:53:29 PM7/16/11
to kippo...@googlegroups.com
Hi!

Cool stuff!

I made a debian package of kippo at some point (and got frustrated by various
things and forgot about it), so I have a special interest in how it's built.
I installed it and took a quick look at what's installed and where. Some
notes:

It creates a /.pc/ directory and /.pc/debian-changes-0.5+svn20110716-1 on my
server. Never seen this before by other packages.

The init.d script looks short and sweet, but could maybe use the pidfile to
kill the process?

About kippo.cfg - the debian way would probably be to install kippo.cfg
instead of kippo.cfg.dist. If needed, the service could be disabled by default
by a config setting or an environment variable stored in /etc/default/kippo.

Maybe the binaries like playlog.py should be in some PATH directory. Since
their names are kinda generic, maybe the package could rename them to
something like kippo-playlog, kippo-createfs, ...

The file paths are looking good to me - packaging like this is exactly why
every path is configurable in kippo.cfg :)

There's i386 and amd64 versions of the package, while kippo is actually
arch-independent (being all python). I've forgotten now how this stuff is
handled in debian packaging, but my package ended up as *_all.deb. I can
investigate this more later.

Thanks for working on this!

mig5

unread,
Jul 16, 2011, 7:08:51 PM7/16/11
to kippo users
Hi Upi,

On Jul 17, 8:53 am, Upi Tamminen <desas...@gmail.com> wrote:
> It creates a /.pc/ directory and /.pc/debian-changes-0.5+svn20110716-1 on my
> server. Never seen this before by other packages.

Sorry about this, I think they are remnants from an earlier experiment
building the package with different Debian tools (dhmake possibly)


> The init.d script looks short and sweet, but could maybe use the pidfile to
> kill the process?

Yes it was quickly thrown together. Needs a lot of work :)


> About kippo.cfg - the debian way would probably be to install kippo.cfg
> instead of kippo.cfg.dist. If needed, the service could be disabled by default
> by a config setting or an environment variable stored in /etc/default/kippo.

That's a good idea about /etc/default/kippo actually. Totally agree.


> Maybe the binaries like playlog.py should be in some PATH directory. Since
> their names are kinda generic, maybe the package could rename them to
> something like kippo-playlog, kippo-createfs, ...

Even better. I thought a similar thing about putting them in /usr/
bin/ , but worried about the non-descript filenames. I guess it hadn't
occurred to me to make as big a change as renaming the actual scripts
(though I did do this with start.sh :) )


> There's i386 and amd64 versions of the package, while kippo is actually
> arch-independent (being all python). I've forgotten now how this stuff is
> handled in debian packaging, but my package ended up as *_all.deb. I can
> investigate this more later.

Yeah - an earlier attempt at building the package didn't like me
putting Architechture: All in the control file. So I built two
separate packages. However I just noticed I can build an 'all' package
with dpkg-deb, so I'll do that (which makes life a lot easier for me!)


> Thanks for working on this!

Thanks for the great feedback! I'll definitely work on the init
script, /etc/default/kippo and the other script names/locations,
hopefully some time today.

Mig

mig5

unread,
Jul 16, 2011, 7:57:39 PM7/16/11
to kippo users
That was a little quicker than expected! :)

/etc/init.d/kippo is now a proper start-stop-daemon script based on /
etc/init.d/skeleton. pidfiles etc.

It won't start until /etc/default/kippo is set START_DAEMON to yes.
the config file in /etc/kippo is now kippo.cfg.

The utility binaries are now:

kippo-convert32
kippo-createfs
kippo-passdb
kippo-playlog

in /usr/bin/

A README.Debian has been dropped into /usr/share/kippo/utils/ in case
anyone gets confused by that. I also dropped in a README.Debian into /
usr/share/doc/kippo explaining a bit about the file dispersal and how
it differs from the source Kippo package in order to suit the 'Debian
way'.

There's now only an architecture-all deb package.

Not bad for first thing Sunday morning! :)

Thanks again for the great tips.

Mig
Reply all
Reply to author
Forward
0 new messages