Translation(s): none
Summary
A project to provide an infrastructure for automatic init script generation in simple cases.
Links
Base Ideas on HackFests/Init
Links to various Blog entries on https://penta.debconf.org/visitor/dc7/event/129
Discussion happening here and on http://lists.alioth.debian.org/mailman/listinfo/initscripts-ng-devel
Current Source http://darcs.nomeata.de/metainit/ (http://darcs.nomeata.de/cgi-bin/darcsweb.cgi?r=metainit)
You can find binaries and the debian source package on: http://people.debian.org/~nomeata/metainit
A description of the metainit file format (as perldoc): http://darcs.nomeata.de/cgi-bin/darcsweb.cgi?r=metainit;a=headblob;f=/lib/MetaInit/Parse.pm
Example metainit files: http://darcs.nomeata.de/metainit/examples/
A descriptions of the steps to upgrade a package to metainit: http://darcs.nomeata.de/metainit/doc/converting.txt
A debian directory of a simple daemon (without debhelper): http://infon.dividuum.de/trac/browser/trunk/contrib/debian?rev=208
A debian directory of a simple daemon (with debhelper): http://infon.dividuum.de/trac/browser/trunk/contrib/debian?rev=210
A list of init scripts in debian and their metainit-able status (please contribute): /InitSurvey
Problem to solve
A lot of packages ship init scripts, and most of these scripts are both not very well cared for (just copy’n’pasted and slightly adjusted) and also very similar. Fixing this is hard, and so is introducing new features to all init scripts.
Outline of metainit
Metainit compromises of
- A small declarative file format to describe the daemon, to be shipped by the package (or created by a local admin)
- A meatinit package that creates init scripts (or, yet to be written, upstart jobs) from these files
- A dh_metainit scripts to ease the inclusion of metainit files in your package, that adds appropriate maintainer script snippets.
In a way, metainit is a mixture of the menu system and cdbs, for init scripts.
The advantages of this system are
For the package maintainer:
- No need to manually create and maintain init scripts or upstart jobs
For Debian:
- More consistent init scripts in the distribution
- Easier to add new features (e.g. lsb output), without recompilation of packages
For the ubuntu/debian relationship:
- The same package could be used unmodified in Debian (creating sysvinit scripts) and ubuntu (upstart jobs)
For ubuntu:
- It could help to ease the transition to a pure upstart based system.
For the user:
- Can create “good” init scripts for custom daemons with just one line in one file and one command (update-metainit)
What this system is not meant for
Replacing all init script in packages. We (at least currently) will only support “simple” daemons (no very special dependencies, no strange ways of starting or stopping them, no forking mode supported, forking is done by the init script or upstart). We do hope to make metainit work for the “boring” 80%-90% of init scripts. All other packages are welcome to continue doing what they did before.