From 1b43a66ccd0dca9b3d85174f5743b3b73daf3ba6 Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Thu, 25 Oct 2018 17:24:43 +0100 Subject: [PATCH 1/9] v6.18 + VC's --- CHANGELOG.txt | 13 +++++++++++++ dietpi/server_version-6 | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 226e814520..b71e75490e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,17 @@ +v6.18 +(xx/11/18) + +Changes / Improvements / Optimisations: + +Bug Fixes: + +As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/Fourdee/DietPi/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+base%3Amaster + +Known/Outstanding Core Issues: + +----------------------------------------------------------------------------------------------------------- + v6.17 (25/10/18) diff --git a/dietpi/server_version-6 b/dietpi/server_version-6 index 6c5dec4375..60834337db 100644 --- a/dietpi/server_version-6 +++ b/dietpi/server_version-6 @@ -1,3 +1,3 @@ 6 -17 -12 +18 +0 From 3d03bee7678df351dfe92eb68d5feaf5a6589b36 Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Thu, 25 Oct 2018 17:25:28 +0100 Subject: [PATCH 2/9] v6.18 + patch template. --- dietpi/patch_file | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dietpi/patch_file b/dietpi/patch_file index 50913800be..22cc35797f 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -1271,6 +1271,12 @@ _EOF_ sed -i '/^www-data ALL=NOPASSWD: ALL/d' /etc/sudoers #------------------------------------------------------------------------------- + elif (( $G_DIETPI_VERSION_SUB == 17 )); then + + #------------------------------------------------------------------------------- + echo 0 + #------------------------------------------------------------------------------- + fi #------------------------------------------------------------------------------- From 836875bf954fc6475be87e96966bea0cd06a79c5 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Thu, 25 Oct 2018 23:45:43 +0200 Subject: [PATCH 3/9] v6.17 DietPi-Config | Allow commented/non-existent config.txt i2c_arm_baudrate entry, using default value instead --- dietpi/dietpi-config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index f05d89c8e8..2e9163fc00 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -1336,7 +1336,9 @@ fi - local rpi_i2cbaudrate_hz="$(( $(grep -m1 '^[[:blank:]]*i2c_arm_baudrate=' /DietPi/config.txt | sed 's/^[^=]*=//') / 1000 )) kHz" + local rpi_i2cbaudrate_hz="$(grep -m1 '^[[:blank:]]*i2c_arm_baudrate=' /DietPi/config.txt | sed 's/^[^=]*=//')" + # Allow commented/non-existent entry, using default value: https://github.com/raspberrypi/firmware/blob/d69aadedb7c146ba5d3b0b45a661e5669a9141c4/boot/overlays/README#L115-L116 + rpi_i2cbaudrate_hz="$(( ${rpi_i2cbaudrate_hz:-100000} / 1000 )) kHz" local usb_max_current_enabled=$(grep -ci -m1 'max_usb_current=1' /DietPi/config.txt) local rpi_usbmaxcurrent_text='[Off]' if (( $usb_max_current_enabled )); then From d9ac484d324842fe4c924edc2a1c297edbc14371 Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Fri, 26 Oct 2018 16:27:40 +0100 Subject: [PATCH 4/9] v6.18 - DietPi-Automation | CONFIG_NTP_MODE is now applied after APT cache, and, initial time sync is updated. Due to packages required for some modes: https://github.com/Fourdee/DietPi/issues/2181#issuecomment-433444882 --- CHANGELOG.txt | 1 + dietpi/boot | 4 +--- dietpi/dietpi-software | 8 ++++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b71e75490e..a2421cc2c5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ v6.18 Changes / Improvements / Optimisations: Bug Fixes: + - DietPi-Automation | CONFIG_NTP_MODE is now applied after APT cache, and, initial time sync is updated. Due to packages required for some modes: https://github.com/Fourdee/DietPi/issues/2181#issuecomment-433444882 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/Fourdee/DietPi/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+base%3Amaster diff --git a/dietpi/boot b/dietpi/boot index 8b70289499..2476794332 100644 --- a/dietpi/boot +++ b/dietpi/boot @@ -26,9 +26,7 @@ Apply_DietPi_FirstRun_Settings(){ #---------------------------------------------------------------- - # Automation - # - Set NTPD mode - /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + echo 0 > /dev/null #---------------------------------------------------------------- } diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7b6e59c766..88b20d9536 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -14367,6 +14367,14 @@ _EOF_ # - Upgrade APT packages G_AGUG + # - Automation Set NTPD mode + # Due to possible packages required, must be done here after APT cache updated + if (( $G_DIETPI_INSTALL_STAGE == 0 )); then + + /DietPi/dietpi/func/dietpi-set_software ntpd-mode $(grep -m1 '^[[:blank:]]*CONFIG_NTP_MODE=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') + + fi + # Generate dir for dietpi-software installed "non-service" based control scripts mkdir -p /var/lib/dietpi/dietpi-software/services chmod -R +x /var/lib/dietpi/dietpi-software/services From 2136ec18e3b1c094fb956b80f2bdba112b528de0 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Oct 2018 20:25:12 +0200 Subject: [PATCH 5/9] v6.17 + DietPi-Software | Nextcloud: Warn user in case of existing database but non-existent finished install --- dietpi/dietpi-software | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7b6e59c766..e8061a415a 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8143,7 +8143,6 @@ _EOF_ # Adjusting config file: local config_php='/var/www/nextcloud/config/config.php' - cp '/var/www/nextcloud/config/config.sample.php' $config_php local datadir="$(grep -m1 '^[[:blank:]]*SOFTWARE_NEXTCLOUD_DATADIR=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')" [[ $datadir ]] || datadir="$G_FP_DIETPI_USERDATA/nextcloud_data" @@ -8153,6 +8152,26 @@ _EOF_ if [[ -d $G_FP_DIETPI_USERDATA/mysql/nextcloud ]]; then G_DIETPI-NOTIFY 2 'Nextcloud database found, will NOT overwrite.' + if [[ ! -f $config_php ]]; then + + G_WHIP_MSG '[WARNING] Existing Nextcloud database was found, but no related install directory\n +A remaining MariaDB "nextcloud" database from an earlier installed instance was found. But the related install directory "/var/www/nextcloud/config/config.php" does not exist. +Since running a fresh install with an existing database can produce data corruption, if the versions do not exactly match, you either need to remove the database or find and place the related install directory.\n +We cannot predict your aim and do not want to mess or break your data, so please do this manually.\n +To remove the existing database (including e.g. contacts, calendar, file tags etc.): + # mysqladmin drop nextcloud +Otherwise to copy an existing instance in place: + # rm -R /var/www/nextcloud + # cp -a /path/to/existing/nextcloud/. /var/www/nextcloud + # chown -R www-data:www-data /var/www/nextcloud\n +The install script will now exit. After applying one of the the above, rerun dietpi-software, e.g.: + # dietpi-software install 114' + + [[ -f /var/www/nextcloud/occ ]] && rm /var/www/nextcloud/occ + /DietPi/dietpi/dietpi-services start + exit 1 + + fi else From 5a32a514f2441706fc595ec212da464cdcf9846d Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Oct 2018 20:31:29 +0200 Subject: [PATCH 6/9] v6.17 + DietPi-Services | ownCloud/Nextcloud: Allow occ/ncc commands to fail without prompt or exit, info only similar to other service failures --- dietpi/dietpi-services | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 9c073e79ed..25b0f0899a 100644 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -397,8 +397,8 @@ # Control ownCloud and Nextcloud maintenance mode: if [[ $target_state == 'stop' || $target_state == 'restart' ]]; then - grep -q "'maintenance' => false," /var/www/owncloud/config/config.php &> /dev/null && G_RUN_CMD occ maintenance:mode --on - grep -q "'maintenance' => false," /var/www/nextcloud/config/config.php &> /dev/null && G_RUN_CMD ncc maintenance:mode --on + grep -q "'maintenance' => false," /var/www/owncloud/config/config.php &> /dev/null && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD occ maintenance:mode --on + grep -q "'maintenance' => false," /var/www/nextcloud/config/config.php &> /dev/null && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD ncc maintenance:mode --on fi @@ -445,8 +445,8 @@ # Control ownCloud and Nextcloud maintenance mode: if [[ $target_state == 'restart' || $target_state == 'start' ]]; then - grep -q "'maintenance' => true," /var/www/owncloud/config/config.php &> /dev/null && G_RUN_CMD occ maintenance:mode --off - grep -q "'maintenance' => true," /var/www/nextcloud/config/config.php &> /dev/null && G_RUN_CMD ncc maintenance:mode --off + grep -q "'maintenance' => true," /var/www/owncloud/config/config.php &> /dev/null && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD occ maintenance:mode --off + grep -q "'maintenance' => true," /var/www/nextcloud/config/config.php &> /dev/null && G_USER_INPUTS=0 G_ERROR_HANDLER_INFO_ONLY=1 G_RUN_CMD ncc maintenance:mode --off fi From 4449150a4737b4608c7b9cfd4c1607a383a61be8 Mon Sep 17 00:00:00 2001 From: MichaIng <28480705+MichaIng@users.noreply.github.com> Date: Fri, 26 Oct 2018 21:22:38 +0200 Subject: [PATCH 7/9] META | DietPi-Survey_report: Add v6.18 software array --- .meta/dietpi-survey_report | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 26b5732daa..8549d15a6b 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -405,21 +405,16 @@ done aSOFTWARE_NAME6_12[148]='myMPD' - # - v6.16 + # - v6.16 + v6.17 + v6.18 aSOFTWARE_NAME6_16=() + aSOFTWARE_NAME6_17=() + aSOFTWARE_NAME6_18=() for i in ${!aSOFTWARE_NAME6_15[@]} do aSOFTWARE_NAME6_16[$i]="${aSOFTWARE_NAME6_15[$i]}" - - done - - # - v6.17 - aSOFTWARE_NAME6_17=() - for i in ${!aSOFTWARE_NAME6_16[@]} - do - aSOFTWARE_NAME6_17[$i]="${aSOFTWARE_NAME6_16[$i]}" + aSOFTWARE_NAME6_18[$i]="${aSOFTWARE_NAME6_17[$i]}" done From 935b026b3232e4e0ee74c94203cd2dadec3bb382 Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Fri, 26 Oct 2018 21:52:36 +0100 Subject: [PATCH 8/9] v6.18 - DietPi-Software | OMPD/MyMPD: Resolved inability to update database. Currently we have rolled back the versions of these programs to a working state. We will investigate with the devs to find out the cause for future release: https://github.com/Fourdee/DietPi/issues/2156 --- CHANGELOG.txt | 1 + dietpi/dietpi-software | 19 ++++++++++++++----- dietpi/patch_file | 12 +++++++++--- dietpi/server_version-6 | 2 +- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a2421cc2c5..37f79ba00a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,7 @@ Changes / Improvements / Optimisations: Bug Fixes: - DietPi-Automation | CONFIG_NTP_MODE is now applied after APT cache, and, initial time sync is updated. Due to packages required for some modes: https://github.com/Fourdee/DietPi/issues/2181#issuecomment-433444882 + - DietPi-Software | OMPD/MyMPD: Resolved inability to update database. Currently we have rolled back the versions of these programs to a working state. We will investigate with the devs to find out the cause for future release: https://github.com/Fourdee/DietPi/issues/2156 As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/Fourdee/DietPi/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+base%3Amaster diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 88b20d9536..46108b6438 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4020,7 +4020,9 @@ _EOF_ #Sourcebuild pre-reqs DEPS_LIST='cppcheck pkg-config libssl-dev libmpdclient-dev libmpdclient2 cmake' - Download_Install 'https://github.com/jcorporation/myMPD/archive/master.zip' + #Download_Install 'https://github.com/jcorporation/myMPD/archive/master.zip' + Download_Install 'https://github.com/jcorporation/myMPD/archive/006eb6d28ce3a124abcbf531f0b3cd3e680837df.zip' + cd myMPD* G_RUN_CMD ./mkrelease.sh cd /tmp/$G_PROGRAM_NAME @@ -4380,7 +4382,8 @@ _EOF_ Banner_Installing - Download_Install 'https://github.com/ArturSierzant/OMPD/archive/master.zip' /var/www + # Download_Install 'https://github.com/ArturSierzant/OMPD/archive/master.zip' /var/www + Download_Install 'https://github.com/ArturSierzant/OMPD/archive/2a2909be2d7abc8cce7dff741f529c7d876d4094.zip' /var/www rm -R /var/www/ompd &> /dev/null #Replace/upgrade existing installs mv /var/www/OMPD* /var/www/ompd @@ -8340,11 +8343,10 @@ Description=Music Player Daemon After=network.target sound.target [Service] -User=root #Also forks its own process under user set in /etc/mpd.conf (mpd) -Group=dietpi +#User=root #forks its own process under user set in /etc/mpd.conf (mpd) Type=simple LimitRTPRIO=infinity -#RuntimeDirectory=/var/run/mpd +RuntimeDirectory=/var/run/mpd EnvironmentFile=/etc/default/mpd ExecStartPre=$(which mkdir) -p /var/run/mpd ExecStartPre=$(which chown) -R root:dietpi /var/run/mpd @@ -11144,6 +11146,9 @@ _EOF_ Banner_Configuration + # - Always install fresh import of SQL for current version + mysqladmin drop ompd -f &> /dev/null + sed -i "/'mysqli_user'/c \$cfg[\'mysqli_user\'] = \'ompd\';" /var/www/ompd/include/config.inc.php sed -i "/'mysqli_password'/c \$cfg[\'mysqli_password\'] = \'$GLOBAL_PW\';" /var/www/ompd/include/config.inc.php sed -i "/'media_dir'/c \$cfg[\'media_dir\'] = \'$G_FP_DIETPI_USERDATA/$FOLDER_MUSIC/\';" /var/www/ompd/include/config.inc.php @@ -11151,6 +11156,10 @@ _EOF_ /DietPi/dietpi/func/create_mysql_db ompd ompd "$GLOBAL_PW" + G_RUN_CMD systemctl start mysql + mysql ompd < /var/www/ompd/sql/ompd*.sql + systemctl stop mysql + fi #IceCast + DarkIce diff --git a/dietpi/patch_file b/dietpi/patch_file index 22cc35797f..3c8a35c04c 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -1173,12 +1173,11 @@ We strongly recommend you select "0 : Re-enable IPv6 on kernel level". By doing #------------------------------------------------------------------------------- #Reinstalls: # MPD - # myMPD: https://twitter.com/ta11/status/1045978421967421440 # Allo GUI: New DietPi version codes # Chromium: Update kiosk mode autostart script: https://github.com/Fourdee/DietPi/issues/2158 if (( $G_DIETPI_INSTALL_STAGE == 1 )); then - /DietPi/dietpi/dietpi-software reinstall 113 128 148 160 + /DietPi/dietpi/dietpi-software reinstall 113 128 160 #Run Transmission and Plex Media Server as "dietpi" group: https://github.com/Fourdee/DietPi/issues/2067#issuecomment-427579779 if grep -q '^aSOFTWARE_INSTALL_STATE\[44\]=2' /DietPi/dietpi/.installed; then @@ -1274,7 +1273,14 @@ _EOF_ elif (( $G_DIETPI_VERSION_SUB == 17 )); then #------------------------------------------------------------------------------- - echo 0 + #Reinstalls: + # OMPD: https://github.com/Fourdee/DietPi/issues/2156#issue-372201367 + # MyMPD: https://github.com/Fourdee/DietPi/issues/2156#issue-372201367 + if (( $G_DIETPI_INSTALL_STAGE == 1 )); then + + /DietPi/dietpi/dietpi-software reinstall 129 148 + + fi #------------------------------------------------------------------------------- fi diff --git a/dietpi/server_version-6 b/dietpi/server_version-6 index 60834337db..6626d8bbac 100644 --- a/dietpi/server_version-6 +++ b/dietpi/server_version-6 @@ -1,3 +1,3 @@ 6 18 -0 +1 From df90b39f0c1c7a3a354f99d5923097126a501ccc Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Sat, 27 Oct 2018 13:59:58 +0100 Subject: [PATCH 9/9] v6.18 - DietPi-Software | Nextcloud: Resolved an issue with failed installation: https://github.com/Fourdee/DietPi/issues/2184 --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 37f79ba00a..ea83c17059 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ v6.18 Changes / Improvements / Optimisations: Bug Fixes: + - DietPi-Software | Nextcloud: Resolved an issue with failed installation: https://github.com/Fourdee/DietPi/issues/2184 - DietPi-Automation | CONFIG_NTP_MODE is now applied after APT cache, and, initial time sync is updated. Due to packages required for some modes: https://github.com/Fourdee/DietPi/issues/2181#issuecomment-433444882 - DietPi-Software | OMPD/MyMPD: Resolved inability to update database. Currently we have rolled back the versions of these programs to a working state. We will investigate with the devs to find out the cause for future release: https://github.com/Fourdee/DietPi/issues/2156