Commit Graph

156 Commits

Author SHA1 Message Date
Joris Vink 960fe5afd3 drop unused __init__ in cli generation 2021-04-20 10:00:46 +02:00
Joris Vink a27227d37f Rework how kodev create does python apps.
Drop the kore.conf for python apps, all configuration
can be done from inside the python code since kore4.

Adds all the basic goo in the app.py file to get up and running.
2021-04-19 09:47:18 +02:00
Joris Vink cef5ac4003 bump copyright year. 2021-01-11 23:46:08 +01:00
Joris Vink 51e9c64fc0 strdup the application name. 2020-09-09 22:30:56 +02:00
Joris Vink 4e384167f0 The version.c file has moved.
Therefor make sure kodev knows the correct place to look for it
and include it in single binary builds.
2020-09-09 21:27:07 +02:00
Joris Vink 2dca8fd6cc Add an install-sources target.
This will place the required sources for building
single binary builds under $PREFIX/share/kore.

The kodev utility will now pickup this KORE_SOURCE path automatically
unless another one is given via the conf/build.conf file or the KORE_SOURCE
environment path.
2020-09-09 21:09:40 +02:00
Joris Vink aaf8be40c2 Add casts for isxdigit and isspace.
The argument must be representable as an unsigned char or EOF.
2020-09-08 19:19:56 +02:00
Joris Vink 4115df69f6 adjust for configuration changes 2020-02-11 11:04:10 +01:00
Joris Vink 9d0aef0079 bump copyright 2020-02-10 14:47:33 +01:00
Frederic Cambus c6dbf16b65 Account for the change from 'static' to 'route' in the CLI tool as well. 2019-11-16 12:34:57 +01:00
Joris Vink 16afcb66d0 kodev MINIMAL=1 shouldn't include mime types either. 2019-10-31 09:55:14 +01:00
Joris Vink ca17e08ad9 Add MIMINAL=1 build to kodev.
If the kodev tool is built with MINIMAL=1 it will not compile in
support for creating application skeletons, only to build apps, etc.

Building with MINIMAL=1 drops the openssl linkage.
2019-10-31 09:44:47 +01:00
Joris Vink 46375303cb Allow multiple binds on new server directive. 2019-09-27 20:00:35 +02:00
Joris Vink 7350131232 Allow listening of tls/notls ports at the same time.
Before kore needed to be built with NOTLS=1 to be able to do non TLS
connections. This has been like this for years.

It is time to allow non TLS listeners without having to rebuild Kore.

This commit changes your configuration format and will break existing
applications their config.

Configurations now get listener {} contexts:

listen default {
	bind 127.0.0.1 8888
}

The above will create a listener on 127.0.0.1, port 8888 that will serve
TLS (still the default).

If you want to turn off TLS on that listener, specify "tls no" in that
context.

Domains now need to be attached to a listener:

Eg:
	domain * {
		attach	default
	}

For the Python API this kills kore.bind(), and kore.bind_unix(). They are
replaced with:

	kore.listen("name", ip=None, port=None, path=None, tls=True).
2019-09-27 12:27:04 +02:00
Joris Vink f725ca228c alter python skeleton from kodev create -p.
adds the kore.config.file setting (required a fix for -c) and the
kore.config.deployment option is set to "development".
2019-09-26 19:58:13 +02:00
Joris Vink 555856ab0a fix usage for python builds.
while here, force a module or script as a cli argument and
fix kodev run to pass the config if inside of a module.
2019-09-26 16:41:52 +02:00
Joris Vink f2472ba485 allow python modules to set progname. 2019-09-04 20:37:33 +02:00
Joris Vink 574c9a7084 make sure kodev run works in python modules. 2019-06-13 11:18:10 +02:00
Joris Vink 3114f8d8d0 Improve python experience.
- If Kore is built with PYTHON=1 you can now specify the module that
  should be loaded on the command-line.

     eg: $ kore -frn myapp

- Add skeleton generation for python applications to kodev.

     eg: $ kodev create -p myapp

This should make it a whole lot easier to get started with kore python.
2019-06-12 23:35:43 +02:00
Joris Vink cd80685d9d get rid of pyko 2019-03-21 21:37:16 +01:00
Joris Vink bf1e8e5ffb bump copyright to 2019 2019-02-22 16:57:28 +01:00
Joris Vink fd1ab5879d KODEV_OUTPUT tells kodev the outdir of the binary.
eg:

$ env KODEV_OUTPUT=/tmp kodev build

will place the resulting binary under /tmp/<binary>
2018-11-28 14:24:42 +01:00
Joris Vink 8dd075e71c style 2018-11-28 14:22:27 +01:00
Joris Vink e3efeb9465 Move assets.h into object_dir. 2018-11-28 14:19:32 +01:00
Joris Vink c172d49567 kodev improvements.
- Take CFLAGS, CXXFLAGS and LDFLAGS from environment
  if present and append them to the build.conf cflags

- Allow overriding of the OBJDIR via KORE_OBJDIR.

- Allow overriding of build flavor via KORE_BUILD_FLAVOR.
2018-10-17 11:30:14 +02:00
Joris Vink 6ef8d59f7d more directly include assets.h 2018-08-13 09:16:28 +02:00
Joris Vink 3312a2882f Let KORE_PREFIX override builtin prefix for kodev. 2018-07-17 15:59:59 +02:00
Joris Vink d5ca2b42c6 invoke platform specific compiler for kodev build. 2018-06-19 22:46:55 +02:00
Joris Vink 296b1693ac don't forward argc/argv for kodev create.
Means we don't have to do weird shit that doesn't work on !macos anyway.
2018-06-15 20:51:48 +02:00
Joris Vink 68f5e33768 kodev improvements.
Allow KORE_SOURCE and KORE_FLAVOR to come from the environment,
overriding any configured kore_source or kore_flavor configuration
setting from the build.conf for the application.

I wanted an easier way of switching between Kore trees while hacking
on some of my apps, this is it.
2018-05-03 21:27:52 +02:00
Joris Vink 98af796acd Improve kodev a tiny bit.
kodev is creating x509s and writing out the dh parameters if they
do not exist in the application each time. This is annoying if
you explictly specified NOTLS=1 in the kore_flavor build options.

So just tell kodev to not do this if NOTLS=1 is present.
2018-04-18 19:51:25 +00:00
Joris Vink 92bd546935 Remove unused argument. 2018-04-13 16:04:33 +02:00
Joris Vink bb210db3df let pyko skeletons setup 'appdb' if available.
If a worker can pickup PYKO_CONNINFO from the environment it will register a
new pgsql connection called 'appdb' tied to the given connection string.
2018-04-10 18:26:22 +02:00
Joris Vink a35dfc6d06 Teach kodev create about pyko applications.
Now you can create a pyko application skeleton using kodev:

	$ kodev create -p myapp

Not sure if this functionality will remain in kodev, but for now i'm undecided.
2018-04-10 16:20:50 +02:00
Joris Vink da8d1800bf free name if we're not using the asset in kodev.
minor leak, doesn't affect run-time of kore.
2018-04-03 10:53:41 +02:00
Joris Vink f05782440b shuffle output from kodev info a bit. 2018-03-30 14:04:07 +02:00
Joris Vink cb206a589a Use kore_source headers if single_binary is set.
Before kodev always picked up the kore headers installed on the system.
This presented some annoying problems as the system headers may not
match the headers used by the kore_source you're actually building
against.
2018-03-30 13:47:32 +02:00
Marcin Szczepaniak d9b385fe2e Ignore hidden files and some temporary editor files in assets (#225) 2018-02-17 20:03:08 +01:00
Joris Vink 548348f553 2018 2018-01-20 22:51:06 +01:00
Joris Vink c87a9286b4 reword a bit 2017-03-09 16:59:14 +01:00
Joris Vink 0ca08114bb unbreak flavor cflags 2017-03-09 16:55:04 +01:00
Joris Vink 41924d0262 make sure len isn't 0 from cli_file_read(). 2017-03-06 23:16:59 +01:00
Joris Vink f8c9e736e2 don't depend on \n for NUL-terminating, just do it. 2017-03-06 22:48:19 +01:00
Joris Vink 8aaf7866c8 Do not unlink assets.h after building.
as per suggestion in #175
2017-03-06 10:42:07 +01:00
Joris Vink 7ec26a8c30 switch asset checksum to SHA256.
while here constify the asset modified time, contents and length.
2017-03-06 10:33:44 +01:00
Joris Vink d09eb5e107 bump copyright 2017-02-22 21:37:14 +01:00
Joris Vink 93ab52dcf5 Add a reload command to the cli tool.
This will look at the kore.pid file in the current directory
and send a SIGHUP signal to it. It's mostly a handy shortcut
since you could of course do a kill -HUP `cat kore.pid` easily.
2017-02-22 20:38:24 +01:00
Joris Vink 6e6d2f005d Remove leftover feature defines from kodev. 2017-02-22 20:13:59 +01:00
Joris Vink fc6b3bf740 Split up kore cli tools into new binary.
Having the create, build, run tools baked into the kore binary
made things harder then they had to be for multiple projects with
each different build flavors.

So move away this functionality into a new "kodev" (name may change)
binary that is installed next to kore.

The new build tools will automatically pick up the correct flavors
the kore binary it points to is installed with. Or for single builds
what flavors where enabled.

The new tool also will honor looking into PREFIX for the kore binary
when doing a `kodev run`.

Additionally add a new command "info" that shows some basic info
about your project and how it will be built. For example it will
show you the flavors of the kore binary installed on the system
or the flavors you configured for a single binary build.

Obligitory, hacking on a plane comment.
2017-02-19 00:52:29 -05:00
Joris Vink 625d50b8dd use rootdir when making paths to features/ldflags. 2017-02-09 11:45:11 +01:00