Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 546842

Summary: www-misc/zoneminder-1.28.1 ebuild fails to create /var/lib/zoneminder/{events,images} directories
Product: Gentoo Linux Reporter: Aaron Burnett <aaron>
Component: Current packagesAssignee: Andreas K. Hüttel <dilfridge>
Status: RESOLVED FIXED    
Severity: normal CC: aaron
Priority: Normal Keywords: InOverlay
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: zoneminder-1.28.1-r1.ebuild with permanent /var/lib/zoneminder directory
zoneminder-1.28.1-r1.ebuild with permanent /var/lib/zoneminder directory and systemd
systemd zoneminder.service file
systemd zoneminder.service file

Description Aaron Burnett 2015-04-16 21:08:38 UTC
Created attachment 401398 [details]
zoneminder-1.28.1-r1.ebuild with permanent /var/lib/zoneminder directory

In the 1.28.1 ebuild, the /var/lib/zoneminder/{events,images} directories are created temporarily, but does not persist after building the package.  The /usr/share/zoneminder/www/{events,images} directories have symlinks to these directories in /var/lib/zoneminder.  With these symlinks broken, zoneminder will throw errors and will not record events.  Assuming it is important for /usr/share/zoneminder/www/{events,images} to remain symlinks that point outside of the web directory, the following should fix it:

> src_install {
> ...
> -dodir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events
> +keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events
> ...
>}

Maybe there is a better solution, but this works for me.
Comment 1 Aaron Burnett 2015-04-17 16:05:56 UTC
I added another -r1 ebuild, this time to support systemd.
Comment 2 Aaron Burnett 2015-04-17 16:06:28 UTC
Created attachment 401460 [details]
zoneminder-1.28.1-r1.ebuild with permanent /var/lib/zoneminder directory and systemd
Comment 3 Aaron Burnett 2015-04-17 16:06:53 UTC
Created attachment 401462 [details]
systemd zoneminder.service file
Comment 4 Aaron Burnett 2015-05-04 13:49:25 UTC
Created attachment 402628 [details]
systemd zoneminder.service file

Apparently this works better without specifying user and group in the systemd service file.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2016-12-10 20:44:07 UTC
Thanks a lot. This is part of the ZM 1.30.0 ebuild now in the main tree. Enjoy!