-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[framework] syncthing: fix DSM7 package upgrade #5117
Conversation
- avoid overwrite of existing files in var folder - fix recognition of dsm6 var folder
@th0ma7 with #4997 you introduced rsync calls to migrate the var folder of spk to the DSM7 var folder. This works as expected except for upgrade of packages created before. Without this fix, the target/var folder (that was not removed in packages created without the rsync migration) was taken as dsm6 folder and existing config files were overwritten with the default files of the former installation. DSM 7 packages created before the rsync solution (like syncthing 1.17.0-22 created at 2021-06-19) do not delete the target/var folder. |
@acolomb DSM 7 package updates are working now. I did intense testing under DSM 7 (including DSM 6 update simulation by recreation of former folder structure). I am just wondering whether is was a good idea to create the sync folders in the package var folder (home). Before DSM7 this folder is backuped an restored at every package upgrade and it is removed when you uninstall the package. A better approach would be to use a DSM shared folder.
|
Thanks @hgy59 for looking into it. Sounds reasonable to me so far. I don't know what you mean exactly by "creating sync folders". Syncthing can be pointed at ANY existing folder path on the file system. It is not limited to it's "own" sharing volume / folder or whatever. Contrary to e.g. Dropbox where all shared stuff must live under one folder. So if you mean the default location where new shared folders are suggested to be created, that should be pointed at a reasonable location. I don't have enough overview of DSM to judge where that would be. |
Thanks for this information. For my tests I created two folders and for me it looked like the folder path is not editable. |
@@ -12,7 +12,7 @@ MAINTAINER = acolomb | |||
DESCRIPTION = Automatically sync files via secure, distributed technology. | |||
DESCRIPTION_FRE = Synchronisation automatique de fichiers via une technologie sécurisée et distribuée. | |||
DISPLAY_NAME = Syncthing | |||
CHANGELOG = "Update syncthing to v1.19.0. Add wizard page to preconfigure credentials for the Web GUI. Integrate with the certificate management UI in Control Panel." | |||
CHANGELOG = "Update syncthing to v1.19.0. Add wizard page to preconfigure credentials for the Web GUI. Integrate with the certificate management UI in Control Panel. Fix DSM 7 data migration." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I routinely add the double spaces after a full-stop btw. because it's an accepted norm (one of several) in English writing. And my editor (Emacs) treats it automatically when reflowing text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in #5118 I numbered the change log entries, so this gets obsolete.
Damn, my review was 30 seconds too late! @hgy59 Please check out the comment about |
oops I was too fast... |
@hgy59 (late to reply, limited cycles available currently) I recall testing this throughout but DSM6 to DSM7 isn't an easy thing to fully test. If I understand this correctly, and this applies to synchting (but may apply elsewhere), after upgrading to DSM7, an existing DSM6 syncthing installation would look like this?
While a DSM7 package would normally look like (notice the appstore vs appdata):
Which could lead at upgrade time that rsync might try to re-sync over itself? Am I painting the right picture? ... Actually no, as Would that mean:
(re-reading your post, again)
Then rewinding for a bit, if that was the expected behavior, then my PR changed that behavior as updated var files do not overwrite pre-existing configurations but rather creates
Is there a need for me to review the code change (as already merged)? If so I can try to find additional spare cycles over the week-end and go through the code. |
if [ -d ${SYNOPKG_PKGDEST}/var ]; then | ||
if [ ! -d ${SYNOPKG_PKGVAR} -o $(realpath ${SYNOPKG_PKGVAR}) = $(realpath ${SYNOPKG_PKGDEST}/var) ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting snipet, good catch.
All packages for DSM 7 are affected, that are created before 15 december 2021 (the date #4997 was merged) and are not updated after this date. To fully understand what was going wrong, you have to consider the following:
sorry for not responding to your detailed questions |
no need for review other than for fully understanding what's happening 😄 |
#4702 is probably realted (but it is for DSM 6) |
Description
Fix DSM7 installer
Fixes #5116
Checklist
all-supported
completed successfullyType of change