Created attachment 496622 [details] emerge --info When using OpenRC Gerbera fails to start with the following error: ERROR: could not open file /etc/gerbera/config.xml for writing : Permission denied This is because the Gerbera ebuild sets the /etc/gerbera/config.xml permissions to 0640 and the ownership to root:gerbera, but the process is runs as gerbera:gerbera. The permissions should be changed to 0660, or the ownership to gerbera:gerbera.
I think this is a Gerbera bug, it doesn't need to write this file if it exists, so it shouldn't die, just open it read only.
The Gerbera ebuild installs a config.xml file with an empty <udn> tag, so Gerbera needs write access on first start to fill in uuid.
So it does... Writing to your own config file feels pretty wrong to me. Perhaps we should add a pkg_postinst call to generate a UDN if its not present in the config.
We also need to consider that a user can remove or incorrectly edit the <udn> tag. So relying on pkg_postinst might not be the best option.
Although I do agree with the remarks about the behaviour of this package and program, it explicitly does die because its config is not write-accessible with this message in its log: ERROR: could not open file /etc/gerbera/config.xml for writing : Permission denied Unless the permissions are adjusted by the ebuild, such as by using chmod 0660, then the necessity for Gerbera to write to its own config file needs to be alleviated at install time.
Raised upstream as https://github.com/gerbera/gerbera/issues/196
This is fixed with 1.2.0, as it no longer tries to write that file.
(In reply to Ian Whyman (thev00d00) from comment #7) > This is fixed with 1.2.0, as it no longer tries to write that file. Gerbera 1.2.0 can't auto fill the empty <udn> tag that exists in the default config.xml file. This results in new Gerbera installs to fail with the following error: ERROR: Config: option not found: /server/udn The default config.xml should be updated with the <udn> tag set to a valid UUID.
BT: To get it working is simple... run <gerbera --create-config> You can redirect the output to /etc/gerbera/config.xml Ten edit the file and remove everything in between <home></home> it puts information there from (https://github.com/gerbera/gerbera/issues/209) Then it should be working just fine.