[Rpm-maint] [rpm-software-management/rpm] Implement simple macro objects (PR #1826)

Michael Schroeder notifications at github.com
Mon Nov 15 10:03:46 UTC 2021


Oh, we can certainly do both ;-)
But only if there is a real need.

I think the "lua native" version is a bit more useful and nicer to use. OTOH it needs a way to define the lua side of the implementation. I used that `luamethod` hack for this, but we could also add support for a `macros.lua` file or some lua escaping for the macro file.

One thing I'm not sure about is if loading a macro file should allow execution of arbitrary lua/shell commands. Say we have a "expand right away" modifier like ":x". So the macro file can contain:
```
%passwd_content:x $(cat /etc/passwd)
```
Or we have support for lua objects and we want to instantiate an object in the macro file (e.g. we want to set an array). That will call the lua constructor code which can also do arbitrary things.

-- 
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/pull/1826#issuecomment-968726441
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211115/9d03674f/attachment.html>


More information about the Rpm-maint mailing list