Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470994 - app-admin/syslog-ng-3.4.1: the ebuild or upstream should create localstatedir, not the init script
Summary: app-admin/syslog-ng-3.4.1: the ebuild or upstream should create localstatedir...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mr. Bones. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-22 12:36 UTC by Agostino Sarubbo
Modified: 2013-05-28 07:00 UTC (History)
2 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 Agostino Sarubbo gentoo-dev 2013-05-22 12:36:07 UTC
The service did not start. Launching syslog-ng manually I get:

Error creating persistent state file; filename='/var/lib/syslog-ng/syslog-ng.persist-', error='No such file or directory (2)'

mkdir /var/lib/syslog-ng solved for me.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2013-05-22 16:47:34 UTC
patches welcome.  I don't use systemd.
Comment 2 Agostino Sarubbo gentoo-dev 2013-05-22 17:22:45 UTC
(In reply to comment #1)
> patches welcome.  I don't use systemd.

patches?

1)keepdir /var/lib/syslog-ng in src_install()
or
2)add systemd IUSE and: use systemd && keepdir /var/lib/syslog-ng
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2013-05-22 17:50:56 UTC
The openrc init.d file takes care of the statefile directory creation.  The systemd file should do the same thing.
Comment 4 Nikoli 2013-05-27 08:23:15 UTC
Why create this dir in init script? /var/lib/ is not symlink to /run/lib and there is no plan to move it into tmpfs.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-27 14:47:35 UTC
(In reply to Mr. Bones. from comment #3)
> The openrc init.d file takes care of the statefile directory creation.  The
> systemd file should do the same thing.

Just because you do something wrong doesn't mean everyone should do the same.
Comment 6 William Hubbs gentoo-dev 2013-05-27 15:01:02 UTC
(In reply to Michał Górny from comment #5)
> (In reply to Mr. Bones. from comment #3)
> > The openrc init.d file takes care of the statefile directory creation.  The
> > systemd file should do the same thing.
> 
> Just because you do something wrong doesn't mean everyone should do the same.

@mgorny:
Wouldn't it be better to point out how this should be handled instead of just telling him that he is wrong?
Comment 7 Agostino Sarubbo gentoo-dev 2013-05-27 15:08:06 UTC
(In reply to William Hubbs from comment #6)
> Wouldn't it be better to point out how this should be handled instead of
> just telling him that he is wrong?

Since upstream supports systemd, I guess the best solution is that the buildsystem should create that directory.
Comment 8 William Hubbs gentoo-dev 2013-05-27 15:53:23 UTC
(In reply to Agostino Sarubbo from comment #7)
> (In reply to William Hubbs from comment #6)
> > Wouldn't it be better to point out how this should be handled instead of
> > just telling him that he is wrong?
> 
> Since upstream supports systemd, I guess the best solution is that the
> buildsystem should create that directory.

Yes, I agree, since this is in /var/lib, the build system creating the directory is the correct long term fix.

(In reply to Mr. Bones. from comment #3)
> The openrc init.d file takes care of the statefile directory creation.  The
> systemd file should do the same thing.

No, since this directory is in /var/lib, the ebuild should create it, or better yet, the build system should be patched to create it and the patch sent upstream.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-27 17:32:30 UTC
The solution has been pointed out already. The package manager is the thing responsible for creating and owning files in non-volatile locations.