Re: [OpenWrt-Devel] Move rrdns to rpcd?

2018-10-19 Thread Nick
Hi,
maybe it would even be possible to port the lua net_hints to a rpcd plugin. I 
find this tool very useful. :) Does it consider mutlicast DNS?

I don't mean to move the source code to rpcd but changing the makefile/cmake as 
its done for libiwinfo and the others Plugins.

Best,
Nick

On September 15, 2018 9:53:51 PM GMT+02:00, Jo-Philipp Wich  
wrote:
>Hi,
>
>> why is the rrdns located under luci?
>
>because its a rpcd plugin provided by LuCI, hosted in the LuCI repo and
>used by LuCI.
>
>> Can we make it consistent place rrdns somewhere else?
>
>Should be doable.
>
>> Furthermore we should change the Makefile of rpcd and the cmakefile
>that
>> rrdns ist listed automatically as rpcd plugin.
>
>That makes no sense as the rrdns plugin sources are not part of the
>rpcd
>repo.
>
>
>
>~ Jo
>
>___
>openwrt-devel mailing list
>openwrt-devel@lists.openwrt.org
>https://lists.openwrt.org/mailman/listinfo/openwrt-devel

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Move rrdns to rpcd?

2018-09-15 Thread Jo-Philipp Wich
Hi,

> why is the rrdns located under luci?

because its a rpcd plugin provided by LuCI, hosted in the LuCI repo and
used by LuCI.

> Can we make it consistent place rrdns somewhere else?

Should be doable.

> Furthermore we should change the Makefile of rpcd and the cmakefile that
> rrdns ist listed automatically as rpcd plugin.

That makes no sense as the rrdns plugin sources are not part of the rpcd
repo.



~ Jo

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Move rrdns to rpcd?

2018-09-13 Thread Nick
Hi,
why is the rrdns located under luci?
Can we make it consistent place rrdns somewhere else?
Furthermore we should change the Makefile of rpcd and the cmakefile that
rrdns ist listed automatically as rpcd plugin.
Right now its located under libraries.

So just add something like this to the end of the Makefile

> $(eval $(call BuildPlugin,rrdns,,Reverse DNS Daemon.)

And to the CMakefile

> OPTION(RRDNS_SUPPORT "rrdns plugin support" ON)
> ...
> IF (RRDNS_SUPPORT)
>   FIND_LIBRARY(resolv NAMES resolv)
>   IF(resolv STREQUAL "LIBS-NOTFOUND")
>     SET(resolv "")
>   ENDIF()
>   SET(PLUGINS ${PLUGINS} rrdns_plugin)
>   ADD_LIBRARY(rpcd-mod-rrdns MODULE rrdns.c)
>   TARGET_LINK_LIBRARIES(rpcd-mod-rrdns ubox ubus ${resolv})
>   SET_TARGET_PROPERTIES(rpcd-mod-rrdns PROPERTIES OUTPUT_NAME rrdns
> PREFIX "")
> ENDIF()

Or is there a reason why rrdns is located under luci?

cmake_minimum_required(VERSION 2.6)

INCLUDE(CheckFunctionExists)

PROJECT(rpcd C)
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
INCLUDE_DIRECTORIES(include)

OPTION(FILE_SUPPORT "File plugin support" ON)
OPTION(IWINFO_SUPPORT "libiwinfo plugin support" ON)
OPTION(RPCSYS_SUPPORT "rpc-sys plugin support" ON)
OPTION(RRDNS_SUPPORT "rrdns plugin support" ON)

SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")

IF(APPLE)
  INCLUDE_DIRECTORIES(/opt/local/include)
  LINK_DIRECTORIES(/opt/local/lib)
ENDIF()

CHECK_FUNCTION_EXISTS(getspnam HAVE_SHADOW)
IF(HAVE_SHADOW)
  ADD_DEFINITIONS(-DHAVE_SHADOW)
ENDIF()

FIND_LIBRARY(json NAMES json-c json)
FIND_LIBRARY(crypt NAMES crypt)
IF(crypt STREQUAL "crypt-NOTFOUND")
  SET(crypt "")
ENDIF()

FIND_PATH(ubus_include_dir libubus.h)
INCLUDE_DIRECTORIES(${ubus_include_dir})

FIND_PATH(ubox_include_dir libubox/blobmsg_json.h)
INCLUDE_DIRECTORIES(${ubox_include_dir})

ADD_EXECUTABLE(rpcd main.c exec.c session.c uci.c plugin.c)
TARGET_LINK_LIBRARIES(rpcd ubox ubus uci dl blobmsg_json ${json} ${crypt})

SET(PLUGINS "")

IF(FILE_SUPPORT)
  SET(PLUGINS ${PLUGINS} file_plugin)
  ADD_LIBRARY(file_plugin MODULE file.c)
  TARGET_LINK_LIBRARIES(file_plugin ubox ubus)
  SET_TARGET_PROPERTIES(file_plugin PROPERTIES OUTPUT_NAME file PREFIX "")
ENDIF()

IF(RPCSYS_SUPPORT)
  SET(PLUGINS ${PLUGINS} rpcsys_plugin)
  ADD_LIBRARY(rpcsys_plugin MODULE sys.c)
  TARGET_LINK_LIBRARIES(rpcsys_plugin ubox ubus)
  SET_TARGET_PROPERTIES(rpcsys_plugin PROPERTIES OUTPUT_NAME rpcsys PREFIX "")
ENDIF()

IF (IWINFO_SUPPORT)
  SET(PLUGINS ${PLUGINS} iwinfo_plugin)
  ADD_LIBRARY(iwinfo_plugin MODULE iwinfo.c)
  TARGET_LINK_LIBRARIES(iwinfo_plugin ubox ubus iwinfo)
  SET_TARGET_PROPERTIES(iwinfo_plugin PROPERTIES OUTPUT_NAME iwinfo PREFIX "")
ENDIF()

IF (RRDNS_SUPPORT)
  FIND_LIBRARY(resolv NAMES resolv)
  IF(resolv STREQUAL "LIBS-NOTFOUND")
SET(resolv "")
  ENDIF()
  SET(PLUGINS ${PLUGINS} rrdns_plugin)
  ADD_LIBRARY(rpcd-mod-rrdns MODULE rrdns.c)
  TARGET_LINK_LIBRARIES(rpcd-mod-rrdns ubox ubus ${resolv})
  SET_TARGET_PROPERTIES(rpcd-mod-rrdns PROPERTIES OUTPUT_NAME rrdns PREFIX "")
ENDIF()

INSTALL(TARGETS rpcd ${PLUGINS}
RUNTIME DESTINATION sbin
LIBRARY DESTINATION lib
)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel