Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684196 - www-apps/gitea-1.7.6 - Problem with Environment setting in systemd service file
Summary: www-apps/gitea-1.7.6 - Problem with Environment setting in systemd service file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Felix Neumärker
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-04-23 16:00 UTC by Horst Prote
Modified: 2019-06-07 13:26 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Horst Prote 2019-04-23 16:00:21 UTC
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!).
Comment 1 Larry the Git Cow gentoo-dev 2019-06-07 13:26:14 UTC
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(+)