From 207f18f4fd63b8bd973db957b10438278b344c9f Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Mon, 2 Mar 2020 21:55:39 +0100 Subject: [PATCH] added dependency to libconfig --- .travis.yml | 1 + CMakeLists.txt | 3 +++ README.md | 6 ++++++ etc/webfused.conf | 31 +++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 etc/webfused.conf diff --git a/.travis.yml b/.travis.yml index 254ab38..d0368df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ addons: - python3-setuptools - python3-wheel - ninja-build + - libconfig-dev before_install: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1abb051..22eb7f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ pkg_check_modules(FUSE3 REQUIRED fuse3) pkg_check_modules(LWS REQUIRED libwebsockets) pkg_check_modules(JANSSON REQUIRED jansson) pkg_check_modules(UUID REQUIRED uuid) +pkg_check_modules(LIBCONFIG REQUIRED libconfig) pkg_check_modules(OPENSSL REQUIRED openssl) pkg_check_modules(WEBFUSE REQUIRED libwebfuse-adapter) @@ -35,6 +36,7 @@ add_library(userdb STATIC ) target_include_directories(userdb PUBLIC + ${LIBCONFIG_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${JANSSON_INCLUDE_DIRS} ) @@ -48,6 +50,7 @@ add_executable(webfused target_link_libraries(webfused PUBLIC userdb + ${LIBCONFIG_LIBRARIES} ${OPENSSL_LIBRARIES} ${WEBFUSE_LIBRARIES} ${UUID_LIBRARIES} diff --git a/README.md b/README.md index 245413a..ab50b1e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ To install dependecies, see below. - [libwebsockets](https://libwebsockets.org/) - [jansson](https://github.com/akheron/jansson) - [openssl](https://www.openssl.org/) +- [libconfig](https://hyperrealm.github.io/libconfig/) ### Installing dependencies @@ -76,3 +77,8 @@ To install libfuse, meson is needed. Please refer to [meson quick guide](https:/ cmake -DWITHOUT_TESTS=ON .. make sudo make install + +#### libconfig + + sudo apt update + sudo apt install libconfig-dev diff --git a/etc/webfused.conf b/etc/webfused.conf new file mode 100644 index 0000000..99f2f10 --- /dev/null +++ b/etc/webfused.conf @@ -0,0 +1,31 @@ +# Webfuse deamon configuration file + +version = { major = 1, minor = 0 } + +server: +{ + vhost_name = "localhost" + port = 8080 + + # tls: + # { + # certificate = "/etc/webfused/cert.pem" + # key = "/etc/webfused/key.pem" + # } + + # document_root = "/var/www" +} + +authentication: +{ + provider = "file" + settings: + { + file = "/etc/webfused/passwd" + } +} + +filesystems: +( + {name = "test", mount_point = "/tmp" } +)