Created attachment 269341 [details] patch to update from 0.6.7 to 0.6.8 Upstream updated to 0.6.8
Hi, first run of $(teddycloud) with an user gets failed with error of ${ETCDIR} not exist and/or not writeable/readable. I have tried to workaround this trying to edit the rc.d file but it's enough for today, gotta see it later. I think we can create some extra rc command like "init", so users would run $(service teddycloudd init) and it would do first run of $(teddycloud) and creates the required config file in the ETCDIR. for this it also needs to own the ETCDIR, so we may need to create USERS/GROUPS for this port. maybe www/www or specific user/group for this port = teddycloud. An example for reference: $ less /usr/ports/mail/hydroxide/files/hydroxide.in hydroxide_init() { read -p "Enter mail account id: " id ${su_cmd} -m ${__user} -c "%%PREFIX%%/bin/hydroxide auth $id" }
(In reply to Yusuf Yaman from comment #1) Do you say about run teddycloudd daemon with non-root user? (In reply to Michael Pape from comment #0) Can you test replace patches: patch-include_json__helper.h patch-src_contentJson.c patch-src_handler__api.c patch-src_home__assistant.c patch-src_main.c patch-src_tonie__audio__playlist.c patch-src_toniesJson.c with one line in Makefile: CFLAGS+= -I${LOCALBASE}/include/cjson Build without errors for me.
(In reply to Vladimir Druzenko from comment #2) > Do you say about run teddycloudd daemon with non-root user? Not actually, currently it runs fine but needs to be run as root. Maybe what i said in comment #1 may be ignored. > Can you test replace patches: > ... > Build without errors for me. It builds for me too, but I had moved out more patches than you said. patch-include_json__helper.h patch-src_contentJson.c patch-src_handler.c patch-src_handler__api.c patch-src_handler__cloud.c patch-src_home__assistant.c patch-src_main.c patch-src_tonie__audio__playlist.c patch-src_toniesJson.c Without these moved out of files/, it builds for me with added: +CFLAGS+= -I${LOCALBASE}/include/cjson Thanks.
(In reply to Yusuf Yaman from comment #3) 1. So the idea is to run it as a non-root user? 2. I just didn't add new patches from this PR.
(In reply to Vladimir Druzenko from comment #4) > 1. So the idea is to run it as a non-root user? I did run teddycloud with non-root user, got the error obviously. If i had ran it as root, no problems would have arise. So I think we can ignore it? > 2. I just didn't add new patches from this PR. Oh, I see, sorry.
(In reply to Yusuf Yaman from comment #5) 1. It's ok if you change owner of the ETCDIR to user. @sample(%%USER%%,%%GROUP%%,) %%EXAMPLESDIR%%/tonieboxes.custom.json %%ETCDIR%%/tonieboxes.custom.json @sample(%%USER%%,%%GROUP%%,) %%EXAMPLESDIR%%/tonieboxes.json %%ETCDIR%%/tonieboxes.json @sample(%%USER%%,%%GROUP%%,) %%EXAMPLESDIR%%/tonies.custom.json %%ETCDIR%%/tonies.custom.json @sample(%%USER%%,%%GROUP%%,) %%EXAMPLESDIR%%/tonies.json %%ETCDIR%%/tonies.json @dir(%%USER%%,%%GROUP%%,) %%ETCDIR%%