Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717312 - media-video/motion: OpenRC init file simplification
Summary: media-video/motion: OpenRC init file simplification
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-04-13 12:45 UTC by Johannes Willem (Hans) Fernhout
Modified: 2020-06-04 07:14 UTC (History)
1 user (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 Johannes Willem (Hans) Fernhout 2020-04-13 12:45:37 UTC
Motion's init script is too much, does not leverage OpenRC features, and does not cater for all use cases.

Specifically:
- reload is not needed because it does the same as restart
- the dependencies on modules and mysql are applicable only in a specific use case, i.e. with V4L and MySQL. Other use cases might not need these: when using IP-cameras and using no or a different database
- there is no need to call s-s-d directly
- standard s-s-d parameters are not used.


Reproducible: Always




All that is needed in the init script is:

#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

command=/usr/bin/motion
command_args_background="-b"
Comment 1 Johannes Willem (Hans) Fernhout 2020-04-18 16:36:06 UTC
I have created ebuilds for the versions 4.3.0 and 4.3.1 of motion, which implement also these simplifications. Please see bug 673410 for details.
Comment 2 Larry the Git Cow gentoo-dev 2020-06-04 07:14:23 UTC
The bug has been closed via the following commit(s):

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

commit 58c1002e91e59ca9edba1a4781f3024b0dbdf99e
Author:     Hans Fernhout <hfern@fernhout.info>
AuthorDate: 2020-06-04 07:09:24 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-06-04 07:14:12 +0000

    media-video/motion: version bump to 4.3.1
    
    Summary of changes:
    - support new version 4.3.1
    - EAPI6 to EAPI7
    - GLEP81 support: user and group management via dedicated packages
    - untangled support for mariadb and mysql
    - remove libav
    - confd support for commandline options, umask and work dir
    - initd checkpre function to check existence of work dir and log dir
    - support for OpenRC's supervise-daemon via a local use flag
    - added myself as proxy-maintainer
    
    Closes: https://bugs.gentoo.org/665930
    Closes: https://bugs.gentoo.org/673410
    Closes: https://bugs.gentoo.org/717312
    Signed-off-by: Johannes Willem Fernhout <hfern@fernhout.info>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 media-video/motion/Manifest                |   1 +
 media-video/motion/files/motion.confd-r4   |  28 ++++++++
 media-video/motion/files/motion.initd-r4   |  30 +++++++++
 media-video/motion/files/motion.service    |   4 +-
 media-video/motion/files/motion.service-r4 |  26 ++++++++
 media-video/motion/metadata.xml            |  10 +++
 media-video/motion/motion-4.3.1.ebuild     | 104 +++++++++++++++++++++++++++++
 7 files changed, 201 insertions(+), 2 deletions(-)