summaryrefslogtreecommitdiff
path: root/pcr/zoneminder
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-02-10 01:12:52 -0800
committerroot <root@rshg054.dnsready.net>2013-02-10 01:12:52 -0800
commit1bb2648cde916ac27d3dd75d7b64a4ddc89787b7 (patch)
tree016bfa1969323404c37dbef29cfc7242a5a8e9f3 /pcr/zoneminder
parente9c244cac8e5dc1c59c7e8b7bc885fef04224b70 (diff)
Sun Feb 10 01:12:35 PST 2013
Diffstat (limited to 'pcr/zoneminder')
-rw-r--r--pcr/zoneminder/Controls_Orbit.sql3
-rw-r--r--pcr/zoneminder/arm-context.patch18
-rwxr-xr-xpcr/zoneminder/customdb31
-rw-r--r--pcr/zoneminder/httpd-zm.conf20
-rw-r--r--pcr/zoneminder/patch-ffmpeg-0.11.patch60
-rw-r--r--pcr/zoneminder/patch-ffmpeg-configure.patch26
-rw-r--r--pcr/zoneminder/patch-libavcodec-detection.patch11
-rw-r--r--pcr/zoneminder/zm.rc.d63
-rw-r--r--pcr/zoneminder/zm.service9
-rwxr-xr-xpcr/zoneminder/zmeventbackup48
-rw-r--r--pcr/zoneminder/zminit.arch143
-rw-r--r--pcr/zoneminder/zoneminder-1.25.0-kernel35.patch21
12 files changed, 0 insertions, 453 deletions
diff --git a/pcr/zoneminder/Controls_Orbit.sql b/pcr/zoneminder/Controls_Orbit.sql
deleted file mode 100644
index 23224e4aa..000000000
--- a/pcr/zoneminder/Controls_Orbit.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-
-INSERT INTO `Controls` VALUES (7,'Orbit','Remote','mjpgStreamer',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,-7000,7000,200,200,1,100,100,0,0,1,-2000,2000,10,100,1,200,200,0,0,0,0);
-
diff --git a/pcr/zoneminder/arm-context.patch b/pcr/zoneminder/arm-context.patch
deleted file mode 100644
index a6fbb5328..000000000
--- a/pcr/zoneminder/arm-context.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/zm_signal.cpp.orig 2012-08-30 13:24:16.479872021 -0700
-+++ src/zm_signal.cpp 2012-08-30 13:27:35.909871996 -0700
-@@ -82,13 +82,13 @@
- int trace_size = 0;
-
- #if HAVE_STRUCT_SIGCONTEXT_EIP
-- Error( "Signal address is %p, from %p", (void *)context.cr2, (void *)context.eip );
-+ Error( "Signal address is %p, from %p", (void *)context.fault_address, (void *)context.eip );
-
- trace_size = backtrace( trace, TRACE_SIZE );
- // overwrite sigaction with caller's address
- trace[1] = (void *)context.eip;
- #elif HAVE_STRUCT_SIGCONTEXT
-- Error( "Signal address is %p, no eip", (void *)context.cr2 );
-+ Error( "Signal address is %p, no eip", (void *)context.fault_address );
-
- trace_size = backtrace( trace, TRACE_SIZE );
- #else // HAVE_STRUCT_SIGCONTEXT
diff --git a/pcr/zoneminder/customdb b/pcr/zoneminder/customdb
deleted file mode 100755
index afd295935..000000000
--- a/pcr/zoneminder/customdb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-DBHOST=$1
-DBNAME=$2
-USERNAME=$3
-PASSWORD=$4
-
-ZM_PATH_ZMS=/cgi-bin/nph-zms
-ZM_PATH_SOCKS=/srv/zoneminder/socks
-ZM_PATH_LOGS=/var/log/zm
-ZM_WEB_LIST_THUMBS=1
-ZM_WEB_MONTAGE_WIDTH=320
-ZM_WEB_MONTAGE_HEIGHT=240
-ZM_OPT_CAMBOZOLA=1
-ZM_OPT_MPEG=ffmpeg
-ZM_PATH_FFMPEG=/usr/bin/ffmpeg
-ZM_OPT_NETPBM=1
-ZM_EXTRA_DEBUG_LOG=/var/log/zm/zm_debug.log
-ZM_OPT_USE_AUTH=0
-
-sql=/tmp/$$
-echo "" >$sql
-for n in ZM_PATH_ZMS ZM_PATH_SOCKS ZM_PATH_LOGS ZM_WEB_LIST_THUMBS ZM_WEB_MONTAGE_WIDTH ZM_WEB_MONTAGE_HEIGHT ZM_OPT_CAMBOZOLA ZM_OPT_MPEG ZM_PATH_FFMPEG ZM_OPT_NETPBM ZM_EXTRA_DEBUG_LOG ZM_OPT_USE_AUTH; do
- eval "val=\$$n"
- echo "UPDATE Config SET Value='$val' WHERE Name='$n';" >>$sql
-done
-
-cat $sql | mysql --user=$USERNAME --password=$PASSWORD --host=$DBHOST $DBNAME
-rm -f $sql
-
-
-exit 0
diff --git a/pcr/zoneminder/httpd-zm.conf b/pcr/zoneminder/httpd-zm.conf
deleted file mode 100644
index aeb089bc1..000000000
--- a/pcr/zoneminder/httpd-zm.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-# /etc/httpd/conf/extra/httpd-zm.conf
-# Config for zoneminder web app
-
-Alias /zm "/srv/http/zoneminder"
-<Directory "/srv/http/zoneminder">
- Options -Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order allow,deny
- Allow from all
- # The code unfortunately uses short tags in many places
- php_value short_open_tag On
-</Directory>
-
-ScriptAlias /cgi-bin "/srv/http/cgi-bin"
-<Directory "/srv/http/cgi-bin">
- AllowOverride None
- Options ExecCGI FollowSymLinks
- Order allow,deny
- Allow from all
-</Directory>
diff --git a/pcr/zoneminder/patch-ffmpeg-0.11.patch b/pcr/zoneminder/patch-ffmpeg-0.11.patch
deleted file mode 100644
index ac56e4c69..000000000
--- a/pcr/zoneminder/patch-ffmpeg-0.11.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp
-index 42927f6..61df606 100644
---- a/src/zm_ffmpeg_camera.cpp
-+++ b/src/zm_ffmpeg_camera.cpp
-@@ -91,7 +91,7 @@ int FfmpegCamera::PrimeCapture()
- Info( "Priming capture from %s", mPath.c_str() );
-
- // Open the input, not necessarily a file
-- if ( av_open_input_file( &mFormatContext, mPath.c_str(), NULL, 0, NULL ) !=0 )
-+ if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, NULL ) !=0 )
- Fatal( "Unable to open input %s due to: %s", mPath.c_str(), strerror(errno) );
-
- // Locate stream info from input
-@@ -122,7 +122,7 @@ int FfmpegCamera::PrimeCapture()
- Fatal( "Can't find codec for video stream from %s", mPath.c_str() );
-
- // Open the codec
-- if ( avcodec_open( mCodecContext, mCodec ) < 0 )
-+ if ( avcodec_open2( mCodecContext, mCodec, NULL ) < 0 )
- Fatal( "Unable to open codec for video stream from %s", mPath.c_str() );
-
- // Allocate space for the native video frame
-
-diff --git a/src/zm_mpeg.cpp b/src/zm_mpeg.cpp
-index f5de2a4..d614346 100644
---- a/src/zm_mpeg.cpp
-+++ b/src/zm_mpeg.cpp
-@@ -130,10 +130,12 @@ void VideoStream::SetParameters()
- {
- /* set the output parameters (must be done even if no
- parameters). */
-- if ( av_set_parameters(ofc, NULL) < 0 )
-+ /*
-+ * Removed in last ffmpeg
-+ * if ( av_set_parameters(ofc, NULL) < 0 )
- {
- Panic( "Invalid output format parameters" );
-- }
-+ }*/
- //dump_format(ofc, 0, filename, 1);
- }
-
-@@ -222,7 +224,7 @@ void VideoStream::OpenStream()
- if ( !(of->flags & AVFMT_NOFILE) )
- {
- #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,2,1)
-- if ( avio_open(&ofc->pb, filename, URL_WRONLY) < 0 )
-+ if ( avio_open(&ofc->pb, filename, AVIO_FLAG_WRITE) < 0 )
- #else
- if ( url_fopen(&ofc->pb, filename, URL_WRONLY) < 0 )
- #endif
-@@ -241,7 +243,7 @@ void VideoStream::OpenStream()
- }
-
- /* write the stream header, if any */
-- av_write_header(ofc);
-+ avformat_write_header(ofc, NULL);
- }
-
- VideoStream::VideoStream( const char *filename, const char *format, int bitrate, double frame_rate, int colours, int subpixelorder, int width, int height )
diff --git a/pcr/zoneminder/patch-ffmpeg-configure.patch b/pcr/zoneminder/patch-ffmpeg-configure.patch
deleted file mode 100644
index ba1674a4a..000000000
--- a/pcr/zoneminder/patch-ffmpeg-configure.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- configure.old 2011-08-23 12:10:37.000000000 -0300
-+++ configure 2012-09-26 16:23:33.211940267 -0300
-@@ -3026,8 +3026,8 @@
- fi
-
-
--FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}"
--FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include"
-+FFMPEG_LIBS=`pkg-config --cflags libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
-+FFMPEG_CFLAGS=`pkg-config --cflags libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
-
-
-
---- configure.ac.old 2011-08-23 12:10:32.000000000 -0300
-+++ configure.ac 2012-09-26 18:16:44.146848335 -0300
-@@ -88,8 +88,8 @@
- e.g. --with-ffmpeg=/usr/local])
- )
- AC_SUBST(FFMPEG_PREFIX)
--FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}"
--FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include"
-+FFMPEG_LIBS=`pkg-config --libs libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
-+FFMPEG_CFLAGS=`pkg-config --libs libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale`
- AC_SUBST(FFMPEG_LIBS)
- AC_SUBST(FFMPEG_CFLAGS)
-
diff --git a/pcr/zoneminder/patch-libavcodec-detection.patch b/pcr/zoneminder/patch-libavcodec-detection.patch
deleted file mode 100644
index 0aaa9bc23..000000000
--- a/pcr/zoneminder/patch-libavcodec-detection.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.ac~ 2012-07-15 22:27:11.195257379 +0100
-+++ configure.ac 2012-07-15 22:24:34.308268675 +0100
-@@ -276,7 +276,7 @@
- AC_CHECK_LIB(avutil,av_malloc,,AC_MSG_WARN(libavutil.a may be required for MPEG streaming))
- # Don't bother to warn about this one
- AC_CHECK_LIB(avcore,av_image_copy,,)
--AC_CHECK_LIB(avcodec,avcodec_init,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
-+AC_CHECK_LIB(avcodec,avcodec_open,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
- AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
- AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming))
- AC_CHECK_LIB(swscale,sws_scale,,,-lswscale) \ No newline at end of file
diff --git a/pcr/zoneminder/zm.rc.d b/pcr/zoneminder/zm.rc.d
deleted file mode 100644
index c4cbf4d3f..000000000
--- a/pcr/zoneminder/zm.rc.d
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-daemon_name=zm
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- stat_busy "Starting Zoneminder"
- /usr/bin/zmfix -a
- if /usr/bin/zmpkg.pl start >/dev/null ; then
- add_daemon $daemon_name
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
-
- stop)
- stat_busy "Stopping Zoneminder"
- if /usr/bin/zmpkg.pl stop >/dev/null ; then
- rm_daemon $daemon_name
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
-
- reload)
- stat_busy "Reloading Zoneminder"
- if /usr/bin/zmpkg.pl graceful >/dev/null ; then
- add_daemon $daemon_name
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
-
- restart)
- stat_busy "Restarting Zoneminder"
- if /usr/bin/zmpkg.pl restart >/dev/null ; then
- add_daemon $daemon_name
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
-
- status)
- stat_busy "Checking Zoneminder status";
- ck_status $daemon_name
- ;;
-
- *)
- echo "usage: $0 {start|stop|reload|restart|status}"
-esac
-
-exit 0
diff --git a/pcr/zoneminder/zm.service b/pcr/zoneminder/zm.service
deleted file mode 100644
index ccf1f3334..000000000
--- a/pcr/zoneminder/zm.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Capture, analyse, record and monitor video security cameras
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/zm
-
-[Install]
-WantedBy=multi-user.target
diff --git a/pcr/zoneminder/zmeventbackup b/pcr/zoneminder/zmeventbackup
deleted file mode 100755
index a14ee22a1..000000000
--- a/pcr/zoneminder/zmeventbackup
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-#===============================================================================
-#
-# FILE: eventdump.sh
-#
-# USAGE: ./eventdump.sh
-#
-# DESCRIPTION: Uses mysqldump to create a .sql file for individual zm
-# events to make Event table recovery possible by doing a
-# 'find' search in ZoneMinder the events directory
-#
-# OPTIONS: ---
-# REQUIREMENTS: --- mysqldump
-# BUGS: ---
-# NOTES: ---
-# AUTHOR: Ross Melin <rdmelin@gmail.com>
-# COMPANY:
-# VERSION: 1.0
-# CREATED: 03/06/2008 11:51:19 AM PST
-# REVISION: ---
-#===============================================================================
-
-# Edit these to suit your configuration
-ZM_CONFIG=/etc/zm.conf
-MYSQLDUMP=/usr/bin/mysqldump
-EVENTSDIR=/srv/zoneminder/www/events
-
-# The rest should not need editing
-
-# Get the mysql user and password
-source $ZM_CONFIG
-MYDUMPOPTS="--user=$ZM_DB_USER --password=$ZM_DB_PASS --skip-opt --compact --quick --no-create-info"
-
-
-for tag in $(find $EVENTSDIR -amin -65 -name ".[0-9]*")
- do
- EVENT_PATH=$(echo $tag |cut -f 1 -d .)
- EVENT_ID=$(echo $tag |cut -f 2 -d .)
- # Dump the sql statements needed to reload the Events, Frames and Stats tables
-
- echo "-- ZM_DB_VERSION=$ZM_VERSION
-" > $EVENT_PATH.sql
-
- $MYSQLDUMP $MYDUMPOPTS --where="Id=$EVENT_ID" zm Events >> $EVENT_PATH.sql
- $MYSQLDUMP $MYDUMPOPTS --where="Eventid=$EVENT_ID" zm Frames >> $EVENT_PATH.sql
- $MYSQLDUMP $MYDUMPOPTS --where="Eventid=$EVENT_ID" zm Stats >> $EVENT_PATH.sql
-
-done
diff --git a/pcr/zoneminder/zminit.arch b/pcr/zoneminder/zminit.arch
deleted file mode 100644
index 01b6658a7..000000000
--- a/pcr/zoneminder/zminit.arch
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-
-
-ZM_CONFIG=/etc/zm.conf
-
-
-
-loadcfg() {
- if [ -f $ZM_CONFIG ]; then
- . $ZM_CONFIG
- else
- echo "ERROR: $ZM_CONFIG not found."
- exit 1
- fi
- }
-chkmysql(){
- #FIXME
- /etc/rc.d/mysqld restart || (echo "mysql is not availible" && exit 1 )
- }
-
-getmylogin(){
- echo "Enter MySQL Administrator username"
- echo "(Default: root and password is blank)"
- echo -n "MySQL Admin: "
- read MYADMIN
- echo -n "Password: "
- read MYPASS
- if [ "X$MYPASS" != "X" ]; then MYPASS="-p$MYPASS"; fi
- echo "\q" |mysql -u $MYADMIN $MYPASS || exit 0
-
- }
-
-checkdb()
-{
- # Check database exisits and version
- exists=$(echo "show databases" |mysql -u $MYADMIN "$MYPASS" |grep zm)
- if [ "$exists" = "zm" ]; then
- OLD_VERSION=$(echo "select Value from Config where Name = 'ZM_DYN_DB_VERSION';" | mysql -u $MYADMIN $MYPASS zm |grep -v '^Value')
-
- case $OLD_VERSION in
- "")
- echo "A zm database exists, but the version is unknown"
- echo "Updating is unlikely to succeed"
- ;;
- "$ZM_VERSION")
- echo "The zm database appears to be up to date"
- echo "If this is incorrect, edit $ZM_CONFIG to reflect the current version"
- ;;
- *)
- echo "A database fron zm-$OLD_VERSION exists already"
- ;;
- esac
-
- while [ true ]
- do
- echo "Choose one of the following options:"
- echo "[U]pdate the database"
- echo "[D]rop the old database and reinitialize"
- echo "[E]xit and do nothing"
- read OPTION
- case $OPTION in
- "U"|"u")
- /etc/rc.d/zm restart
- exit 0
- ;;
- "D"|"d")
- echo "drop database zm;"|mysql -u $MYADMIN $MYPASS
- return
- ;;
- "E"|"e")
- exit 0
- ;;
- esac
- done
- fi
-}
-
-checkcfg(){
-for n in ZM_DB_HOST ZM_DB_NAME ZM_DB_USER ZM_DB_PASS; do
- eval "val=\$$n"
- if [ "$val" = "" ]; then
- echo "ERROR($ZM_CONFIG): $n should not be empty."
- echo "Enter a $n for ZM to use the Database."
- if [ "$n" = "ZM_DB_PASS" ]; then
- echo -n "Will not echo on screen $n : "
- stty -echo # Turns off screen echo.
- read newval
- stty echo # Restores screen echo.
- echo ""
- ### The following can be used to generate a random password
- # randstr newval 16
- else
- echo -n "$n : "
- read newval
- fi
- cp $ZM_CONFIG /tmp/$$ &&
- sed 's/^'$n='.*$/'$n=$newval'/g' /tmp/$$ >$ZM_CONFIG
-
- fi
-done
-
-if [ "$ZM_DB_HOST" = "localhost" ]; then
- ClientHost=localhost
-else
- ClientHost=`hostname`
-fi
-}
-
-reloadcfg(){
-loadcfg
-}
-
-initdb(){
-sql=/tmp/zm.crdb.sql
-echo "" >$sql
-chmod 600 $sql
-
-echo "CREATE DATABASE $ZM_DB_NAME;" >>$sql
-echo "USE $ZM_DB_NAME;" >>$sql
-
-echo "GRANT all on $ZM_DB_NAME.* TO '$ZM_DB_USER'@'$ClientHost' IDENTIFIED BY '$ZM_DB_PASS';" >>$sql
-
-cat $sql | mysql -B -h $ZM_DB_HOST -u $MYADMIN $MYPASS
-rm -f $sql
-
-cat $ZM_PATH_UPDATE/zm_create.sql | mysql -h $ZM_DB_HOST -u $ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME
-( cd $ZM_PATH_UPDATE; perl $ZM_PATH_BIN/zmupdate.pl -f )
-
- $ZM_PATH_UPDATE/customdb $ZM_DB_HOST $ZM_DB_NAME $ZM_DB_USER $ZM_DB_PASS
-}
-
-
-
-loadcfg
-getmylogin
-checkdb
-checkcfg
-reloadcfg
-initdb
-
-
-
-
diff --git a/pcr/zoneminder/zoneminder-1.25.0-kernel35.patch b/pcr/zoneminder/zoneminder-1.25.0-kernel35.patch
deleted file mode 100644
index 9939dc5c3..000000000
--- a/pcr/zoneminder/zoneminder-1.25.0-kernel35.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -up ./src/zm_local_camera.cpp.kernel35 ./src/zm_local_camera.cpp
---- ./src/zm_local_camera.cpp.kernel35 2012-07-16 15:01:22.182614878 -0500
-+++ ./src/zm_local_camera.cpp 2012-07-16 15:02:16.491941730 -0500
-@@ -739,7 +739,7 @@ void LocalCamera::Terminate()
- {
- Debug( 3, "Terminating video stream" );
- //enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- enum v4l2_buf_type type = v4l2_data.fmt.type;
-+ enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;
- if ( vidioctl( vid_fd, VIDIOC_STREAMOFF, &type ) < 0 )
- Error( "Failed to stop capture stream: %s", strerror(errno) );
-
-@@ -1519,7 +1519,7 @@ int LocalCamera::PrimeCapture()
-
- Debug( 3, "Starting video stream" );
- //enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- enum v4l2_buf_type type = v4l2_data.fmt.type;
-+ enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;
- if ( vidioctl( vid_fd, VIDIOC_STREAMON, &type ) < 0 )
- Fatal( "Failed to start capture stream: %s", strerror(errno) );
- }