aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2019-03-22Add support for L4Re Virtio Socketssandbox/jobol/l4sockJosé Bollo1-0/+1
Change-Id: Ia47ef2fa8c650781d5a4545fa08360808291faf5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-22globmatch: Add globmatch to wrap fnmatchJose Bollo1-0/+2
Change-Id: I1effa961a169cce444ea246f5d7f8839b4937403 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22Allow to remove libmicrohttpd (HTTP server)Jose Bollo1-28/+20
This allows to remove the dependency to libmicrohttpd. At the end, this will allow either to replace it with an other HTTP library or to fully remove the HTTP server. It also makes a tiny improvement of the conditionnal compilation. Change-Id: I24106659af04453b6693f2cda0939a601391202f Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22jobs: Add starting mode for jobsJose Bollo1-6/+6
Also improve naming of variables. Change-Id: I8efa74e27256425df18f57b3de257c234ff60e69 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22Allow to remove systemd libraryJose Bollo1-0/+2
This change allows to compile a binder that doesn't use libsystemd. The restriction implied is that the neither the systemd event loop nor the systemd dbus facilities are availables. Consequently, the dbus transparancy of APIs isn't available. Also the work isn't fully complete because afb-ws-client doesn't handle the removal of libsystemd. A more general work still have to be made to allow the binder to run as library using an external event loop. Change-Id: I27a80862868b9c5a0453011a1d8aa3ce75cb5f6e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22Add conditionnal support of dynamic bindingsJose Bollo1-1/+4
The load of dynamic bindings becomes removable. This is a step in direction of a tiny binder library. Also refactor AGL_DEVEL Signed-off-by: Jose Bollo <jose.bollo@iot.bzh> Change-Id: If283f431fd8a831429e717b2770464cb54476dc7
2019-03-22Add conditionnal support of bindings version 2Jose Bollo1-0/+2
Bindings version 2 will become legacy soon. This patch allows their removal Change-Id: Iecad3abd0ddd714e5d55c0b935be756a29d1ca37 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22Improve setting of optionsJose Bollo1-28/+34
Change-Id: Idbadb9b7b801cb61d527addb5d3137aeb4cf6311 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22Rename afb-config to afb-argsJosé Bollo1-2/+2
With the introduction of more compilation flags, it becomes interesting to use a configuration file. The configuration file is usually "config.h". So that renaming avoids future ambiguity. It also reflects better what the module does. Change-Id: I952adc1e1bf469132dc224900bd9140ccc51c58b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-22hooks: Allow to remove hooking (and/or trace)Jose Bollo1-24/+14
This change allows to downsize the binder by removing its internal hooking and tracing features. Change-Id: Ifb080a7426216f6c6b1c8f8e5bf8ddd52df40a3e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-03-22sig-monitor: Add compiling switchesJosé Bollo1-0/+29
The following new switches are added: - USE_SIG_MONITOR_DUMPSTACK activate dump stack on error - USE_SIG_MONITOR_SIGNALS activate handling of signals - USE_SIG_MONITOR_FOR_CALL activate monitoring of calls - USE_SIG_MONITOR_TIMERS activate monitoring of call expiration All enabled by default Change-Id: I2231e5f2a8db469b7258ce14530f72b4c5f38b00 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-22evmgr: Isolate the event loop from jobsJosé Bollo1-0/+1
The event loop is renamed evmgr for "event manager" with the intention (1) still use evloop in jobs (2) to provide an abstract event manager/handler/loop abstraction. Change-Id: Ib1955f661f98df80e1c7be99e9fe26a1e06d78f6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-22Rename afb-systemd to systemdJosé Bollo1-1/+1
Files "afb-systemd.[ch]" are renamed "systemd.[ch]" and their functions "afb_systemd_*" are renamed "systemd_*" Change-Id: I8362a2ca8b71945b54c6ab9a7ead51d9c50bc8e2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-22watchdog: Isolate the watchdog from jobsJosé Bollo1-0/+1
Change-Id: Iaa7f71dc7e5d8d525463619b4da980c827722909 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-02-06Update copyright datehalibut_7.90.0halibut/7.90.07.90.0José Bollo1-1/+1
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-05afb-proto-ws: Add error reportJose Bollo1-1/+1
Change-Id: I58c88f8bcaf4cfb8a53b58eeefd7fa3415bf894a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-11-22globset: Introduce globset for event handlingguppy_6.99.1guppy/6.99.16.99.1Jose Bollo1-0/+1
It optimises the event handling that was slow. It also fix few bugs: - at most one event handler is called now - the handler call has the most specific pattern Change-Id: Ic13a0258b5743579ab15e0e953ec62206d982850 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-02afb-socket: Separate socket creationJosé Bollo1-0/+1
The objective is to have a well identified and possibly reusable internally. Change-Id: Icdb6ce7d85ae26373cfe4f0b492fe97b74ed747c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-25afb-config: Rewrite the config as JSON objectJosé Bollo1-0/+1
Despite its poor performance, this changes is good at the end because: - it allows to put config in files - it removes dirty code to translate to JSON - it removes dirty code to dump the config - it unifies code for scanning hook's flag's names - it improves unity of naming between option's names and JSON's names Change-Id: I2487c8746d78a0cff80505a12b9fa60e40da9951 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-06Simplify build by introducing queuing functionJosé Bollo1-1/+1
It is not valuable at the end to continue to have this fake job implementation. So removing it is good. Change-Id: I930ade3e3a511f0ebfb91292e5725ac3be884d44 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05supervision: Exclude conditionaly the supervisionJosé Bollo1-1/+4
Exclude from the binder the part related to the supervision when the supervisor is excluded from the build. Change-Id: I41193122d63e47b9f0db7f113f88d2d63b783027 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo1-7/+21
This commit introduces the bindings v3 API for bindings. The documentation has still to be improved and will come very soon. Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-13Make DBUS transparency optional (off by default)José Bollo1-1/+5
The implementation of API transparency through DBUS is not used at the moment. To improve independancy to systemd (it relies on systemd library) removing it should be possible. Change-Id: I5750a92527dc3e9cf7dcd27625dce6a020797a3d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-27Update date of copyright noticesJosé Bollo1-1/+1
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-26afs-supervisor: Add systemd service and configJosé Bollo1-7/+9
Change-Id: I64bf8de01dbb8cf9581ed0be358d81fa84106520 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-26supervisor: Make it a HTTP serverJosé Bollo1-1/+1
The supervisor now run as an HTTP server by default. Change-Id: Ia0a654cd97c941f15b212c5364d739e2196662e4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-22fdev: Introduce fdev for file event handlingJosé Bollo1-1/+5
This is an effort to keep cutting dependency to systemd. Change-Id: I9a0c032a1095e297c7f3ac5b67827fda3658b8d9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-21afb-systemd: Integrate sd-fds featuresJosé Bollo1-1/+0
Change-Id: I59d194ba675912a42922f0905933b1cea796c78a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-21afb-systemd: Isolate systemd main entriesJosé Bollo1-0/+1
This change prepares the possibilty to remove the dependency to systemd/libsystemd. Change-Id: Ife4181d6c7195230a11a32e527b8973af6a096e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-14afs-supervisor: Add discovery mechanicJosé Bollo1-1/+1
Change-Id: Icfcdcc16d0433454c9bb0785d0690f7f173980ae Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13supervision: Add supervision and supervisorJosé Bollo1-0/+12
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-20CMAKE: refactor optionseel_4.99.3eel/4.99.34.99.3José Bollo1-18/+3
The option ALLOW_NO_BINDER is removed and the option ONLY_DEVTOOLS is introduced. Change-Id: Ia19eb977ee25a3871582605028fdef75e552363f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-20Merge "Fix build for native package"José Bollo1-3/+5
2017-11-20Fix build for native packageRonan Le Martret1-3/+5
* If the package is natively compile, the gcc used is the host gcc, and host gcc version must be >4.9. This is unneeded for the mode ALLOW_NO_BINDER (like in native). Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-11-17afb-proto-ws: Fix autolock in proto-wsJosé Bollo1-1/+2
Because a systemd event loop can not be reentered while evaluating an event callback, the event loop was removed from the threads. It had the effect to enter in deadlock when calling a synchronous call while in an event callback. Queueing a job solves the issue. But because using queued job has implications on libafbws, a fake job manager is added for libafbws. Change-Id: Id793bea55743790082eaab48cd4cc87f7993772a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-17CMAKE: allow to compile afb-genskel onlyJosé Bollo1-1/+8
When missing components are detected, allows to not compile the binder if ALLOW_NO_BINDER is ON Change-Id: I0fb27844e3f36d4dd643bdf250f05b4f6769bc53 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-11libafbwsc: add function 'afb_ws_client_connect_api'José Bollo1-2/+2
This function allows to connect to an API exported by the binder. The demo program afb-client-demo is modified to integrate on option that direct API connection. Example: server: afb-daemon --ws-server unix:hello client: afb-client-demo -d -H unix:hello Change-Id: Id9f857a453c406df1c4b36eb25fb5e833a938c3d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Allow pure dynamic bindingsJosé Bollo1-0/+1
Activates the new internal interfaces Change-Id: I8f51cd271f66a0216ffdf03626300bb5964a70f9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09Allow dynamic creation of APIsJosé Bollo1-0/+1
Change-Id: I825bfa7969c98dd214457d9ff94e2948362286a9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-09afb-export: refactor of binder interfaceJosé Bollo1-2/+1
The interfaces of the binder called afb_ditf and afb_svc are merged together to create the afb_export structure. Change-Id: I841ba04d7b2f94bfc19f691ec746d0bd221f164d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-09-12afb-proto-ws: Split afb-stub-ws in twoeel_4.99.1eel/4.99.14.99.1José Bollo1-0/+1
The file afb-stub-ws is split in two parts: - afb-stub-ws: implements the interface between xreq and protocol. - afb-proto-ws: implements the pbinary protocol over wer sockets The intent is to have a clean separation between a kind of generic stub and the protocol implmentation. This will allow soon to provide a library to access directly in C to the websocket of an API exposed through the otpion --ws-server. At the moment, the protocol implementation is on websockets but in the futur it will be cleanly rewritten to use any binary transport. This commit also fixe a double free in subcalls. Change-Id: I831787533db9fe073d060dd8ee9401cbab2894e1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-29Add option --name for naming the processJosé Bollo1-0/+1
This option allows to set the command line and the thread name of the main process. The value can contain spaces that will be replaced by nulls. Change-Id: I895270a24663467b16fb3cd8fc3218b7b003b6bb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-28build config: remove forced AGL_DEVEL from src/CMakelists.txtStephane Desneux1-1/+0
Change-Id: I6fd44469b148732103d4b903f94c355f2bd231ee Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
2017-08-10subpath: creation for splitting locale-rootJosé Bollo1-0/+1
Change-Id: Ia339dc1d1291ef52fbec3c928537721ed7410694 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-08afb-trace: Add tracing features to API monitorJosé Bollo1-0/+1
This api allows to receive events when particular actions are reached. At the moment, tracing is bound to the API monitor and can trace anything. In the future, this will not be the case and the API monitor will only allow to trace requests of its session. The tracing of all will be available for supervision only. Change-Id: I880852612c2f77ff5329496b16c75fe602db4090 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-08-02afb-xreq: integration of subcallsJosé Bollo1-1/+0
The file afb-subcall is now integrated within afb-xreq. It improves memory allocation and performance of synchronous calls. Change-Id: I4190199babbe0559527438b530b19ac9a35ec38b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-27wrap-json: add unpacking tool for jsonJosé Bollo1-0/+1
The functions wrap_json_unpack, wrap_json_vunpack, wrap_json_check, wrap_json_vcheck, wrap_json_match and wrap_json_vmatch can be used to get items in a json object. These functions are likely to be compatible in the format with the unpacking functions of the library jansson [1]. [1] http://jansson.readthedocs.io/en/2.10/apiref.html#parsing-and-validating-values Change-Id: I18ad702498b9a70215d88b2a3c13bd0f6194bb45 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-11debug: Create a file indicating the waiting pointJosé Bollo1-0/+1
When AFB_DEBUG_WAIT is used, the file /tmp/afb-debug-<PID> is created and contains the name of the awaiting point (without tailing new line) Signals other than SIGINT are ignored when waiting for SIGINT. This improves the cleaning up. Example: the signal SIGTERM is delayed until after removal of the debugging indication file. Change-Id: I5c896e4d9a3a098affc18d4282e260d9bb253611 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-05afb-debug: add features for debuggingJosé Bollo1-0/+1
When compiled with -DAGL_DEVEL or -DAFB_INSERT_DEBUG_FEATURES afb-daemon interprets the environment variables AFB_DEBUG_BREAK and AFB_DEBUG_WAIT. The environment variable AFB_DEBUG_BREAK make afb-daemon emit a break (SIGINT) that should be treated by the debugger. The environment variable AFB_DEBUG_WAIT make afb-daemon wait for a break (SIGINT) to continue. This can be used to attach a debugger. The content of the variables AFB_DEBUG_BREAK and AFB_DEBUG_WAIT is a list of key names of the point where the action should occur. The list is separated by spaces or commas ','. Example: AFB_DEBUG_WAIT=main-entry,start-load The defined points are: main-entry, main-args, main-start, start-entry, start-load, start-start, start-http, start-call, start-exec. Here some of their characteristic: - main-entry: at the beginning befaore any other instruction - main-args: after parsing arguments - main-start: after daemonisation before starting - start-entry: at start entry - start-load: before loading bindings after initialisation of afb-daemon - start-start: after loading bindings befaore starting it - start-call: after init before starting HTTP server - start-http: after http server, before calling startup calls - start-exec: before running the --exec command Change-Id: Id405e749c590fb95f32e30a7d37c30b6412cf0a5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-05-29Moves library resolution on top (hack)José Bollo1-41/+1
Avoid to tune executable byu executable. Should be redefined later. Change-Id: I02e55e642c1797768b7dbcd8406f59199a56891d Signed-off-by: José Bollo <jose.bollo@iot.bzh>