Skip to content
New issue

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

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

Already on GitHub? # to your account

ownCloud: Update to v10.13.3 #5949

Merged
merged 3 commits into from
Dec 4, 2023
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
4 changes: 2 additions & 2 deletions cross/owncloud/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKG_NAME = owncloud
PKG_VERS = 10.13.2
PKG_DATE = 20231009
PKG_VERS = 10.13.3
PKG_DATE = 20231121
PKG_EXT = tar.bz2
PKG_DIST_NAME = $(PKG_NAME)-complete-$(PKG_DATE).$(PKG_EXT)
PKG_DIST_SITE = https://download.owncloud.com/server/stable
Expand Down
6 changes: 3 additions & 3 deletions cross/owncloud/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
owncloud-complete-20231009.tar.bz2 SHA1 240643ff4eaef8cf5432e5a4ab673b6e06bef59a
owncloud-complete-20231009.tar.bz2 SHA256 0eee3bf9dacd86ef6b5efba4d71d99188e98d3ff83a49078e87d4ea4e3937cec
owncloud-complete-20231009.tar.bz2 MD5 2f8e340a760c18b184859680a8c29e1c
owncloud-complete-20231121.tar.bz2 SHA1 031c3ae5847dd3419a308da28c485428ca487545
owncloud-complete-20231121.tar.bz2 SHA256 4b42022ee12c28e7032617d46ca4c88cdbecd96100dcebcbf9184b2bb77530fc
owncloud-complete-20231121.tar.bz2 MD5 2c351c6502c6dd4147188f03d431379f
6 changes: 3 additions & 3 deletions spk/owncloud/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = owncloud
SPK_VERS = 10.13.2
SPK_REV = 13
SPK_VERS = 10.13.3
SPK_REV = 14
SPK_ICON = src/owncloud.png

DEPENDS = cross/owncloud
Expand All @@ -13,7 +13,7 @@ SPK_DEPENDS = WebStation:PHP7.4:Apache2.4
MAINTAINER = ymartin59
DESCRIPTION = ownCloud is a personal cloud which runs on your own server and gives you freedom and control over your own data.
DISPLAY_NAME = ownCloud
CHANGELOG = "1. Update ownCloud to 10.13.2.<br/>2. New backup and restore functions.<br/>3. Use new shared folder handling.<br/>4. Package maintenance optimisation."
CHANGELOG = "1. Update ownCloud to 10.13.3.<br/>2. Improved backup function."
HOMEPAGE = https://owncloud.org/

LICENSE = AGPL
Expand Down
37 changes: 26 additions & 11 deletions spk/owncloud/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,17 @@ service_postinst ()
# Disable maintenance mode
exec_occ maintenance:mode --off

# Extract the version number using awk and cut
file_version=$(echo "$filename" | awk -F "${expected_prefix}" '{print $2}' | cut -d '_' -f 1)
package_version=$(echo ${SYNOPKG_PKGVER} | cut -d '-' -f 1)
if [ -n "$file_version" ]; then
# Compare the extracted version with package_version using awk
if awk "BEGIN {exit !($file_version < $package_version) }"; then
echo "The archive version ($file_version) is older than the package version ($package_version). Triggering upgrade."
exec_occ upgrade
fi
fi

# Clean-up temporary files
${RM} "${TEMPDIR}"
else
Expand All @@ -275,6 +286,18 @@ service_preuninst ()
if [ "${SYNOPKG_PKG_STATUS}" = "UNINSTALL" ]; then
# Check export directory
if [ -n "${wizard_export_path}" ]; then
if [ ! -d "${wizard_export_path}" ]; then
# If the export path directory does not exist, create it
${MKDIR} "${wizard_export_path}" || {
# If mkdir fails, print an error message and exit
echo "Error: Unable to create directory ${wizard_export_path}. Check permissions."
exit 1
}
elif [ ! -w "${wizard_export_path}" ]; then
# If the export path directory is not writable, print an error message and exit
echo "Error: Unable to write to directory ${wizard_export_path}. Check permissions."
exit 1
fi
# Get data directory
DATADIR="$(exec_occ config:system:get datadirectory)"
# Data directory fail-safe
Expand Down Expand Up @@ -315,17 +338,9 @@ service_preuninst ()
${TAR} -C "$TEMPDIR" -czf "${SYNOPKG_PKGTMP}/$archive_name" . 2>&1

# Move archive to export directory
${MKDIR} "${wizard_export_path}"
if ${RSYNC} "${SYNOPKG_PKGTMP}/$archive_name" "${wizard_export_path}/"; then
echo "Backup file copied successfully to ${wizard_export_path}."
else
echo "File copy failed. Trying to copy to alternate location..."
if ${RSYNC} "${SYNOPKG_PKGTMP}/$archive_name" "${SYNOPKG_PKGDEST_VOL}/@tmp/"; then
echo "Backup file copied successfully to alternate location (${SYNOPKG_PKGDEST_VOL}/@tmp)."
else
echo "File copy failed. Backup of ownCloud data will not be saved."
fi
fi
RSYNC_BAK_ARGS="--backup --suffix=.bak"
rsync -aX ${RSYNC_BAK_ARGS} "${SYNOPKG_PKGTMP}/$archive_name" "${wizard_export_path}/" 2>&1
echo "Backup file copied successfully to ${wizard_export_path}."

# Clean-up temporary files
${RM} "${TEMPDIR}"
Expand Down
1 change: 1 addition & 0 deletions spk/owncloud/src/wizard_templates/install_uifile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ getBackupFile()
if (backupFile) {
filePath.setDisabled(false);
} else {
filePath.setValue("");
filePath.setDisabled(true);
}
return true;
Expand Down