View previous topic :: View next topic |
Author |
Message |
Kruge n00b
Joined: 22 May 2009 Posts: 1
|
Posted: Fri May 22, 2009 8:50 am Post subject: Zoneminder 1.24.x |
|
|
Hi,
I was wondering if there was any news on when the latest zoneminder ebuild might be added into the official portage tree, since it's currently masked at an old, insecure version.
After looking through the bugs associated with this package, there does appear to have been a working ebuild produced, but as yet, it has still not been brought in.
Is there any chance someone could devote 10 minutes to fixing this, please?
Regards |
|
Back to top |
|
|
billium Apprentice
Joined: 22 Mar 2003 Posts: 185
|
Posted: Sat Oct 03, 2009 11:46 pm Post subject: |
|
|
zoneminder 1.24.2 is now marked ~
I try to emerge it but it fails as it tries to emerge perl 5.10.1 which is masked.
Looking in the zoneminder ebuild, the requirement is for perl >= 5.6, I have 5.8.8, so what am I doing wrong? I assume it is a simple fix!
Billy |
|
Back to top |
|
|
danky Tux's lil' helper
Joined: 18 Sep 2006 Posts: 115
|
Posted: Fri Dec 18, 2009 5:00 pm Post subject: |
|
|
Also having this issue on an x86 build. It wants perl 5.10.1 when it only needs 5.8
Looks like it is requiring it for perl-Module-Load not zoneminder howerver. |
|
Back to top |
|
|
Eduardo Garcia n00b
Joined: 25 Oct 2007 Posts: 4 Location: Porto Alegre, Brazil
|
Posted: Sat Dec 19, 2009 9:00 pm Post subject: |
|
|
The problem is that virtual/perl-Module-Load requires ~dev-lang/perl-5.10.1 OR ~perl-core/Module-Load.
Just emerge Module-Load and it won't complain about perl. _________________ Eduardo L. Garcia
"Only the dead ones will see the end of the war." - Plato |
|
Back to top |
|
|
danky Tux's lil' helper
Joined: 18 Sep 2006 Posts: 115
|
Posted: Sun Dec 20, 2009 12:25 am Post subject: |
|
|
Yah I figured that out yesterday that by just emerging the Module then doing the zoneminder emerge it stops complaining. However zoneminder 1.24.2 still fails to build through portage. I had to build it manually from sources downloaded on the zoneminder website. After pulling in all of the dependencies from portage of course. |
|
Back to top |
|
|
Pipes n00b
Joined: 01 Sep 2010 Posts: 2
|
Posted: Wed Sep 01, 2010 5:23 pm Post subject: |
|
|
I get messages like this:
Code: | i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -Iyes/include -Wall -Wno-sign-compare -fno-inline -Iyes/include -frepo -O2 -march=athlon-xp -fomit-frame-pointer -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_mpeg.h:23,
from zm_stream.h:27,
from zm_event.h:39,
from zm_zone.h:27,
from zm_monitor.h:26,
from zmc.cpp:28:
zm_ffmpeg.h:33:2: error: #error "No location for avutils.h found"
zm_ffmpeg.h:40:2: error: #error "No location for avcodec.h found"
zm_ffmpeg.h:47:2: error: #error "No location for avformat.h found"
zm_ffmpeg.h:55:2: error: #error "No location for swscale.h found"
|
|
|
Back to top |
|
|
danky Tux's lil' helper
Joined: 18 Sep 2006 Posts: 115
|
Posted: Wed Sep 01, 2010 5:59 pm Post subject: |
|
|
I gave up on the zoneminder ebuild it hasn't worked right for a couple of years now.
Here is the process I use to build it from source on a gentoo x86 install:
1. Get Root Access
2. Make The Source Directory
Code: |
mkdir /usr/src/Zoneminder
|
3. Get The Source Package (1.24.2 at this time)
Code: |
cd /usr/src/Zoneminder
wget http://www2.zoneminder.com/downloads/ZoneMinder-1.24.2.tar.gz
|
4. Unpack The Sources
Code: |
tar xzf ZoneMinder-1.24.2.tar.gz
|
5. Install Required Dependencies
Add the following to /etc/portage/package.keywords:
Code: | #Zoneminder
www-misc/zoneminder
dev-perl/PHP-Serialization
virtual/perl-Module-Load
perl-core/Module-Load
|
Add the following to /etc/portage/package.use
Code: |
#Zoneminder
www-misc/zoneminder ffmpeg
|
Check The Dependencies
Code: |
emerge -pv zoneminder
|
That will show you all the packages that the ebuild would pull in for Zoneminder. You can just emerge them and let it fail on ZM or a cleaner way would be to add the required packages to /var/lib/portage/world and then do an emerge -avtDNuq world to build them all.
6. Configure and Build Zoneminder
Code: |
cd /usr/src/Zoneminder/ZoneMinder-1.24.2
|
Configure the sources (note this is for a localhost install, you can change it to whatever vhost you want)
Make sure to change the zm db username and password to reflect your setup.
Code: |
./configure --with-webdir=/var/www/localhost/htdocs/zm --with-cgidir=/var/www/localhost/cgi-bin ZM_DB_USER=YOUR_USER ZM_DB_PASS=YOUR_PASS CFLAGS=-O2 -march=native -fomit-frame-pointer CXXFLAGS=-O2 -march=native -fomit-frame-pointer
|
Setup the DB
Code: |
mysql -u root -p
create database zm;
grant select,insert,update,delete on zm.* to '<database user>'@localhost identified by '<database password>';
flush privileges;
exit
|
Import the Initial DB
Code: |
mysql -u root -p -D zm < db/zm_create.sql
|
Build it
Code: |
make clean
make
make install
|
After all that zoneminder should be installed on your system and ready to run. Here are the init script I created to get zoneminder started, stopped and reset as well as allow it to start up and shutdown on a machine power cycle.
Code: |
#!/sbin/runscript
# ----------------------------------------------------------------------
# File: /etc/init.d/zoneminder
# Purpose: Startup the Zoneminder Server
# By: Danky
# Date: 8-31-2010
# ----------------------------------------------------------------------
ZM_START='/usr/local/bin/zmpkg.pl start'
ZM_STOP='/usr/local/bin/zmpkg.pl stop'
depend() {
need net mysql
}
start() {
ebegin "Starting Zoneminder"
$ZM_START
eend $? "Failed to start Zoneminder!"
}
stop() {
ebegin "Stopping Zoneminder"
$ZM_STOP
eend $? "Failed to stop Zoneminder!"
}
|
Save the file as zoneminder and copy it to /etc/init.d/ then make sure to run
Code: |
chmod +x /etc/init.d/zoneminder
|
Now you can start and stop your server by doing /etc/init.d/zoneminder start
If you want it to start on power up add it to the default runlevel
Code: |
rc-update add zoneminder default
|
Hope this helps! |
|
Back to top |
|
|
Btoo n00b
Joined: 24 Sep 2008 Posts: 42 Location: An isolated island
|
Posted: Sun Dec 05, 2010 2:42 am Post subject: Gentoo ebuild works with... |
|
|
Looking around I found a quick fix to get the Zoneminder 1.24.2 ebuild to compile.
Emerge with:
CPPFLAGS="-D__STDC_CONSTANT_MACROS" emerge -av www-misc/zoneminder |
|
Back to top |
|
|
Tintamarre n00b
Joined: 11 Jun 2007 Posts: 63 Location: Belgium
|
Posted: Sun Dec 12, 2010 11:48 am Post subject: Re: Gentoo ebuild works with... |
|
|
Btoo wrote: | Looking around I found a quick fix to get the Zoneminder 1.24.2 ebuild to compile.
Emerge with:
Code: | CPPFLAGS="-D__STDC_CONSTANT_MACROS" emerge -av www-misc/zoneminder |
|
Thx Btoo, you save me some hours of grief. _________________ Martin Erpicum |
|
Back to top |
|
|
Btoo n00b
Joined: 24 Sep 2008 Posts: 42 Location: An isolated island
|
Posted: Mon Dec 13, 2010 9:25 pm Post subject: Zoneminder after the compile |
|
|
Glad to help but wondering if you ran into PHP 5.3 problems as well. I had to do some editing of Zoneminder php includes to get things working. More specifically, any time an error popped up on a Zoneminder web page I would go through the mentioned file and change out the deprecated function with the proper replacement. Most notably the functions.php file at:
/var/www/zoneminder/htdocs/includes/functions.php
Swap out the deprecated function ereg( for preg_match(.
If it sounds like I know what I'm doing, well....
WAS:
Code: |
if (ereg( 'MSIE ([0-9].[0-9]{1,2})',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'ie';
}
elseif (ereg( 'Safari/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'safari';
}
elseif (ereg( 'Konqueror/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'konqueror';
}
elseif (ereg( 'Opera ([0-9].[0-9]{1,2})',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'opera';
}
elseif (ereg( 'Mozilla/([0-9].[0-9]{1,2})',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'mozilla';
}
else
{
$version = 0;
$browser = 'unknown';
}
|
IS NOW:
Code: |
if (preg_match( '/MSIE ([0-9].[0-9]{1,2})/',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'ie';
}
elseif (preg_match( '#Safari/([0-9.]+)#',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'safari';
}
elseif (preg_match( '#Konqueror/([0-9.]+)#',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'konqueror';
}
elseif (preg_match( '/Opera ([0-9].[0-9]{1,2})/',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'opera';
}
elseif (preg_match( '#Mozilla/([0-9].[0-9]{1,2})#',$_SERVER['HTTP_USER_AGENT'],$logVersion))
{
$version = $logVersion[1];
$browser = 'mozilla';
}
else
{
$version = 0;
$browser = 'unknown';
}
|
Also the php function split() needs to be replaced with expode() and then any trailing backslashes or escapes should be removed. I found only one backslash to remove. Zoneminder forums have a few posts about this:
http://www.zoneminder.com/forums/viewtopic.php?p=63380
There were a couple more files in that includes directory that needed fixing. These edits didn't take too long and I thought it better than lowering the error reporting level in PHP 5.3 as suggested elsewhere. |
|
Back to top |
|
|
Tintamarre n00b
Joined: 11 Jun 2007 Posts: 63 Location: Belgium
|
Posted: Thu Dec 16, 2010 8:44 am Post subject: |
|
|
Hello,
Thx for the patch, I will try it.
In fact, I don't use the ZoneMinder interface that much. It's really a mess ... I get a lot of errors, ... Hence, I decided to let zoneminder do the capture and analysis jobs and then I use small bash scripts to produce video files and alert me of some new "events" and redirect me to a ZenPhoto gallery where I store everything. _________________ Martin Erpicum |
|
Back to top |
|
|
|