diff --git a/buildconf/base.ini b/buildconf/base.ini index 6058d1b1..3bb36e29 100644 --- a/buildconf/base.ini +++ b/buildconf/base.ini @@ -5,14 +5,10 @@ yaml = true json = auto sqlite3 = auto zeromq = auto -snmp = true ssl = auto -async = true ldap = auto pcre = auto routing = auto -alarm = auto -ipv6 = false debug = false unbit = false xml_implementation = libxml2 diff --git a/buildconf/unbit.ini b/buildconf/unbit.ini index e0acc804..3bb36e29 100644 --- a/buildconf/unbit.ini +++ b/buildconf/unbit.ini @@ -1,26 +1,35 @@ [uwsgi] -xml = true +xml = auto ini = true yaml = true -json = false -sqlite3 = false -zeromq = false -ldap = true -pcre = true -routing = true -alarm = true +json = auto +sqlite3 = auto +zeromq = auto +ssl = auto +ldap = auto +pcre = auto +routing = auto debug = false -unbit = true -xml_implementation = expat +unbit = false +xml_implementation = libxml2 yaml_implementation = auto malloc_implementation = libc +extras = plugins = -bin_name = /opt/unbit/bin/uwsgi -append_version = unbit -plugin_dir = /opt/unbit/uwsgi_plugins -embedded_plugins = +bin_name = uwsgi +append_version = +plugin_dir = . +embedded_plugins = %(main_plugin)s, ping, cache, nagios, rrdtool, carbon, rpc, corerouter, fastrouter, http, ugreen, signal, syslog, rsyslog, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter, router_static, sslrouter +as_shared_library = false locking = auto event = auto timer = auto filemonitor = auto + +blacklist = +whitelist = + +embed_files = + +embed_config = diff --git a/buildconf/unbitstaff.ini b/buildconf/unbitstaff.ini index 375d7718..42330cd8 100644 --- a/buildconf/unbitstaff.ini +++ b/buildconf/unbitstaff.ini @@ -1,6 +1,5 @@ [uwsgi] inherit = unbit -json = false embedded_plugins = python bin_name = ../bin/uwsgi plugin_dir = ../bin/uwsgi_plugins diff --git a/core/ini.c b/core/ini.c index 1337614b..41d68b33 100644 --- a/core/ini.c +++ b/core/ini.c @@ -1,6 +1,4 @@ -#ifdef UWSGI_INI - -#include "uwsgi.h" +#include extern struct uwsgi_server uwsgi; @@ -157,5 +155,3 @@ void uwsgi_ini_config(char *file, char *magic_table[]) { } - -#endif diff --git a/core/uwsgi.c b/core/uwsgi.c index b3770754..8967b17e 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -276,9 +276,7 @@ static struct uwsgi_option uwsgi_base_options[] = { {"exec-as-user-atexit", required_argument, 0, "run the specified command before app exit and reload", uwsgi_opt_add_string_list, &uwsgi.exec_as_user_atexit, 0}, {"exec-pre-app", required_argument, 0, "run the specified command before app loading", uwsgi_opt_add_string_list, &uwsgi.exec_pre_app, 0}, {"exec-post-app", required_argument, 0, "run the specified command after app loading", uwsgi_opt_add_string_list, &uwsgi.exec_post_app, 0}, -#ifdef UWSGI_INI {"ini", required_argument, 0, "load config from ini file", uwsgi_opt_load_ini, NULL, UWSGI_OPT_IMMEDIATE}, -#endif #ifdef UWSGI_YAML {"yaml", required_argument, 'y', "load config from yaml file", uwsgi_opt_load_yml, NULL, UWSGI_OPT_IMMEDIATE}, {"yal", required_argument, 'y', "load config from yaml file", uwsgi_opt_load_yml, NULL, UWSGI_OPT_IMMEDIATE}, @@ -3729,12 +3727,10 @@ void uwsgi_opt_deprecated(char *opt, char *value, void *message) { void uwsgi_opt_load(char *opt, char *filename, void *none) { -#ifdef UWSGI_INI if (uwsgi_endswith(filename, ".ini")) { uwsgi_opt_load_ini(opt, filename, none); return; } -#endif #ifdef UWSGI_XML if (uwsgi_endswith(filename, ".xml")) { uwsgi_opt_load_xml(opt, filename, none); @@ -3782,12 +3778,10 @@ void uwsgi_opt_logic(char *opt, char *arg, void *func) { void uwsgi_opt_noop(char *opt, char *foo, void *bar) { } -#ifdef UWSGI_INI void uwsgi_opt_load_ini(char *opt, char *filename, void *none) { config_magic_table_fill(filename, uwsgi.magic_table); uwsgi_ini_config(filename, uwsgi.magic_table); } -#endif #ifdef UWSGI_XML void uwsgi_opt_load_xml(char *opt, char *filename, void *none) { diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 35e63727..8c02617f 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -55,7 +55,6 @@ void uwsgi_opt_pyver(char *opt, char *foo, void *bar) { } -#ifdef UWSGI_INI void uwsgi_opt_ini_paste(char *opt, char *value, void *foobar) { uwsgi_opt_load_ini(opt, value, NULL); @@ -72,7 +71,6 @@ void uwsgi_opt_ini_paste(char *opt, char *value, void *foobar) { } } -#endif struct uwsgi_option uwsgi_python_options[] = { {"wsgi-file", required_argument, 0, "load .wsgi file", uwsgi_opt_set_str, &up.file_config, 0}, @@ -121,10 +119,8 @@ struct uwsgi_option uwsgi_python_options[] = { {"web3", required_argument, 0, "load a web3 app", uwsgi_opt_set_str, &up.web3, 0}, {"pump", required_argument, 0, "load a pump app", uwsgi_opt_set_str, &up.pump, 0}, {"wsgi-lite", required_argument, 0, "load a wsgi-lite app", uwsgi_opt_set_str, &up.wsgi_lite, 0}, -#ifdef UWSGI_INI {"ini-paste", required_argument, 0, "load a paste.deploy config file containing uwsgi section", uwsgi_opt_ini_paste, NULL, UWSGI_OPT_IMMEDIATE}, {"ini-paste-logged", required_argument, 0, "load a paste.deploy config file containing uwsgi section (load loggers too)", uwsgi_opt_ini_paste, NULL, UWSGI_OPT_IMMEDIATE}, -#endif {"reload-os-env", no_argument, 0, "force reload of os.environ at each request", uwsgi_opt_true, &up.reload_os_env, 0}, #ifndef __CYGWIN__ #ifndef UWSGI_PYPY diff --git a/uwsgi.h b/uwsgi.h index 03d79f11..30d9be6f 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -2597,34 +2597,32 @@ struct wsgi_request *next_wsgi_req(struct wsgi_request *); void async_add_timeout(struct wsgi_request *, int); - void uwsgi_as_root(void); +void uwsgi_as_root(void); - void uwsgi_close_request(struct wsgi_request *); +void uwsgi_close_request(struct wsgi_request *); - void wsgi_req_setup(struct wsgi_request *, int, struct uwsgi_socket *); - int wsgi_req_recv(int, struct wsgi_request *); - int wsgi_req_async_recv(struct wsgi_request *); - int wsgi_req_accept(int, struct wsgi_request *); - int wsgi_req_simple_accept(struct wsgi_request *, int); +void wsgi_req_setup(struct wsgi_request *, int, struct uwsgi_socket *); +int wsgi_req_recv(int, struct wsgi_request *); +int wsgi_req_async_recv(struct wsgi_request *); +int wsgi_req_accept(int, struct wsgi_request *); +int wsgi_req_simple_accept(struct wsgi_request *, int); #define current_wsgi_req() (*uwsgi.current_wsgi_req)() - void sanitize_args(void); +void sanitize_args(void); - void env_to_arg(char *, char *); - void parse_sys_envs(char **); +void env_to_arg(char *, char *); +void parse_sys_envs(char **); - void uwsgi_log(const char *, ...); - void uwsgi_log_verbose(const char *, ...); +void uwsgi_log(const char *, ...); +void uwsgi_log_verbose(const char *, ...); - void *uwsgi_load_plugin(int, char *, char *); +void *uwsgi_load_plugin(int, char *, char *); - int unconfigured_hook(struct wsgi_request *); +int unconfigured_hook(struct wsgi_request *); -#ifdef UWSGI_INI - void uwsgi_ini_config(char *, char *[]); -#endif +void uwsgi_ini_config(char *, char *[]); #ifdef UWSGI_YAML void uwsgi_yaml_config(char *, char *[]); @@ -3205,9 +3203,7 @@ struct uwsgi_string_list *uwsgi_ssl_add_sni_item(char *, char *, char *, char *, #endif void uwsgi_opt_flock(char *, char *, void *); void uwsgi_opt_flock_wait(char *, char *, void *); -#ifdef UWSGI_INI void uwsgi_opt_load_ini(char *, char *, void *); -#endif #ifdef UWSGI_XML void uwsgi_opt_load_xml(char *, char *, void *); #endif diff --git a/uwsgiconfig.py b/uwsgiconfig.py index b45b7f98..98a3335d 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -64,7 +64,6 @@ report['pcre'] = False report['matheval'] = False report['routing'] = False report['capabilities'] = False -report['ini'] = False report['yaml'] = False report['json'] = False report['ldap'] = False @@ -461,7 +460,7 @@ class uConf(object): 'core/offload', 'core/io', 'core/static', 'core/websockets', 'core/spooler', 'core/snmp', 'core/exceptions', 'core/setup_utils', 'core/clock', 'core/init', 'core/buffer', 'core/reader', 'core/writer', 'core/alarm', 'core/plugins', 'core/lock', 'core/cache', 'core/daemons', 'core/errors', 'core/hash', 'core/master_events', - 'core/queue', 'core/event', 'core/signal', 'core/strings', 'core/progress', 'core/timebomb', + 'core/queue', 'core/event', 'core/signal', 'core/strings', 'core/progress', 'core/timebomb', 'core/ini', 'core/rpc', 'core/gateway', 'core/loop', 'core/rb_timers', 'core/uwsgi'] # add protocols self.gcc_list.append('proto/base') @@ -628,7 +627,6 @@ class uConf(object): self.libs.append('-lkvm') if uwsgi_os == 'Haiku': - self.set('async', 'false') self.libs.remove('-rdynamic') self.libs.remove('-lpthread') self.libs.append('-lroot') @@ -936,11 +934,6 @@ class uConf(object): self.cflags.append('-DUWSGI_VERSION_REVISION="' + uver_rev + '"') self.cflags.append('-DUWSGI_VERSION_CUSTOM="\\"' + uver_custom + '\\""') - if self.get('ini'): - self.cflags.append("-DUWSGI_INI") - self.gcc_list.append('core/ini') - report['ini'] = True - if self.get('yaml'): self.cflags.append("-DUWSGI_YAML") self.gcc_list.append('core/yaml')