I'm trying to find the available debconf configuration options (which key-value pairs the package supports and if possible a description of each) of some non-installed packages, like ufw, but I haven't found a way with debconf* binaries to check them out. Is there something I'm missing?
2 Answers
If you extract the contents of the deb file, you will find in DEBIAN/templates
the debconf rules for the package. In your case it should have this (trimmed to the relevant parts):
Template: ufw/existing_configuration
Template: ufw/enable
Type: boolean
Default: false
Template: ufw/allow_known_ports
Type: multiselect
Choices: CUPS, DNS, IMAPS, POP3S, SSH, CIFS (Samba), SMTP, HTTP, HTTPS
Template: ufw/allow_custom_ports
Type: string
Description: Additional authorized services:
The template lines match with the shown by debconf-show ufw
:
debconf-show ufw
ufw/existing_configuration:
ufw/allow_custom_ports:
ufw/enable: false
ufw/allow_known_ports:
Extracting the contents is one option, as Braiam suggests. Another option is to look inside the deb using mc (midnight commander), which is a little less messy, because it doesn't explode files all over the place. mc which show the contents of the deb as a virtual filesystem, and allow you to navigate through it. Enter takes you down a level in the filesystem, F3 lets you read the file. As Braiam says, the debconf templates are in the file DEBIAN/templates. Note also that mc will let you copy a file from inside the deb.