-
-
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
Meta: DSM6 compatibility of packages with user privilege issues #2904
Comments
I am busy changing the NZBGet package in such a manner that it will be completely compatible with DSM 5 and DSM 6 and in according to Synology standards with as much possible use of DSM tools. The current version in of that package in the DSM 6 branch is not able to do that correctly in my opinion. I almost finished the work and will begin testing tomorrow. |
May it be possible to document a set of "recipes" describing how to create a package "the right way", typically with a "installer.sh" template script when a technical user is required for service process, and how to port existing |
I agree that the information is spread all over and the "3-rd-party Package Developer Guide" in not a very easy readable document. Not sure if I want to spend the time learning how to use wiki for that. I hope someone can test the package I create on a DSM 5 machine, because I don't have one, both my machines are on DSM 6. |
I run a XPEnology 5.2 as vmware virtual machine. I should document how to build it too ! |
Table above updated with WIP notes for nzbget and squidguard. @BenjV: Great, you are in for it, too! I'm aware of your discussion with @Dr-Bean some months ago but do not have any strong feelings on the approach. I will just wait for your POC PR. Maybe @ymartin59 and @cytec can judge which route is best and then I will help implementing whatever you guys settle on. |
@m4tt075 |
@Safihre : The 5.2 package on the master branch, which is published via the Synocommunity platform, is not compatible with DSM6. If people install them on DSM6 systems, they are bound to run into the kind of trouble you describe. @Dr-Bean's fixed version is only available on the DSM6 branch (therefore the comment in the above table). You should be able to cross-compile those packages and run them (correctly) on 6.1+ firmwares ("should", because I did not test it). The problem with those DSM6 compatible packages is though, that they can currently not be published via Synocommunity. This is the catch 22 with all affected packages. |
Table update: |
@ymartin59 : Help! I just went through the DSM6 branch and realized that @Dr-Bean has already "fixed" almost all of them half a year ago. I simply checked which packages already possess the necessary privilege files and the list below showed up. It is unfortunate @Dr-Bean has suddenly disappeared but I believe he has actually done most of the DSM6 compatibility work already and was "just" lacking the publication platform to initiate broader testing. Might be wrong though. I started offering test builds initially (like you have done in the past), but given the breadth of packages we are looking at here, I don't think that is a viable option. What is your take? How should we proceed? Here the additional packages @Dr-Bean already addressed (all untested of course): |
I am sorry to say that the already changes packages on the DSM 6 branch are having some flaws. I have finished my testing of the NZBGet package. I still have to do some thinking on how to handle the following scenario. |
@BenjV If same Makefile can produce both DSM 5 and 6 packages, it would be perfect. For "upgrade path", it is really difficult to test without real hardware, as virtual machines we may find are not designed to support DSM update/upgrade. Would it be reasonable to state that "we try to" support in place upgrade of "old" installed package version (which may be really old, some builds in repository have been produced for DSM 4 !) when already running on DSM 6. In case our "tentative" is not successful (and there is high chance it is not without proper testing), we would have to do support to help users to clean up their system, as uninstall scripts often fails on DSM 6. Worst option remains: re-install fresh DSM 6, reapply config backup and reinstall all packages.... What do you think about it ? World cannot be perfect... I wonder if there are many users having upgraded from DSM 5 to 6 with "complex" package installed (typically with database schema) |
The MakeFile can fore sure be used for DSM 5 and DSM 6, but it have to changed a little. A cleanup script would be nice, I myself have had some trouble removing packages while testing. |
I have finished the package for NZBGet. I have used the avoton version but the important things are in the script files which can be reused. The main difference is that this package will run as Synology has layed out in their documentation and that the package wil run with user privileges and not with root. If someone can test it under DSM 5 I would be very interested in the line of the /etc/passwd file of the nzbget user. This will show if the package is completely compatible with DSM 5 or not. I am working on a more elaborate document but my time is limited at the moment. |
Great. Thanks, @BenjV. Could you please PR your changes (I'd propose against the DSM6 branch until it has been tested more broadly) to make sure we are all on the same page? I have set up a VM with XPEnology 5.2. Happy to test for you... |
I am sorry but I am not familiar with the spksrc structure. I can list the files which I changed. I removed the following file because the were are not needed. By the way, there were structural errors in the Wizard-UI files so the input validation did not work at all and the other scripts were full of potential risc regarding filenames. There were missing a lot of "" around variables. |
Many thanks for your work @BenjV. I will report your change on package into spksrc as a PR. |
Perfect. Thanks, both. |
Hi, i am new to the synology community and note that even after enabling betas in DSM package manager, i still am not able to see all packages listed. I presume particular packages have been pulled due to incompatibilities or is there something else i am seeing? For example - Headphones is not an available package however listed on the synocommunity page. thank you |
@drpau: Your problem is related to a lack of DSM6 compatibility of publishable packages. This issue is part of a more general approach to sort these things out. Please open a separate issue on the package you are looking for, if it does not already exist. @ymartin59 : I have seen you closed #2912 (your first DSM6 merge branch). No prob, but I think we need to step back and sort some things before we can advance here. I have also seen that your are currently reorganizing the issues as projects, which is great. Here my perspective on what we still need to clarify for your consideration and potential reflection in your project overview:
Ok for you? |
@m4tt075 I really agree. I have not reviewed BenjV's proposal yet but I also guessed it deviates from first approach. About point 3 and my master-to-dsm6 merge, my aim was to be able to locally merge package branch with From here, I think any package compatible with DSM 6 should be sent to Probably one of our issue is the copy-paste pattern applied to |
@ymartin59 : Yes, makes sense. We have got a plan then. Let me know if I can help... |
I also red @Dr-Bean's concerns and I will comment here on how I have dealt with them. -About the privileges file: My original idea was to also use the group in the installer, but there is a bug in the installer from Synology that would not allow the same group for different packages. Also we have to add the "status" to run-as root. About the installer: -Preugrade -Postupgrade About compatibility we have to wait the result of the testing, I think even under DSM 5 and with the privilege file in place, DSM 5 would create a hidden user, if not we have to create a legacy user ourselves, my package already takes care of that . Start-stop-status I would suggest to move the standard stuff that is in the installer to the preinst and postinst scripts and just keep the package specifics in the installer. I don't know if the spksrc scripts create the firewall (package.sc) file which I found in the script folder. The main difference for the end-user will be that no longer all users (via the users group) have read/write privs on everything, but has to grant it themselves via the "sc-media" or "sc-download" groups. I will work on moving the general part of the installer to the standard scripts and finishing the documentation. We have to test that all packages will run with user privileges and not need root or system privileges. |
@BenjV : Wow, you have obviously thought a lot about this. The concerns I was referring to where the ones about using different user names, but I assumed (and did not verify) that what @Dr-Bean wrote, was correct. If it wasn't and this is no longer an issue, that's great. You have also already answered most of the things I did not understand. The only additional questions I' have right now are |
The removing of the old name is in my opinion not a problem, those users were created by the SynoCommunity package and if somebody used that name for other purposes he (or she) has to create a new name. I don't think many users have done that, and the few that did it have to take some action. Also if we leave the old username in place it will create enormous confusion, because it doesn't function anymore in settings privs. We need to keep the username the same as the package name otherwise we don't have a way to find out this name within the scripts and we have to add a new name for every package we have. About your other concerns. b) No, the breaking point was the change from DSM 5 to DSM 6, and to be honest I believe even DSM 4.2 already has all the tools in place to make this more secure working possible. c) Very good spotting, I saw it yesterday myself, it is a leftover from some testing I did and should be "-lt 6" and not "-lt 7", |
Based on BenjV proposal SynoCommunity#2904
Any news from the testing of my package on DSM 5? |
@BenjV |
@ymartin59 I am especially interested to see how the /etc/passwd file will look like on DSM 5 |
Why not, I expect |
I was going to convert |
@Safihre PRed quicker than I could update our tracking table... 😏 |
About |
@ymartin59, I don't think this is sufficient as it doesn't cover the case when the process restarts itself and the PID changes (resulting in the Stopped status in DSM). |
OK I propose to create a third generic |
+1 |
Welcome back, by the way! |
Yes, I have identified 502 failure when uploading |
@ymartin59 : 👍 Happy New Year, Yves! |
@ymartin59 Great news 🎉👍👍 |
@Safihre I am currently publishing pending packages from
I do not agree with you - it is never too late... and sooner any is fixed, better it is. |
@ymartin59 That would be great and also what I was thinking, I was working a bit before on this for Sonarr/Radarr but abandoned it when I saw that so many packages had I imagined:
|
What's the progress on getting ejabberd functional? |
@Heptite Not aware of any progress on this particular package. Maybe you are lucky and somebody picks it up, but we still have some packages in testing which need to be published first (see WIP in table above). We are getting there, it just takes time... |
@m4tt075 Is there any temporary workaround to getting it working? Also, I'd like to point out that there's a small bounty (which I added to) on that particular package. |
@Heptite Nope, the package needs proper adaptation. Seems it hasn't been updated for quite some time. The bounty might raise people's interest though. Good luck. |
@ymartin59 @Safihre I know that you have been keeping track with the progress, also on the list above. Since most of the packages we had converted have been merged in the meantime, I was wondering whether I should continue with list. Having said that, my feeling is that there is not a lot of demand for the packages that are missing and that it might not be worthwhile to just keep them for the sake of keeping them. On the contrary, there might be a benefit in cleaning up and focusing more on maintainance of those packages we provide. Can you judge (maybe through downloads from spkrepo), which packages should be continued and which ones retired? |
Asked @Diaoul if we can somehow figure this out 👍 Indeed we should convert now the most popular packages. |
Gateone is WIP: #3431 |
Is synocli supported on dsm6? |
Closing in favor of DSM7 package status. |
In #2661 @Dr-Bean provided a complete overview on issues with current packages. There is one class of issues related to how DSM6 handles user priviliges (see #2216 for the related discussion and information on how to fix the issue).
Edit: In the meantime, @ymartin59 has developed and merged generic service support for DSM 5+6 packages (PR #2949). As such, the objective is now to convert all the affected packages to use the newly created generic service support.
Here is an overview of the status of those packages.
IWe willtry totackle them successively, but will be slow. If you want to contribute, please just comment which packages you would like to tackle so that we avoid double work. I will update the table regularly. Please report any errors / updates you find.bitlbeeThe text was updated successfully, but these errors were encountered: