From e2e7f01692e84f7537cec33558469fd69420f808 Mon Sep 17 00:00:00 2001 From: Schrolli91 Date: Fri, 8 Jan 2021 19:05:14 +0100 Subject: [PATCH 1/7] relase --- CHANGELOG.md | 9 --------- includes/globalVars.py | 6 +++--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3107002..eea44a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,6 @@ # Changelog -### __[v2.5.3]__ - unreleased -##### Added -##### Changed -##### Deprecated -##### Removed -##### Fixed -##### Security - - ### __[v2.5.2]__ - 08.01.2021 ##### Added - fhemCmd-Plugin: New plugin fhemCmd to execute commands in FHEM home automation. [#457](https://github.com/Schrolli91/BOSWatch/pull/457) diff --git a/includes/globalVars.py b/includes/globalVars.py index 14c7ea9..82f4858 100644 --- a/includes/globalVars.py +++ b/includes/globalVars.py @@ -9,9 +9,9 @@ """ # version info -versionNr = "2.5.3" -branch = "dev" -buildDate = "unreleased" +versionNr = "2.5.2" +branch = "master" +buildDate = "08.01.2021" # Global variables config = 0 From 52151c76b79f5db8f0c7ef083c62b5bfa96cc385 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 2 Feb 2021 17:45:07 +0100 Subject: [PATCH 2/7] Create FUNDING.yml --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..517004f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [Schrolli91] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 5ebbaba6f15b1e0fc0e01b26cfeaf22ebaf82252 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Tue, 2 Feb 2021 17:45:53 +0100 Subject: [PATCH 3/7] Delete Konzept.md --- Konzept.md | 121 ----------------------------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 Konzept.md diff --git a/Konzept.md b/Konzept.md deleted file mode 100644 index 7903dcc..0000000 --- a/Konzept.md +++ /dev/null @@ -1,121 +0,0 @@ -# BOSWatch 3.0 -============ - - -Python 3 -Verpacken der Funktionalitäten in Klassen um OOP-Grundsätze zu erreichen. - - - -## Dekodierung und Auswertung trennen. - -### Client: - - reine Dekodierung mittels rtl-fm und multimon - - Keine Filter usw. nur die Dekoder, Daten verpacken, verschicken - - per TCP Socket an den Server - - versch Eingabequellen (DVB-T Stick, Audio Eingang) - - ### Server: - - Empfängt die TCP Socket Pakete der einzelnen Clients - - Durch doubleFiltering fallen doppelt eingehende Alarme der Clienten sowieso raus - - Danach Filterung nach neuen Filterkonzept - - dann call an die plugins - - - -## Konfiguration: -- Alle Einstellungen in INI File -- Einziges Argument beim Start des Clienten ist der Name der INI (-v -q -t sollen auch bleiben) -- So werden mehrere Sticks auf einem Rechner einfach möglich ohne BOSWatch Ordner kopieren zu müssen - -### Client: - -``` -[Server] -IP = 127.0.0.1 -PORT = 23 - -[Client] -Name = BOSWatch Client 1 -LogDir = log/ - -[Stick] -device = 0 -Frequency = 85...M -PPMError = 0 -Squelch = 0 -gain = 100 - -[Decoder] -FMS = 0 -ZVEI = 0 -POC512 = 0 -POC1200 = 1 -POC2400 = 0 -``` - -### Server: -``` -[Server] -PORT = 23 - -[Filter] -... - -[Plugins] -MySQL = 1 -template = 0 -... -``` - -### Plugin: -- Konfigurations Datei für Plugin mit in den Plugin Ordner -- Plugin läd bei Bedarf seine Config selbst, die geht BOSWatch ja nichts an -- Aktuell wird eine ewig lange Config geladen, obwohl 90% der Plugins nicht genutzt werden - - - -## Filterung -Ein Vernünftiges Filterkonzept sollte aufgestellt werden, welches bei POC, FMS und ZVEI gleichermaßen funktioniert -und daher nicht 3 mal implementiert erden muss. - - - -## Versions Überprüfung - -über die LIB sched.py - https://docs.python.org/3/library/sched.html - können Zeitgesteuerte Events gestartet werden. -Dies kann zur Überprüfung einer neuen Software version verwendet werden. -information des Nutzers muss noch überlegt werden - evtl als "Alarm" absetzen über normalen Plugin weg. - - - -## Code Dokumentation -Dokumentiert werden sollten alle Funktion und Klassen in Doxygen gerechter Notation. -Genaue Erklärung und Bennenung der Tags in der Doxygen Hilfe -``` -class Hello: - ## @brief Short description. - # Longer description. - # - # @param self - # @param name Another Parameter - # @return value Returns a Value - - def __init__(self, name): - ## @brief Constructor - # Longer description optinal. - # - # @param self - # @param name Another Parameter - dosomething(12) - - def dosomething(self, x): - ## @brief Do something - # Longer description for do something. - # - # @param self - # @param x Another Parameter - # @return value Returns a 0 - dosomethingelse - return 0 -``` From 5a8131a59327efd79861fb0381daa253efab47e5 Mon Sep 17 00:00:00 2001 From: jaytee34 Date: Tue, 24 May 2022 23:27:27 +0200 Subject: [PATCH 4/7] install.sh adopted for debian/bullseye --- install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0335aee..f28bfe6 100755 --- a/install.sh +++ b/install.sh @@ -108,9 +108,17 @@ tput cup 13 15 echo "[ 2/9] [##-------]" tput cup 15 5 echo "-> download GIT and other stuff.........." -apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake qt4-default libpulse-dev libx11-dev sox python-pip >> $boswatch_install_path/setup_log.txt 2>&1 +apt-get -y install git python cmake build-essential libusb-1.0 qt5-qmake qtbase5-dev libpulse-dev libx11-dev sox >> \ +$boswatch_install_path/setup_log.txt 2>&1 exitcodefunction $? download stuff +# download and install pip2 +curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? curl pip2 +python2 get-pip.py >> $boswatch_install_path/setup_log.txt 2>&1 exitcodefunction $? python2 get-pip +rm get-pip.py + + # download BOSWatch via git tput cup 13 15 echo "[ 3/9] [###------]" From 53a1a15572f569371aaa940d5854588a042a97d1 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 25 May 2022 05:44:00 +0000 Subject: [PATCH 5/7] add installer for bullseye --- install.sh | 10 +- install_bullseye.sh | 238 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 239 insertions(+), 9 deletions(-) create mode 100755 install_bullseye.sh diff --git a/install.sh b/install.sh index f28bfe6..0335aee 100755 --- a/install.sh +++ b/install.sh @@ -108,17 +108,9 @@ tput cup 13 15 echo "[ 2/9] [##-------]" tput cup 15 5 echo "-> download GIT and other stuff.........." -apt-get -y install git python cmake build-essential libusb-1.0 qt5-qmake qtbase5-dev libpulse-dev libx11-dev sox >> \ -$boswatch_install_path/setup_log.txt 2>&1 +apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake qt4-default libpulse-dev libx11-dev sox python-pip >> $boswatch_install_path/setup_log.txt 2>&1 exitcodefunction $? download stuff -# download and install pip2 -curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py >> $boswatch_install_path/setup_log.txt 2>&1 -exitcodefunction $? curl pip2 -python2 get-pip.py >> $boswatch_install_path/setup_log.txt 2>&1 exitcodefunction $? python2 get-pip -rm get-pip.py - - # download BOSWatch via git tput cup 13 15 echo "[ 3/9] [###------]" diff --git a/install_bullseye.sh b/install_bullseye.sh new file mode 100755 index 0000000..f28bfe6 --- /dev/null +++ b/install_bullseye.sh @@ -0,0 +1,238 @@ +#!/bin/bash + +function exitcodefunction { + errorcode=$1 + action=$2 + module=$3 + + if [ $errorcode -ne "0" ]; then + echo "Action: $action on $module failed." >> $boswatch_install_path/setup_log.txt + echo "Exitcode: $errorcode" >> $boswatch_install_path/setup_log.txt + echo "" + echo "Action: $action on $module failed." + echo "Exitcode: $errorcode" + echo "" + echo " -> If you want to open an issue at https://github.com/Schrolli91/BOSWatch/issues" + echo " please post the logfile, located at $boswatch_install_path/setup_log.txt" + exit 1 + else + echo "Action: $action on $module ok." >> $boswatch_install_path/setup_log.txt + fi + } + + +tput clear +tput civis +echo " ____ ____ ______ __ __ __ " +echo " / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ " +echo " / __ / / / /\__ \| | /| / / __ / __/ ___/ __ \ " +echo " / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / " +echo " /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ " +echo " German BOS Information Script " +echo " by Bastian Schroll " +echo "" + +# Make sure only root can run our script +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root!" 1>&2 + exit 1 +fi + +echo "This may take several minutes... Don't panic!" +echo "" +echo "Caution, script does not install a webserver with PHP and MySQL" +echo "So you have to make up manually if you want to use MySQL support" + +boswatchpath=/opt/boswatch +boswatch_install_path=/opt/boswatch_install +reboot=false +didBackup=false + +# Checking for Backup +# check for old version (for the old ones...) +if [ -f $boswatchpath/BOSWatch/boswatch.py ]; then + echo "Old installation found!" + echo "A backup will be copied to $boswatchpath/old" + + mkdir /tmp/boswatch + mv $boswatchpath/BOSWatch/* /tmp/boswatch/ + didBackup=true +fi + +#and the future... +if [ -f $boswatchpath/boswatch.py ]; then + echo "Old installation found!" + echo "A backup will be copied to $boswatchpath/old" + + mkdir /tmp/boswatch + mv $boswatchpath/* /tmp/boswatch/ + didBackup=true +fi + +# Check for Flags in command line +for (( i=1; i<=$#; i=$i+2 )); do + t=$((i + 1)) + eval arg=\$$i + eval arg2=\$$t + + case $arg in + -r|--reboot) reboot=true ;; + + -b|--branch) + case $arg2 in + dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;; + *) branch=master ;; + esac ;; + + -p|--path) echo " !!! WARNING: you'll install BOSWATCH to alternative path !!! "; boswatchpath=$arg2 ;; + + *) echo "Internal error!" ; exit 1 ;; + esac +done + +# Create default paths +mkdir -p $boswatchpath +mkdir -p $boswatch_install_path + +echo "" + +# Update of computer +tput cup 13 15 +echo "[ 1/9] [#--------]" +tput cup 15 5 +echo "-> make an apt-get update................" +apt-get update -y > $boswatch_install_path/setup_log.txt 2>&1 + +# download software +tput cup 13 15 +echo "[ 2/9] [##-------]" +tput cup 15 5 +echo "-> download GIT and other stuff.........." +apt-get -y install git python cmake build-essential libusb-1.0 qt5-qmake qtbase5-dev libpulse-dev libx11-dev sox >> \ +$boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? download stuff + +# download and install pip2 +curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? curl pip2 +python2 get-pip.py >> $boswatch_install_path/setup_log.txt 2>&1 exitcodefunction $? python2 get-pip +rm get-pip.py + + +# download BOSWatch via git +tput cup 13 15 +echo "[ 3/9] [###------]" +tput cup 15 5 +echo "-> download BOSWatch..................." +cd $boswatchpath/ + +case $branch in + "dev") git clone -b develop https://github.com/Schrolli91/BOSWatch . >> $boswatch_install_path/setup_log.txt 2>&1 && \ + exitcodefunction $? git-clone BOSWatch-develop ;; + *) git clone -b master https://github.com/Schrolli91/BOSWatch . >> $boswatch_install_path/setup_log.txt 2>&1 && \ + exitcodefunction $? git-clone BOSWatch ;; +esac + +# Download RTL-SDR +tput cup 13 15 +echo "[ 4/9] [####-----]" +tput cup 15 5 +echo "-> download rtl_fm......................" +cd $boswatch_install_path +git clone https://github.com/Schrolli91/rtl-sdr.git >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? git-clone rtl-sdr +cd rtl-sdr/ + +# Compie RTL-FM +tput cup 13 15 +echo "[ 5/9] [#####----]" +tput cup 15 5 +echo "-> compile rtl_fm......................" +mkdir -p build && cd build +cmake ../ -DINSTALL_UDEV_RULES=ON >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? cmake rtl-sdr + +make >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? make rtl-sdr + +make install >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? make-install rtl-sdr + +ldconfig >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? ldconfig rtl-sdr + + +# Download Multimon-NG +tput cup 13 15 +echo "[ 6/9] [######---]" +tput cup 15 5 +echo "-> download multimon-ng................" +cd $boswatch_install_path +git clone https://github.com/Schrolli91/multimon-ng.git multimonNG >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? git-clone multimonNG + +cd $boswatch_install_path/multimonNG/ + +# Compile Multimon-NG +tput cup 13 15 +echo "[ 7/9] [#######--]" +tput cup 15 5 +echo "-> compile multimon-ng................." +mkdir -p build +cd build +qmake ../multimon-ng.pro >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? qmake multimonNG + +make >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? make multimonNG + +make install >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? qmakeinstall multimonNG + +# Download & Install MySQL-Connector for Python via pip +tput cup 13 15 +echo "[ 8/9] [########-]" +tput cup 15 5 +echo "-> Download & Install MySQL connector for Python." +cd $boswatch_install_path +pip install mysql-connector-python >> $boswatch_install_path/setup_log.txt 2>&1 +exitcodefunction $? install mysql-connector + +# Blacklist DVB-Drivers +tput cup 13 15 +echo "[9/9] [#########]" +tput cup 15 5 +echo "-> configure..........................." +cd $boswatchpath/ +echo $'# BOSWatch - blacklist the DVB drivers to avoid conflicts with the SDR driver\n blacklist dvb_usb_rtl28xxu \n blacklist rtl2830\n blacklist dvb_usb_v2\n blacklist dvb_core' >> /etc/modprobe.d/boswatch_blacklist_sdr.conf + +# Installation is ready +tput cup 17 1 +echo "BOSWatch is now installed in $boswatchpath/" +echo "Installation ready!" +tput cup 19 3 +echo "Watch out: to run BOSWatch you have to modify the config.ini!" +echo "Do the following step to do so:" +echo "sudo nano $boswatchpath/config/config.ini" +echo "and modify the config as you need. This step is optional if you are upgrading an old version of BOSWatch. " + +tput cnorm + +# cleanup +mkdir $boswatchpath/log/install -p +mv $boswatch_install_path/setup_log.txt $boswatchpath/log/install/ +rm $boswatch_install_path/ -R + +#copy the template config to run boswatch +cp $boswatchpath/config/config.template.ini $boswatchpath/config/config.ini + + +#replay the backup +if [ $didBackup = "true" ]; then + mkdir $boswatchpath/old/ + mv /tmp/boswatch/* $boswatchpath/old/ +fi + +if [ $reboot = "true" ]; then + /sbin/reboot +fi From 6304af8980cfd1ad2927f2c57016259e3ba7f1ca Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 25 May 2022 05:53:43 +0000 Subject: [PATCH 6/7] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbafb05..ed8ad0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Functionality to fill coordinate values in POC data structure (lat, lon) based on configured locations that match a regular expression in POC message [#510](https://github.com/Schrolli91/BOSWatch/pull/510) - Extending POC data-structure by Regex named groups matching. [#508](https://github.com/Schrolli91/BOSWatch/pull/508) - MQTT Plugin: Added possibility to configure login (user and password) for mqtt broker. [#539](https://github.com/Schrolli91/BOSWatch/pull/539) +- Installer Script for Debian 11 Bullseye [#546](https://github.com/Schrolli91/BOSWatch/pull/546/) ##### Changed ##### Deprecated ##### Removed From 66b5ddf4675c2f12322e3a3237f5e48dc77c6a50 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 25 May 2022 05:57:38 +0000 Subject: [PATCH 7/7] fix version string --- includes/globalVars.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/globalVars.py b/includes/globalVars.py index 82f4858..14c7ea9 100644 --- a/includes/globalVars.py +++ b/includes/globalVars.py @@ -9,9 +9,9 @@ """ # version info -versionNr = "2.5.2" -branch = "master" -buildDate = "08.01.2021" +versionNr = "2.5.3" +branch = "dev" +buildDate = "unreleased" # Global variables config = 0