mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-01-28 01:47:19 +01:00
owsd: bump to 0.8 with test ACL moved to owsd-testdata
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
This commit is contained in:
parent
8bb705d288
commit
e9054920b6
3 changed files with 39 additions and 24 deletions
|
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=owsd
|
||||
PKG_VERSION:=0.7
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=0.8
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=git@public.inteno.se:owsd.git
|
||||
PKG_SOURCE_VERSION:=ff0dd624f3aa087578463109bb4047769a6837ee
|
||||
PKG_SOURCE_VERSION:=31a604777cfe0db440e640f5a85101ccea6e98b6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>
|
||||
|
|
@ -49,6 +49,12 @@ define Package/owsd-openssl
|
|||
VARIANT:=openssl
|
||||
endef
|
||||
|
||||
define Package/owsd-testdata
|
||||
$(call Package/$(PKG_NAME)/default)
|
||||
TITLE += (Test certs and rpcd ACLs for running automated tests)
|
||||
DEPENDS := owsd
|
||||
endef
|
||||
|
||||
#ifeq ($(BUILD_VARIANT),openssl)
|
||||
# CMAKE_OPTIONS += -OWSD_OPENSSL_CLIENT_CERTS=/etc/ssl/certs
|
||||
# CMAKE_OPTIONS += -OWSD_OPENSSL_SUPPORT=ON
|
||||
|
|
@ -60,6 +66,33 @@ define Package/owsd/description
|
|||
Web socket ubus daemon
|
||||
endef
|
||||
|
||||
define Package/owsd-testdata/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/res/owsd-test.json $(1)/usr/share/rpcd/acl.d/owsd-test.json
|
||||
$(INSTALL_DIR) $(1)/usr/share/owsd/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/res/cert.pem $(1)/usr/share/owsd/cert.pem
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/res/key.pem $(1)/usr/share/owsd/key.pem
|
||||
endef
|
||||
|
||||
define Package/owsd-testdata/postinst
|
||||
#!/bin/sh
|
||||
set -e
|
||||
uci delete rpcd.owsd_test 2>/dev/null || true
|
||||
uci set rpcd.owsd_test=login
|
||||
uci set rpcd.owsd_test.username="owsd_test"
|
||||
uci set rpcd.owsd_test.password="x"
|
||||
uci add_list rpcd.owsd_test.read='test-calls'
|
||||
uci add_list rpcd.owsd_test.read='test-events'
|
||||
uci commit
|
||||
endef
|
||||
|
||||
define Package/owsd-testdata/prerm
|
||||
#!/bin/sh
|
||||
set -e
|
||||
uci delete rpcd.owsd_test
|
||||
uci commit
|
||||
endef
|
||||
|
||||
define Package/owsd/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/owsd $(1)/usr/bin/
|
||||
|
|
@ -67,9 +100,8 @@ define Package/owsd/install
|
|||
$(INSTALL_BIN) ./files/owsd.init $(1)/etc/init.d/owsd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_BIN) ./files/owsd $(1)/etc/config/owsd
|
||||
$(INSTALL_DIR) $(1)//usr/share/rpcd/acl.d
|
||||
$(INSTALL_BIN) ./files/superuser.json $(1)/usr/share/rpcd/acl.d/superuser.json
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,owsd))
|
||||
$(eval $(call BuildPackage,owsd-openssl))
|
||||
$(eval $(call BuildPackage,owsd-testdata))
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ config owsd 'setup'
|
|||
list origin 'http://localhost/'
|
||||
list origin 'http://localhost:80/'
|
||||
list origin 'http://localhost:8080/'
|
||||
#option cert '/usr/share/owsd/cert.pem'
|
||||
#option key '/usr/share/owsd/ke.pem'
|
||||
#option cert '/usr/share/owsD/cert.pem'
|
||||
#option key '/usr/share/owsD/key.pem'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"superuser": {
|
||||
"description": "Super user access role",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"*": [ "*" ]
|
||||
},
|
||||
"uci": [ "*" ]
|
||||
},
|
||||
"write": {
|
||||
"ubus": {
|
||||
"*": [ "*" ]
|
||||
},
|
||||
"uci": [ "*" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue