From 563e673bee74053a39557a991b37e6079ffff423 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sat, 1 Sep 2018 11:53:56 -0500 Subject: [PATCH 1/6] rpm - rename README.xxx to README for all builds --- distros/redhat/CMakeLists.txt | 9 +++++++-- distros/redhat/zoneminder.spec | 6 ++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 683a475b1..d940942c1 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -1,4 +1,4 @@ -# CMakeLists.txt for the Redhat/CentOS Target Distro. +# CMakeLists.txt for the Redhat Target Distros. # Display a message to show the RHEL build options are being processed. if(ZM_TARGET_DISTRO MATCHES "^el") @@ -20,11 +20,16 @@ if(ZM_WEB_USER STREQUAL "nginx") configure_file(nginx/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) configure_file(nginx/zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) configure_file(nginx/zoneminder.php-fpm.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.php-fpm.conf @ONLY) - configure_file(nginx/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/readme/README.Fedora COPYONLY) + configure_file(nginx/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/readme/README COPYONLY) else(ZM_WEB_USER STREQUAL "nginx") configure_file(systemd/zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) configure_file(apache/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) configure_file(systemd/zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) + if( ZM_TARGET_DISTRO MATCHES "^fc") + configure_file(readme/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/readme/README COPYONLY) + else( ZM_TARGET_DISTRO MATCHES "^fc") + configure_file(readme/README.Redhat7 ${CMAKE_CURRENT_SOURCE_DIR}/readme/README COPYONLY) + endif( ZM_TARGET_DISTRO MATCHES "^fc") endif(ZM_WEB_USER STREQUAL "nginx") # Create several empty folders diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index a91a3a78e..d619f3662 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -22,7 +22,6 @@ %global with_apcu_bc 1 %endif -%global readme_suffix %{?rhel:Redhat%{?rhel}}%{!?rhel:Fedora} %global _hardened_build 1 Name: zoneminder @@ -203,8 +202,7 @@ fi %{_bindir}/gpasswd -a %{zmuid_final} dialout >/dev/null 2>&1 || : # Warn the end user to read the README file -echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read README.%{readme_suffix} to finish the\ninstallation or upgrade!\n" -echo -e "\nThe README file is located here: %{_docdir}/%{name}\n" +echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read %{_docdir}/README\nto finish the installation or upgrade!\n" %if 0%{?with_nginx} # Nginx does not create an SSL certificate like the apache package does so lets do that here @@ -252,7 +250,7 @@ EOF %files %license COPYING -%doc AUTHORS README.md distros/redhat/readme/README.%{readme_suffix} distros/redhat/readme/README.https +%doc AUTHORS README.md distros/redhat/README distros/redhat/readme/README.https # We want these two folders to have "normal" read permission # compared to the folder contents From 86f043633a87fa9ff188ec186450d892af365d85 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sat, 1 Sep 2018 12:04:48 -0500 Subject: [PATCH 2/6] typo --- distros/redhat/zoneminder.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index d619f3662..ba6945966 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -202,7 +202,8 @@ fi %{_bindir}/gpasswd -a %{zmuid_final} dialout >/dev/null 2>&1 || : # Warn the end user to read the README file -echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read %{_docdir}/README\nto finish the installation or upgrade!\n" +echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, you must read the README file\nto finish the installation or upgrade!\n" +echo -e "\nThe README file is located here: %{_docdir}/README\n" %if 0%{?with_nginx} # Nginx does not create an SSL certificate like the apache package does so lets do that here @@ -250,7 +251,7 @@ EOF %files %license COPYING -%doc AUTHORS README.md distros/redhat/README distros/redhat/readme/README.https +%doc AUTHORS README.md distros/redhat/readme/README distros/redhat/readme/README.https # We want these two folders to have "normal" read permission # compared to the folder contents From 36322f91295c9ec1c5171968f9ed33ad41abf481 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sat, 1 Sep 2018 12:15:08 -0500 Subject: [PATCH 3/6] rpm - use _pkgdocdir instead of _docdir --- distros/redhat/zoneminder.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index ba6945966..8ed07898d 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -202,8 +202,8 @@ fi %{_bindir}/gpasswd -a %{zmuid_final} dialout >/dev/null 2>&1 || : # Warn the end user to read the README file -echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, you must read the README file\nto finish the installation or upgrade!\n" -echo -e "\nThe README file is located here: %{_docdir}/README\n" +echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, you must read the README file\nto finish the installation or upgrade!" +echo -e "\nThe README file is located here: %{_pkgdocdir}/README\n" %if 0%{?with_nginx} # Nginx does not create an SSL certificate like the apache package does so lets do that here From e5a2581dcce33f73ba2be54e4728fea4334f0cae Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 3 Sep 2018 08:56:52 -0500 Subject: [PATCH 4/6] optionhelp - support links markdown style (#2198) --- web/skins/classic/views/optionhelp.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/skins/classic/views/optionhelp.php b/web/skins/classic/views/optionhelp.php index 705c5101f..fe466ea62 100644 --- a/web/skins/classic/views/optionhelp.php +++ b/web/skins/classic/views/optionhelp.php @@ -22,6 +22,7 @@ $optionHelpIndex = preg_replace( '/^ZM_/', '', $_REQUEST['option'] ); $optionHelpText = !empty($OLANG[$optionHelpIndex])?$OLANG[$optionHelpIndex]['Help']:$config[$_REQUEST['option']]['Help']; $optionHelpText = validHtmlStr($optionHelpText); $optionHelpText = preg_replace( "/~~/", "
", $optionHelpText ); +$optionHelpText = preg_replace( "/\[(.+)\]\((.+)\)/", "$1", $optionHelpText ); $focusWindow = true; From ce48343d1a82efe3097e267a1d81288cc5af208c Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Mon, 3 Sep 2018 13:55:11 -0500 Subject: [PATCH 5/6] embed link to privacy statment in telemetry help text --- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 6a3a66dae..319ac4489 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -2721,7 +2721,8 @@ our @options = ( This is being done for the sole purpoase of creating a better product for our target audience. This script is intended to be completely transparent to the end user, and can be disabled from - the web console under Options. + the web console under Options. For more details on what information + we collect, please refer to our [privacy](?view=privacy) statement. `, type => $types{boolean}, category => 'system', From 13558b2c125b9d3592bb1cbbff9338bfd2e455e1 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Tue, 4 Sep 2018 07:39:46 -0500 Subject: [PATCH 6/6] convert existing http urls in help text to markdown --- .../lib/ZoneMinder/ConfigData.pm.in | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 319ac4489..eac13cb75 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -409,8 +409,8 @@ our @options = ( that is used to get notifications for alarms detected by ZoneMinder in real time. zmNinja requires this server for push notifications to mobile phones. This option only enables the server if its already installed. - Please visit https://github.com/pliablepixels/zmeventserver for installation - instructions. + Please visit the [zmeventserver project site](https://github.com/pliablepixels/zmeventserver) + for installation instructions. `, type => $types{boolean}, category => 'system', @@ -442,7 +442,7 @@ our @options = ( description => 'Your recaptcha site-key', help => q`You need to generate your keys from the Google reCaptcha website. - Please refer to https://www.google.com/recaptcha/ + Please refer to the [recaptcha project site](https://www.google.com/recaptcha/) for more details. `, requires => [ @@ -457,7 +457,7 @@ our @options = ( description => 'Your recaptcha secret-key', help => q`You need to generate your keys from the Google reCaptcha website. - Please refer to https://www.google.com/recaptcha/ + Please refer to the [recaptcha project site](https://www.google.com/recaptcha/) for more details. `, requires => [ @@ -674,9 +674,9 @@ our @options = ( ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this - from http://www.charliemouse.com/code/cambozola/ however if it - is not installed still images at a lower refresh rate can still - be viewed. + from the [cambozola project site](http://www.charliemouse.com/code/cambozola/). + However, if it is not installed still images at a lower refresh rate can + still be viewed. `, type => $types{boolean}, category => 'images', @@ -690,9 +690,9 @@ our @options = ( ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this - from http://www.charliemouse.com/code/cambozola/ however if it - is not installed still images at a lower refresh rate can still - be viewed. Leave this as 'cambozola.jar' if cambozola is + from the [cambozola project site](http://www.charliemouse.com/code/cambozola/). + However if it is not installed still images at a lower refresh rate can + still be viewed. Leave this as 'cambozola.jar' if cambozola is installed in the same directory as the ZoneMinder web client files. `, @@ -3908,7 +3908,7 @@ our @options = ( SSMTP is a lightweight and efficient method to send email. The SSMTP application is not installed by default. NEW_MAIL_MODULES must also be enabled. - Please visit: http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder + Please visit the ZoneMinder [SSMTP Wiki page](http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder) for setup and configuration help. `, type => $types{boolean},