Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
820d8b737e | ||
|
|
c78b696849 | ||
|
|
58aa9f120a | ||
|
|
68f3c31c2a |
15 changed files with 709 additions and 1 deletions
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
cambozola-0.68.tar.gz
|
||||
jscalendar-1.0.zip
|
||||
mootools-1.2.3-core-yc.js
|
||||
ZoneMinder-1.24.2.tar.gz
|
||||
/ZoneMinder-1.24.3.tar.gz
|
||||
/zoneminder-20110324svn.tar.xz
|
||||
/ZoneMinder-1.24.4.tar.gz
|
||||
72
README.Fedora
Normal file
72
README.Fedora
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
New installs
|
||||
============
|
||||
|
||||
1. Unless you are already using the MySQL server or you are running it
|
||||
remotely you will need to ensure that the server is installed and secured:
|
||||
|
||||
yum install mysql-server
|
||||
chkconfig mysql on
|
||||
service mysql start
|
||||
mysql_secure_installation
|
||||
|
||||
2. You will need to create the ZoneMinder database. These commands should do
|
||||
the trick, assuming your database server is local:
|
||||
|
||||
mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
mysqladmin reload
|
||||
|
||||
3. The database needs a user. One is not created by default because this would
|
||||
introduce an obvious security issue. The following should set this up:
|
||||
|
||||
mysql -u root -p
|
||||
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
|
||||
|
||||
Obviously, change at least zmpass to an actual, secure password or
|
||||
passphrase. You can change zmuser as well if you like.
|
||||
|
||||
4. Edit /etc/zm.conf and, at the bottom, change ZM_DB_PASS and perhaps
|
||||
ZM_DB_USER to match.
|
||||
|
||||
5. This package probably does not work with SELinux enabled at the moment. It
|
||||
may be necessary to disable SELinux for httpd, or even completely for
|
||||
ZoneMinder to function. This will be addressed in a later release. Run
|
||||
|
||||
setenforce 0
|
||||
|
||||
for testing, and edit /etc/sysconfig/selinux to disable it at boot time.
|
||||
|
||||
6. Enable and start the zoneminder service:
|
||||
|
||||
chkconfig zoneminder on
|
||||
service zoneminder start
|
||||
|
||||
7. The ZoneMinder web interface is disabled by default (which makes it rather
|
||||
useless but also secure by default), you will need to edit
|
||||
/etc/httpd/conf.d/zoneminder.conf to enable it. Afterwards, you can start
|
||||
the web server:
|
||||
|
||||
chkconfig httpd on
|
||||
service httpd start
|
||||
|
||||
8. You should immediately visit http://localhost/zm and secure the system if
|
||||
you wish for it to be network facing. To do this:
|
||||
|
||||
a) click Options, then System.
|
||||
b) check OPT_USE_AUTH.
|
||||
c) set AUTH_HASH_SECRET to a random string.
|
||||
d) click Save and refresh the main browser window.
|
||||
e) You should be prompted to log in; the default username/password is admin/admin.
|
||||
f) Open Options again, choose the newly visible Users tab.
|
||||
g) click the admin user and set a password.
|
||||
|
||||
|
||||
Upgrades
|
||||
========
|
||||
|
||||
1. Check for any new settings in /etc/zm.conf. Specifically, zmupdate.pl may
|
||||
fail if ZM_PATH_BUILD is not set.
|
||||
|
||||
2. You will need to upgrade the ZoneMinder database as described in the
|
||||
manual. This command should be sufficient:
|
||||
|
||||
zmupdate.pl --version=<from version>
|
||||
|
|
@ -1 +0,0 @@
|
|||
Moving to rpmfusion repo
|
||||
BIN
redalert.wav
Executable file
BIN
redalert.wav
Executable file
Binary file not shown.
2
sources
Normal file
2
sources
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
10f2160fe68294013efcd1473cd36f72 jscalendar-1.0.zip
|
||||
733629e1eda99be53f37c7554d169c84 ZoneMinder-1.24.4.tar.gz
|
||||
14
zoneminder-1.24.3-gcc44.patch
Normal file
14
zoneminder-1.24.3-gcc44.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff -up ./src/zm_utils.cpp.gcc44 ./src/zm_utils.cpp
|
||||
--- ./src/zm_utils.cpp.gcc44 2009-11-24 05:41:16.000000000 -0600
|
||||
+++ ./src/zm_utils.cpp 2011-01-23 23:24:34.117082494 -0600
|
||||
@@ -20,8 +20,8 @@
|
||||
//#include "zm_debug.h"
|
||||
#include "zm_utils.h"
|
||||
|
||||
-#include <stdio.h>
|
||||
-#include <stdarg.h>
|
||||
+#include <cstdio>
|
||||
+#include <cstdarg>
|
||||
|
||||
const std::string stringtf( const char *format, ... )
|
||||
{
|
||||
23
zoneminder-1.24.3-noffmpeg.patch
Normal file
23
zoneminder-1.24.3-noffmpeg.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff -up ./configure.ac.noffmpeg ./configure.ac
|
||||
--- ./configure.ac.noffmpeg 2011-03-24 21:41:02.000000000 -0500
|
||||
+++ ./configure.ac 2011-03-24 21:42:40.497276440 -0500
|
||||
@@ -269,13 +269,13 @@ AC_CHECK_LIB(gnutls-openssl,MD5,,AC_MSG_
|
||||
fi
|
||||
AC_CHECK_LIB(pcre,pcre_compile,,AC_MSG_WARN(libpcre.a may be required for remote/network camera support))
|
||||
AC_CHECK_LIB(x264,x264_predict_16x16_init)
|
||||
-AC_CHECK_LIB(avutil,av_malloc,,AC_MSG_WARN(libavutil.a may be required for MPEG streaming))
|
||||
+dnl 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(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)
|
||||
+dnl AC_CHECK_LIB(avcore,av_image_copy,,)
|
||||
+dnl AC_CHECK_LIB(avcodec,avcodec_init,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
+dnl AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
|
||||
+dnl AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming))
|
||||
+dnl AC_CHECK_LIB(swscale,sws_scale,,,-lswscale)
|
||||
AC_CHECK_LIB(bz2,BZ2_bzCompress,,AC_MSG_WARN(zm requires libbz2.a for recent versions of ffmpeg))
|
||||
AC_CHECK_LIB(z,compress,,)
|
||||
|
||||
11
zoneminder-1.24.3-runlevel.patch
Normal file
11
zoneminder-1.24.3-runlevel.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up ./scripts/zm.in.runlevel ./scripts/zm.in
|
||||
--- ./scripts/zm.in.runlevel 2010-11-28 15:22:05.000000000 -0600
|
||||
+++ ./scripts/zm.in 2011-03-24 21:39:01.973010160 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# description: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008
|
||||
-# chkconfig: 2345 99 00
|
||||
+# chkconfig: - 99 00
|
||||
# processname: zmpkg.pl
|
||||
|
||||
# Source function library.
|
||||
12
zoneminder-1.24.3-v4l2.patch
Normal file
12
zoneminder-1.24.3-v4l2.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up ./configure.ac.v4l2 ./configure.ac
|
||||
--- ./configure.ac.v4l2 2011-01-24 12:49:16.092209967 -0600
|
||||
+++ ./configure.ac 2011-01-24 12:58:58.823207570 -0600
|
||||
@@ -282,7 +282,7 @@ AC_CHECK_LIB(z,compress,,)
|
||||
AC_FUNC_ALLOCA
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h limits.h memory.h netdb.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h values.h])
|
||||
-AC_CHECK_HEADERS(linux/videodev.h,,AC_MSG_ERROR(zm requires Video4Linux to be installed),)
|
||||
+AC_CHECK_HEADERS(linux/videodev.h,,AC_MSG_WARN(zm requires Video4Linux to be installed for V4L1 support),)
|
||||
AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_V4L2,"1"),AC_MSG_WARN(zm requires Video4Linux2 to be installed for V4L2 support),)
|
||||
AC_CHECK_HEADERS(jpeglib.h,,AC_MSG_ERROR(zm requires libjpeg headers to be installed),)
|
||||
AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),)
|
||||
58
zoneminder-1.24.4-dbinstall.patch
Normal file
58
zoneminder-1.24.4-dbinstall.patch
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
diff -up ./configure.ac.dbinstall ./configure.ac
|
||||
--- ./configure.ac.dbinstall 2011-06-24 11:22:44.000000000 -0500
|
||||
+++ ./configure.ac 2011-09-08 17:30:00.009282471 -0500
|
||||
@@ -1,10 +1,10 @@
|
||||
AC_PREREQ(2.59)
|
||||
-AC_INIT(zm,1.24.4,support@zoneminder.com,ZoneMinder,http://www.zoneminder.com/downloads.html)
|
||||
+AC_INIT(zm,1.24.4,support@zoneminder.com,zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR(src/zm.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
-PATH_BUILD=`pwd`
|
||||
+PATH_BUILD=/usr/share/zoneminder
|
||||
AC_SUBST(PATH_BUILD)
|
||||
TIME_BUILD=`date +'%s'`
|
||||
AC_SUBST(TIME_BUILD)
|
||||
@@ -353,6 +353,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC
|
||||
|
||||
AC_DEFINE_DIR([BINDIR],[bindir],[Expanded binary directory])
|
||||
AC_DEFINE_DIR([LIBDIR],[libdir],[Expanded library directory])
|
||||
+AC_DEFINE_DIR([DATADIR],[datadir],[Expanded data directory])
|
||||
+AC_SUBST(PKGDATADIR,"$DATADIR/$PACKAGE")
|
||||
AC_SUBST(ZM_PID,"$ZM_RUNDIR/zm.pid")
|
||||
AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory])
|
||||
AC_SUBST(ZM_CONFIG,"$SYSCONFDIR/zm.conf")
|
||||
diff -up ./db/Makefile.am.dbinstall ./db/Makefile.am
|
||||
--- ./db/Makefile.am.dbinstall 2011-06-19 15:51:12.000000000 -0500
|
||||
+++ ./db/Makefile.am 2011-09-08 17:29:19.171528213 -0500
|
||||
@@ -1,7 +1,16 @@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
+zmdbdatadir = $(pkgdatadir)/db
|
||||
+
|
||||
EXTRA_DIST = \
|
||||
zm_create.sql.in \
|
||||
+ $(dbupgrade_scripts)
|
||||
+
|
||||
+dist_zmdbdata_DATA = \
|
||||
+ zm_create.sql \
|
||||
+ $(dbupgrade_scripts)
|
||||
+
|
||||
+dbupgrade_scripts = \
|
||||
zm_update-0.0.1.sql \
|
||||
zm_update-0.9.7.sql \
|
||||
zm_update-0.9.8.sql \
|
||||
diff -up ./zm.conf.in.dbinstall ./zm.conf.in
|
||||
--- ./zm.conf.in.dbinstall 2011-06-19 15:51:14.000000000 -0500
|
||||
+++ ./zm.conf.in 2011-09-08 17:30:22.154604007 -0500
|
||||
@@ -15,6 +15,9 @@ ZM_VERSION=@VERSION@
|
||||
# Path to build directory, used mostly for finding DB upgrade scripts
|
||||
ZM_PATH_BUILD=@PATH_BUILD@
|
||||
|
||||
+# Path to installed data directory, used mostly for finding DB upgrade scripts
|
||||
+ZM_PATH_DATA=@PKGDATADIR@
|
||||
+
|
||||
# Build time, used to record when to trigger various checks
|
||||
ZM_TIME_BUILD=@TIME_BUILD@
|
||||
|
||||
83
zoneminder-1.24.4-gcrypt.patch
Normal file
83
zoneminder-1.24.4-gcrypt.patch
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
--- configure.ac 2011-08-02 16:25:43.000000000 +0200
|
||||
+++ configure.ac.gcrypt 2011-08-02 16:37:56.000000000 +0200
|
||||
@@ -11,7 +11,7 @@ AC_ARG_VAR(ZM_DB_HOST,[Hostname where Zo
|
||||
AC_ARG_VAR(ZM_DB_NAME,[Name of ZoneMinder database, default zm])
|
||||
AC_ARG_VAR(ZM_DB_USER,[Name of ZoneMinder database user, default zmuser])
|
||||
AC_ARG_VAR(ZM_DB_PASS,[Password of ZoneMinder database user, default zmpass])
|
||||
-AC_ARG_VAR(ZM_SSL_LIB,[Library to use for ssl functions, default gnutls])
|
||||
+AC_ARG_VAR(ZM_SSL_LIB,[Library to use for MD5 function, default libgcrypt])
|
||||
AC_ARG_VAR(ZM_MYSQL_ENGINE,[MySQL engine to use with database, default MyISAM])
|
||||
AC_ARG_VAR(ZM_RUNDIR,[Location of transient process files, default /var/run/zm])
|
||||
AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /tmp/zm])
|
||||
@@ -30,7 +30,7 @@ if test "$ZM_DB_PASS" == ""; then
|
||||
AC_SUBST(ZM_DB_PASS,[zmpass])
|
||||
fi
|
||||
if test "$ZM_SSL_LIB" == ""; then
|
||||
- AC_SUBST(ZM_SSL_LIB,gnutls)
|
||||
+ AC_SUBST(ZM_SSL_LIB,libgcrypt)
|
||||
fi
|
||||
if test "$ZM_MYSQL_ENGINE" == ""; then
|
||||
AC_SUBST(ZM_MYSQL_ENGINE,MyISAM)
|
||||
@@ -261,11 +261,10 @@ AC_CHECK_LIB(jpeg,jpeg_start_compress,,A
|
||||
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
|
||||
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
||||
if test "$ZM_SSL_LIB" == "openssl"; then
|
||||
-AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead]))
|
||||
+AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select libgcrypt instead]))
|
||||
else
|
||||
-AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),)
|
||||
+AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed),)
|
||||
AC_CHECK_LIB(gcrypt,gcry_check_version,,AC_MSG_WARN([libgcrypt.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead]))
|
||||
-AC_CHECK_LIB(gnutls-openssl,MD5,,AC_MSG_WARN([gnutls-openssl.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead]))
|
||||
fi
|
||||
AC_CHECK_LIB(pcre,pcre_compile,,AC_MSG_WARN(libpcre.a may be required for remote/network camera support))
|
||||
AC_CHECK_LIB(x264,x264_predict_16x16_init)
|
||||
@@ -316,9 +315,6 @@ AC_CHECK_DECLS(round,,,[#include <math.h
|
||||
if test "$ZM_SSL_LIB" == "openssl"; then
|
||||
AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h>
|
||||
#include <openssl/md5.h>])
|
||||
-else
|
||||
-AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include <stdlib.h>
|
||||
-#include <gnutls/openssl.h>])
|
||||
fi
|
||||
AC_CHECK_DECLS(backtrace,,,[#include <execinfo.h>])
|
||||
|
||||
--- src/zm_user.cpp 2010-11-11 13:22:35.000000000 +0100
|
||||
+++ src/zm_user.cpp.gcrypt 2011-08-02 16:31:39.000000000 +0200
|
||||
@@ -144,6 +144,18 @@ User *zmLoadUser( const char *username,
|
||||
return( user );
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GCRYPT_H
|
||||
+#define HAVE_DECL_MD5 1
|
||||
+#define MD5_DIGEST_LENGTH 16
|
||||
+static unsigned char *MD5(const unsigned char *data, unsigned long len,
|
||||
+ unsigned char *md)
|
||||
+{
|
||||
+ gcry_md_hash_buffer(GCRY_MD_MD5, md, data, len);
|
||||
+
|
||||
+ return md;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// Function to validate an authentication string
|
||||
User *zmLoadAuthUser( const char *auth, bool use_remote_addr )
|
||||
{
|
||||
--- src/zm_user.h 2010-11-11 13:11:06.000000000 +0100
|
||||
+++ src/zm_user.h.gcrypt 2011-08-02 16:33:21.000000000 +0200
|
||||
@@ -23,14 +23,11 @@
|
||||
#ifndef ZM_USER_H
|
||||
#define ZM_USER_H
|
||||
|
||||
-#if HAVE_LIBGNUTLS_OPENSSL
|
||||
-#include <gnutls/openssl.h>
|
||||
#if HAVE_GCRYPT_H
|
||||
#include <gcrypt.h>
|
||||
-#endif // HAVE_GCRYPT_H
|
||||
#elif HAVE_LIBCRYPTO
|
||||
#include <openssl/md5.h>
|
||||
-#endif // HAVE_LIBGNUTLS_OPENSSL || HAVE_LIBCRYPTO
|
||||
+#endif // HAVE_GCRYPT_H || HAVE_LIBCRYPTO
|
||||
|
||||
class User
|
||||
{
|
||||
22
zoneminder-1.24.4-installfix.patch
Normal file
22
zoneminder-1.24.4-installfix.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff -up ./Makefile.am.installfix ./Makefile.am
|
||||
--- ./Makefile.am.installfix 2011-06-19 15:51:14.000000000 -0500
|
||||
+++ ./Makefile.am 2011-08-13 20:33:30.288587436 -0500
|
||||
@@ -21,12 +21,12 @@ EXTRA_DIST = \
|
||||
# Yes, you are correct. This is a HACK!
|
||||
install-data-hook:
|
||||
( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )
|
||||
- ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi )
|
||||
- ( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi )
|
||||
- ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )
|
||||
+ ( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir -p $(DESTDIR)$(ZM_RUNDIR); fi; if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR); fi )
|
||||
+ ( if ! test -e $(DESTDIR)$(ZM_TMPDIR); then mkdir -m 700 -p $(DESTDIR)$(ZM_TMPDIR); fi; if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR); fi )
|
||||
+ ( if ! test -e $(DESTDIR)$(ZM_LOGDIR); then mkdir -p $(DESTDIR)$(ZM_LOGDIR); fi; if test "$(DESTDIR)$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_LOGDIR); chmod u+w $(DESTDIR)$(ZM_LOGDIR); fi )
|
||||
|
||||
uninstall-hook:
|
||||
@-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
|
||||
- @-( if test "$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(ZM_RUNDIR); fi )
|
||||
- @-( if test "$(ZM_TMPDIR)" != "/tmp"; then rm -rf $(ZM_TMPDIR); fi )
|
||||
- @-( if test "$(ZM_LOGDIR)" != "/var/log"; then rm -rf $(ZM_LOGDIR); fi )
|
||||
+ @-( if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(DESTDIR)$(ZM_RUNDIR); fi )
|
||||
+ @-( if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp"; then rm -rf $(DESTDIR)$(ZM_TMPDIR); fi )
|
||||
+ @-( if test "$(DESTDIR)$(ZM_LOGDIR)" != "/var/log"; then rm -rf $(DESTDIR)$(ZM_LOGDIR); fi )
|
||||
10
zoneminder-svn-checkout.sh
Executable file
10
zoneminder-svn-checkout.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
DATE=$(date +%Y%m%d)
|
||||
|
||||
set -x
|
||||
|
||||
rm -rf zm
|
||||
svn export http://svn.zoneminder.com/svn/zm/trunk zm
|
||||
tar cJf zoneminder-${DATE}svn.tar.xz zm
|
||||
|
||||
rm -rf zm
|
||||
33
zoneminder.conf
Normal file
33
zoneminder.conf
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# The Zoneminder web interface has been disabled by default due to a small
|
||||
# security issue in the default install.
|
||||
#
|
||||
# When using Zoneminder's own authentication, recorded CCTV images are
|
||||
# accessible from the web directly without passing the authentication. This
|
||||
# means any attacker could see your CCTV images without a password. In order
|
||||
# to avoid this you can disable Zoneminder's authentication and configure
|
||||
# standard Apache authentication (see the Apache documentation for details on
|
||||
# this).
|
||||
#
|
||||
# If you still wish to use Zoneminder's own authentication, or have an
|
||||
# internal site which needs no authentication, you need to delete the line
|
||||
# marked below and restart Apache.
|
||||
|
||||
Alias /zm "/usr/share/zoneminder/www"
|
||||
<Directory "/usr/share/zoneminder/www">
|
||||
Options -Indexes MultiViews FollowSymLinks
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
# The code unfortunately uses short tags in many places
|
||||
php_value short_open_tag 1
|
||||
|
||||
Deny from all # DELETE THIS LINE
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
|
||||
<Directory "/usr/libexec/zoneminder/cgi-bin">
|
||||
AllowOverride All
|
||||
Options ExecCGI
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
362
zoneminder.spec
Normal file
362
zoneminder.spec
Normal file
|
|
@ -0,0 +1,362 @@
|
|||
#define svndate 20110324
|
||||
#define svnrev 3310
|
||||
|
||||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.24.4
|
||||
Release: 3%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is inder the MIT license: http://mootools.net/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
Source: http://www2.zoneminder.com/downloads/ZoneMinder-%{version}.tar.gz
|
||||
Source2: zoneminder.conf
|
||||
Source3: redalert.wav
|
||||
Source4: README.Fedora
|
||||
Source5: http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip
|
||||
# Need to unravel the proper mootools files to grab from upstream, since the
|
||||
# number of them keeps multiplying. In the meantime, rely on the ones bundled
|
||||
# with zoneminder. As these are javascript, there is no guideline violation
|
||||
# here.
|
||||
#Source6: http://mootools.net/download/get/mootools-1.2.3-core-yc.js
|
||||
Patch1: zoneminder-1.24.4-dbinstall.patch
|
||||
Patch2: zoneminder-1.24.3-runlevel.patch
|
||||
Patch3: zoneminder-1.24.3-noffmpeg.patch
|
||||
Patch10: zoneminder-1.24.4-installfix.patch
|
||||
Patch11: zoneminder-1.24.3-gcc44.patch
|
||||
Patch12: zoneminder-1.24.4-gcrypt.patch
|
||||
|
||||
BuildRequires: automake gnutls-devel
|
||||
BuildRequires: mysql-devel pcre-devel libjpeg-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
|
||||
Requires: httpd php php-mysql cambozola
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service
|
||||
Requires(postun): /sbin/service
|
||||
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
# Unpack jscalendar and move some files around
|
||||
%setup -q -D -T -a 5 -n ZoneMinder-%{version}
|
||||
mkdir jscalendar-doc
|
||||
pushd jscalendar-1.0
|
||||
mv *html *php doc/* README ../jscalendar-doc
|
||||
rmdir doc
|
||||
popd
|
||||
|
||||
%patch1 -p0 -b .dbinstall
|
||||
%patch2 -p0 -b .runlevel
|
||||
%patch3 -p0 -b .noffmpeg
|
||||
%patch10 -p0 -b .installfix
|
||||
%patch11 -p0 -b .gcc44
|
||||
%patch12 -p0 -b .gcrypt
|
||||
cp %{SOURCE4} README.Fedora
|
||||
|
||||
|
||||
%build
|
||||
autoreconf
|
||||
|
||||
OPTS=""
|
||||
%ifnarch %{ix86} x86_64
|
||||
OPTS="$OPTS --disable-crashtrace"
|
||||
%endif
|
||||
|
||||
%configure \
|
||||
--with-libarch=%{_lib} \
|
||||
--with-mysql=%{_prefix} \
|
||||
--with-webdir=%{_datadir}/%{name}/www \
|
||||
--with-cgidir=%{_libexecdir}/%{name}/cgi-bin \
|
||||
--with-webuser=%{zmuid} \
|
||||
--with-webgroup=%{zmgid} \
|
||||
--enable-mmap=yes \
|
||||
--disable-debug \
|
||||
$OPTS
|
||||
|
||||
# Have to do this now because the configure script wipes out modifications made to this file
|
||||
cat <<EOF >> db/zm_create.sql
|
||||
# Fedora change:
|
||||
# Alter some default paths to match the default URL and selinux expectations
|
||||
update Config set Value = '/cgi-bin/zm/nph-zms' where Name = 'ZM_PATH_ZMS';
|
||||
update Config set Value = '/var/log/zoneminder' where Name = 'ZM_PATH_LOGS';
|
||||
update Config set Value = '/var/log/zoneminder/zm_debug_log+' where Name = 'ZM_EXTRA_DEBUG_LOG';
|
||||
update Config set Value = '/var/lib/zoneminder/sock' where Name = 'ZM_PATH_SOCKS';
|
||||
update Config set Value = '/var/lib/zoneminder/swap' where Name = 'ZM_PATH_SWAP';
|
||||
update Config set Value = '/var/spool/zoneminder-upload' where Name = 'ZM_UPLOAD_FTP_LOC_DIR';
|
||||
EOF
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid_final}/;' \
|
||||
-e 's/(ZM_WEB_GROUP=).*$/${1}%{zmgid_final}/;' zm.conf
|
||||
|
||||
|
||||
%install
|
||||
install -d %{buildroot}/%{_localstatedir}/run
|
||||
make install DESTDIR=%{buildroot} \
|
||||
INSTALLDIRS=vendor
|
||||
rm -rf %{buildroot}/%{perl_vendorarch} %{buildroot}/%{perl_archlib}
|
||||
rm -f %{buildroot}/%{_bindir}/zmx10.pl
|
||||
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/log/zoneminder
|
||||
for dir in events images temp
|
||||
do
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/$dir
|
||||
rmdir %{buildroot}/%{_datadir}/%{name}/www/$dir
|
||||
ln -sf ../../../..%{_localstatedir}/lib/zoneminder/$dir %{buildroot}/%{_datadir}/%{name}/www/$dir
|
||||
done
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/sock
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/swap
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/spool/zoneminder-upload
|
||||
|
||||
install -D -m 755 scripts/zm %{buildroot}/%{_initrddir}/zoneminder
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/httpd/conf.d/zoneminder.conf
|
||||
install -D -m 755 %{SOURCE3} %{buildroot}/%{_datadir}/%{name}/www/sounds/redalert.wav
|
||||
|
||||
# Install jscalendar - this really should be in its own package
|
||||
install -d -m 755 %{buildroot}/%{_datadir}/%{name}/www/jscalendar
|
||||
cp -rp jscalendar-1.0/* %{buildroot}/%{_datadir}/%{name}/www/jscalendar
|
||||
|
||||
# Set up cambozola
|
||||
pushd %{buildroot}/%{_datadir}/%{name}/www
|
||||
ln -s ../../java/cambozola.jar
|
||||
popd
|
||||
|
||||
# Install mootools
|
||||
#pushd %{buildroot}/%{_datadir}/%{name}/www
|
||||
#install -m 644 %{SOURCE6} mootools-1.2.3-core-yc.js
|
||||
#ln -s mootools-1.2.3-core-yc.js mootools.js
|
||||
#popd
|
||||
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add zoneminder
|
||||
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service zoneminder stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del zoneminder
|
||||
fi
|
||||
|
||||
|
||||
%postun
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service zoneminder condrestart > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README README.Fedora jscalendar-doc
|
||||
%config(noreplace) %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/zoneminder.conf
|
||||
%attr(755,root,root) %{_initrddir}/zoneminder
|
||||
|
||||
%{_bindir}/zma
|
||||
%{_bindir}/zmaudit.pl
|
||||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%attr(4755,root,root) %{_bindir}/zmfix
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
%{_bindir}/zmtrigger.pl
|
||||
%{_bindir}/zmu
|
||||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%{_libexecdir}/%{name}/cgi-bin
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/db
|
||||
%{_datadir}/%{name}/www
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/spool/zoneminder-upload
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
|
||||
- Re-add the dist-tag that somehow got lost.
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
|
||||
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
|
||||
- Undo that patch, and undo another which was the cause of the whole mess.
|
||||
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
|
||||
- Make sure database creation mods actually take.
|
||||
- Update Fedora-specific docs with some additional info.
|
||||
- Use bundled mootools (javascript, so no guideline violation).
|
||||
- Update download location.
|
||||
- Update the gcrypt patch to actually work.
|
||||
- Upstream changed the tarball without changing the version to patch a
|
||||
vulnerability, so redownload.
|
||||
|
||||
* Fri Aug 26 2011 Tom Callaway <spot@fedoraproject.org> - 1.24.3-8.20110324svn3310
|
||||
- bump for gnutls
|
||||
|
||||
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
|
||||
- Initial attempt to upgrade to 1.24.4.
|
||||
|
||||
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
|
||||
gnutls openssl libs.
|
||||
|
||||
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
|
||||
- Bump for gnutls update.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.Fedora.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
||||
Reference in a new issue