Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev > Beta #2188

Merged
merged 11 commits into from
Oct 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@

v6.18
(xx/11/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

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)

Expand Down
4 changes: 1 addition & 3 deletions dietpi/boot
Original file line number Diff line number Diff line change
Expand Up @@ -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
#----------------------------------------------------------------

}
Expand Down
4 changes: 3 additions & 1 deletion dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions dietpi/dietpi-services
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
48 changes: 42 additions & 6 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -8143,7 +8146,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"
Expand All @@ -8153,6 +8155,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

Expand Down Expand Up @@ -8340,11 +8362,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
Expand Down Expand Up @@ -11144,13 +11165,20 @@ _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
sed -i "/'ignore_media_dir_access_error'/c \$cfg[\'ignore_media_dir_access_error\'] = \'true';" /var/www/ompd/include/config.inc.php

/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
Expand Down Expand Up @@ -14367,6 +14395,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
Expand Down
16 changes: 14 additions & 2 deletions dietpi/patch_file
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1271,6 +1270,19 @@ _EOF_
sed -i '/^www-data ALL=NOPASSWD: ALL/d' /etc/sudoers
#-------------------------------------------------------------------------------

elif (( $G_DIETPI_VERSION_SUB == 17 )); then

#-------------------------------------------------------------------------------
#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

#-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions dietpi/server_version-6
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
6
17
12
18
1