Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#55033 - [matrix-synapse] unneccessary extra step in config generation instructions in post-install messages

Attached to Project: Community Packages
Opened by Eric Toombs (ewtoombs) - Friday, 04 August 2017, 18:33 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 06 August 2017, 02:26 GMT
Task Type General Gripe
Category Packages
Status Closed
Assigned To Johannes Löthberg (demize)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The post install config generation instructions ask the user to cd to /var/lib/synapse. This step is unnecessary, and additionally is impossible.

$ cd /var/lib/synapse
cd: permission denied: /var/lib/synapse

Just
$ sudo -u synapse python2 -m synapse.app.homeserver \
--server-name my.domain.name \
--config-path /etc/synapse/homeserver.yaml \
--generate-config \
--report-stats=yes
works fine.


Additional info:
Name : matrix-synapse
Version : 0.22.1-2
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 06 August 2017, 02:26 GMT
Reason for closing:  Not a bug
Comment by Eric Toombs (ewtoombs) - Saturday, 05 August 2017, 03:01 GMT
Turns out it actually is important to run the command with current working directory /var/lib/synapse. It's just inconvenient because of the permissions of that directory and the fact that su synapse fails, since logins are disabled from that account. The easiest thing for me to do was to make this script. Could you consider shipping it with synapse?
Comment by Johannes Löthberg (demize) - Saturday, 05 August 2017, 18:01 GMT
The easiest way is to just run that sudo command as root. If you want that script included you're going to have to get it upstreamed
Comment by Eric Toombs (ewtoombs) - Sunday, 06 August 2017, 02:21 GMT
What is your solution exactly? Remember it has to run as synapse in the directory /var/lib/synapse. Have you actually tried it?
Comment by Eli Schwartz (eschwartz) - Sunday, 06 August 2017, 02:23 GMT
Johannes, I'd say the easiest way is to wrap *both* commands in the sudo invocation. But whatever, it (running the whole thing from a root shell) does seem like the kind of obvious thing users should realize.

(Aside: that wrapper script brings me nightmares of `update-grub`.)

Loading...