Build: conffiles type validity

The package control environment may include a conffiles file that lists all the files that represent configuration files. This must be a regular file or a symbolic link to a regular file. Any other file type is rejected with an error.

If any one file listed in the conffiles does not exist in the resulting data.tar.gz an error is raised. Further more, the file in the data.tar.gz archive must be a regular file.

A filename in the conffiles cannot end with a slash because it cannot represent a directory.

A source package does not support configuration files. If a conffiles is declared in a source package, the packager emits an error and exists.

Finally, no hard link can be created with a configuration file. There are two main reasons for not allowing hard links on configuration files: (a) some editors break the link when editing the file; (b) wpkg may break the link when upgrading. Also wpkg extracts configuration files with a different name1 while unpacking a package. This means attempting to create a hard link to them would fail anyway.

  • 1. The extraction of configuration files make use of the special .wpkg-new extension. The allows the user to decide whether he should use the new version of the configuration file or keep his old version and do updates as required.