The Environment setting: Environment="GITEA_WORK_DIR=/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom" in the systemd service file leads to following lines in the journal on startup of gitea: gitea[23234]: 2019/04/23 17:15:26 [T] AppPath: /usr/bin/gitea gitea[23234]: 2019/04/23 17:15:26 [T] AppWorkPath: /var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom gitea[23234]: 2019/04/23 17:15:26 [T] Custom path: /var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom/custom gitea[23234]: 2019/04/23 17:15:26 [T] Log path: /var/log/gitea That is GITEA_WORK_DIR is set to "/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom" and GITEA_CUSTOM gets its default "${GITEA_WORK_DIR}/custom" resulting in "/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom/custom". After consulting the "Environment=" paragraph in "man systemd.exec" I think the line should be: Environment="GITEA_WORK_DIR=/var/lib/gitea" "GITEA_CUSTOM=/var/lib/gitea/custom" (note the extra double quotes!).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05b7acaa3d40b21b40f56cc8541f6c74d9eaa02e commit 05b7acaa3d40b21b40f56cc8541f6c74d9eaa02e Author: Felix Neumärker <xdch47@posteo.de> AuthorDate: 2019-04-24 06:25:13 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-06-07 13:17:46 +0000 www-apps/gitea: bump to 1.8.2 + fix systemd service Closes: https://bugs.gentoo.org/671596 Closes: https://bugs.gentoo.org/684196 Closes: https://bugs.gentoo.org/685616 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Felix Neumärker <xdch47@posteo.de> Closes: https://github.com/gentoo/gentoo/pull/11977 Signed-off-by: Michał Górny <mgorny@gentoo.org> www-apps/gitea/Manifest | 1 + www-apps/gitea/files/gitea.initd-r3 | 22 +++++++ www-apps/gitea/files/gitea.service-r2 | 34 +++++++++++ www-apps/gitea/gitea-1.8.2.ebuild | 104 ++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+)