|
|
# Local development setup
|
|
|
|
|
|
These steps guide you through
|
|
|
|
|
|
### prerequisites
|
|
|
|
|
|
- You might want to use separate environment. I myself used either `VirtualBox` or `LXC`
|
|
|
- Setup `SSH` keys and `GPG` key
|
|
|
|
|
|
## Install dependencies
|
|
|
|
|
|
Log into shell in your development machine. If you are developing with __non-root__ account, you need to patch ``ubus`` packages.
|
|
|
|
|
|
Go throught the gitlab-ci python [Dockerfile](https://gitlab.nic.cz/turris/foris-ci/-/blob/master/Dockerfile) until ubus
|
|
|
|
|
|
## Patching ubus
|
|
|
Clone `ubus` repository as all others
|
|
|
|
|
|
Right before ``make``apply below patch
|
|
|
``ubus-non-root.patch``
|
|
|
```
|
|
|
diff --git a/ubusd_acl.c b/ubusd_acl.c
|
|
|
index 4b72663..dbd473c 100644
|
|
|
--- a/ubusd_acl.c
|
|
|
+++ b/ubusd_acl.c
|
|
|
@@ -100,6 +100,8 @@ ubusd_acl_check(struct ubus_client *cl, const char *obj,
|
|
|
struct ubusd_acl_obj *acl;
|
|
|
struct blob_attr *cur;
|
|
|
int rem;
|
|
|
+ // bypass check for root uid
|
|
|
+ return 0;
|
|
|
|
|
|
if (!cl->uid || !obj)
|
|
|
return 0;
|
|
|
```
|
|
|
follow the Dockerfile to the end.
|
|
|
|
|
|
Go to [Testing](testing) if you need further information |
|
|
\ No newline at end of file |