Merge branch 'hide_rtspdescribe' into storageareas

This commit is contained in:
Isaac Connor 2016-02-12 13:53:09 -05:00
commit 5da8df45a7
6 changed files with 40 additions and 12 deletions

View File

@ -1,6 +1,6 @@
# ZoneMinder # ZoneMinder
FROM ubuntu:precise FROM ubuntu:trusty
MAINTAINER Kyle Johnson <kjohnson@gnulnx.net> MAINTAINER Kyle Johnson <kjohnson@gnulnx.net>
# Let the container know that there is no tty # Let the container know that there is no tty
@ -10,10 +10,10 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libpolkit-gobject-1-dev build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev \ libpolkit-gobject-1-dev build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev \
libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \ libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \
libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg-turbo8-dev \ libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm cmake libjpeg-turbo8-dev \
libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \ libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \
apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli openssh-server \ apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli openssh-server \
mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore5 vlc-data libcurl4-openssl-dev \ mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore7 vlc-data libcurl4-openssl-dev \
libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \ libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \
libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \ libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \
libmime-lite-perl dh-autoreconf dpatch libmime-lite-perl dh-autoreconf dpatch
@ -25,10 +25,11 @@ ADD . /ZoneMinder
WORKDIR /ZoneMinder WORKDIR /ZoneMinder
# Setup the ZoneMinder build environment # Setup the ZoneMinder build environment
RUN aclocal && autoheader && automake --force-missing --add-missing && autoconf #RUN aclocal && autoheader && automake --force-missing --add-missing && autoconf
# Configure ZoneMinder # Configure ZoneMinder
RUN ./configure --with-libarch=lib/$DEB_HOST_GNU_TYPE --disable-debug --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-webdir=/var/www/zm --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-mmap=yes ZM_SSL_LIB=openssl ZM_DB_USER=zm ZM_DB_PASS=zm #RUN ./configure --with-libarch=lib/$DEB_HOST_GNU_TYPE --disable-debug --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-webdir=/var/www/zm --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-mmap=yes --enable-onvif ZM_SSL_LIB=openssl ZM_DB_USER=zm ZM_DB_PASS=zm
RUN cmake .
# Build ZoneMinder # Build ZoneMinder
RUN make RUN make
@ -36,6 +37,9 @@ RUN make
# Install ZoneMinder # Install ZoneMinder
RUN make install RUN make install
# ensure writable folders
RUN ./zmlinkcontent.sh
# Adding the start script # Adding the start script
ADD utils/docker/start.sh /tmp/start.sh ADD utils/docker/start.sh /tmp/start.sh
@ -43,15 +47,23 @@ ADD utils/docker/start.sh /tmp/start.sh
# TODO - Files ADD'ed have 755 already...why do we need this? # TODO - Files ADD'ed have 755 already...why do we need this?
RUN chmod 755 /tmp/start.sh RUN chmod 755 /tmp/start.sh
# give files in /usr/local/share/zoneminder/
RUN chown -R www-data:www-data /usr/local/share/zoneminder/
# Creating SSH privledge escalation dir # Creating SSH privledge escalation dir
RUN mkdir /var/run/sshd RUN mkdir /var/run/sshd
# Adding apache virtual hosts file # Adding apache virtual hosts file
ADD utils/docker/apache-vhost /etc/apache2/sites-enabled/000-default ADD utils/docker/apache-vhost /etc/apache2/sites-available/000-default.conf
ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini
# Set the root passwd # Set the root passwd
RUN echo 'root:root' | chpasswd RUN echo 'root:root' | chpasswd
# Add a user we can actually login with
RUN useradd -m -s /bin/bash -G sudo zoneminder
RUN echo 'zoneminder:zoneminder' | chpasswd
# Expose ssh and http ports # Expose ssh and http ports
EXPOSE 80 EXPOSE 80
EXPOSE 22 EXPOSE 22

View File

@ -51,7 +51,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
,libwww-perl ,libwww-perl
,mysql-client | virtual-mysql-client ,mysql-client | virtual-mysql-client
,perl-modules ,perl-modules
,php5-mysql ,php5-mysql, php5-gd
,policykit-1 ,policykit-1
,rsyslog | system-log-daemon ,rsyslog | system-log-daemon
,zip ,zip

View File

@ -6,8 +6,7 @@
<Directory "/usr/lib/cgi-bin"> <Directory "/usr/lib/cgi-bin">
AllowOverride None AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny require all granted
Allow from all
</Directory> </Directory>
</VirtualHost> </VirtualHost>

5
utils/docker/phpdate.ini Normal file
View File

@ -0,0 +1,5 @@
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = GMT

View File

@ -1,5 +1,11 @@
#!/bin/bash #!/bin/bash
# Prepare proper amount of shared memory
# For H.264 cameras it may be necessary to increase the amout of shared memory
# to 2048 megabytes.
umount /dev/shm
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm
# Start MySQL # Start MySQL
/usr/bin/mysqld_safe & /usr/bin/mysqld_safe &
@ -25,7 +31,13 @@ done
mysql -u root < db/zm_create.sql mysql -u root < db/zm_create.sql
# Add the ZoneMinder DB user # Add the ZoneMinder DB user
mysql -u root -e "grant insert,select,update,delete,lock tables,alter on zm.* to 'zm'@'localhost' identified by 'zm'" mysql -u root -e "grant insert,select,update,delete,lock tables,alter on zm.* to 'zmuser'@'localhost' identified by 'zmpass';"
# Activate CGI
a2enmod cgi
# Activate modrewrite
a2enmod rewrite
# Restart apache # Restart apache
service apache2 restart service apache2 restart

View File

@ -804,7 +804,7 @@ switch ( $tab )
elseif ( $newMonitor['Type'] == "Remote" ) elseif ( $newMonitor['Type'] == "Remote" )
{ {
?> ?>
<tr><td><?php echo translate('RemoteProtocol') ?></td><td><?php echo buildSelect( "newMonitor[Protocol]", $remoteProtocols, "updateMethods( this )" ); ?></td></tr> <tr><td><?php echo translate('RemoteProtocol') ?></td><td><?php echo buildSelect( "newMonitor[Protocol]", $remoteProtocols, "updateMethods( this );if(this.value=='RTSP'){\$('RTSPDescribe').show();}else{\$('RTSPDescribe').hide();}" ); ?></td></tr>
<?php <?php
if ( empty($newMonitor['Protocol']) || $newMonitor['Protocol'] == "http" ) if ( empty($newMonitor['Protocol']) || $newMonitor['Protocol'] == "http" )
{ {
@ -868,7 +868,7 @@ switch ( $tab )
if ( $newMonitor['Type'] == "Remote" ) if ( $newMonitor['Type'] == "Remote" )
{ {
?> ?>
<tr><td><?php echo translate('RTSPDescribe') ?>&nbsp;(<?php echo makePopupLink( '?view=optionhelp&amp;option=OPTIONS_RTSPDESCRIBE', 'zmOptionHelp', 'optionhelp', '?' ) ?>) </td><td><input type="checkbox" name="newMonitor[RTSPDescribe]" value="1"<?php if ( !empty($newMonitor['RTSPDescribe']) ) { ?> checked="checked"<?php } ?>/></td></tr> <tr id="RTSPDescribe"<?php if ( $newMonitor['Protocol'] != 'RTSP' ) { echo ' style="display:none;"' } ) ?>><td><?php echo translate('RTSPDescribe') ?>&nbsp;(<?php echo makePopupLink( '?view=optionhelp&amp;option=OPTIONS_RTSPDESCRIBE', 'zmOptionHelp', 'optionhelp', '?' ) ?>) </td><td><input type="checkbox" name="newMonitor[RTSPDescribe]" value="1"<?php if ( !empty($newMonitor['RTSPDescribe']) ) { ?> checked="checked"<?php } ?>/></td></tr>
<?php <?php
} }
?> ?>