-
-
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
Change in behaviour - latest framework snapshot with DSM7 support #4533
Comments
Confirmed, it is trying to run the package as
And looking under the
Switching |
If you need root for this package you could add "run-as' root to the start action:
I think it would be wise to run all stop scripts as root so it will be able to forcefully kill hanging processes. |
@BenjV that's the issue, I can certainly add a
Will that work on DSM7? Because I thought it was enforcing package user by default always? |
If the privilege file has this on board everything will run as the package user except what you expliciet give "run-as : root", that is the purpose of the privilege file also on DSM 7.
So in my example you could just remove the run-as : root from the start option and the actual package will run-as : "package" and all other scripts will run-as "root". There are two options in my opinion.
Needless to state that option 2 is the simplest solution. And you don't have to worry about backward compatibility, DSM 6 (and even DSM 5) is acting exactly the same as DSM 7 on the privilege file. |
@BenjV re-reading your post. I also agree to disagree. For DSM<7 where there is no |
The conf/privilege is introduced in DSM 5 by Synology so I will work without any problem. I am not sure but I think as of DSM 7 conf/privilege are required, so unless you want to maintain different packages for DSM 5/6 and DSM 7 there is no choice. |
Lets hope all packages eventually gets migrated over to DSM7, and once done all will be good. Although we both know this takes a while and in the meantime we do have to republish a few packages from time to time (ex: https://github.com/SynoCommunity/spkrepo/issues/70). As-is, package rebuilds may require being adapted otherwise they may break due to the framework change. I actually ask myself how I'll proceed with upgrading considering I only have one unit at home... sigh I wished Synology would be more grateful to SynoCommunity developpers... |
IMHO now is time to redesign all packages to be future compatible with DSM7. As I started to redesign the installation logging (#4539) we should start to redesign the package privilege configuration.
If we do not start such redesigns now, we will have packages that are hard to maintain for years, as there are still packages that do not use the generic service installer introduced more than 5 years ago for DSM6. And I prefer explicit |
Aah the good old days, we used to define (require?) the |
Agreed with the redesign with the following two caveats:
|
@Safihre it's a really good question. So, I don't know yet but yes, there "may be" cases to play with the user depending of the action being performed, at least from a migration standpoint. |
If you use the methode of saving files as stated in the development manual for upgrading packages, then package center will chown the files to the correct owner at the end op the upgrading process. |
@BenjV can you please point me to that, I tried finding it but may have overlooked. Also, its exactly my point: rebuilding + publishing current packages with no changes may lead to such issue. So we definitively need to be careful for any updates being published. |
Developers manual for DSM 6.2 on page 100
Developers manual for DSM 7 on page 67 chapter "Script Environment Variables"
But to be very sure the best thing to do is in the "post install" and "post upgrade" do a chown of the complete /var folder of the package. |
While testing something else I quickly looked at the amount of packages which does a
From this list only 15x of them do have a
Perhaps we should define ${SYNOPKG_TEMP_UPGRADE_FOLDER} right away on DSM-6.2, adapt packages in using that and applying a |
Setup
Package Name:
synokernel-usbserial
Package Version: PR #4420
NAS Model: DS918+
NAS Architecture:
apollolake
DSM version: 6.2.3 Update 3
Expected behavior
Since I've rebased against master which now includes DSM7 preliminary support, my development packages behave differently and fail to start. I've started investigating and didn't noticed much difference besides the permissions now being assigned to
sc-synokernel-usbserial
on files which wasn't the case before (probably expected on DSM7 but wasn't on DSM6) and not necessarely a blocker neither in theory.Which makes me wonder if it isn't trying to run the service script as user
sc-synokernel-usbserial
which will necessarily fail (loading kernel modules requireroot
access).Other logs
New install log:
Old install log:
The text was updated successfully, but these errors were encountered: