lua and RPM

lua

Lua support has been added to rpm for both scriptlets and macros. Some reasons for adding lua support include:

  • Many scripts execute simple operations which an internal interpreter requires no forking at all

  • Internal scripts reduce or eliminate external dependancies related to script slots

  • Internal scripts operate even under very minimal environments, e.g.stripped chroot, LFS, installer

  • Syntax errors in internal scripts are detected at build not run time

How it works:

Just use -p <lua> in any script slot.

%pre -p lua
print("Hello, Lua RPM World!")
	

Inline macros are done using %{lua: print ("Requirs: foo > 1.1") }. Lua provides better support for multiline macros than the standard RPM macro parser.