Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671596 - www-apps/gitea gitea.service depends on mysqld.service even though gitea can use different database backends
Summary: www-apps/gitea gitea.service depends on mysqld.service even though gitea can ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Felix Neumärker
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-11-21 00:14 UTC by Nathan Dehnel
Modified: 2019-06-07 13:26 UTC (History)
3 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 Nathan Dehnel 2018-11-21 00:14:57 UTC
I just ran gitea from the command line to set it up with postgresql only to be unable to start gitea.service because it requires mysql to be installed.
Comment 1 Tomáš Mózes 2018-11-21 05:58:33 UTC
Seems like our dependency is too hard, we should definitely remove Requires=mysqld.service. Looking at the official systemd unit file at https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service they have:

After=syslog.target
After=network.target
#After=mysqld.service
#After=postgresql.service
#After=memcached.service
#After=redis.service

While in Gentoo we have:
After=network.target
Requires=network.target
After=mysqld.service
Requires=mysqld.service

Can you please test with the following?
After=network.target
Requires=network.target
After=mysqld.service
After=postgresql.service
After=memcached.service
After=redis.service

If that doesn't work, we will probably need to remove all the database deps (like in the openrc script).
Comment 2 Nathan Dehnel 2018-11-25 05:19:18 UTC
Here it is:
> Gitea requires MySQL, PostgreSQL, MSSQL, SQLite3 or TiDB.

(In reply to Tomáš Mózes from comment #1)
> Seems like our dependency is too hard, we should definitely remove
> Requires=mysqld.service. Looking at the official systemd unit file at
> https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service
> they have:
> 
> After=syslog.target
> After=network.target
> #After=mysqld.service
> #After=postgresql.service
> #After=memcached.service
> #After=redis.service
> 
> While in Gentoo we have:
> After=network.target
> Requires=network.target
> After=mysqld.service
> Requires=mysqld.service
> 
> Can you please test with the following?
> After=network.target
> Requires=network.target
> After=mysqld.service
> After=postgresql.service
> After=memcached.service
> After=redis.service
> 
> If that doesn't work, we will probably need to remove all the database deps
> (like in the openrc script).

That allows the service to start, but it fails with

>Nov 24 23:10:21 gentooserver postgres[2175]: 2018-11-24 23:10:21.155 CST [4064] LOG:  could not receive data from client: Connection reset by peer

Starting from the command line still works.
Comment 3 Tomáš Mózes 2019-03-15 23:26:22 UTC
I believe this is then fixed in 1.7.4, if not, please reopen, thanks.
Comment 4 Nathan Dehnel 2019-04-05 01:43:19 UTC
Um, it depends on postgresql, which isn't a valid service. It needs to depend on postgresql-11.service.
Comment 5 Tomáš Mózes 2019-04-05 03:45:27 UTC
Then we nwed to name all current postgresql versions 9.4..11.
Comment 6 Felix Neumärker 2019-05-11 13:26:50 UTC
PR is pendings since 16 days.
(https://github.com/gentoo/gentoo/pull/11808)
I don't know what else I can do…
Comment 7 Tomáš Mózes 2019-05-11 16:15:42 UTC
(In reply to Felix Neumärker from comment #6)
> PR is pendings since 16 days.
> (https://github.com/gentoo/gentoo/pull/11808)
> I don't know what else I can do…

Become a dev or grow in patience :)
Comment 8 Larry the Git Cow gentoo-dev 2019-06-07 13:26:17 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(+)