Repository navigation
Conversation
|
Hi @publicarray and @hgy59, finally slowly coming back and revisiting this PR. |
|
@publicarray issue #4758 is due to "new" files being deployed under the EDIT: This PR do solve the issue for tvheadend and been working well, additional testers would be great to confirm all is ok. |
668f8df to
4b326e3
Compare
|
@publicarray All changes are now in and all packages adjusted accordingly. I'll be running a few more tests of my own to confirm all is still ok for my regular packages. But in theory this should make all packages fully using target/../var directory for DSM => 7, from configure (with all proper switches) , to build then to install time. @hgy59 you where right, indeed it was worth splitting things over in separate PR as |
|
Now that #4854 is completed, I'm back to this pending PR. |
|
There is a caveat in the |
|
@hgy59 and @publicarray I was able to solve my last blocker to properly inherit copying while managing
I've ran quite a few tests with the
This is the next step into using natively the Synology DSM7 |
|
Unless all packages using EDIT: Revisiting this, makes no sense... too many use cases. Suggesting to declare them as not compatible for DSM7 until migrated to |
|
@hgy59 and @publicarray proposing the following change in |
When testing the package creation with spk/demoservice it appeared that files in staging/README was not being processed. This is due to the "-type d" option which only include directories, thus leaving files location at root of staging (e.g. target/) to be skipped.
Otherwise ends-up getting Cannot open: No such file or directory
Use tmp directory for DSM6-7 migration instead of moving right away to permanent storage as it is not available immediately when upgrading. Also, when copying over new target/_var/* files, any existing will be added suffix .new and rsync a second time so user will keep his existing but will have access to any new versions of the configuration file.
postupgrade now use the --backup in conjunction with --suffix=.new which will update any changed files with the previous copy and rename the file in place to .new so it can be used as reference for the user.
|
Hi fellow @SynoCommunity/developers , winter is coming and I would really much like to get this merged before spring break. Every smaller bits have been merged into other PR. Now whats left is the framework changes to fully handle Synology's new So overall I'm now begging to get a thumbs-up before merging so I can focus on other things afterwards (e.g. |
Motivation: Follow-up to #4579 with focus only on
var. This includes migrating to usingrsyncfor this new installation method intospksrc.service.installer.dsm7.Current framework simply move files from
target/vartotarget/../varat installation/upgrade time. While it's probably fine for most use-cases, in order to generate proper configuration files at compile time the "real" path must be given at configure time usinglocalstatediroption. Doing so enforces the application to use by default the new DSM7vardirectory and install and adjust path in configurations accordingly at build time. Not doing so leaves a bit of unknown on actual application state & behavior.Current limitations of spksrc fixed by this PR:
varproperly by default (e.g. at configure/compile time)varduring package upgrade overwriting existingtarget/../varvarfor user referenceThis PR aims at solving the current limitations by:
localstatedirfor DSM7 builds. At package generation time, files installed under<workdir>/install/var/package/<package>/varare now be handled differently in order to be packaged and installed properly..newsuffix to configuration new files when previous ones already exist. User can then refer to them and adapt their own configuration as needed.Changes
1. @appdata (e.g. var)
The
package.tgzonly containstargetdirectory (referred as@appstore). The framework currently copies over thetarget/vartotarget/../vardirectory. The limitation is that it doesn't change the configure options to make usage oflocalstatedirso the application isn't built by default to be in a readiness state for using this new directory structure. Further more, it doesn't allow to provide updated files with proper path that the user could refer to during upgrades.This PR aim at working around that in order to fully use
var(referred as@appdata):localstatedirconfigure option pointing to this/var/packages/<package>/varby default_varThis PR creates the following new variables to be used at build time (backward compatible <= DSM6):
INSTALL_PREFIX_VAR=/var/packages/<package/target/../var-> Used for setting up thelocalstatedirpathSTAGING_INSTALL_PREFIX_VAR=work-*/install/....../target/../var-> Used undercross/*installationSTAGING_SPKVAR-> Used for copying files directly to staging underwork-*/staging/_varatspkpre-packaging time2. spksrc.service.installer.dsm7 (rsync usage, merged part of #4997)
A few changes where made to the dsm7 installer script in order to
.../target/../var.new" suffix when files already exists under.../target/../varin order to never overwrite user-configurations while still providing updated examples for reference.varfiles gets lost due to missing@appdataAt the lower level it works such as:
rsyncinstead ofcpto copy filespreupgrade, copy any "residual" DSM6 files from.../target/var/*to a tmp directorypostupgrade, copy any "residual" DSM6 files from tmp directory back to the new.../target/../var. As theses files where pre-existing from a previous version of the package, it uses the--backupflag to move any conflicting files with.newsuffix and puts back the original user files in its location.varfiles located under.../target/_varto.../target/../var. Any conflicting file gets renamed to.newand sync'ed to.../target/../varensuring to keep the original user configuration while providing fresh updated configuration examples.3. Migrate
SYNOPKG_PKGDEST/vartoSYNOPKG_SPKVARin all spk/*/src/service_setup.shAs identified in #4895 (comment) there are many
service_setup.shscripts still usingSYNOPKG_PKGDEST/varwhich will necessarely break under DSM7. All of them are being migrated over to usingSYNOPKG_SPKVARLinked issues: #4545, #4758, #4895, #4910
Checklist
all-supportedcompleted successfullyAll packages cannot be tested, tested successfully:
tvheadendffmpegchromaprintcomskippython38