Browse Source

sysrepo: merge sysrepod and sysrepo-plugind

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
lilik-openwrt-22.03
Mislav Novakovic 8 years ago
parent
commit
0aa8371086
5 changed files with 44 additions and 62 deletions
  1. +2
    -2
      net/netopeer2/Makefile
  2. +8
    -22
      net/sysrepo/Makefile
  3. +0
    -19
      net/sysrepo/files/sysrepo-plugind.init
  4. +34
    -0
      net/sysrepo/files/sysrepo.init
  5. +0
    -19
      net/sysrepo/files/sysrepod.init

+ 2
- 2
net/netopeer2/Makefile View File

@ -47,7 +47,7 @@ define Package/netopeer2-server
CATEGORY:=Utilities CATEGORY:=Utilities
TITLE:=NETCONF server TITLE:=NETCONF server
URL:=$(PKG_SOURCE_URL) URL:=$(PKG_SOURCE_URL)
DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepod +SSH_SERVER:openssh-server
DEPENDS:=+libpthread +libyang +libnetconf2 +netopeer2-keystored +libsysrepo +sysrepocfg +sysrepoctl +sysrepo +SSH_SERVER:openssh-server
MENU:=1 MENU:=1
endef endef
@ -64,7 +64,7 @@ define Package/netopeer2-keystored
CATEGORY:=Utilities CATEGORY:=Utilities
TITLE:=Netopeer2 key store management TITLE:=Netopeer2 key store management
URL:=$(PKG_SOURCE_URL) URL:=$(PKG_SOURCE_URL)
DEPENDS:=+libopenssl +libsysrepo +sysrepo-plugind +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
DEPENDS:=+libopenssl +libsysrepo +sysrepo +sysrepocfg +sysrepoctl +SSH_KEYS:openssh-keygen
MENU:=1 MENU:=1
endef endef


+ 8
- 22
net/sysrepo/Makefile View File

@ -38,11 +38,11 @@ define Package/libsysrepo
DEPENDS:=+libyang +libprotobuf-c +libev +libavl DEPENDS:=+libyang +libprotobuf-c +libev +libavl
endef endef
define Package/sysrepod
define Package/sysrepo
SECTION:=util SECTION:=util
CATEGORY:=Utilities CATEGORY:=Utilities
URL:=$(PKG_SOURCE_URL) URL:=$(PKG_SOURCE_URL)
TITLE:=YANG-based data store daemon
TITLE:=YANG-based data store daemon and plugin
DEPENDS:=+libsysrepo DEPENDS:=+libsysrepo
endef endef
@ -62,14 +62,6 @@ define Package/sysrepocfg
DEPENDS:=+libsysrepo DEPENDS:=+libsysrepo
endef endef
define Package/sysrepo-plugind
SECTION:=util
CATEGORY:=Utilities
URL:=$(PKG_SOURCE_URL)
TITLE:=sysrepo plugin daemon
DEPENDS:=+libsysrepo
endef
define Package/sysrepo/description define Package/sysrepo/description
Sysrepo is an YANG-based configuration and operational state data store for Unix/Linux applications. Sysrepo is an YANG-based configuration and operational state data store for Unix/Linux applications.
endef endef
@ -107,12 +99,15 @@ define Package/libsysrepo/install
$(INSTALL_BIN) ./files/libsysrepo.default $(1)/etc/uci-defaults/95_libsysrepo $(INSTALL_BIN) ./files/libsysrepo.default $(1)/etc/uci-defaults/95_libsysrepo
endef endef
define Package/sysrepod/install
define Package/sysrepo/install
$(INSTALL_DIR) $(1)/bin $(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepod $(1)/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepod $(1)/bin/
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepo-plugind $(1)/bin/
$(INSTALL_DIR) $(1)/etc/init.d/ $(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/sysrepod.init $(1)/etc/init.d/sysrepod
$(INSTALL_BIN) ./files/sysrepo.init $(1)/etc/init.d/sysrepo
endef endef
define Package/sysrepoctl/install define Package/sysrepoctl/install
@ -125,16 +120,7 @@ define Package/sysrepocfg/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepocfg $(1)/bin/
endef endef
define Package/sysrepo-plugind/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysrepo-plugind $(1)/bin/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/sysrepo-plugind.init $(1)/etc/init.d/sysrepo-plugind
endef
$(eval $(call BuildPackage,libsysrepo)) $(eval $(call BuildPackage,libsysrepo))
$(eval $(call BuildPackage,sysrepod))
$(eval $(call BuildPackage,sysrepo))
$(eval $(call BuildPackage,sysrepoctl)) $(eval $(call BuildPackage,sysrepoctl))
$(eval $(call BuildPackage,sysrepocfg)) $(eval $(call BuildPackage,sysrepocfg))
$(eval $(call BuildPackage,sysrepo-plugind))

+ 0
- 19
net/sysrepo/files/sysrepo-plugind.init View File

@ -1,19 +0,0 @@
#!/bin/sh /etc/rc.common
START=90
STOP=10
USE_PROCD=1
PROG=/bin/sysrepo-plugind
start_service() {
procd_open_instance
procd_set_param command $PROG
procd_set_param respawn
procd_close_instance
}
stop_service()
{
service_stop ${PROG}
}

+ 34
- 0
net/sysrepo/files/sysrepo.init View File

@ -0,0 +1,34 @@
#!/bin/sh /etc/rc.common
START=70
STOP=10
USE_PROCD=1
PROG_DEAMON=/bin/sysrepod
PROG_PLUGIN=/bin/sysrepo-plugind
start_service() {
procd_open_instance
procd_set_param command ${PROG_DEAMON}
procd_append_param command -d -l 0
procd_set_param respawn
procd_close_instance
procd_open_instance
procd_set_param command ${PROG_PLUGIN}
procd_append_param command -d -l 0
procd_set_param respawn
procd_close_instance
}
stop_service()
{
if [ -f /etc/init.d/netopeer2-server ]; then
# netopeer2-server will automatically start sysrepod,
# so we need to stop it
/etc/init.d/netopeer2-server stop
sleep 1
fi
service_stop ${PROG_PLUGIN}
service_stop ${PROG_DEAMON}
}

+ 0
- 19
net/sysrepo/files/sysrepod.init View File

@ -1,19 +0,0 @@
#!/bin/sh /etc/rc.common
START=70
STOP=10
USE_PROCD=1
PROG=/bin/sysrepod
start_service() {
procd_open_instance
procd_set_param command $PROG
procd_set_param respawn
procd_close_instance
}
stop_service()
{
service_stop ${PROG}
}

Loading…
Cancel
Save