From 0d736cffc59e41cbe03e7be7657e9b6b3c4ff753 Mon Sep 17 00:00:00 2001 From: Hans Fernhout Date: Sat, 25 Apr 2020 13:10:26 +0200 Subject: [PATCH 1/4] media_video/motion: version bump to 4.3.1 New version of motion, which fixes - bug 665930: depends on virtual/mysql - bug 673410: version bump request - bug 717312: OpenRC init file simplification Signed-off-by: Johannes Willem Fernhout --- media-video/motion/Manifest | 1 + media-video/motion/files/motion.confd-r4 | 13 ++++ media-video/motion/files/motion.initd-r4 | 18 +++++ media-video/motion/files/motion.service | 4 +- media-video/motion/motion-4.3.1.ebuild | 98 ++++++++++++++++++++++++ 5 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 media-video/motion/files/motion.confd-r4 create mode 100644 media-video/motion/files/motion.initd-r4 create mode 100644 media-video/motion/motion-4.3.1.ebuild diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest index 00403820c80c0..2ea48fa4c591c 100644 --- a/media-video/motion/Manifest +++ b/media-video/motion/Manifest @@ -1 +1,2 @@ DIST motion-release-4.1.1.tar.gz 447795 BLAKE2B 8c7dfdad89f49ba8ec39689d268b4bc95c6a8bd85d4bd333f66638b2e815b3c59b2e42dd93811601b2ee7870100a0a21eaa789633056f74a5cc9f39f4f92229f SHA512 3b08d464f9243ccfc4b53b16cfc2001d1e0d206bf0295d55d8914914bc14ad0248ce5ac622cb7eb89ed32e1913a9a10add1b56497c4094ba876f7f85d6ad4143 +DIST motion-release-4.3.1.tar.gz 849633 BLAKE2B 33039d9b8b6db0698767892997be958d84a881cc56e8cdc31d8c27242c972e629d328197c92f91c1b71a957d85807877dc602f474d430384b1e27c9213ddc697 SHA512 17033dab055c4f1d9e2912a27d0a5b419d325b0781def98428a6117e38c62201b87199210071ba93d6c4dae514733b749e39cbc1befe6242f157d4583e07dcc6 diff --git a/media-video/motion/files/motion.confd-r4 b/media-video/motion/files/motion.confd-r4 new file mode 100644 index 0000000000000..cc65d5133c9bc --- /dev/null +++ b/media-video/motion/files/motion.confd-r4 @@ -0,0 +1,13 @@ +# Set the user and group under which motion will be run +# +# If the below parameters are not altered then motion will +# run under user root, and group video +# +# If the below parameters are altered then please make sure to +# * manually create the user, e.g. with the follwing command: +# # useradd motion -g video -N -M -r -s /sbin/nologin -d /dev/null +# * provide write access to motion's output directories + +#MOTION_USER="motion" +#MOTION_GROUP="video" + diff --git a/media-video/motion/files/motion.initd-r4 b/media-video/motion/files/motion.initd-r4 new file mode 100644 index 0000000000000..97ddfa06da6e8 --- /dev/null +++ b/media-video/motion/files/motion.initd-r4 @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${MOTION_USER:="root"} +: ${MOTION_GROUP:="video"} + +depend() { + use mysql + use postgresql +} + + +pidfile="/run/${RC_SVCNAME}.pid" +command=/usr/bin/motion +command_user="${MOTION_USER}:${MOTION_GROUP}" +command_background=true + diff --git a/media-video/motion/files/motion.service b/media-video/motion/files/motion.service index 559b94b6b29ae..d4755bdb48ea7 100644 --- a/media-video/motion/files/motion.service +++ b/media-video/motion/files/motion.service @@ -8,13 +8,13 @@ Type=simple ExecStart=/usr/bin/motion -n -c /etc/motion/motion.conf StandardError=null -User=motion +#User=motion Group=video #RuntimeDirectory=motion #RuntimeDirectoryMode=0750 -WorkingDirectory=/var/lib/motion +#WorkingDirectory=/var/lib/motion [Install] WantedBy=multi-user.target diff --git a/media-video/motion/motion-4.3.1.ebuild b/media-video/motion/motion-4.3.1.ebuild new file mode 100644 index 0000000000000..01f0650d1ae9b --- /dev/null +++ b/media-video/motion/motion-4.3.1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools readme.gentoo-r1 systemd user + +DESCRIPTION="A software motion detector" +HOMEPAGE="https://motion-project.github.io" +SRC_URI="https://github.com/Motion-Project/${PN}/archive/release-${PV}.tar.gz -> ${PN}-release-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="ffmpeg libav mariadb mmal mysql postgres sqlite v4l webp" + +RDEPEND=" + virtual/jpeg:= + ffmpeg? ( + libav? ( media-video/libav:= ) + !libav? ( media-video/ffmpeg:0= ) + ) + mariadb? ( dev-db/mariadb-connector-c ) + mmal? ( media-libs/raspberrypi-userland ) + mysql? ( dev-db/mysql-connector-c ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 ) + webp? ( media-libs/libwebp:= ) +" +DEPEND="${RDEPEND} + net-libs/libmicrohttpd + v4l? ( + media-libs/libv4l + virtual/os-headers + ) +" + +#PATCHES=( +# "${FILESDIR}"/${PV}/Fix-build-errors-with-FFmpeg-4.0.patch +#) + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +You need to setup /etc/motion/motion.conf before running motion for the +first time. You can use /etc/motion/motion-dist.conf as a template. +Please note that the 'daemon' and 'process_id_file' settings are +overridden by the bundled OpenRC init script and systemd unit where +appropriate. + +If motion is built with the mysql or mariadb use flags then please make +sure to match the database_type in /etc/motion/motion.conf: either +mysql or mariadb. + +To install motion as a service, use: +rc-update add motion default # with OpenRC +systemctl enable motion.service # with systemd +" + +S="${WORKDIR}"/${PN}-release-${PV} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_with ffmpeg) \ + $(use_with mariadb) \ + $(use_with mmal) \ + $(use_with mysql) \ + $(use_with postgres pgsql) \ + $(use_with sqlite sqlite3) \ + $(use_with v4l v4l2) \ + $(use_with webp) \ + --without-optimizecpu +} + +src_install() { + emake \ + DESTDIR="${D}" \ + docdir=/usr/share/doc/${PF} \ + examplesdir=/usr/share/doc/${PF}/examples \ + install + + newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} + # do not start mysql/postgres unnecessarily + ( use mysql || use mariadb ) || sed -i -e "/use mysql/d" "${D}/etc/init.d/motion" + use postgres || sed -i -e "/use postgresql/d" "${D}/etc/init.d/motion" + ( use mysql || use mariadb || use postgres ) || sed -i -e "/depend/{N;N;d;}" "${D}/etc/init.d/motion" + + newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN} + + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf + + readme.gentoo_create_doc + readme.gentoo_print_elog +} From 582c39e9c12e591356ddfcb2242dfb760890ee9f Mon Sep 17 00:00:00 2001 From: Hans Fernhout Date: Sat, 25 Apr 2020 13:10:26 +0200 Subject: [PATCH 2/4] media_video/motion: version bump to 4.3.1 New version of motion, which fixes - https://bugs.gentoo.org/665930: depends on virtual/mysql - https://bugs.gentoo.org/673410: version bump request - https://bugs.gentoo.org/717312: OpenRC init file simplification Signed-off-by: Johannes Willem Fernhout --- media-video/motion/motion-4.3.1.ebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/media-video/motion/motion-4.3.1.ebuild b/media-video/motion/motion-4.3.1.ebuild index 01f0650d1ae9b..0901a110209f5 100644 --- a/media-video/motion/motion-4.3.1.ebuild +++ b/media-video/motion/motion-4.3.1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 -inherit autotools readme.gentoo-r1 systemd user +EAPI=7 +inherit autotools readme.gentoo-r1 systemd DESCRIPTION="A software motion detector" HOMEPAGE="https://motion-project.github.io" @@ -11,7 +11,7 @@ SRC_URI="https://github.com/Motion-Project/${PN}/archive/release-${PV}.tar.gz -> LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="ffmpeg libav mariadb mmal mysql postgres sqlite v4l webp" +IUSE="ffmpeg libav mariadb mmal mysql postgres sqlite v4l webp" RDEPEND=" virtual/jpeg:= From 3051a2dcdd9673a8eb5e90a368093995d1ff5ff5 Mon Sep 17 00:00:00 2001 From: Hans Fernhout Date: Sat, 2 May 2020 19:10:10 +0200 Subject: [PATCH 3/4] media_video/motion-4.3.1 enhancements Addressed the bot's QA issues: - eclass "user" removed from ebuild - created ebuilds in acct-user/motion and acct-group/motion - added local use flag mariadb to metadata.xml Also made the following other enhancements: - set default directory to motion's home dir /var/db/montion - updated emerge message - created local use flag 'supervise-daemon' to configure initd for process supervision under OpenRC --- acct-group/motion/Manifest | 2 ++ acct-group/motion/metadata.xml | 7 +++++ acct-group/motion/motion-0.ebuild | 8 ++++++ acct-user/motion/Manifest | 2 ++ acct-user/motion/metadata.xml | 7 +++++ acct-user/motion/motion-0.ebuild | 13 +++++++++ media-video/motion/Manifest | 10 ++++++- media-video/motion/files/motion.confd-r4 | 30 +++++++++++++------- media-video/motion/files/motion.initd-r4 | 8 ++---- media-video/motion/metadata.xml | 2 ++ media-video/motion/motion-4.3.1.ebuild | 36 ++++++++++++++---------- 11 files changed, 94 insertions(+), 31 deletions(-) create mode 100644 acct-group/motion/Manifest create mode 100644 acct-group/motion/metadata.xml create mode 100644 acct-group/motion/motion-0.ebuild create mode 100644 acct-user/motion/Manifest create mode 100644 acct-user/motion/metadata.xml create mode 100644 acct-user/motion/motion-0.ebuild diff --git a/acct-group/motion/Manifest b/acct-group/motion/Manifest new file mode 100644 index 0000000000000..5b101332854cf --- /dev/null +++ b/acct-group/motion/Manifest @@ -0,0 +1,2 @@ +EBUILD motion-0.ebuild 146 BLAKE2B 95b74aef1b7545fc1cd9452a345bed4f0901320fde286781d0e2561ba9019531428fd69348448bf0177891761d8096e22464daed7a1027122912ca9eb30b2199 SHA512 c8c9b27c1f92951a949dd072f9b3daf4591b8c5e41634820c1e7b68299c03918bfef68b0334f69c1fd869da0f0b0ae99e92e8700339ba8a87ce602b8492e5a71 +MISC metadata.xml 235 BLAKE2B 0b005838eb2812b5052779904d5b1daf6958830721f8d84e503fb806dd841347b562329b24af48dc9763cbac18aa2d7cc90d38d6fd442e224e016773ba109064 SHA512 522be4e6d0250f91032399a92381cb7b8ad95e3e7c5aad2720ef4cc62571a353bdb1d1bf16e60f7c2760e23ef0737be713c74b127c4a5f46e8ee50cfa99cb7a9 diff --git a/acct-group/motion/metadata.xml b/acct-group/motion/metadata.xml new file mode 100644 index 0000000000000..db1bcff7dff7b --- /dev/null +++ b/acct-group/motion/metadata.xml @@ -0,0 +1,7 @@ + + + + + media-video@gentoo.org + + diff --git a/acct-group/motion/motion-0.ebuild b/acct-group/motion/motion-0.ebuild new file mode 100644 index 0000000000000..f5aa4deb218d3 --- /dev/null +++ b/acct-group/motion/motion-0.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=395 diff --git a/acct-user/motion/Manifest b/acct-user/motion/Manifest new file mode 100644 index 0000000000000..85cd91a1401ae --- /dev/null +++ b/acct-user/motion/Manifest @@ -0,0 +1,2 @@ +EBUILD motion-0.ebuild 304 BLAKE2B e01def1023e828ea1b823d4b3f57d0dc0d68a7ff990a2c871fdeadda3aa87e01b8457a26705889ea4bfcaf83fc7603448f7129028aba902603f8d5853cbdb2b1 SHA512 ee4e1c414c41872546e6cd989b4e8629fc2df4f9daf151c3abad99be9ee24a09f7e51cbe864790c814dbf7a40872e731203745b5d46488dd3ec0a015653e735f +MISC metadata.xml 232 BLAKE2B a60022015d20a1d23e10769cd2972e15a521c7107ccc68acbbb33b0977b229a8f53994499fb62868dcb02767d5c66e633de0d42874d2c2d3474e7236fbbdd485 SHA512 9560539733289a87ceb5d0bcce3b0ad9e2cee438297f37f88e3eb13990a21c18c238d26e3f8c8694253951de28824a06ac6a510ba3a89165c0df7ee80a91cd3c diff --git a/acct-user/motion/metadata.xml b/acct-user/motion/metadata.xml new file mode 100644 index 0000000000000..a5bdbc2fd43c1 --- /dev/null +++ b/acct-user/motion/metadata.xml @@ -0,0 +1,7 @@ + + + + + media-video@gentoo.org + + diff --git a/acct-user/motion/motion-0.ebuild b/acct-user/motion/motion-0.ebuild new file mode 100644 index 0000000000000..d1329eb79f7fd --- /dev/null +++ b/acct-user/motion/motion-0.ebuild @@ -0,0 +1,13 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="added by portage for motion, a software motion detector" +ACCT_USER_ID=395 +ACCT_USER_HOME=/var/lib/motion +ACCT_USER_GROUPS=( motion video ) + +acct-user_add_deps diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest index 2ea48fa4c591c..d6f85cd45a88a 100644 --- a/media-video/motion/Manifest +++ b/media-video/motion/Manifest @@ -1,2 +1,10 @@ -DIST motion-release-4.1.1.tar.gz 447795 BLAKE2B 8c7dfdad89f49ba8ec39689d268b4bc95c6a8bd85d4bd333f66638b2e815b3c59b2e42dd93811601b2ee7870100a0a21eaa789633056f74a5cc9f39f4f92229f SHA512 3b08d464f9243ccfc4b53b16cfc2001d1e0d206bf0295d55d8914914bc14ad0248ce5ac622cb7eb89ed32e1913a9a10add1b56497c4094ba876f7f85d6ad4143 +AUX 4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch 1768 BLAKE2B d2ec71166a4c3779007aabd975e3bd003b17713ff1bcd3c94e57183936c5f6fc24abd6ed5231dca94d1d37f66db7a13358c5dc52795200d190d848f0360ec1e6 SHA512 bee1af2f32215b2abc006b9f12c77e138dbe9bb2de41ae9f1022b6c10340cb8e2eb2831459b241c44e3a0789a9df81b7227dfc07beb3e7e3af6f718fb4a4c56d +AUX motion.conf 37 BLAKE2B 0a30bc830b519022f8c3bfdedb274329ecb506f3b3e42fb3de1f61513b9ef86c7884a9298c17b19b4afbb83b33ceb4f35f85fd377775e2485bbbfa2feb76833e SHA512 06e2dd29b946f35c78e7cf0ddeca727ca7f3f84e57e38b6688b2a493d487061ea6c959c5b365305a7813e0d3315f719003c681c26265566f46faa6ff88606853 +AUX motion.confd-r1 272 BLAKE2B bb395beafecf0498158ff0358b489ab251d79e005148715ef89ea882dec945f82faec60c2650e703d4db82e0bef3ccc8abd9768adf23dc8df5161f7fd8f24714 SHA512 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363 +AUX motion.confd-r4 784 BLAKE2B dacb5b9e0580422a18094dc6106c88f19952dc3d520b19d57de5c46817cc1346959f925179f6642562d0432962f73c7d7f3b62fb70a5164afa686f3576fe85c8 SHA512 e3b65d61c413cb34c15beac1f2144f2a76dd4f756e72cba19d3c2d500f33d65e6bae0873bf31309e94ca2e7e6a90926295c372de4ce150dd9997c9aeaca52f6a +AUX motion.initd-r3 1163 BLAKE2B 1926b3468c1b49651377c2704fe8f5cb65c9eed5a4bd11efe365aa01b9acd5300d7dae2f22c93748c2e1c1c49be9d707ad7d1c14d49dc092f18e6ddfe0e06ac5 SHA512 7c7201768fd868f851bb35b8df5e22d43688f1729178fd94d10f21436db6d5c178811bcef8b51c5b79b426bb92d542892edd65ee0414acaa799639a3a226934e +AUX motion.initd-r4 327 BLAKE2B 2326d374285fb56d0fcc81142012527769b6848505660527cf85c4c73be609c2b158b4b7b66b365472dfdd3f836403ab3c8f0967b8cae14585ed4ded50289c53 SHA512 a2d0450d1786d2c0db0e41656cd6adadae7fdcaf0f65b0ee1216216d24df2ce0bc5f91134b706d2e1580b13e8abeeba805622bb4a0938cdaa1a8c0af2e2e7e3d +AUX motion.service 355 BLAKE2B 3626031d4388676e899415482099e47cd7ff50d5e2437ca2dba5aa79817a92901d0edff9ea40208e6f4ac726979a02589d565a4e4caa153739e012b38235d34a SHA512 a345b5e0997701db8494984b5cd453ca47b37a830ed913a54f2f344628d7fb437667d84ae3d43b7ae52302ecdefbed08622abcb6ce4f52f93331e892d59a9466 DIST motion-release-4.3.1.tar.gz 849633 BLAKE2B 33039d9b8b6db0698767892997be958d84a881cc56e8cdc31d8c27242c972e629d328197c92f91c1b71a957d85807877dc602f474d430384b1e27c9213ddc697 SHA512 17033dab055c4f1d9e2912a27d0a5b419d325b0781def98428a6117e38c62201b87199210071ba93d6c4dae514733b749e39cbc1befe6242f157d4583e07dcc6 +EBUILD motion-4.3.1.ebuild 3027 BLAKE2B e01b5bd3f888d8d7bf6de34386c38331d1becaaf91527e1cc2d13a5030fcc9ba000163f00822d72027435e7027e499818e9d4a06dad99f40d7343893498d60e7 SHA512 ce6932e8c35abe9de5cc28e46252b22205f7bf9500192a029a3597fd3e41d4097ff881f7aa38ee378c712bdc58b42e6af771b155413364617351a974f08e94db +MISC metadata.xml 624 BLAKE2B 73d036b8380e7f2b29c6d42cf75ae310e77f2ed7f8d856bb240fb205039bce204c272c24b502f86d555f2948af1788a23802ecbce7350627cb183547d967ca2c SHA512 9212f81cc4843eb185675f1c0a66be8ee7e4497b036ef8dcfb301b413d76e898cb8dcf1282dbc893b84904d90b4b0387f92b52e2012bc48507436f44c455cb6d diff --git a/media-video/motion/files/motion.confd-r4 b/media-video/motion/files/motion.confd-r4 index cc65d5133c9bc..8ebaa530696ad 100644 --- a/media-video/motion/files/motion.confd-r4 +++ b/media-video/motion/files/motion.confd-r4 @@ -1,13 +1,23 @@ -# Set the user and group under which motion will be run -# -# If the below parameters are not altered then motion will -# run under user root, and group video -# -# If the below parameters are altered then please make sure to -# * manually create the user, e.g. with the follwing command: -# # useradd motion -g video -N -M -r -s /sbin/nologin -d /dev/null -# * provide write access to motion's output directories +# Motion OpenRC conf.d file + +# Set the user and group under which motion will be run #MOTION_USER="motion" -#MOTION_GROUP="video" +#MOTION_GROUP="motion" + +# Motion accepts some command line args, which overrule the parameters in +# the configuration file. These command line args can be coded as follows: +# -c configfile - complete path and filename +#MOTION_ARGS="-c /etc/motion/motion.conf +# -d loglevel - 1-9 for EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL +#MOTION_ARGS="${MOTION_ARGS} -d 6" +# -k logtype - 1-9 for COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL +#MOTION_ARGS="${MOTION_ARGS} -k 7" +# -l logfile - complete path and filename +#MOTION_ARGS="${MOTION_ARGS} -l /var/log/messages"" + +#Optinally set a default dir where motion places its output +#MOTION_HOMEDIR="/var/lib/motion" + + diff --git a/media-video/motion/files/motion.initd-r4 b/media-video/motion/files/motion.initd-r4 index 97ddfa06da6e8..997898dff6d06 100644 --- a/media-video/motion/files/motion.initd-r4 +++ b/media-video/motion/files/motion.initd-r4 @@ -2,17 +2,15 @@ # Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -: ${MOTION_USER:="root"} -: ${MOTION_GROUP:="video"} +: ${MOTION_USER:="motion"} +: ${MOTION_GROUP:="motion"} depend() { use mysql use postgresql } - -pidfile="/run/${RC_SVCNAME}.pid" command=/usr/bin/motion +command_args="${MOTION_ARGS}" command_user="${MOTION_USER}:${MOTION_GROUP}" -command_background=true diff --git a/media-video/motion/metadata.xml b/media-video/motion/metadata.xml index b1389a2954b4b..1a4b53222a454 100644 --- a/media-video/motion/metadata.xml +++ b/media-video/motion/metadata.xml @@ -5,7 +5,9 @@ media-video@gentoo.org + Add mariadb database support Enables Multi-Media Abstraction Layer (MMAL) decoding support: Available e.g. on the Raspberry Pi. + Add experimental suppport for OpenRC's supervise-daemon process supervision Motion-Project/motion diff --git a/media-video/motion/motion-4.3.1.ebuild b/media-video/motion/motion-4.3.1.ebuild index 0901a110209f5..b94e9696a6a7a 100644 --- a/media-video/motion/motion-4.3.1.ebuild +++ b/media-video/motion/motion-4.3.1.ebuild @@ -11,9 +11,11 @@ SRC_URI="https://github.com/Motion-Project/${PN}/archive/release-${PV}.tar.gz -> LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="ffmpeg libav mariadb mmal mysql postgres sqlite v4l webp" +IUSE="ffmpeg libav mariadb mmal mysql postgres sqlite supervise-daemon v4l webp" RDEPEND=" + acct-group/motion + acct-user/motion virtual/jpeg:= ffmpeg? ( libav? ( media-video/libav:= ) @@ -34,25 +36,24 @@ DEPEND="${RDEPEND} ) " -#PATCHES=( -# "${FILESDIR}"/${PV}/Fix-build-errors-with-FFmpeg-4.0.patch -#) - DISABLE_AUTOFORMATTING="yes" DOC_CONTENTS=" -You need to setup /etc/motion/motion.conf before running motion for the -first time. You can use /etc/motion/motion-dist.conf as a template. -Please note that the 'daemon' and 'process_id_file' settings are -overridden by the bundled OpenRC init script and systemd unit where -appropriate. +You need to setup a configuraton file (/etc/motion/motion.conf) before +running motion for the first time. If motion is built with the mysql or mariadb use flags then please make -sure to match the database_type in /etc/motion/motion.conf: either -mysql or mariadb. +sure to configure a matching database_type in the config file. + +Motion's default current working directory is /var/lib/motion. +Output will be written here, unless overruled in the config file. + +Motion runs by default under user motion and group motion: +- change this if needed in /etc/conf.d/motion +- or add users who need access to the output files to the motion group To install motion as a service, use: -rc-update add motion default # with OpenRC -systemctl enable motion.service # with systemd +- rc-update add motion default # with OpenRC +- systemctl enable motion.service # with systemd " S="${WORKDIR}"/${PN}-release-${PV} @@ -82,13 +83,18 @@ src_install() { examplesdir=/usr/share/doc/${PF}/examples \ install + newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN} newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN} + # do not start mysql/postgres unnecessarily ( use mysql || use mariadb ) || sed -i -e "/use mysql/d" "${D}/etc/init.d/motion" use postgres || sed -i -e "/use postgresql/d" "${D}/etc/init.d/motion" ( use mysql || use mariadb || use postgres ) || sed -i -e "/depend/{N;N;d;}" "${D}/etc/init.d/motion" - newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN} + # configure for supervise-daemonn + use supervise-daemon && echo "supervisor=\"supervise-daemon\"" >> "${D}/etc/init.d/motion" + use supervise-daemon || echo "pidfile=\"/run/\${RC_SVCNAME}.pid\"" >> "${D}/etc/init.d/motion" + use supervise-daemon || echo "command_background=true" >> "${D}/etc/init.d/motion" systemd_dounit "${FILESDIR}"/${PN}.service systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf From 8bcb2558df5e92c0d03175ebdf9e1d93685d34d8 Mon Sep 17 00:00:00 2001 From: Hans Fernhout Date: Sun, 3 May 2020 17:52:42 +0200 Subject: [PATCH 4/4] media-video/motion fixing qa issues 2-MAY-2020 on pull request bot check - it seems that adding manifests to newly created packages acct-group/motion and acct-user/motion/Manifest does not work - fixed indentation in acct-user/motion/metadata.xml - media-video/motion/Manifest didn't include the ebuild for 2.1.1-r1 anymore --- acct-group/motion/Manifest | 2 -- acct-user/motion/Manifest | 2 -- acct-user/motion/metadata.xml | 2 +- media-video/motion/Manifest | 10 +--------- 4 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 acct-group/motion/Manifest delete mode 100644 acct-user/motion/Manifest diff --git a/acct-group/motion/Manifest b/acct-group/motion/Manifest deleted file mode 100644 index 5b101332854cf..0000000000000 --- a/acct-group/motion/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -EBUILD motion-0.ebuild 146 BLAKE2B 95b74aef1b7545fc1cd9452a345bed4f0901320fde286781d0e2561ba9019531428fd69348448bf0177891761d8096e22464daed7a1027122912ca9eb30b2199 SHA512 c8c9b27c1f92951a949dd072f9b3daf4591b8c5e41634820c1e7b68299c03918bfef68b0334f69c1fd869da0f0b0ae99e92e8700339ba8a87ce602b8492e5a71 -MISC metadata.xml 235 BLAKE2B 0b005838eb2812b5052779904d5b1daf6958830721f8d84e503fb806dd841347b562329b24af48dc9763cbac18aa2d7cc90d38d6fd442e224e016773ba109064 SHA512 522be4e6d0250f91032399a92381cb7b8ad95e3e7c5aad2720ef4cc62571a353bdb1d1bf16e60f7c2760e23ef0737be713c74b127c4a5f46e8ee50cfa99cb7a9 diff --git a/acct-user/motion/Manifest b/acct-user/motion/Manifest deleted file mode 100644 index 85cd91a1401ae..0000000000000 --- a/acct-user/motion/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -EBUILD motion-0.ebuild 304 BLAKE2B e01def1023e828ea1b823d4b3f57d0dc0d68a7ff990a2c871fdeadda3aa87e01b8457a26705889ea4bfcaf83fc7603448f7129028aba902603f8d5853cbdb2b1 SHA512 ee4e1c414c41872546e6cd989b4e8629fc2df4f9daf151c3abad99be9ee24a09f7e51cbe864790c814dbf7a40872e731203745b5d46488dd3ec0a015653e735f -MISC metadata.xml 232 BLAKE2B a60022015d20a1d23e10769cd2972e15a521c7107ccc68acbbb33b0977b229a8f53994499fb62868dcb02767d5c66e633de0d42874d2c2d3474e7236fbbdd485 SHA512 9560539733289a87ceb5d0bcce3b0ad9e2cee438297f37f88e3eb13990a21c18c238d26e3f8c8694253951de28824a06ac6a510ba3a89165c0df7ee80a91cd3c diff --git a/acct-user/motion/metadata.xml b/acct-user/motion/metadata.xml index a5bdbc2fd43c1..db1bcff7dff7b 100644 --- a/acct-user/motion/metadata.xml +++ b/acct-user/motion/metadata.xml @@ -1,7 +1,7 @@ - + media-video@gentoo.org diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest index d6f85cd45a88a..2ea48fa4c591c 100644 --- a/media-video/motion/Manifest +++ b/media-video/motion/Manifest @@ -1,10 +1,2 @@ -AUX 4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch 1768 BLAKE2B d2ec71166a4c3779007aabd975e3bd003b17713ff1bcd3c94e57183936c5f6fc24abd6ed5231dca94d1d37f66db7a13358c5dc52795200d190d848f0360ec1e6 SHA512 bee1af2f32215b2abc006b9f12c77e138dbe9bb2de41ae9f1022b6c10340cb8e2eb2831459b241c44e3a0789a9df81b7227dfc07beb3e7e3af6f718fb4a4c56d -AUX motion.conf 37 BLAKE2B 0a30bc830b519022f8c3bfdedb274329ecb506f3b3e42fb3de1f61513b9ef86c7884a9298c17b19b4afbb83b33ceb4f35f85fd377775e2485bbbfa2feb76833e SHA512 06e2dd29b946f35c78e7cf0ddeca727ca7f3f84e57e38b6688b2a493d487061ea6c959c5b365305a7813e0d3315f719003c681c26265566f46faa6ff88606853 -AUX motion.confd-r1 272 BLAKE2B bb395beafecf0498158ff0358b489ab251d79e005148715ef89ea882dec945f82faec60c2650e703d4db82e0bef3ccc8abd9768adf23dc8df5161f7fd8f24714 SHA512 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363 -AUX motion.confd-r4 784 BLAKE2B dacb5b9e0580422a18094dc6106c88f19952dc3d520b19d57de5c46817cc1346959f925179f6642562d0432962f73c7d7f3b62fb70a5164afa686f3576fe85c8 SHA512 e3b65d61c413cb34c15beac1f2144f2a76dd4f756e72cba19d3c2d500f33d65e6bae0873bf31309e94ca2e7e6a90926295c372de4ce150dd9997c9aeaca52f6a -AUX motion.initd-r3 1163 BLAKE2B 1926b3468c1b49651377c2704fe8f5cb65c9eed5a4bd11efe365aa01b9acd5300d7dae2f22c93748c2e1c1c49be9d707ad7d1c14d49dc092f18e6ddfe0e06ac5 SHA512 7c7201768fd868f851bb35b8df5e22d43688f1729178fd94d10f21436db6d5c178811bcef8b51c5b79b426bb92d542892edd65ee0414acaa799639a3a226934e -AUX motion.initd-r4 327 BLAKE2B 2326d374285fb56d0fcc81142012527769b6848505660527cf85c4c73be609c2b158b4b7b66b365472dfdd3f836403ab3c8f0967b8cae14585ed4ded50289c53 SHA512 a2d0450d1786d2c0db0e41656cd6adadae7fdcaf0f65b0ee1216216d24df2ce0bc5f91134b706d2e1580b13e8abeeba805622bb4a0938cdaa1a8c0af2e2e7e3d -AUX motion.service 355 BLAKE2B 3626031d4388676e899415482099e47cd7ff50d5e2437ca2dba5aa79817a92901d0edff9ea40208e6f4ac726979a02589d565a4e4caa153739e012b38235d34a SHA512 a345b5e0997701db8494984b5cd453ca47b37a830ed913a54f2f344628d7fb437667d84ae3d43b7ae52302ecdefbed08622abcb6ce4f52f93331e892d59a9466 +DIST motion-release-4.1.1.tar.gz 447795 BLAKE2B 8c7dfdad89f49ba8ec39689d268b4bc95c6a8bd85d4bd333f66638b2e815b3c59b2e42dd93811601b2ee7870100a0a21eaa789633056f74a5cc9f39f4f92229f SHA512 3b08d464f9243ccfc4b53b16cfc2001d1e0d206bf0295d55d8914914bc14ad0248ce5ac622cb7eb89ed32e1913a9a10add1b56497c4094ba876f7f85d6ad4143 DIST motion-release-4.3.1.tar.gz 849633 BLAKE2B 33039d9b8b6db0698767892997be958d84a881cc56e8cdc31d8c27242c972e629d328197c92f91c1b71a957d85807877dc602f474d430384b1e27c9213ddc697 SHA512 17033dab055c4f1d9e2912a27d0a5b419d325b0781def98428a6117e38c62201b87199210071ba93d6c4dae514733b749e39cbc1befe6242f157d4583e07dcc6 -EBUILD motion-4.3.1.ebuild 3027 BLAKE2B e01b5bd3f888d8d7bf6de34386c38331d1becaaf91527e1cc2d13a5030fcc9ba000163f00822d72027435e7027e499818e9d4a06dad99f40d7343893498d60e7 SHA512 ce6932e8c35abe9de5cc28e46252b22205f7bf9500192a029a3597fd3e41d4097ff881f7aa38ee378c712bdc58b42e6af771b155413364617351a974f08e94db -MISC metadata.xml 624 BLAKE2B 73d036b8380e7f2b29c6d42cf75ae310e77f2ed7f8d856bb240fb205039bce204c272c24b502f86d555f2948af1788a23802ecbce7350627cb183547d967ca2c SHA512 9212f81cc4843eb185675f1c0a66be8ee7e4497b036ef8dcfb301b413d76e898cb8dcf1282dbc893b84904d90b4b0387f92b52e2012bc48507436f44c455cb6d