You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sources.list manual has specifications for both single-line and DEB822-style formats for APT data sources.
There are 13 options listed as supported, but rex seems to handle only one so far (arch). It is even special-cased as an if-else decision, which structure does not make it easy to extend support for arbitrary combinations of all the accepted options.
Suggested approach
Based on the above, my first idea about how to address the situation is the following:
Introduce a new parameter for the repository command, which accepts a hash reference with the desired options for the given APT repository:
options or apt_options sounds like good candidates for this new parameter at this point.
Generate the desired file contents by using an embedded template at the end of Rex::Pkg::Debian under __DATA__, passing the repository() command's parameters to it for substitution. Then write the results to the target file.
Find a way to make this approach testable. For example add an internal private function to get the generated content from the template, so tests can call it and compare it against expectations.
This approach is:
flexible enough to support other options than just arch and signed-by
extensible with validation against list of supported options later if desired
extensible with support for DEB822-style file formats later via a second embedded template
As
Me
I would like to
"signed-by" option in for Debian Repositories
so I can
indicate to dpkg what key should be signing packages
Additional context
No response
Describe the solution you would like
Just needs to have the "signed-by" keyword added here https://metacpan.org/release/FERKI/Rex-1.13.4/source/lib/Rex/Pkg/Debian.pm#L134
Example output https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions
Describe alternatives you have considered
No response
The text was updated successfully, but these errors were encountered: