Compare commits

..

5 commits

Author SHA1 Message Date
Fedora Release Engineering
1d49d8ed7f dist-git conversion 2010-07-29 16:32:38 +00:00
Bill Nottingham
607e5400f5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:08:58 +00:00
mebourne
089ea055fc - Remove default runlevel, bz #441315 2008-05-06 22:08:03 +00:00
mebourne
81ce234298 - Patch for CVE-2008-1381 2008-04-29 23:21:56 +00:00
Jesse Keating
353e152a34 Initialize branch F-9 for zoneminder 2008-04-19 18:45:52 +00:00
12 changed files with 594 additions and 1 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
ZoneMinder-1.22.3.tar.gz
cambozola-0.68.tar.gz

31
README.Fedora Normal file
View file

@ -0,0 +1,31 @@
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:
yum install mysql-server
2. You will need to create the ZoneMinder database. These commands should do
the trick:
mysql mysql < /usr/share/zoneminder/db/zm_create.sql
mysqladmin reload
3. The ZoneMinder web interface is disabled by default, you will need to edit
this file to enable it:
/etc/httpd/conf.d/zoneminder.conf
4. 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.
Upgrades
========
1. You will need to upgrade the ZoneMinder database as described in the
manual. This command should be sufficient:
zmupdate.pl --version=<from version>

View file

@ -1 +0,0 @@
Moving to rpmfusion repo

BIN
redalert.wav Executable file

Binary file not shown.

2
sources Normal file
View file

@ -0,0 +1,2 @@
cfc9aa9c2cd750c825b9dfa5f96918af ZoneMinder-1.22.3.tar.gz
e4fac8b6ee94c9075b14bb95be4f860b cambozola-0.68.tar.gz

View file

@ -0,0 +1,138 @@
--- db/Makefile.am.orig 2006-12-27 23:50:07.000000000 +0000
+++ db/Makefile.am 2006-12-27 23:50:21.000000000 +0000
@@ -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 \
--- scripts/zmupdate.pl.orig 2006-12-27 23:59:20.000000000 +0000
+++ scripts/zmupdate.pl 2006-12-27 23:59:35.000000000 +0000
@@ -320,7 +320,7 @@
$command .= " -p".$db_pass;
}
}
- $command .= " ".ZM_DB_NAME." < ".ZM_PATH_BUILD."/db/zm_update-".$version.".sql";
+ $command .= " ".ZM_DB_NAME." < ".ZM_PATH_DATA."/db/zm_update-".$version.".sql";
print( "Executing '$command'\n" ) if ( DBG_LEVEL > 0 );
my $output = qx($command);
--- configure.in.orig 2006-12-27 23:55:41.000000000 +0000
+++ configure.in 2006-12-27 23:59:07.000000000 +0000
@@ -1,10 +1,8 @@
-AC_INIT(zm,1.22.3,support@zoneminder.com,ZoneMinder)
+AC_INIT(zm,1.22.3,support@zoneminder.com,zoneminder)
AC_CONFIG_SRCDIR(src/zm.h)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
-PATH_BUILD=`pwd`
-AC_SUBST(PATH_BUILD)
TIME_BUILD=`date +'%s'`
AC_SUBST(TIME_BUILD)
@@ -216,8 +214,10 @@
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(RUNDIR,"/var/run")
-AC_SUBST(ZM_RUNDIR,"$RUNDIR/zm")
+AC_SUBST(ZM_RUNDIR,"$RUNDIR/$PACKAGE")
AC_SUBST(ZM_PID,"$ZM_RUNDIR/zm.pid")
AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory])
AC_SUBST(ZM_CONFIG,"$SYSCONFDIR/zm.conf")
--- zm.conf.in.orig 2006-12-27 23:53:38.000000000 +0000
+++ zm.conf.in 2006-12-27 23:59:11.000000000 +0000
@@ -12,8 +12,8 @@
# Current version of ZoneMinder
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@
--- scripts/zm.in.dbinstall 2007-04-03 00:41:48.000000000 +0100
+++ scripts/zm.in 2007-04-03 00:42:46.000000000 +0100
@@ -6,10 +6,10 @@
# Source function library.
. /etc/rc.d/init.d/functions
-prog=ZoneMinder
+prog="@PACKAGE@"
ZM_CONFIG="@ZM_CONFIG@"
pidfile="@ZM_RUNDIR@"
-LOCKFILE=/var/lock/subsys/zm
+LOCKFILE=/var/lock/subsys/$prog
loadconf()
{
@@ -27,9 +27,8 @@
start()
{
zmupdate || return $?
- loadconf || return $?
#Make sure the directory for our PID folder exists or create one.
- [ ! -d /var/run/zm ] \
+ [ ! -d $pidfile ] \
&& mkdir -m 774 $pidfile \
&& chown $ZM_WEB_USER:$ZM_WEB_GROUP $pidfile
#Make sure the folder for the socks file exists or create one
@@ -49,7 +48,6 @@
stop()
{
- loadconf
echo -n $"Stopping $prog: "
$command stop
RETVAL=$?
@@ -60,22 +58,21 @@
zmstatus()
{
- loadconf
result=`$command status`
if [ "$result" = "running" ]; then
- echo "ZoneMinder is running"
+ echo "$prog is running"
$ZM_PATH_BIN/zmu -l
RETVAL=0
else
- echo "ZoneMinder is stopped"
+ echo "$prog is stopped"
RETVAL=1
fi
}
zmupdate()
{
- if [ -x $ZM_PATH_BIN/zm_update ]; then
- $ZM_PATH_BIN/zm_update noi
+ if [ -x $ZM_PATH_BIN/zmupdate.pl ]; then
+ $ZM_PATH_BIN/zmupdate.pl --freshen >/dev/null
fi
}
@@ -92,7 +89,6 @@
start
;;
'condrestart')
- loadconf
result=`$ZM_PATH_BIN/zmdc.pl check`
if [ "$result" = "running" ]; then
$ZM_PATH_BIN/zmdc.pl shutdown > /dev/null

View file

@ -0,0 +1,11 @@
--- src/zm_image.h.orig 2008-01-03 23:56:32.000000000 +0000
+++ src/zm_image.h 2008-01-03 23:56:20.000000000 +0000
@@ -249,7 +249,7 @@
bool Unzip( const Bytef *inbuffer, unsigned long inbuffer_size );
bool Zip( Bytef *outbuffer, unsigned long *outbuffer_size, int compression_level=Z_BEST_SPEED ) const;
- bool Crop( int lo_x, int lo_y, int hi_y, int hi_y );
+ bool Crop( int lo_x, int lo_y, int hi_x, int hi_y );
void Overlay( const Image &image );
void Blend( const Image &image, int transparency=10 ) const;

View file

@ -0,0 +1,15 @@
--- Makefile.am.orig 2006-12-25 01:21:07.000000000 +0000
+++ Makefile.am 2006-12-25 01:22:04.000000000 +0000
@@ -23,9 +23,9 @@
# 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 $(RUNDIR); then mkdir $(RUNDIR); fi )
- ( if ! test -e $(ZM_RUNDIR); then mkdir $(ZM_RUNDIR); fi; chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR) )
+ -( if ! test -e $(DESTDIR)$(RUNDIR); then mkdir $(DESTDIR)$(RUNDIR); fi )
+ ( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir $(DESTDIR)$(ZM_RUNDIR); fi; chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR) )
uninstall-hook:
@-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
- @-( rm -rf $(ZM_RUNDIR) )
+ @-( rm -rf $(DESTDIR)$(ZM_RUNDIR) )

View file

@ -0,0 +1,10 @@
--- scripts/zm.in.runlevel 2008-05-06 22:54:36.000000000 +0100
+++ scripts/zm.in 2008-05-06 23:01:35.000000000 +0100
@@ -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-2006
-# chkconfig: 2345 99 00
+# chkconfig: - 99 00
# processname: zmpkg.pl
# Source function library.

View file

@ -0,0 +1,143 @@
diff -ru ZoneMinder-1.22.3/web/zm_export_funcs.php ZoneMinder-1.22.3-fix/web/zm_export_funcs.php
--- ZoneMinder-1.22.3/web/zm_export_funcs.php 2006-03-27 16:01:33.000000000 -0600
+++ ZoneMinder-1.22.3-fix/web/zm_export_funcs.php 2008-04-28 10:07:32.000000000 -0500
@@ -314,7 +314,7 @@
{
$archive = "temp/".$export_root.".tar.gz";
@unlink( $archive );
- $command = "tar --create --gzip --file=$archive --files-from=$list_file";
+ $command = "tar --create --gzip --file=".escapeshellarg($archive)." --files-from=".escapeshellarg($list_file);
exec( $command, $output, $status );
if ( $status )
{
@@ -329,7 +329,7 @@
$archive = "temp/zm_export.zip";
$archive = "temp/".$export_root.".zip";
@unlink( $archive );
- $command = "cat $list_file | zip -q $archive -@";
+ $command = "cat ".escapeshellarg($list_file)." | zip -q ".escapeshellarg($archive)." -@";
exec( $command, $output, $status );
if ( $status )
{
diff -ru ZoneMinder-1.22.3/web/zm_funcs.php ZoneMinder-1.22.3-fix/web/zm_funcs.php
--- ZoneMinder-1.22.3/web/zm_funcs.php 2006-11-09 04:51:10.000000000 -0600
+++ ZoneMinder-1.22.3-fix/web/zm_funcs.php 2008-04-28 10:16:17.000000000 -0500
@@ -724,20 +724,20 @@
function packageControl( $command )
{
- $string = ZM_PATH_BIN."/zmpkg.pl $command";
+ $string = ZM_PATH_BIN."/zmpkg.pl ".escapeshellarg( $command );
$string .= " 2>/dev/null >&- <&- >/dev/null";
exec( $string );
}
function daemonControl( $command, $daemon=false, $args=false )
{
- $string = ZM_PATH_BIN."/zmdc.pl $command";
+ $string = ZM_PATH_BIN."/zmdc.pl ".escapeshellarg( $command );
if ( $daemon )
{
- $string .= " $daemon";
+ $string .= " ".escapeshellarg( $daemon );
if ( $args )
{
- $string .= " $args";
+ $string .= " ".escapeshellarg( $args );
}
}
$string .= " 2>/dev/null >&- <&- >/dev/null";
@@ -893,9 +893,9 @@
$string = ZM_PATH_BIN."/zmdc.pl check";
if ( $daemon )
{
- $string .= " $daemon";
+ $string .= " ".escapeshellarg( $daemon );
if ( $args )
- $string .= " $args";
+ $string .= " ".escapeshellarg( $args );
}
$result = exec( $string );
return( preg_match( '/running/', $result ) );
@@ -973,7 +973,7 @@
{
if ( ZM_WEB_SCALE_THUMBS )
{
- $command = ZM_PATH_NETPBM."/jpegtopnm -quiet -dct fast $image_path | ".ZM_PATH_NETPBM."/pnmscalefixed -quiet $fraction | ".ZM_PATH_NETPBM."/pnmtojpeg -quiet -dct=fast > $thumb_path";
+ $command = ZM_PATH_NETPBM."/jpegtopnm -quiet -dct fast ".escapeshellarg( $image_path )." | ".ZM_PATH_NETPBM."/pnmscalefixed -quiet ".escapeshellarg( $fraction )." | ".ZM_PATH_NETPBM."/pnmtojpeg -quiet -dct=fast > ".escapeshellarg( $thumb_path );
exec( $command );
}
else
@@ -1040,7 +1040,7 @@
$command = ZM_PATH_BIN."/zmvideo.pl -e ".$event['Id']." -f ".$format." -r ".sprintf( "%.2f", ($rate/RATE_BASE) )." -s ".sprintf( "%.2f", ($scale/SCALE_BASE) );
if ( $overwrite )
$command .= " -o";
- $result = exec( $command, $output, $status );
+ $result = exec( escapeshellcmd( $command ), $output, $status );
return( $status?"":rtrim($result) );
}
@@ -1062,7 +1062,7 @@
function executeFilter( $filter )
{
- $command = ZM_PATH_BIN."/zmfilter.pl --filter ".$filter;
+ $command = ZM_PATH_BIN."/zmfilter.pl --filter ".escapeshellarg( $filter );
$result = exec( $command, $output, $status );
$result = mysql_query( "delete from Filters where Name like '_TempFilter%'" );
if ( !$result )
@@ -1882,13 +1882,7 @@
{
// Can't connect so use script
$command = ZM_PATH_BIN."/zmx10.pl --command $status --key $key";
- //$command .= " 2>/dev/null >&- <&- >/dev/null";
- $result = exec( $string );
- if ( preg_match( '/^'.$key.'\s+(.*)/', $result, $matches ) )
- $status = $matches[1];
- else
- $status = "unknown";
- $x10_response = exec( escapeshellcmd( $x10_command ) );
+ $x10_response = exec( escapeshellcmd( $command ) );
}
if ( preg_match( '/^'.$key.'\s+(.*)/', $x10_response, $matches ) )
$status = $matches[1];
diff -ru ZoneMinder-1.22.3/web/zm_xhtml_view_eventdetails.php ZoneMinder-1.22.3-fix/web/zm_xhtml_view_eventdetails.php
--- ZoneMinder-1.22.3/web/zm_xhtml_view_eventdetails.php 2006-11-09 05:48:56.000000000 -0600
+++ ZoneMinder-1.22.3-fix/web/zm_xhtml_view_eventdetails.php 2008-04-28 10:07:32.000000000 -0500
@@ -75,7 +75,7 @@
$fraction = sprintf( "%.2f", $scale/100 );
if ( file_exists( $image_path ) )
{
- $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast $image_path | ".ZM_PATH_NETPBM."/pnmscalefixed $fraction | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > $thumb_image";
+ $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast ".escapeshellarg($image_path)." | ".ZM_PATH_NETPBM."/pnmscalefixed ".escapeshellarg($fraction)." | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > ".escapeshellarg($thumb_image);
exec( $command );
}
}
diff -ru ZoneMinder-1.22.3/web/zm_xhtml_view_event.php ZoneMinder-1.22.3-fix/web/zm_xhtml_view_event.php
--- ZoneMinder-1.22.3/web/zm_xhtml_view_event.php 2006-11-09 05:48:56.000000000 -0600
+++ ZoneMinder-1.22.3-fix/web/zm_xhtml_view_event.php 2008-04-28 10:07:32.000000000 -0500
@@ -278,10 +278,9 @@
{
$anal_image = preg_replace( "/capture/", "analyse", $capt_image );
if ( file_exists( $anal_image ) )
- $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast $anal_image | ".ZM_PATH_NETPBM."/pnmscalefixed $fraction | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > $thumb_image";
+ $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast ".escapeshellarg($anal_image)." | ".ZM_PATH_NETPBM."/pnmscalefixed ".escapeshellarg($fraction)." | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > ".escapeshellarg($thumb_image);
else
- $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast $capt_image | ".ZM_PATH_NETPBM."/pnmscalefixed $fraction | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > $thumb_image";
- #exec( escapeshellcmd( $command ) );
+ $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast ".escapeshellarg($capt_image)." | ".ZM_PATH_NETPBM."/pnmscalefixed ".escapeshellarg($fraction)." | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > ".escapeshellarg($thumb_image);
exec( $command );
}
}
diff -ru ZoneMinder-1.22.3/web/zm_xhtml_view_video.php ZoneMinder-1.22.3-fix/web/zm_xhtml_view_video.php
--- ZoneMinder-1.22.3/web/zm_xhtml_view_video.php 2006-11-09 05:48:56.000000000 -0600
+++ ZoneMinder-1.22.3-fix/web/zm_xhtml_view_video.php 2008-04-28 10:07:32.000000000 -0500
@@ -102,7 +102,7 @@
$command = ZM_PATH_BIN."/zmvideo.pl -e ".$event['Id']." -f ".$video_format." -r ".sprintf( "%.2f", ($rate/RATE_BASE) )." -S ".$video_size;
if ( $overwrite )
$command .= " -o";
- $generated = exec( $command, $output, $status );
+ $generated = exec( escapeshellcmd( $command ), $output, $status );
}
$video_files = array();

30
zoneminder.conf Normal file
View file

@ -0,0 +1,30 @@
# 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
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>

212
zoneminder.spec Normal file
View file

@ -0,0 +1,212 @@
%define zmuid $(id -un)
%define zmgid $(id -gn)
%define zmuid_final apache
%define zmgid_final apache
Name: zoneminder
Version: 1.22.3
Release: 14%{?dist}
Summary: A camera monitoring and analysis tool
Group: System Environment/Daemons
License: GPLv2+
URL: http://www.zoneminder.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source: http://www.zoneminder.com/fileadmin/downloads/ZoneMinder-%{version}.tar.gz
Source1: http://www.charliemouse.com/code/cambozola/cambozola-0.68.tar.gz
Source2: zoneminder.conf
Source3: redalert.wav
Source4: README.Fedora
Patch1: zoneminder-1.22.3-dbinstall.patch
Patch2: zoneminder-1.22.3-runlevel.patch
Patch10: zoneminder-1.22.3-installfix.patch
Patch11: zoneminder-1.22.3-gcc43.patch
Patch12: zoneminder-1.22.3-security.patch
Conflicts: zm <= 1.22.3
BuildRequires: automake
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)
Requires: httpd php php-mysql
Requires: perl(DBD::mysql)
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. This package includes cambozola.jar.
%prep
%setup -q -n ZoneMinder-%{version}
%patch1 -p0 -b .dbinstall
%patch2 -p0 -b .runlevel
%patch10 -p0 -b .installfix
%patch11 -p0 -b .gcc43
%patch12 -p1 -b .security
gunzip -c %{SOURCE1} | tar xf - cambozola-*/dist/cambozola.jar
cp %{SOURCE4} README.Fedora
cat <<EOF >> db/zm_create.sql.in
update Config set Value = '/cgi-bin/zm/nph-zms' where Name = 'ZM_PATH_ZMS';
use mysql;
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
EOF
%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} \
--disable-debug \
$OPTS
make %{?_smp_mflags}
%{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid_final}/;' \
-e 's/(ZM_WEB_GROUP=).*$/${1}%{zmgid_final}/;' zm.conf
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_localstatedir}/run
make install DESTDIR=$RPM_BUILD_ROOT \
INSTALLDIRS=vendor
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{_lib}/perl5/vendor_perl/*.*/*-*
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{_lib}/perl5/*.*/*-*
rm -f $RPM_BUILD_ROOT%{_bindir}/zmx10.pl
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/log/zoneminder
for dir in events images temp
do
install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/zoneminder/$dir
rmdir $RPM_BUILD_ROOT%{_datadir}/%{name}/www/$dir
ln -sf ../../../..%{_localstatedir}/lib/zoneminder/$dir $RPM_BUILD_ROOT%{_datadir}/%{name}/www/$dir
done
install -D -m 755 scripts/zm $RPM_BUILD_ROOT%{_initrddir}/zoneminder
install -D -m 644 cambozola-*/dist/cambozola.jar $RPM_BUILD_ROOT%{_datadir}/%{name}/www/cambozola.jar
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/zoneminder.conf
install -D -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{name}/www/sounds/redalert.wav
%clean
rm -rf $RPM_BUILD_ROOT
%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.html README.pdf README.Fedora
%config(noreplace) %attr(600,%{zmuid_final},%{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}/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/temp
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/log/zoneminder
%changelog
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
- Remove default runlevel, bz #441315
* Wed Apr 30 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-13
- Patch for CVE-2008-1381
* 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