-
-
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
redesign shared folder handling #5649
Conversation
I'm probably missing something but I remember working on the ability to choose a volume for downloads with the transmission package using the resource worker, not sure if this is relevant here. It was the only package that I know of that fully made use of it and coursed some issues with how a shared folder was created. Something might have changed since then or I never documented it fully. |
@publicarray indeed, something also used for deluge package. |
@publicarray @th0ma7 I tend to introduce new Makefile variables for this. The migration of existing packages is a mess, as it depends on multiple facts currently:
future:
|
Would it be easier to have a script that just splits the path string into the variables (volume, share) and combine them when needed (path)? |
Never mind I remember now that the resource worker requires them to be seperate (volume, share) |
No, the resource workes takes the (folder) name only. The volume cannot be specified with a resource worker. We already have such code, that splits the SHARE_PATH into SHARE_VOLUME and SHARE_NAME. But this is not usable. |
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 haven't touched or played much with this side of the framework. I won't be able to provide much assistance on this 🤷
Thanks for cleaning that up. I like what you proposed. |
redesign shared folder handling
hey @hgy59, I attempted to include this PR as part of a revision to the Transmission build #5616. In selecting
Let me know if there is anything I can do to assist with making this fix work. From my other tests, creating a folder on
Checking the Developer Guide Data Share resource worker documentation as well as your earlier comments it doesn't seem possible to assign a volume argument for creating a share. As such, I'm not sure what is the overall solution we are working toward. |
redesign shared folder handling
hey @hgy59, I did a few more tests with Transmission 4 and it seems that the Makefile must still only refer to the share name and not the full path. Using the full path (including volume) in the generated This however does not prevent other errors (like the |
Yes that's what I am trying to fix/explain here: for shared folders, a wizard should never ask for a volume but for the share name only. And when we use the BTW synology provides the variable SYNOPKG_PKGDEST_VOL with the volume where the package is installed to (OK, you already found this in #5619) |
Hmm, okay. Perhaps I don't understand how this PR works then. Would you say that the main objectives are:
If this understanding is correct, then it seems to be checking for the share before it is created based on the logs. And when we use just the share name to create the shared folder, what variable should we be using in scripts to derive the full path? Apologies if I'm still not understanding correctly. |
@mreid-tt sorry, this is still WIP. I started to introduce new variables and not to touch existing packages (locally, not pushed yet). And I did not yet update any existing package that will show the final solution... |
Whats the status here? I'd like to update my minio installation to a version without any critical security issues, |
886e574
to
d0923d1
Compare
d0923d1
to
bd4f814
Compare
Related to #5722, since it as been broken for ages, do we really need to postpone updates because of this? It's not like this was broken recently and it also only affects users that want to use a non-default spot. |
bd4f814
to
497d873
Compare
Any news here? What is missing? Can we provide any help to get this done? If this blocks so many other packages this should have a high priority. |
Can we please get any reaction on this? My system is running out of space and needs an upgrade ASAP which is the only chance for me switching to the new minio data format. |
@fgma you can continue using the existing approach for shared folders. I will try to create a migration path for this redesign with new Makefile variable(s) to not touch existing packages. |
@hgy59 As far as I understood the issue here my migration will have a problem because I'm going to add a second disk to my system without using raid. The workaround of creating the share manually before installing the package might work for me. The other issue is the final migration path to the new minio data format. I'd like to update my system ASAP but in the end continue using future minio SPKs. |
Thanks I'll double check. It's probably because I'm not on the latest dem6 version on my test VM. |
The synology dev guide documents that Alternativly you could install the noarch all package ( |
- create icons when DSM_UI_CONFIG is defined
- add demowebservice to document how to create a web service apps - use shared folder to show how to access shared folders by the package
- support DSM 5 - fully support dark mode
No, it does not replace it, it enhances it to create icons for web service packages (that define DSM_UI_CONFIG but not SERVICE_PORT nor ADMIN_URL) Currently only cops has a workaround to fix this (by definition of Other packages (owncloud, rutorrent, memcached) have defined ADMIN_URL to get icons in the package. (in fact, this is a workaround too, since ADMIN_URL is not required for packages that create an icon in DSM UI). |
- fix service-setup file generation (orphaned if)
- remove workaround to create package icons
- adjust patch to current version
- fix installation of app/config when DSM_UI_CONFIG is defined - ensure DSM_UI_CONFIG has privilege over generated app/config (and is not affected by NO_SERVICE_SHORTCUT) - add Makefile variable SERVICE_DESC to define DESC property in app/config (the whole package description is often not ment to be shown as tooltip of the app icon) - remove the extra installation of app/config since this is fixed now (demowebservice, adminer, cops, owncloud) - add some comments in demoservice/Makefile - remove obsolete dsm-control.sh in adminer package (same is created by the framework with STARTABLE=no) - throw error when SERVICE_USER is not properly defined (only 'auto' is supported)
- SERVICE_WIZARD_GROUP is not supported anymore
- fix NO_SERVICE_SHORTCUT to be applied independent of DSM_UI_CONFIG: - it must be possible to disable creation of app/config file when app (webservice) is fully defined in conf/resource - force icon creation when DSM_UI_CONFIG is defined - NO_SERVICE_SHORTCUT must be ignored for icon creation, when DSM_UI_CONFIG is defined
- document and avoid web server and PHP dependency as SPK_DEPENDS for all except DSM 7 - DSM 6: remove conf/resorce for webservice (supported on DSM 7 only)
28266b1
to
774c5a4
Compare
- add port 8889 for Web Portal on DSM 7 - add page with remarks install wizard - reverse proxy configuration on DSM 7 does not work and is not added to resource file (SynoCommunity#5544)
- force SERVICE_USER = auto with SERVICE_WIZARD_SHARENAME - remove SERVICE_USER = auto in demowebservice Makefile as defined by framework now (focred by SERVICE_WIZARD_SHARENAME)
@hgy59 this seems to be related... https://github.com/SynoCommunity/spksrc/projects/9#card-62758887. should it be moved to done? |
- this is a leftover of shared folder redesign (SynoCommunity#5649) - DSM 7 does not allow to call synohare (Permission denied)
- this is a leftover of shared folder redesign (#5649) - DSM 7 does not allow to call synohare (Permission denied)
Description
The volume specified in the install wizard for shared folders is not used on DSM 7 (and on DSM 6, when using the resource worker with
USE_DATA_SHARE_WORKER = yes
)By default the shared folders created by DSM are located in the same volume as the package is installed to.
It is possible to create shared folders on a different volume and use an existing share in the installation wizard.
This is currently not supported by our framework (at least not for DSM 6 when using the resource worker)
There is some code in the framework, that handles the volume chosen in the wizard, but only when the variable is named
wizard_volume
.This is undocumented and bogus, and will be removed here. It is replaced by evaluation of the full path of the share by the system function synoshare on DSM 6 and by using the provided link under shares on DSM 7 (non root user is denied to call synoshare)
Related to #5481
Fixes #5041
Remarks
This got more framework fixes than originally planned.
Finally this PR updates the
demoservice
package only and introduces the Makefile variableSERVICE_WIZARD_SHARENAME
to not affect existing packages that use shared folders the old way (i.e.SERVICE_WIZARD_SHARE
and optionallyUSE_DATA_SHARE_WORKER
).While testing the new shared folders with demoservice, an issue with
SERVICE_COMMAND
on SRM and DSM5 popped up. Therefore a dedicated start script without parameters is used in demoservice now.SERVICE_COMMAND
with parameters does not work together withSVC_BACKGROUND=y
andSVC_CREATE_PID=y
on platforms not supporting bash shell (i.e. ash).Another issue newly discoverd is, that
load_variables_from_file
does not work to load installer variables. This is fixed by direct call of the function (to avoid a sub shell by use ofcall_func
).And
load_variables_from_file
had an issue on SRM and DSM5 (cut with parameter --delimiter is not supported there)Another issue affects the installer variables persisted in
etc/installer-variables
. This file was removed on package updates without an upgrade wizard. Without an upgrade wizard that activly reloads the variables into the wizard before the upgrade, those variables are not defined anymore. The fix avoids the deletion of the installer-variables file in such cases.Additionally this PR completly removes the (deprecated) support for
SERVICE_EXE
andSERVICE_WIZARD_GROUP
.And one more issue fixed. The DSM 7 uninstaller was not able to delete the files in the package
etc
folder. This was also a security issue, since theinstaller-variables
file might contain sensitive information.And (hopefully) a final fix: On DSM 7, when a package is uninstalled without removing the data, the
etc/installer-variables
file already exists when the package is installed again. To avoid that wizard variables get overwritten by installer-variables, the functionload_variables_from_file
now ignores variables that are already defined. Otherwise the shared folder name (and path) was always taken from installer-variables and not from the wizard.To create a shared folder by a package, there must exist a service user. to give access to the folder. On packages for DSM <7,
SERVICE_USER = auto
must be defined. This is now enforced, whenSERVICE_WIZARD_SHARENAME
is defined.And #5041 is now fixed by implicit definition of
SERVICE_USER = auto
inspksrc.service.mk
for DSM 7.Probably we should remove the need to define
SERVICE_USER = auto
at all, and always use a package user (sc-packagename). For the case that on DSM < 7 a service user must not be defined, we could add a variable to defineNO_SERVICE_USER = y
. But this definitivly goes beyond the scope of this PR...Overview: Packages with shared folder
Since this PR does not affect existing packages anymore, the following packages can be migrated one by one after this PR is merged.
Affected PRs
wizard_owncloud_datadirectory
)Checklist
all-supported
completed successfullyType of change