Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 743856

Summary: net-irc/znc-1.8.2: systemd service file points to a non-standard data directory
Product: Gentoo Linux Reporter: Sven <sven.koehler>
Component: Current packagesAssignee: Louis Sautier (sbraz) <sbraz>
Status: RESOLVED FIXED    
Severity: normal CC: alexey+gentoo, crabbedhaloablution, gentoo, jstein, sam, samuelbernardo.mail
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Sven 2020-09-20 22:50:41 UTC
The current ExecStart line is broken. It should be
ExecStart=/usr/bin/znc -f --datadir=/var/lib/znc/

Otherwise, znc will be looking in /var/lib/znc/.znc for the configs folder.

Workaround: create a symlink from /var/lib/znc/.znc to /var/lib/znc/

Reproducible: Always
Comment 1 Louis Sautier (sbraz) gentoo-dev 2020-09-22 08:53:45 UTC
(In reply to Sven from comment #0)
> The current ExecStart line is broken. It should be
> ExecStart=/usr/bin/znc -f --datadir=/var/lib/znc/
> 
> Otherwise, znc will be looking in /var/lib/znc/.znc for the configs folder.
> 
> Workaround: create a symlink from /var/lib/znc/.znc to /var/lib/znc/
> 
> Reproducible: Always

Hi,
What is the problem with that, did you migrate from OpenRC to systemd?
I don't really want to change the unit, upstream provides it this way and if we change it, it will break everyone's configs.
Comment 3 Michael 'veremitz' Everitt 2021-03-26 12:47:24 UTC
Any reason this can't be patched in Gentoo temporarily, and this bug closed?
Comment 4 Sven 2021-03-26 14:19:42 UTC
Louis, don't use the broken upstream unit file. It uses the /var/lib/znc/.znc folder only because /var/lib/znc/ is the home directory of the znc user. To use a dot-subfolder is very uncommon for system daemons. Also upstream has fixed their mistake by now.

Since upstream has fixed their mistake, people's config will now break when znc is updated. This is due to the fact, that you, as a maintainer, did not take control of the datadir location in the first place.

As a workaround for the broken unit file, I have created a symlink from /var/lib/znc/.znc to /var/lib/znc/.
Comment 5 Louis Sautier (sbraz) gentoo-dev 2021-03-27 13:31:08 UTC
Hi guys,
I'm aware of the fa
Comment 6 Louis Sautier (sbraz) gentoo-dev 2021-03-27 13:32:51 UTC
Hi guys,
I'm aware of the fact that upstream fixed this. I also don't really know how to tackle the problem created by the change in the location of the config. I don't really want to create a news item just for this. I'll think this through and probably backport the patch when I have a good solution to avoid breaking everyone's config.
Comment 7 Larry the Git Cow gentoo-dev 2021-08-24 19:26:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f302ee221545dd442429c19dd3a21545df86be63

commit f302ee221545dd442429c19dd3a21545df86be63
Author:     Louis Sautier <sbraz@gentoo.org>
AuthorDate: 2021-08-22 22:36:36 +0000
Commit:     Louis Sautier <sbraz@gentoo.org>
CommitDate: 2021-08-24 19:23:39 +0000

    net-irc/znc: fix data location on systemd, #743856, enable py3.10
    
    Also:
    * Backport a patch to replace freenode with libera.
    * Adjust README.
    * Remove an 8-year-old ewarn.
    * Respect PYTHON_SINGLE_TARGET when building modpython.
    * Fix pkg_postinst to work on systemd.
    * Remove/fix some checks in pkg_postinst that became broken/unnecessary
      with the swith to acct-user.
    * Improve README.gentoo slightly.
    
    Closes: https://bugs.gentoo.org/743856
    Signed-off-by: Louis Sautier <sbraz@gentoo.org>

 net-irc/znc/files/README.gentoo-r1                 |   6 +-
 net-irc/znc/files/znc-1.8.2-add-libera.patch       |  55 ++++++
 net-irc/znc/files/znc-1.8.2-fix-python-3.10.patch  |  31 ++++
 .../znc/files/znc-1.8.2-fix-systemd-datadir.patch  |  23 +++
 net-irc/znc/znc-1.8.2-r1.ebuild                    | 194 +++++++++++++++++++++
 5 files changed, 306 insertions(+), 3 deletions(-)
Comment 8 Samuel Bernardo 2022-09-11 00:59:57 UTC
*** Bug 869356 has been marked as a duplicate of this bug. ***