Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 739872 - media-video/motion-4.3.1 - OpenRC service fails to create PID file
Summary: media-video/motion-4.3.1 - OpenRC service fails to create PID file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johannes Willem (Hans) Fernhout
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-09-01 11:36 UTC by chris lindley
Modified: 2020-12-15 07:18 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 chris lindley 2020-09-01 11:36:02 UTC
Media-video/motion-4.3.1 is unable to create its user PID folder in /var/run when using OpenRC. Manually creating the directory works but of course does not persist after a reboot. 

Mine runs under the user:group - “motion:motion”. It needs to create “/var/run/motion/motion.pid”. 

I posted this on Gentoo forums and user:netfab pointed out that whereas an earlier init file created the directory, the current one (init-r4) no longer does this.

https://forums.gentoo.org/viewtopic-t-1118330-highlight-.html
Comment 1 Johannes Willem (Hans) Fernhout 2020-09-06 15:26:56 UTC
I'll pick this up and update the ebuild to verify the existence of /var/run . In the mean time you can try to use the supervise-daemon use flag which does not require a pid file.
Comment 2 Johannes Willem (Hans) Fernhout 2020-11-01 12:37:39 UTC
the fix will be to add the following two statements to the depend function 'need localmount" and "after bootmisc", in accordance with the suggestions in the wiki: https://wiki.gentoo.org/wiki/Handbook:Parts/Working/Initscripts#Controlling_the_order .
Comment 3 chris lindley 2020-11-17 10:35:39 UTC
(In reply to Hans Fernhout from comment #2)
> the fix will be to add the following two statements to the depend function
> 'need localmount" and "after bootmisc", in accordance with the suggestions
> in the wiki:
> https://wiki.gentoo.org/wiki/Handbook:Parts/Working/
> Initscripts#Controlling_the_order .

4.3.2 is now the current version. Are you intending to add the fixes to that ebuild? Is there a current maintainer for the Motion ebuild?

BTW Despite using Gentoo for many years I've rarely ever modified an ebuild. But unless somebody else has this, I'm happy to give it a go.
Comment 4 Johannes Willem (Hans) Fernhout 2020-12-05 04:35:42 UTC
(In reply to chris lindley from comment #3)
> (In reply to Hans Fernhout from comment #2)
> > the fix will be to add the following two statements to the depend function
> > 'need localmount" and "after bootmisc", in accordance with the suggestions
> > in the wiki:
> > https://wiki.gentoo.org/wiki/Handbook:Parts/Working/
> > Initscripts#Controlling_the_order .
> 
> 4.3.2 is now the current version. Are you intending to add the fixes to that
> ebuild? Is there a current maintainer for the Motion ebuild?

Can you please confirm that adding "need localmount" and "after bootmisc" resolves ths issue for you? Thanks.
Comment 5 chris lindley 2020-12-09 09:17:18 UTC
(In reply to Hans Fernhout from comment #4)
> (In reply to chris lindley from comment #3)
> > (In reply to Hans Fernhout from comment #2)
> > > the fix will be to add the following two statements to the depend function
> > > 'need localmount" and "after bootmisc", in accordance with the suggestions
> > > in the wiki:
> > > https://wiki.gentoo.org/wiki/Handbook:Parts/Working/
> > > Initscripts#Controlling_the_order .
> > 
> > 4.3.2 is now the current version. Are you intending to add the fixes to that
> > ebuild? Is there a current maintainer for the Motion ebuild?
> 
> Can you please confirm that adding "need localmount" and "after bootmisc"
> resolves ths issue for you? Thanks.

I'm afraid that I switched to the "official" Docker image of this tool from the Gentoo build - a local string of shed robberies made me want a reliable CCTV system ;-) 

I will be able to check, however, I will only be able to do so in about a week's time. Thanks!
Comment 6 Johannes Willem (Hans) Fernhout 2020-12-09 16:55:41 UTC
Okay, that'd be good. In any case 4.3.2 with this change is underway. I submitted the pull request yesterday. Waiting for it to be merged.
Comment 7 Larry the Git Cow gentoo-dev 2020-12-15 07:18:09 UTC
The bug has been closed via the following commit(s):

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

commit c2b5ff207b1160749bc7287f8372dcfe783d8079
Author:     Johannes Willem Fernhout <hfern@fernhout.info>
AuthorDate: 2020-12-08 18:23:18 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-12-15 07:18:02 +0000

    media-video/motion: version bump to 4.3.2
    
    Changes are:
    - version 4.3.2 has some bug fixes
    - init file updated with need localmount and after bootmisc
    - simplification of ebuild
    - supervise-deamon USE flag no longer used
    
    Closes: https://bugs.gentoo.org/752135
    Closes: https://bugs.gentoo.org/739872
    Signed-off-by: Johannes Willem Fernhout <hfern@fernhout.info>
    Closes: https://github.com/gentoo/gentoo/pull/18569
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-video/motion/Manifest              |  1 +
 media-video/motion/files/motion.confd-r5 | 31 +++++++++++
 media-video/motion/files/motion.initd-r5 | 37 +++++++++++++
 media-video/motion/motion-4.3.2.ebuild   | 89 ++++++++++++++++++++++++++++++++
 4 files changed, 158 insertions(+)