Open voxik opened 4 years ago
This request is inspired by this ML thread:
Yup, it's not a new idea, we've even had a ticket for it but that's probably gotten lost in the jump to GH.
I had a PoC that threw sources at %{uncompress:...} and grabbed the result up to the first space, which kinda works but of course has the limitation of not supporting executables with whitespace in the name (dunno if we care...), but also has the issue of whining unnecessarily on spec parse (non-build) where sources are not present. It probably needs a bit of API work to make the required stuff meaningfully available. Incidentally I was just looking around this neighborhood last week or so when adding Lua bindings for rpmio files: rpm doesn't currently know how to convert a result from rpmFileIsCompressed() into a Fopen() mode for that compression type...
I am experimenting with something like this:
The idea is, that since we have dynamic build dependencies, we could do better and generate dependencies on the archive tools, used to expand the sources by
setup
macro. This in turn would allow to have:Of course this is very naive proof of concept. To make this more useful, it would be helpful if RPM provided list of supported archivers together with access to
rpmFileIsCompressed
which knows how to detect the compression tool already. Or possibly if the%sources
macro provided more then just list of files.