[Rpm-maint] [rpm-software-management/rpm] RFE: Ability to have a file in %files via a command (macro) evaluated at buildtime (#894)
Miro Hrončok
notifications at github.com
Thu Oct 10 16:37:48 UTC 2019
I'd like to have a macro, that sees the files after `%install` is finished and can do stuff with the files in `%buildroot` and `$PWD`, and I like to use the macro in the `%files` section.
Minimal (not so useful) example with a command:
This works:
```
%files
%(echo /foo)
```
This doesn't:
```
%build
echo /foo > ./special_file
...
%files
%(cat ./special_file)
```
I know that the above could be achieved via `%files -f special_file`, but imagine the macro I want to put in there is not simply catting a file, but doing some logic.
Currently, the usual workflow is:
1. get the command/macro output a file
2. use that file in `-f`
```
%{our_files} > special_file
%files -f special_file
```
However I want to avoid this step and be able to use:
```
%files
%{our_files}
```
What's needed to make this happen?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/894
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191010/496c8581/attachment.html>
More information about the Rpm-maint
mailing list