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

Package with config files - best practices?



Hi !

To simplyfy my everday's life I sometimes create custom deb packages containing only dependencies on other packages so I can quickly set up a system for i.e. mail server. It would be a great thing if I could use such packages to configure everything, too. For example my mail-server package shall contain dependencies on postfix, courier-imap etc. as well as configuration files for postfix and courier. This way, setting a server would be as easy as single apt-get install. Of course, some files still requires tweaking after installation, but still it's nice to have them preconfigured.

Currently I see 2 possibilities:

1. I've discovered that Replaces: field of debian/control allows to overwrite other package's files. I can put e.g. postfix in Replaces: field, and include config files in my package. It actually works, but has some drawbacks - files logically belonging to another package changes its owner. Actually it sounds like abusing Replaces:.

2. Make a postinst script modify all the config files. This sounds like a bit of shell coding to me - for example, to avoid replacing manually tweaked files. I'm too lazy for that :)
Are there any tools (beside grep/sed/awk/perl ;) ) to help ?

Any other useful practices ?

Best Regards,
Przemyslaw



Reply to: