babolivier / cozy-archlinux

Old Archlinux packaging for Cozy v2
4 stars 0 forks source link

Make the self-hosted app work on Archlinux #6

Open babolivier opened 8 years ago

babolivier commented 8 years ago

Currently, the self-hosted app is designed in a way that only allows configuration on Debian-based architectures. We'll need to adapt this, mainly by replacing the debian-reconfigure-cozy-domain.sh file.

By the way, @nledez, could you please tell me if the app is working on your side? Here, I get some

exec error: Error: Command failed: 
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

sudo: no tty present and no askpass program specified

in the logs, even with the cozy-self-hosting ALL=NOPASSWD: /usr/local/sbin/debian-reconfigure-cozy-domain.sh line in the sudoers file. I may come from a divergence between sudoer files on Debian and on Archlinux, but I don't really see where as I don't have the Default requiretty line in my file.

nledez commented 8 years ago

You should add a file "/etc/cozy/self-hosting.json". Exemple in Debian package: https://github.com/cozy/cozy-debian/blob/master/self-hosting.json

And allow to used it from sudo: https://github.com/cozy/cozy-debian/blob/master/sudoers.d_cozy-self-hosting

The code used in app is here: https://github.com/cozy/cozy-self-hosting/blob/master/server/controllers/debian.js#L18-L19

Install app with right user: https://github.com/cozy/cozy-debian/blob/master/debian/cozy-app-self-hosting.postinst#L27

cozy-monitor install self-hosting -r https://github.com/cozy/cozy-self-hosting.git

babolivier commented 8 years ago

I did all of that. It doesn't explain the sudo error :/