[REQ] Adhoc package contents
What kind of request is this?
New feature
What is your request or suggestion?
I would like to be able to include adhoc content from a source in a package (or container image). As an example, a Git repository may include scripts or default configuration that is desirable in the resulting container image. I would like to be able to specify these in the artifact config for the package so they would be included in resulting packages and containers.
Are you willing to submit PRs to contribute to this feature request?
- [X] Yes, I am willing to implement it.
To add onto this a little bit, would it make sense to just have a files subsection of artifacts in the dalec spec that takes arbitrary paths? I realize this could be abused when there are better ways to use dalec (i.e., the files section would not be appropriate for actual built binaries, for example, those should still go under binaries), but I also worry that if we keep adding new artifact types instead of allowing for adhoc content, we won't cover all the possible cases that a user might want.
One problem I foresee is if the destination file paths are partially system dependent. I.e., what if I have a file that I want to place in <system-config>/my-package/conf.json. How does the user express that they want dalec to fill in <system-config> at the spec level? In an RPM spec the user could write %{_sysconfdir}, so I'm wondering how we could potentially expose that at the Dalec level