Krisztian Litkey [Wed, 14 Nov 2012 12:15:39 +0000 (14:15 +0200)]
core: get rid of ignored retval warning.
Krisztian Litkey [Wed, 14 Nov 2012 12:14:51 +0000 (14:14 +0200)]
common: get rid of false positive of uninitialized variable warning.
Krisztian Litkey [Wed, 14 Nov 2012 11:42:14 +0000 (13:42 +0200)]
lua-bindings: get rid of unused variable warning, better luaL_error usage.
We now adhere to the Lua-wide idiom of using luaL_error with a
(technically pointless) return.
Krisztian Litkey [Wed, 14 Nov 2012 11:34:55 +0000 (13:34 +0200)]
domain-control: support for automatic reconnection.
Krisztian Litkey [Wed, 14 Nov 2012 08:29:48 +0000 (10:29 +0200)]
common: clear any potential superloop when destroying a mainloop.
Krisztian Litkey [Tue, 13 Nov 2012 16:56:27 +0000 (18:56 +0200)]
core,common: updated debug info.
Krisztian Litkey [Tue, 13 Nov 2012 16:55:24 +0000 (18:55 +0200)]
daemon: prepare targets before generating autoupdate target.
Krisztian Litkey [Tue, 13 Nov 2012 16:53:48 +0000 (18:53 +0200)]
resolver: include targets with indirect depdndencies on facts in generated autoupdate targets.
Krisztian Litkey [Tue, 13 Nov 2012 16:51:58 +0000 (18:51 +0200)]
resolver: don't generate fuly NULL update scriptlets for precompiled targets.
Krisztian Litkey [Tue, 13 Nov 2012 16:49:03 +0000 (18:49 +0200)]
lua-decision: resolver integration fixes.
Krisztian Litkey [Mon, 12 Nov 2012 17:26:22 +0000 (19:26 +0200)]
lua-bindings: handle plugin boolean arguments correctly.
Krisztian Litkey [Mon, 12 Nov 2012 17:25:38 +0000 (19:25 +0200)]
domain-controller: install header and pkg-config file.
Janos Kovacs [Tue, 13 Nov 2012 02:48:18 +0000 (04:48 +0200)]
daemon: add a test element to lua config
Janos Kovacs [Tue, 13 Nov 2012 02:44:54 +0000 (04:44 +0200)]
lua-decision: fix elemen_install() to install correct dependencies
Janos Kovacs [Tue, 13 Nov 2012 02:42:16 +0000 (04:42 +0200)]
lua-decision: add create field to mdb.table
Janos Kovacs [Mon, 12 Nov 2012 21:24:31 +0000 (23:24 +0200)]
plugin-resource-native: replace printf's with mrp_debug
Janos Kovacs [Mon, 12 Nov 2012 21:02:47 +0000 (23:02 +0200)]
lua-decision: start to use MRP_LUA_[ENTER|LEAVE] and replace printf's mrp_debug
Janos Kovacs [Mon, 12 Nov 2012 19:10:12 +0000 (21:10 +0200)]
resource-library: replace printf's with MRP_LUA_[ENTER|LEAVE] and mrp_log_info()
Janos Kovacs [Mon, 12 Nov 2012 19:08:44 +0000 (21:08 +0200)]
lua-utils: add MRP_LUA_[ENTER|LEAVE] macros
Janos Kovacs [Mon, 12 Nov 2012 17:23:36 +0000 (19:23 +0200)]
lua-utils: fix an argument check what prevented tor run in load-plugin context
Janos Kovacs [Mon, 12 Nov 2012 14:42:52 +0000 (16:42 +0200)]
build: re-building core-func-info.c
Janos Kovacs [Mon, 12 Nov 2012 14:29:48 +0000 (16:29 +0200)]
Merge branch 'murphy-lua-bindings' of https://github.com/otcshare/policy-internal into murphy-lua-bindings
Janos Kovacs [Mon, 12 Nov 2012 14:26:06 +0000 (16:26 +0200)]
daemon: lua configuration for application_classes, zones and resource classes
Janos Kovacs [Mon, 12 Nov 2012 14:22:29 +0000 (16:22 +0200)]
plugin-resource-native: replace hardwired config with lua based config
Janos Kovacs [Mon, 12 Nov 2012 14:17:16 +0000 (16:17 +0200)]
build: support for building lua configuration in resource library
Janos Kovacs [Mon, 12 Nov 2012 14:12:37 +0000 (16:12 +0200)]
resource: add lua configuration
Janos Kovacs [Mon, 12 Nov 2012 14:00:15 +0000 (16:00 +0200)]
lua-decision: fix a typo in mdb's table_setfield()
Janos Kovacs [Mon, 12 Nov 2012 13:57:51 +0000 (15:57 +0200)]
lua-utils: fix mrp_lua_create_object() to handle correctly names
Krisztian Litkey [Mon, 12 Nov 2012 13:28:28 +0000 (15:28 +0200)]
core: automatically start plugins loaded while starting plugins.
When running with a Lua config script, all subsequent plugins are
loaded by the Lua plugin while this is executing the config script.
Normally the config script core references some Lua objects or
functions that are registered by these plugins. If we simply let
these plugins start normally the config script would fail as the
plugins would get a chance to extend Lua only after the Lua plugin
finished starting up and executing the script. For the time being
to work around this once we begin starting up plugins, we always
immediately start any newly loaded plugin.
Note that this can easily trigger bugs related to non-reentrant code
on the plugin loading and startup code pathes, so keep your eyes
open...
(except the basic Lua plugin) are loaded by the
Janos Kovacs [Fri, 9 Nov 2012 21:49:00 +0000 (23:49 +0200)]
lua-decision: add .single_value field to select as shorthand for [1][1] indexing
Krisztian Litkey [Fri, 9 Nov 2012 17:28:13 +0000 (19:28 +0200)]
common, core: updated debug infos.
Krisztian Litkey [Fri, 9 Nov 2012 17:25:56 +0000 (19:25 +0200)]
resolver: include alloca directly.
Krisztian Litkey [Fri, 9 Nov 2012 17:25:10 +0000 (19:25 +0200)]
console: best-effort std{out,err} redirection during console commands.
Janos Kovacs [Fri, 9 Nov 2012 16:41:39 +0000 (18:41 +0200)]
resource: add db transactions for resurce acquistitions and releases
Janos Kovacs [Fri, 9 Nov 2012 16:38:58 +0000 (18:38 +0200)]
resource: add Makefile for local builds requests
Janos Kovacs [Thu, 8 Nov 2012 23:38:53 +0000 (01:38 +0200)]
Merge branch 'murphy-lua-bindings' of https://github.com/otcshare/policy-internal into murphy-lua-bindings
Janos Kovacs [Thu, 8 Nov 2012 23:35:06 +0000 (01:35 +0200)]
lua-decision: complete select object
Janos Kovacs [Thu, 8 Nov 2012 23:22:13 +0000 (01:22 +0200)]
lua-utils: add MRP_LUA_OVERRIDE_GETLENGTH macro
Janos Kovacs [Thu, 8 Nov 2012 23:18:41 +0000 (01:18 +0200)]
murphy-db: fix comment typo
Krisztian Litkey [Thu, 8 Nov 2012 13:39:26 +0000 (15:39 +0200)]
core: updated debug info.
Krisztian Litkey [Thu, 8 Nov 2012 13:38:59 +0000 (15:38 +0200)]
resolver: test config changes.
Krisztian Litkey [Thu, 8 Nov 2012 13:38:08 +0000 (15:38 +0200)]
daemon: termporary kludge for testing: force autoupdate on.
Krisztian Litkey [Thu, 8 Nov 2012 13:36:55 +0000 (15:36 +0200)]
resolver: added support for automatically generating autoupdate targets.
Krisztian Litkey [Thu, 8 Nov 2012 11:00:39 +0000 (13:00 +0200)]
build-sys: failed to enabled features with missing dependencies.
Krisztian Litkey [Thu, 8 Nov 2012 09:44:48 +0000 (11:44 +0200)]
resolver: test input changes.
Krisztian Litkey [Thu, 8 Nov 2012 09:44:13 +0000 (11:44 +0200)]
daemon: test config changes.
Krisztian Litkey [Thu, 8 Nov 2012 09:43:10 +0000 (11:43 +0200)]
plugin-lua: added initial resolver Lua scriptlet support.
Krisztian Litkey [Thu, 8 Nov 2012 09:04:40 +0000 (11:04 +0200)]
lua-bindings: pull in Lua base lib during init.
Krisztian Litkey [Thu, 8 Nov 2012 08:47:22 +0000 (10:47 +0200)]
core/scripting: safer interpreter registration.
Krisztian Litkey [Thu, 8 Nov 2012 08:46:22 +0000 (10:46 +0200)]
core/scripting: don't require interpreter-provided scriptlet cleanup.
Krisztian Litkey [Wed, 7 Nov 2012 20:51:19 +0000 (22:51 +0200)]
core: updated debug info.
Krisztian Litkey [Wed, 7 Nov 2012 20:51:01 +0000 (22:51 +0200)]
core: linker-script updated.
Krisztian Litkey [Wed, 7 Nov 2012 20:49:21 +0000 (22:49 +0200)]
resolver: test input changes for lua testing.
Krisztian Litkey [Wed, 7 Nov 2012 20:48:11 +0000 (22:48 +0200)]
daemon: lua-related test config updates.
Krisztian Litkey [Wed, 7 Nov 2012 20:45:39 +0000 (22:45 +0200)]
daemon: ruleset creation/parsing vs. plugin loading/starting ordering fixes.
Krisztian Litkey [Wed, 7 Nov 2012 20:42:27 +0000 (22:42 +0200)]
lua-decision: added basic resolver target generation.
Krisztian Litkey [Wed, 7 Nov 2012 20:33:41 +0000 (22:33 +0200)]
resolver: support for plain resolver context creation, prepared target fixes.
Resolver context creation and input parsing can now be done in
two phases. This is especially useful if one needs to have both
programmatically created (pre-prepared) targets and static targets
from a resolver input file.
This commits also fixes a few bugs related to handling preprepared
targets.
Krisztian Litkey [Wed, 7 Nov 2012 20:30:26 +0000 (22:30 +0200)]
lua-bindings: initialize lua-utils and lua-decision.
Krisztian Litkey [Wed, 7 Nov 2012 16:59:03 +0000 (18:59 +0200)]
plugins/lua: added lua interpreter skeleton.
Krisztian Litkey [Wed, 7 Nov 2012 16:57:25 +0000 (18:57 +0200)]
build-sys: fix incorrect build dependencies/linkage.
Krisztian Litkey [Wed, 7 Nov 2012 16:53:22 +0000 (18:53 +0200)]
resolver: allow scriptlet type to be specified.
Krisztian Litkey [Wed, 7 Nov 2012 16:19:27 +0000 (18:19 +0200)]
core/scripting: fix interpreter registration to not depend on resolver.
Krisztian Litkey [Tue, 6 Nov 2012 20:32:07 +0000 (22:32 +0200)]
lua-bindings: added support for evaluating Lua from the console.
You can now evaluate Lua code snippets or Lua files from the console.
Please note that currently you need to fully quote Lua code you enter
via the console to protect it from the console input tokenizer. This
limitation will be lifted once we have implemented support for non-
pre-tokenized console commands.
Also note that all output produced by Lua code is currently going to
the standard output of the murphy daemon and not to the console where
you entered the Lua snippet. Consider this a bug which should be fixed.
Fixing this is a bit harder that it was with the old ohm-time console
implementation. In all its crudeness (whenever 'grabbed') the old ohm
console was simply dup2ing stdout to the socket fd of the console
connection during the execution of console commands. With our current
console things this is not so easy: we have mrp_console_printf to print
to the console which is not fd-based but is using glibc's custom stream
handler support...
Krisztian Litkey [Tue, 6 Nov 2012 11:53:15 +0000 (13:53 +0200)]
core: warn only once about lack of signature check.
Krisztian Litkey [Fri, 2 Nov 2012 16:38:34 +0000 (18:38 +0200)]
WiP-core: murphy lua bindings prototype for basic daemon configuration.
This prototype provides equivalent functionality to the built-in
configuration language of the daemon. IOW, it provides functions
for
- testing the existence of plugins
- loading plugin instances with optional parameters
- basic info, error, warning message logging
This proto currently does not use or depend on the common lua-utils
or lua-decision 'convenience libraries'. However it can be easily
moved on top of those if needed. This would probably make sense if
we start adding bindings to more complex bits of functionality
(such as the mainloop, transports, events, etc).
Krisztian Litkey [Fri, 2 Nov 2012 16:32:07 +0000 (18:32 +0200)]
build-sys: don't claim to support that old Lua.
Janos Kovacs [Mon, 29 Oct 2012 23:10:21 +0000 (01:10 +0200)]
lua-decision: add select_install() to print dependencies
Janos Kovacs [Mon, 29 Oct 2012 23:08:58 +0000 (01:08 +0200)]
build: do not link murphyd agains the resource library if --with-resources=no
Janos Kovacs [Mon, 29 Oct 2012 22:06:33 +0000 (00:06 +0200)]
lua-decision: first prototype of the 'element' object
Janos Kovacs [Fri, 26 Oct 2012 13:24:54 +0000 (16:24 +0300)]
build: conditional build of resource management (--with-resources)
Janos Kovacs [Fri, 26 Oct 2012 04:12:55 +0000 (07:12 +0300)]
building: build support for lua-decision library
Janos Kovacs [Fri, 26 Oct 2012 04:11:41 +0000 (07:11 +0300)]
lua-decision: initial sources
Janos Kovacs [Fri, 26 Oct 2012 04:01:44 +0000 (07:01 +0300)]
lua-utils: add local Makefile to compile locally, ie. not in the src dir
Janos Kovacs [Fri, 26 Oct 2012 03:49:03 +0000 (06:49 +0300)]
lua-utils: fix funcbridge.c
- to avoid namespace clash use builtin.method instead of builtin
- mrp_create_funcbridge_class() do not leave garbage on the stack
Janos Kovacs [Thu, 25 Oct 2012 00:08:29 +0000 (03:08 +0300)]
lua-utils: fix mrp_lua_push_strarray()
Janos Kovacs [Thu, 25 Oct 2012 00:03:55 +0000 (03:03 +0300)]
lua-library: add MRP_LUA_OVERRIDE_STRINGIFY
Janos Kovacs [Wed, 24 Oct 2012 19:35:27 +0000 (22:35 +0300)]
lua-utils: fix MRP_LUA_CLASS_DEF to work with multiple constructors
Janos Kovacs [Tue, 23 Oct 2012 01:05:15 +0000 (04:05 +0300)]
building: make the lua-utils library
Janos Kovacs [Tue, 23 Oct 2012 01:02:19 +0000 (04:02 +0300)]
scripting: add sources of LUA scripting support library
Krisztian Litkey [Wed, 24 Oct 2012 07:30:44 +0000 (10:30 +0300)]
resolver: added support for precompiled (pre-prepared) targets.
Precompiled targets skip the target compilation (preparation)
phase altogether. They get added with a pre-prepared scripting
context readily provided by the one creating the target. Hence
it is possible, using precompiled targets, to avoid altogether
the textual representation of target update 'rules' in cases
where this would be difficult or inconvenient.
Krisztian Litkey [Tue, 30 Oct 2012 09:29:39 +0000 (11:29 +0200)]
plugins: removed decision-proto plugin.
Krisztian Litkey [Mon, 22 Oct 2012 10:07:00 +0000 (13:07 +0300)]
domain-control: added domain-control plugin (modified decision-proto).
Krisztian Litkey [Fri, 26 Oct 2012 13:43:55 +0000 (16:43 +0300)]
common: added support for type-agnostic message field iteration.
Krisztian Litkey [Wed, 24 Oct 2012 19:42:50 +0000 (22:42 +0300)]
murphy-db: added column 'introspection' for mql_result_rows.
Krisztian Litkey [Mon, 22 Oct 2012 07:14:06 +0000 (10:14 +0300)]
build-sys: fix to handle plugins with dashes in their names.
Krisztian Litkey [Fri, 26 Oct 2012 16:45:31 +0000 (19:45 +0300)]
Added README to make automake happy.
Krisztian Litkey [Fri, 26 Oct 2012 16:34:24 +0000 (19:34 +0300)]
build-sys: make gen-linkedin-loader executable.
Krisztian Litkey [Thu, 18 Oct 2012 15:58:35 +0000 (18:58 +0300)]
resource-native: set default config only for our own start event.
Krisztian Litkey [Thu, 18 Oct 2012 15:29:43 +0000 (18:29 +0300)]
build-sys: --with-dynamic-plugins handling fix.
Krisztian Litkey [Thu, 18 Oct 2012 15:28:45 +0000 (18:28 +0300)]
build-sys: linkedin loader generation fixes.
Krisztian Litkey [Tue, 16 Oct 2012 17:38:54 +0000 (20:38 +0300)]
resolver: targets and target aliasen can now be added programmatically.
Note that a separate alias addition function is merely API-sugar.
Adding an alias is equivalent to adding a new target of the form:
target <alias>
depends on <target>
Krisztian Litkey [Tue, 16 Oct 2012 17:37:34 +0000 (20:37 +0300)]
core/scripting: script type name is const.
Ismo Puustinen [Wed, 17 Oct 2012 08:15:49 +0000 (11:15 +0300)]
docs: updated README and moved it to README.md.
Ismo Puustinen [Tue, 16 Oct 2012 09:44:43 +0000 (12:44 +0300)]
resource-dbus: add client tracking.
Add optional client tracking to release resources when a D-Bus client
leaves the bus without cleaning up the resources manually. This is
configured via the plugin configuration file.
Ismo Puustinen [Tue, 16 Oct 2012 07:45:08 +0000 (10:45 +0300)]
resource-dbus: filter out the events before first resource set acquisition.
Krisztian Litkey [Fri, 12 Oct 2012 13:24:18 +0000 (16:24 +0300)]
common/glib-glue: emulate deferred with 0 msec delay, not 10.
Ismo Puustinen [Fri, 12 Oct 2012 08:20:28 +0000 (11:20 +0300)]
resource-dbus: filter out events before acquiring the resource set.
Krisztian Litkey [Thu, 11 Oct 2012 20:17:54 +0000 (23:17 +0300)]
common: slight cleanup of mainloop test wrt. to superloops.
Krisztian Litkey [Thu, 11 Oct 2012 10:46:19 +0000 (13:46 +0300)]
common/ecore: fix copy-paste'os in ecore .pc.in and ecore pkg-config check.
Krisztian Litkey [Thu, 11 Oct 2012 20:13:10 +0000 (23:13 +0300)]
build-sys: don't link unconditionally against glib and dbus libs.