Age | Commit message (Collapse) | Author | Files | Lines |
|
Lua52 support was started with ac959fed0082cb253d45c7a04866e8654e962442.
Compilation tested with Lua 5.2.1 and Lua 5.1.5.
The short typerror() snippet is taken from luaL_typerror in Lua 5.1.5
(MIT license)
Signed-off-by: Johannes Dewender <rpm@JonnyJD.net>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
|
|
Just print a warning. In addition, set Lua output buffer to contain
string "1" for failed scripts.
Change-Id: Id0478b64ac942fe6839f3cd8c9bb75c9b15382b2
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
However, disable the "io" and "os" standard libraries and only enable
the access() function from the "posix" extension library.
Change-Id: If3b5f0776f6684af4ebaeb7bff742ab9a2123221
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Change-Id: Iec8ff9da9c866fd47f3352964a5aac1bd6148310
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Disables the execution of shell scripts or lua code when parsing the
spec file. Replaces the script output with static text
"UNEXPANDEDSHELLSCRIPT" or "UNEXPANDEDLUASCRIPT".
Change-Id: I7d43785715c4b518040463ae70bddd46734e824e
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add compatibility support for both lua-5.1 and lua-5.2,
assuming that the LUA_COMPAT might have been disabled.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
|
|
- Commit 70f063cb773bedb7d336429d9bc8ed1d4e5d18f4 accidentally
changed lua's base64 encode/decode interface too, ugh. Dangers of
search-and-replace... Only the function name string exported to
lua matters but renaming the internal functions back as well
for naming consistency.
|
|
- Base64 is present in headers and all, it's only reasonable that
our API users have access to this functionality without having
to link to other libraries. Even if we didn't want to carry the
implementation forever in our codebase, we should provide a wrapping
for this (much like the other crypto stuff) for the reason stated above.
- A bigger issue is that our dirty little (badly hidden) secret was using
non-namespaced function names, clashing with at least beecrypt. And we
couldn't have made these internal-only symbols even on platforms that
support it, because they are used all over the place outside rpmio.
So... rename the b64 functions to rpmLikeNamingStyle and make 'em public.
No functional changes, just trivial renaming despite touching numerous
places.
|
|
- Lift the printbuffer accounting out of rpmlua into a struct of
its own (Funny thing, this looks a whole lot like the macro
expansion buffer and Good Ole StringBuf Brothers ... Boys ... Mam.
Unify them one of these days maybe)
- Replace the simplistic on/off printbuffer with a stack of buffers,
fixup the lone caller to use the new internal push/pop API.
|
|
|
|
- Track posix.fork() and only allow exit() and exec() if the script
has forked. There are other questionable items in posix extensions
too but these are the worst offenders.
- Using Lua registry for tracking forked status might be more Lua-way
option but this'll do for now.
|
|
|
|
- hook data is userdata, not light userdata
|
|
|
|
- otherwise repeated read config -> free config like rpmbuild does
will crash and burn
- somewhat kludgy, figure a better way to do this
|
|
- retrieve global state, init if needed
- inspired by rpm5.org, details differ
- use it for initialisation in rpmrc instead of abusing rpmluaGetPrintBuffer
|
|
- userconfig is actually unused
|
|
|
|
|
|
- luaL_openlibs() to pull in all standard libs
- local extensions need to be registered by calling through Lua
|
|
- don't build internal copy of Lua
- move 3rd party extensions (posix and rexlib) to toplevel luaext/
directory, built by default (unless --without-lua specified)
- auto*foo checks for external Lua
- minimal tweaks to lposix.c and rpmlua.c to get them build with Lua 5.1
|
|
- we require C99 anyway
- snprintf is used unconditionally all around the tree
- if absolutely needed for portability, having insecure wrappers littered
over the source is not the best way
|
|
- put some consistency into include ordering
- everything (apart from bits missed ;) is now ordered like this
1. "system.h"
2. other system includes
3. rpm public headers
4. rpm private headers
5. "debug.h"
|
|
- adjust include paths accordingly
|
|
|
|
|
|
|
|
|
|
- Don't automatically print a newline in rpm_print
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CVS patchset: 7435
CVS date: 2004/10/09 17:29:22
|
|
CVS patchset: 7242
CVS date: 2004/04/19 12:12:12
|
|
CVS patchset: 7239
CVS date: 2004/04/18 20:47:29
|
|
CVS patchset: 7195
CVS date: 2004/03/26 17:27:57
|
|
CVS patchset: 7193
CVS date: 2004/03/26 15:42:45
|
|
- /usr/lib/rpm/init.lua is called during intialization.
CVS patchset: 7188
CVS date: 2004/03/24 19:47:11
|
|
removes the prectability of initalization order in relation to
lualibs.
CVS patchset: 7187
CVS date: 2004/03/23 23:52:45
|
|
CVS patchset: 7184
CVS date: 2004/03/23 07:18:55
|
|
CVS patchset: 7183
CVS date: 2004/03/23 05:52:59
|
|
- New API abstracting access to Lua state (rpmlua is
abstract to everyone but rpmlua.c).
- New %{lua: ... } macro.
Modified Files:
lib/Makefile.am lib/psm.c lib/rpmts.c lua/local/linit.lch
lua/local/linit.lua rpmio/Makefile.am rpmio/macro.c
Added Files:
rpmio/rpmlua.c rpmio/rpmlua.h
Removed Files:
lib/rpmlua.c lib/rpmlua.h
CVS patchset: 7178
CVS date: 2004/03/19 20:08:20
|