New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
media-video/motion: version bump to 4.3.1 #15513
media-video/motion: version bump to 4.3.1 #15513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash this patch into your previous one so that it's a single commit that can be merged when it's approved.
Change the Github pull request title at the top of this page and append |
You need to create a motion user package and a motion group package. Add them as dependencies to your motion ebuild. Here's some more information about the format: https://wiki.gentoo.org/wiki/Categories_acct-group_and_acct-user
Add a "mariadb" entry in the metadata.xml file: 91f6eee#diff-f19779b8008ab61e7ff7cf996b971d96 |
Have reserved a motion uid/gid in a pull request gentoo/api-gentoo-org#272 . Previously I had removed the motion user from the ebuild, but once this pull request 272 is approved I will reinstate the motion user, and process the other comments. |
This is looking better, but squash all those commits down to just one. The I also recommend applying to become a Proxy Maintainer for this package. That will probably help expedite the process to merge your pull request. |
Pull request CI reportReport generated at: 2020-05-03 18:17 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
d93c61f
to
89aa84f
Compare
I think I finally managed to squash the commits together, get the right labels and bug references added. |
@juippis based on the earlier suggestion from @vilhelmgray to volunteer as proxy-maintainer I contacted @mgorny, who suggested that you should have a look at this PR. |
Pull request CI reportReport generated at: 2020-05-06 09:04 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to split this into 3 commits. One for acct-user, one for acct-group and one for media-video/motion.
Your commit summary needs to be updated, it's media**-**video, not media_video. And you can update your Bug:
tag to be Closes:
tag so it closes the bugs automatically when this is merged. Overall it looks good, just few small things here and there.
acct-group/motion/metadata.xml
Outdated
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>media-video@gentoo.org</email> | ||
</maintainer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't add them here without their consent. Did you ask? If not, put yourself and proxy-maint project here.
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/User_Guide#Proxied_maintainer_in_metadata.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, have not asked them; I assumed because they are the maintainer of media-video/motion that they'd also maintain the uid/gid. I will change the maintainer to me and the proxy maint group.
acct-user/motion/motion-0.ebuild
Outdated
|
||
DESCRIPTION="added by portage for motion, a software motion detector" | ||
ACCT_USER_ID=395 | ||
ACCT_USER_HOME=/var/lib/motion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually needed? Please refer to
http://michael.orlitzky.com/articles/gentoo_glep81_user_package_guidelines.xhtml#the-home-directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for a home dir is that motion writes it's output files in the current working directory (or the directory defined in it's config file). Looking at Michael Orlizky's article I should create the home dir from the motion-video/motion ebuild though, not assume it'll be created by acct-user/motion ebuild.
#MOTION_USER="motion" | ||
#MOTION_GROUP="motion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is everything commented in this file? Looks ok to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the comments are just documentation, showing default values.
@@ -0,0 +1,16 @@ | |||
#!/sbin/openrc-run | |||
# Copyright 1999-2017 Gentoo Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020
and switch Foundation
to Authors
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will do
Group=video | ||
|
||
#RuntimeDirectory=motion | ||
#RuntimeDirectoryMode=0750 | ||
|
||
WorkingDirectory=/var/lib/motion | ||
#WorkingDirectory=/var/lib/motion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why comment? Just remove if it's not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should actually make a separate r4 version and leave the original as is for motion-4.1.1. That way existing 4.1.1 won't be bothered with any changes and 4.1.1 can be deprecated over time. The new version can set the uid/gid and the working dir properly.
EAPI=7 | ||
inherit autotools readme.gentoo-r1 systemd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One empty line below EAPI please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
inherit autotools readme.gentoo-r1 systemd | ||
|
||
DESCRIPTION="A software motion detector" | ||
HOMEPAGE="https://motion-project.github.io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you want me to do with this...
ffmpeg? ( | ||
libav? ( media-video/libav:= ) | ||
!libav? ( media-video/ffmpeg:0= ) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libav has been removed from ::gentoo tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll change it to ffmpeg? ( media-video/ffmpeg:0= )
( 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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if you did this / constructed the init.d file before calling newinitd
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might work too: I would change "${D}/etc/init.d/motion"
to "${FILESDIR}"/${PN}.confd-r4"
in these three lines.
Why would that be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is hard to make sense at. And all external commands need to die (sed
). So you'll have to open this into if ... then;
You can use something like https://github.com/gentoo/gentoo/blob/master/mail-client/thunderbird-bin/thunderbird-bin-68.8.0.ebuild#L151 with newinitd
.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is doable with a single echo. Although I'd say to construct this file with newinitd
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried doing with a single echo, using echo -e
, and adding a \n
for the newline but that added unwanted spaces. An alternative would be using a heredoc, but that won't be shorter nor easier to read, I think.
Not sure how to construct a file using newinitd, other then have a separate initd file for this, which would make us maintain more files.
70947f7
to
fb2d6ba
Compare
Pull request CI reportReport generated at: 2020-05-11 17:50 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
I think I resolved all issues. However the bot checked only the last commit. When @juippis wrote:
Di you mean three pull separate pull requests? |
No, it looks good now. 3 commits 1 PR. |
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>
New group for media-video/motion, gid 395. See also gentoo/api-gentoo-org#272. Signed-off-by: Johannes Willem Fernhout <hfern@fernhout.info>
New user for media-video/motion, uid 395. See also gentoo/api-gentoo-org#272. Signed-off-by: Johannes Willem Fernhout <hfern@fernhout.info>
fb2d6ba
to
a1c6847
Compare
I have changed the editing of the initd file by creating just one multi line string with additions (depend function, supervise-daemon/ssd stuff) that should be added. Since I get permission errors when I try to update the source file (file/motion-initd-r4) I now copy it first to a temp file, then add the string, then install the initd file. |
Pull request CI reportReport generated at: 2020-05-15 16:51 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Please let me know if there is anything else that needs to be done to get this merged. Thanks. |
@juippis Please let me know if there is anything else that needs to be done to get this merged. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey,
sorry for ignoring this so long. I'm preparing for a law case which takes all my energy.
So the init.d construction is not what I had in mind but I guess it works. However this needs to be fixed before merging:
* The ebuild is installing to one or more unexpected paths:
*
* /usr/local
*
* Please fix the ebuild to use correct FHS/Gentoo policy paths.
>: equery f motion | grep /local/
/usr/local/bin
/usr/local/bin/motion
/usr/local/etc
/usr/local/etc/motion
/usr/local/etc/motion/camera1-dist.conf
/usr/local/etc/motion/camera2-dist.conf
/usr/local/etc/motion/camera3-dist.conf
/usr/local/etc/motion/camera4-dist.conf
/usr/local/etc/motion/motion-dist.conf
/usr/local/share
/usr/local/share/locale
/usr/local/share/locale/fi
/usr/local/share/locale/fi/LC_MESSAGES
/usr/local/share/locale/fi/LC_MESSAGES/motion.mo
/usr/local/share/locale/sv
/usr/local/share/locale/sv/LC_MESSAGES
/usr/local/share/locale/sv/LC_MESSAGES/motion.mo
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man1/motion.1
We don't install anything to /usr/local
through portage.
# } | ||
# | ||
# supervisor=supervise-daemon" | ||
local INITDADJ="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also while at it, please make a local variable smallcase. We distinct them from global variables this way. Global variables cannot be changed inside a phase while local can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is weird that is shows installing in /usr/local on your machine. I see this:
$ equery f motion
- Searching for motion ...
- Contents of media-video/motion-4.3.1:
/etc
/etc/conf.d
/etc/conf.d/motion
/etc/init.d
/etc/init.d/motion
/etc/motion
/etc/motion/camera1-dist.conf
/etc/motion/camera2-dist.conf
/etc/motion/camera3-dist.conf
/etc/motion/camera4-dist.conf
/etc/motion/motion-dist.conf
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/motion.service
/usr
/usr/bin
/usr/bin/motion
/usr/share
/usr/share/doc
/usr/share/doc/motion-4.3.1
/usr/share/doc/motion-4.3.1/COPYING.bz2
/usr/share/doc/motion-4.3.1/CREDITS.bz2
/usr/share/doc/motion-4.3.1/README.gentoo.bz2
/usr/share/doc/motion-4.3.1/mask1.png
/usr/share/doc/motion-4.3.1/motion_build.html
/usr/share/doc/motion-4.3.1/motion_config.html
/usr/share/doc/motion-4.3.1/motion_guide.html
/usr/share/doc/motion-4.3.1/motion_stylesheet.css
/usr/share/doc/motion-4.3.1/normal.jpg
/usr/share/doc/motion-4.3.1/outputmotion1.jpg
/usr/share/doc/motion-4.3.1/outputnormal1.jpg
/usr/share/locale
/usr/share/locale/de
/usr/share/locale/de/LC_MESSAGES
/usr/share/locale/de/LC_MESSAGES/motion.mo
/usr/share/locale/nl
/usr/share/locale/nl/LC_MESSAGES
/usr/share/locale/nl/LC_MESSAGES/motion.mo
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/motion.1.bz2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happens with FEATURES="test"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll file a bug about that test failure, and restrict them for now. Thanks and sorry it took this long!
# } | ||
# | ||
# supervisor=supervise-daemon" | ||
local INITDADJ="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happens with FEATURES="test"
.
Thanks for taking the effort to check. I'll lowercase |
New version of motion, which fixes
Bug: https://bugs.gentoo.org/665930
Bug: https://bugs.gentoo.org/673410
Bug: https://bugs.gentoo.org/717312
Signed-off-by: Johannes Willem Fernhout hfern@fernhout.info