Debian Policy Compliance
Introduction
This section describes the design and the tasks that need to be done in eBox to make it comply with the Debian policy.
Problem
The first problem we have to tackle is the overwriting of other packages files, and we have to be specially careful with configuration files which have been modified by the user.
To comply with the policy we must warn the user every time we try to overwrite a file, and ask permission to go ahead.
We also have to avoid modifying other package files in our post install scripts. We also must put off those operations until the module is going to be used for the first time and to inform the user in the same way as described above.
Approach
The current mechanism to modify configuration files works as follows:
- The user configures the services through the web interface.
- The user clicks on save changes.
- The different configuration files are overwritten substituting the user values from the templates and putting the result in the service's configuration file.
- A module which is going to modify files explicitly tells the framework which files are going to be modified. Based on that, the framework will keep track of user modifications that were done in eBox.
- The user will be warned and permission to go ahead will be asked for when a file is going to be modified for the first time.
- After each eBox modification of a configuration file we will store a MD5 digest of its result.
- Whenever eBox tries to modify a file again, it will compare MD5 digests to find out if it's been modified by the user.
