← Back to issue list

Implement token substitution in debconf files

View original Github issue

Metadata

Project
debcraft
Number
#159
Type
issue
State
open
Author
cmatsuoka
Labels
Status: Triaged
Created
2026-05-22 17:46:26+00:00
Updated
2026-05-22 17:46:46+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

When the `dh_installdebconf` debhelper processes the package.config script, it runs a token expansion search. All valid tokens must follow the strict regex format `#[A-Za-z0-9_.+]+#`. The installdebconf helper in Debcraft must also replace these tokens. The built-in tokens available for substitution inside package.config are: * `#DEB_HOST_NAME#`: The architecture name the package is being built for (e.g. amd64, arm64). * `#DEB_BUILD_NAME#`: The architecture name of the machine doing the building. * `#DEB_TARGET_NAME#`: The target architecture name (primarily used when building compiler toolchains). * `#ENV.NAME#`: The environment variable NAME exported at build time. * `#PACKAGE#`: Replaced by the concrete name of the binary package currently being processed. We can set `#DEB_TARGET_NAME#` to the build-for architecture for now. Support for custom tokens (defined with `-DTOKEN=value`) can be added later. `#DEBHELPER#` will be handled later by the installdeb helper.

Evaluation history

No evaluation history available.