Skip to content

Commit 07321bc

Browse files
committed
dietpi-software: implement ownCloud Infinite Scale
1 parent 7c0a149 commit 07321bc

File tree

13 files changed

+168
-399
lines changed

13 files changed

+168
-399
lines changed

.conf/dps_47/apache.owncloud.conf

Lines changed: 0 additions & 11 deletions
This file was deleted.

.conf/dps_47/lighttpd.owncloud.conf

Lines changed: 0 additions & 28 deletions
This file was deleted.

.conf/dps_47/nginx.owncloud.conf

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/dietpi-software.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Process_Software()
143143
44) aSERVICES[i]='transmission-daemon' aTCP[i]='9091 51413' aUDP[i]='51413';;
144144
45) aSERVICES[i]='deluged deluge-web' aTCP[i]='8112 58846 6882';;
145145
46) aSERVICES[i]='qbittorrent' aTCP[i]='1340 6881';;
146-
47) aCOMMANDS[i]='sudo -u www-data php /var/www/owncloud/occ status';;
146+
47) aSERVICES[i]='ocis' aTCP[i]='9200';;
147147
#48) Pydio
148148
49) aSERVICES[i]='gogs' aTCP[i]='3000';;
149149
50) aSERVICES[i]='syncthing' aTCP[i]='8384';;

.github/workflows/update_urls.bash

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ aARCH[$software_id]='armhf arm64 amd64'
6464
aARCH_CHECK[$software_id]='riscv64'
6565
aREGEX[$software_id]='https://github.com/MediaBrowser/Emby.Releases/releases/download/.*/emby-server-deb_.*_\$arch.deb'
6666

67+
# ownCloud Infinite Scale
68+
software_id=47
69+
aCHECK[$software_id]='curl -sSfL '\''https://api.github.com/repos/owncloud/ocis/releases/latest'\'' | mawk -F\" "/^ *\"browser_download_url\": \".*\/ocis-[^\"\/]*-linux-$arch\"$/{print \$4}"'
70+
aARCH[$software_id]='arm arm64 amd64'
71+
aARCH_CHECK[$software_id]='riscv64'
72+
aREGEX[$software_id]='https://github.com/owncloud/ocis/releases/download/.*/ocis-.*-linux-\$arch'
73+
6774
# Gogs
6875
software_id=49
6976
aCHECK[$software_id]='curl -sSf '\''https://api.github.com/repos/gogs/gogs/releases/latest'\'' | mawk -F\" "/^ *\"browser_download_url\": \".*\/gogs_[^\"\/]*_linux_$arch.tar.gz\"$/{print \$4}"'

.meta/dietpi-bookworm-upgrade

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ alist=()
2121
while read -r id
2222
do
2323
case $id in
24-
47) alist+=('ownCloud');;
24+
47)
25+
G_WHIP_BUTTON_OK_TEXT='Continue' G_WHIP_BUTTON_CANCEL_TEXT='Exit' G_WHIP_YESNO '[ INFO ] ownCloud 10 installation detected
26+
\nownCloud 10 does not support PHP 8.x and hence cannot run on Debian Bookworm or above with its native PHP version.
27+
\nAs a replacement, we implemented ownCloud Infinite Scale with DietPi 10.0, ownCloud'\''s successor written in Go. A direct data migration however is not possible. The easiest way to port data is probably to upload them back into a new instance from clients.
28+
\nAn alternative is to migrate to Nextcloud, which preserves most settings and metadata, and offers most of the apps also found in ownCloud'\''s apps market. This can however be done easily only on Debian Bullseye only. Read all details here:
29+
\n - https://github.com/MichaIng/DietPi/pull/7886
30+
\nDo you want to continue with the Debian Bookworm upgrade regardless? This will imply an uninstall of ownCloud, but keeping data, configs, and the install dir as backup.
31+
Select <Exit> if you want to migrate to Nextcloud, follow the instructions linked above and recall this script afterwards.' || exit 0
32+
;;
2533
48) alist+=('Pydio');;
2634
59) alist+=('RPi Cam Web Interface');;
2735
167) (( $G_HW_ARCH == 1 )) && alist+=('Raspotify');;
@@ -49,6 +57,8 @@ G_CHECK_KERNEL || { G_WHIP_YESNO '[ INFO ] Reboot required
4957
G_DIETPI-NOTIFY 2 'Updating DietPi to latest version'
5058
/boot/dietpi/dietpi-update 1
5159

60+
grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[47\]=2' /boot/dietpi/.installed && ! /boot/dietpi/dietpi-software uninstall 47 && exit 1
61+
5262
mapfile -t apackages < <(apt-mark showhold)
5363
[[ ${apackages[0]} ]] && G_EXEC_DESC='Unholding all packages' G_EXEC apt-mark unhold "${apackages[@]}"
5464
unset -v apackages

.update/patches

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,6 +2161,43 @@ Patch_9_20()
21612161
G_DIETPI-NOTIFY 2 'Scheduling Allo GUI update to latest version'
21622162
G_EXEC eval 'echo 160 >> /var/tmp/dietpi/dietpi-update_reinstalls'
21632163
fi
2164+
fi
2165+
2166+
# RPi firmware migration: Do after all other patches
2167+
if (( $G_HW_MODEL < 10 )) && ! dpkg-query -s 'raspi-firmware' &> /dev/null
2168+
then
2169+
G_WHIP_MSG '[ INFO ] Raspberry Pi kernel/firmware migration will be applied
2170+
\nA migration to the new RPi Linux 6.12+ kernel and firmware stack will be applied. Please report any error at our forum or GitHub. The DietPi update will finish in any case, and you can retry the migration with:
2171+
$ /boot/dietpi/func/dietpi-set_software rpi_firmware_migration'
2172+
G_EXEC_OUTPUT=1 G_EXEC /boot/dietpi/func/dietpi-set_software rpi_firmware_migration
2173+
fi
2174+
}
2175+
2176+
Patch_10_0()
2177+
{
2178+
# dietpi.txt migration
2179+
if grep -q '^[[:blank:]]*SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=' /boot/dietpi.txt
2180+
then
2181+
G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*SOFTWARE_NEXTCLOUD_USERNAME=/d' /boot/dietpi.txt
2182+
G_EXEC sed --follow-symlinks -i 's/SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=/SOFTWARE_NEXTCLOUD_USERNAME=/' /boot/dietpi.txt
2183+
fi
2184+
G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*SOFTWARE_OWNCLOUD_DATADIR=/d' /boot/dietpi.txt
2185+
2186+
# Software updates, migrations and patches
2187+
if [[ -f '/boot/dietpi/.installed' ]]
2188+
then
2189+
# ownCloud
2190+
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[47\]=2' /boot/dietpi/.installed && [[ ! -f '/opt/ocis/ocis' ]]
2191+
then
2192+
G_WHIP_MSG '[ INFO ] ownCloud 10 installation detected
2193+
\nownCloud 10 does not support PHP 8.x and hence cannot run on Debian 12 Bookworm or above with its native PHP version.
2194+
\nAs a replacement, we implemented ownCloud Infinite Scale, ownCloud'\''s successor written in Go. A direct data migration however is not possible. The easiest way to port data is probably to upload them from clients.
2195+
\nAn alternative is to migrate to Nextcloud, which offers most of the apps also found in ownCloud'\''s app market.'
2196+
G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[47\]=/d' /boot/dietpi/.installed
2197+
fi
2198+
2199+
# RPi Cam Web Interface
2200+
grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[59\]=' /boot/dietpi/.installed && G_EXEC sed --follow-symlinks -i '/^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[59\]=/d' /boot/dietpi/.installed
21642201

21652202
# Pi-hole v6 migration
21662203
# - /etc/pihole/pihole.toml indicates that Pi-hole has been upgraded to v6 already.
@@ -2216,15 +2253,6 @@ Patch_9_20()
22162253
fi
22172254
fi
22182255
fi
2219-
2220-
# RPi firmware migration: Do after all other patches
2221-
if (( $G_HW_MODEL < 10 )) && ! dpkg-query -s 'raspi-firmware' &> /dev/null
2222-
then
2223-
G_WHIP_MSG '[ INFO ] Raspberry Pi kernel/firmware migration will be applied
2224-
\nA migration to the new RPi Linux 6.12+ kernel and firmware stack will be applied. Please report any error at our forum or GitHub. The DietPi update will finish in any case, and you can retry the migration with:
2225-
$ /boot/dietpi/func/dietpi-set_software rpi_firmware_migration'
2226-
G_EXEC_OUTPUT=1 G_EXEC /boot/dietpi/func/dietpi-set_software rpi_firmware_migration
2227-
fi
22282256
}
22292257

22302258
# Failsafe: Error out on invalid version

CHANGELOG.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ Breaking:
55
- The minimum Debian version supported by our scripts has been raised to Debian 12 Bookworm. Debian 11 Bullseye systems will be migrated to a dedicated branch automatically. We highly recommend to upgrade affected systems to Debian 12 Bookworm, following our guide: https://dietpi.com/blog/?p=3128. Once the upgrade has been done, the update to DietPi v10 will be offered on next update check or when running "dietpi-update".
66
- The minimum DietPi version to support direct updates to DietPi v10 from has been raised to v8.0. Older systems will go through a two-stage process, being upgraded to DietPi v9.20 on a separate branch, and afterwards further to DietPi v10 via master branch, if the Debian version requirement is met as well.
77

8+
New software:
9+
- ownCloud Infinite Scale | This successor of the classic ownCloud file sync and share platform has been added to our software catalogue.
10+
811
Removed SBC support:
912
- The removed of support for Debian 11 Bullseye implies the removal of support for the Sparky SBC, NanoPi M2/T2/Fire2, and NanoPi M3/T3/Fire3 families. Images for those SBCs ship with very old vendor Linux versions, which cannot run Debian 13 Trixie. They already had issues which Debian 12 Bookworm, which is the reason we provided only Bullseye images for them. If anyone finds functional mainline-based Linux and U-Boot sources, or is able to rebase the needed drivers and device trees, we are happy to re-implement support.
1013

1114
Removed software:
12-
- The removal of support for Debian 11 Bullseye implies the removal of the RPi Cam Web Interface software option. This depends on the legacy MMAL camera interface, while the related userspace libraries have been removed from the Bookworm packages of the Raspberry Pi repository. Maintenance for this project stalled since several years, and there is no active fork. We are focusing on motionEye and mjpg-streamer as generic camera and motion detection web interfaces, which both support libcamera indirectly via libcamerify, and have native support in view.
15+
- The removal of support for Debian 11 Bullseye implies the removal of the RPi Cam Web Interface software option. It depends on the legacy MMAL camera interface, while the related userspace libraries have been removed from the Bookworm packages of the Raspberry Pi repository. Maintenance for this project stalled since several years, and there is no active fork. We are focusing on motionEye and mjpg-streamer as generic camera and motion detection web interfaces, which both support libcamera indirectly via libcamerify, and have native support in view.
16+
- The removal of support for Debian 11 Bullseye implies the removal of the classic ownCloud software option. It does not support PHP 8.x, and development stalled. Instead we integrated support for the actively developed ownCloud Infinite Scale (see above), and a migration to Nextcloud is alternatively possible.
1317

1418
Enhancement:
1519

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Links to hardware and software manufacturers, sources and build instructions use
227227
- [ruTorrent](https://github.com/Novik/ruTorrent)
228228
- [qBittorrent](https://github.com/qbittorrent/qBittorrent)
229229
- [Nextcloud](https://github.com/nextcloud/server)
230-
- [ownCloud](https://github.com/owncloud/core)
230+
- [ownCloud Infinite Scale](https://github.com/owncloud/ocis)
231231
- [Syncthing](https://github.com/syncthing/syncthing)
232232
- [ReadyMedia](https://sourceforge.net/p/minidlna/git/ci/master/tree/)
233233
- [MPD](https://github.com/MusicPlayerDaemon/MPD)

dietpi.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,10 @@ SOFTWARE_VNCSERVER_DEPTH=16
267267
SOFTWARE_VNCSERVER_DISPLAY_INDEX=1
268268
SOFTWARE_VNCSERVER_SHARE_DESKTOP=0
269269

270-
# ownCloud/Nextcloud
271-
# - Optional username for admin account, the default is 'admin', applied during install
272-
SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=admin
273-
# - Optional data directory, default is "/mnt/dietpi_userdata/owncloud_data" respectively "/mnt/dietpi_userdata/nextcloud_data", applied during install
274-
SOFTWARE_OWNCLOUD_DATADIR=/mnt/dietpi_userdata/owncloud_data
270+
# Nextcloud
271+
# - Optional username for admin account, the default is "admin", applied during install
272+
SOFTWARE_NEXTCLOUD_USERNAME=admin
273+
# - Optional data directory, default is "/mnt/dietpi_userdata/nextcloud_data", applied during install
275274
SOFTWARE_NEXTCLOUD_DATADIR=/mnt/dietpi_userdata/nextcloud_data
276275

277276
# Synapse

0 commit comments

Comments
 (0)