From d7ddee574280ac57b1e9791bf19b4cd0737be03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Vavru=C5=A1a?= <marek.vavrusa@nic.cz> Date: Sun, 7 Jun 2015 22:48:26 +0200 Subject: [PATCH] build: renamed libkresolve => libkres, kresolved => kresd also some cleanup and version bump to Q2 --- .gitignore | 2 +- README.md | 4 ++-- config.mk | 2 +- daemon/README.rst | 6 +++--- daemon/daemon.mk | 18 +++++++++--------- doc/conf.py | 6 +++--- doc/lib.rst | 16 ++++++++-------- lib/generic/README.rst | 10 +++++----- lib/lib.mk | 18 +++++++++--------- modules/README.rst | 2 +- modules/cachectl/cachectl.mk | 4 ++-- modules/gostats/gostats.mk | 4 ++-- modules/hints/hints.mk | 4 ++-- modules/ketcd/README.rst | 10 +++++----- modules/ketcd/ketcd.lua | 2 +- modules/kmemcached/kmemcached.mk | 2 +- modules/stats/stats.mk | 4 ++-- scripts/Dockerfile | 2 +- tests/integration.mk | 2 +- tests/unit.mk | 4 ++-- 20 files changed, 61 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 4d2c98a6b..86c79a0c5 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ tmp* /ylwrap /doc/doxyxml /doc/html -/daemon/kresolved +/daemon/kresd /tests/test_array /tests/test_map /tests/test_module diff --git a/README.md b/README.md index fd82cb065..bd55f9d20 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ See the [Building project][depends] documentation page for more information. The project builds a resolver library in the `lib` directory, and a daemon in the `daemon` directory. ``` -$ ./daemon/kresolved -h -$ ./daemon/kresolved [working_directory] +$ ./daemon/kresd -h +$ ./daemon/kresd [working_directory] ``` See the documentation at [knot-resolver.readthedocs.org][doc]. diff --git a/config.mk b/config.mk index 763ce785e..0a843b5ae 100644 --- a/config.mk +++ b/config.mk @@ -1,6 +1,6 @@ # Project MAJOR := 15 -MINOR := 04 +MINOR := 07 PATCH := 0 # Paths diff --git a/daemon/README.rst b/daemon/README.rst index dea775885..2dc6f1f63 100644 --- a/daemon/README.rst +++ b/daemon/README.rst @@ -16,7 +16,7 @@ the `daemon` directory. .. code-block:: bash - $ ./daemon/kresolved -h + $ ./daemon/kresd -h Interacting with the daemon --------------------------- @@ -26,7 +26,7 @@ You can load modules this way and use their properties to get information about .. code-block:: bash - $ kresolved /var/run/knot-resolver + $ kresd /var/run/knot-resolver [system] started in interactive mode, type 'help()' > cache.count() 53 @@ -47,7 +47,7 @@ comfortable in the current working directory. .. code-block:: sh - $ kresolved /var/run/kresolved + $ kresd /var/run/kresd And you're good to go for most use cases! If you want to use modules or configure daemon behavior, read on. diff --git a/daemon/daemon.mk b/daemon/daemon.mk index 5850de51b..829fa69be 100644 --- a/daemon/daemon.mk +++ b/daemon/daemon.mk @@ -1,7 +1,7 @@ -kresolved_EMBED := \ +kresd_EMBED := \ contrib/ccan/json/json.c -kresolved_SOURCES := \ - $(kresolved_EMBED) \ +kresd_SOURCES := \ + $(kresd_EMBED) \ daemon/io.c \ daemon/network.c \ daemon/engine.c \ @@ -16,18 +16,18 @@ daemon/engine.o: daemon/lua/sandbox.inc daemon/lua/config.inc @$(call quiet,XXD,$<) $< > $@ # Dependencies -kresolved_DEPEND := $(libkresolve) -kresolved_LIBS := $(libkresolve_TARGET) $(libknot_LIBS) $(libuv_LIBS) $(lua_LIBS) +kresd_DEPEND := $(libkres) +kresd_LIBS := $(libkres_TARGET) $(libknot_LIBS) $(libuv_LIBS) $(lua_LIBS) # Make binary ifeq ($(HAS_lua)|$(HAS_libuv), yes|yes) -$(eval $(call make_bin,kresolved,daemon)) +$(eval $(call make_bin,kresd,daemon)) endif # Targets -daemon: $(kresolved) -daemon-install: kresolved-install -daemon-clean: kresolved-clean +daemon: $(kresd) +daemon-install: kresd-install +daemon-clean: kresd-clean @$(RM) daemon/lua/*.inc .PHONY: daemon daemon-install daemon-clean diff --git a/doc/conf.py b/doc/conf.py index 25ca5624c..4aef16b5a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -11,8 +11,8 @@ if os.environ.get('READTHEDOCS', None) == 'True': extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'breathe'] # Breathe configuration -breathe_projects = { "libkresolve": "doxyxml" } -breathe_default_project = "libkresolve" +breathe_projects = { "libkres": "doxyxml" } +breathe_default_project = "libkres" breathe_domain_by_extension = {"h" : "c"} # The suffix of source filenames. @@ -66,7 +66,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'libkresolve', u'libkresolve documentation', + ('index', 'libkres', u'libkres documentation', [u'CZ.NIC Labs'], 1) ] diff --git a/doc/lib.rst b/doc/lib.rst index 5aec08f25..cbe7f8e1d 100644 --- a/doc/lib.rst +++ b/doc/lib.rst @@ -15,9 +15,9 @@ Name resolution --------------- .. doxygenfile:: resolve.h - :project: libkresolve + :project: libkres .. doxygenfile:: rplan.h - :project: libkresolve + :project: libkres .. _lib_api_cache: @@ -25,7 +25,7 @@ Cache ----- .. doxygenfile:: cache.h - :project: libkresolve + :project: libkres .. _lib_api_nameservers: @@ -33,9 +33,9 @@ Nameservers ----------- .. doxygenfile:: nsrep.h - :project: libkresolve + :project: libkres .. doxygenfile:: zonecut.h - :project: libkresolve + :project: libkres .. _lib_api_modules: @@ -43,15 +43,15 @@ Modules ------- .. doxygenfile:: module.h - :project: libkresolve + :project: libkres Utilities --------- .. doxygenfile:: utils.h - :project: libkresolve + :project: libkres .. doxygenfile:: defines.h - :project: libkresolve + :project: libkres .. _lib_generics: diff --git a/lib/generic/README.rst b/lib/generic/README.rst index 0fb042f45..02429b285 100644 --- a/lib/generic/README.rst +++ b/lib/generic/README.rst @@ -16,30 +16,30 @@ array ~~~~~ .. doxygenfile:: array.h - :project: libkresolve + :project: libkres map ~~~ .. doxygenfile:: map.h - :project: libkresolve + :project: libkres set ~~~ .. doxygenfile:: set.h - :project: libkresolve + :project: libkres pack ~~~~ .. doxygenfile:: pack.h - :project: libkresolve + :project: libkres lru ~~~ .. doxygenfile:: lru.h - :project: libkresolve + :project: libkres .. _`Crit-bit tree`: http://cr.yp.to/critbit.html diff --git a/lib/lib.mk b/lib/lib.mk index 52445f3ed..857d20fd8 100644 --- a/lib/lib.mk +++ b/lib/lib.mk @@ -3,7 +3,7 @@ ccan_EMBED := \ contrib/ccan/isaac/isaac.c \ contrib/murmurhash3/murmurhash3.c -libkresolve_SOURCES := \ +libkres_SOURCES := \ $(ccan_EMBED) \ lib/generic/map.c \ lib/layer/iterate.c \ @@ -17,7 +17,7 @@ libkresolve_SOURCES := \ lib/rplan.c \ lib/cache.c -libkresolve_HEADERS := \ +libkres_HEADERS := \ lib/generic/array.h \ lib/generic/map.h \ lib/generic/set.h \ @@ -31,16 +31,16 @@ libkresolve_HEADERS := \ lib/cache.h # Dependencies -libkresolve_DEPEND := -libkresolve_LIBS := $(libknot_LIBS) -libkresolve_TARGET := -Wl,-rpath,lib -Llib -lkresolve +libkres_DEPEND := +libkres_LIBS := $(libknot_LIBS) +libkres_TARGET := -Wl,-rpath,lib -Llib -lkres # Make library -$(eval $(call make_static,libkresolve,lib)) +$(eval $(call make_static,libkres,lib)) # Targets -lib: $(libkresolve) -lib-install: libkresolve-install -lib-clean: libkresolve-clean +lib: $(libkres) +lib-install: libkres-install +lib-clean: libkres-clean .PHONY: lib lib-install lib-clean diff --git a/modules/README.rst b/modules/README.rst index 5dad0fc38..766edd64f 100644 --- a/modules/README.rst +++ b/modules/README.rst @@ -314,7 +314,7 @@ Once you load the module, you can call the module property from the interactive .. code-block:: bash - $ kresolved + $ kresd ... [system] started in interactive mode, type 'help()' > modules.load('cached') diff --git a/modules/cachectl/cachectl.mk b/modules/cachectl/cachectl.mk index 4a141e2ef..7a67b567c 100644 --- a/modules/cachectl/cachectl.mk +++ b/modules/cachectl/cachectl.mk @@ -1,4 +1,4 @@ cachectl_SOURCES := modules/cachectl/cachectl.c -cachectl_DEPEND := $(libkresolve) -cachectl_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) +cachectl_DEPEND := $(libkres) +cachectl_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(call make_c_module,cachectl) \ No newline at end of file diff --git a/modules/gostats/gostats.mk b/modules/gostats/gostats.mk index 9a3fea619..06abd6727 100644 --- a/modules/gostats/gostats.mk +++ b/modules/gostats/gostats.mk @@ -1,4 +1,4 @@ gostats_SOURCES := modules/gostats/gostats.go -gostats_DEPEND := $(libkresolve) -gostats_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) +gostats_DEPEND := $(libkres) +gostats_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(call make_go_module,gostats) \ No newline at end of file diff --git a/modules/hints/hints.mk b/modules/hints/hints.mk index 9d1dec1e2..0d50c8ef8 100644 --- a/modules/hints/hints.mk +++ b/modules/hints/hints.mk @@ -1,4 +1,4 @@ hints_SOURCES := modules/hints/hints.c contrib/ccan/json/json.c -hints_DEPEND := $(libkresolve) -hints_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) +hints_DEPEND := $(libkres) +hints_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(call make_c_module,hints) \ No newline at end of file diff --git a/modules/ketcd/README.rst b/modules/ketcd/README.rst index f8b8d6e21..566222388 100644 --- a/modules/ketcd/README.rst +++ b/modules/ketcd/README.rst @@ -4,16 +4,16 @@ Etcd module ----------- The module connects to Etcd peers and watches for configuration change. -By default, the module looks for the subtree under ``/kresolved`` directory, +By default, the module looks for the subtree under ``/kresd`` directory, but you can change this `in the configuration <https://github.com/mah0x211/lua-etcd#cli-err--etcdnew-optiontable->`_. The subtree structure corresponds to the configuration variables in the declarative style. .. code-block:: bash - $ etcdctl set /kresolved/net/127.0.0.1 53 - $ etcdctl set /kresolved/modules/cachectl true - $ etcdctl set /kresolved/cache/size 10000000 + $ etcdctl set /kresd/net/127.0.0.1 53 + $ etcdctl set /kresd/modules/cachectl true + $ etcdctl set /kresd/cache/size 10000000 Configures all listening nodes to following configuration: @@ -30,7 +30,7 @@ Example configuration modules = { ketcd = { - prefix = '/kresolved', + prefix = '/kresd', peer = 'http://127.0.0.1:7001' } } diff --git a/modules/ketcd/ketcd.lua b/modules/ketcd/ketcd.lua index ac10ae476..f1537dd75 100644 --- a/modules/ketcd/ketcd.lua +++ b/modules/ketcd/ketcd.lua @@ -28,7 +28,7 @@ end function ketcd.init(module) ketcd.Etcd = require('etcd.luasocket') - ketcd.defaults = { prefix = '/kresolved' } + ketcd.defaults = { prefix = '/kresd' } end function ketcd.deinit(module) diff --git a/modules/kmemcached/kmemcached.mk b/modules/kmemcached/kmemcached.mk index 58e00997c..f5e1a96b3 100644 --- a/modules/kmemcached/kmemcached.mk +++ b/modules/kmemcached/kmemcached.mk @@ -1,3 +1,3 @@ kmemcached_SOURCES := modules/kmemcached/kmemcached.c modules/kmemcached/namedb_memcached.c -kmemcached_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) $(libmemcached_LIBS) +kmemcached_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(libmemcached_LIBS) $(call make_c_module,kmemcached) diff --git a/modules/stats/stats.mk b/modules/stats/stats.mk index 362c619a1..b82fd10f2 100644 --- a/modules/stats/stats.mk +++ b/modules/stats/stats.mk @@ -1,4 +1,4 @@ stats_SOURCES := modules/stats/stats.c contrib/ccan/json/json.c -stats_DEPEND := $(libkresolve) -stats_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) +stats_DEPEND := $(libkres) +stats_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(call make_c_module,stats) diff --git a/scripts/Dockerfile b/scripts/Dockerfile index 35cedd817..7e8a5f47a 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -14,7 +14,7 @@ EXPOSE 53 # Select entrypoint WORKDIR /data -CMD ["/usr/local/bin/kresolved"] +CMD ["/usr/local/bin/kresd"] # Install dependencies and sources RUN \ diff --git a/tests/integration.mk b/tests/integration.mk index 50bbfec48..100de5937 100644 --- a/tests/integration.mk +++ b/tests/integration.mk @@ -5,7 +5,7 @@ # Mocked calls library libmock_calls_SOURCES := tests/mock_calls.c libmock_calls_LIBS := $(tests_LIBS) $(python_LIBS) -libmock_calls_DEPEND := $(libkresolve) +libmock_calls_DEPEND := $(libkres) $(eval $(call make_lib,libmock_calls,tests)) # Python module for tests diff --git a/tests/unit.mk b/tests/unit.mk index 24dc1d002..3b69799d6 100644 --- a/tests/unit.mk +++ b/tests/unit.mk @@ -21,8 +21,8 @@ mock_gomodule_SOURCES := tests/mock_gomodule.c $(eval $(call make_lib,mock_gomodule,tests)) # Dependencies -tests_DEPEND := $(libkresolve) $(mock_cmodule) $(mock_gomodule) -tests_LIBS := $(libkresolve_TARGET) $(libkresolve_LIBS) $(cmocka_LIBS) +tests_DEPEND := $(libkres) $(mock_cmodule) $(mock_gomodule) +tests_LIBS := $(libkres_TARGET) $(libkres_LIBS) $(cmocka_LIBS) # Make test binaries define make_test -- GitLab