Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to use debconf and need to add config and templates file to config.tar.gz section #7

Open
ichan-akira opened this issue Jul 30, 2021 · 0 comments

Comments

@ichan-akira
Copy link
Contributor

ichan-akira commented Jul 30, 2021

Currently config.tar.gz section can only have following files:

  • control
  • md5sums
  • conffiles
  • preinst
  • postinst
  • prerm
  • postrm

Because I want to display prompt for custom user input to pre-configure the package, I am planning to add feature that allow *.debspec file to add config and templates file as well.

My plan is to create controlfile (control file) directive with following description:

Sets the name of any kind of additional control file (e.g. config, templates). This file is included in the control part of the package and may be called during uninstallation or other operations of the package. It will not be available on the target system after installation. This directive has multiple parameters that are separated by white-space (any number of spaces or tabs):

  • The source path: The file is read from this path. Non-rooted paths are interpreted relative to the base path, if set before this directive.
  • Optional: text keyword to convert the file from DOS to Unix line endings.
  • The file mode: The target file is created with the specified mode, written in the usual octal notation. If unset, the default file mode is 644 (owner-write, world-read, no execute).
  • The file user ID: The target file is owned by the user with the specified numeric user ID. If unset, the file will be owned by the root user (ID 0).
  • The file group ID: The target file is owned by the group with the specified numeric group ID. If unset, the file will be owned by the root group (ID 0).

The source path may contain wildcards (* and ?) in the file name (not in the directory). If such a wildcard occurs, a file item for each local found file is added in place of this directive. All other parameters (mode, owner, group) are applied equally to all found files.

If the last path segment (the file name) of the source path is ** then all files from the specified directory and all its subdirectories are included. This allows the inclusion of entire subtrees of directories and files.

Source files can be specified multiple times. The last entry will overwrite any previous entry. This can be used to set different modes or owners for specific files that were already covered by a wildcard. In this case, the wildcard entry must occur before the specific file entry.

References to debconf:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant