-
-
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
DSM7 method to manage @appdata, @apptemp and @apphome directories #4579
base: master
Are you sure you want to change the base?
Conversation
@hgy59 and @publicarray unless you think of another approach I believe I pretty much nailed it. This should allow migrating all packages needing to drop files under the new A pending question is: should we keep or not the source files under Ready for your review. |
I don't think you should use
|
This is already migrated. On fresh DSM7 install the files are copied from This is why correcting 72be928 was so important. If you want you can change this behaviour, but I don't follow why you need to...
|
Well interestingly the This new approach does also work for all other Behavior is simple, using new variables it create "temporary" |
I'm not really using it as I'm only referring Also, re-using the |
@publicarray also, the preupgrade copy would benefit from using EDIT: I would actually suggest doing a |
Thanks, using rsync is a good idea 👍
I've tested it thoroughly and it works as designed. I don't know why it failed for you. It maybe that you had left over user files there, so the code was skipped (my design decision). I thought users files should not be overridden/added, but maybe I was wrong. Using rsync would fix that... 🤷
Yes adding more folders to be supported (
Hm, The chances of a package adding new config files is very slim so the wrong behaviour that you experienced is only apparent when you don't have a clean new install (you had a broken package with missing files). So maybe we should overwrite? This is the current behaviour in DSM6 I think. And store user files in
I think that's a bad idea AFAIK the path is not documented. Why not use |
Personally I would ignore any Packages can also have the following structure if it is installed on a system partition:
|
I can confirm that I tested it using clean install/reinstall/etc. I really tried figuring out why it didn't worked. My best guess is
Indeed in DSM6 it gets overwritten because
Not sure I understand how
If I understand the behavior correctly, config files will not be overwritten in
You are right. When playing with this I ended-up sending an
|
Currently using relative to
Which currently will also work due to its relativeness to |
@publicarray btw, from the dev manual in theory EDIT: Another point, should then the |
@publicarray moving back to [WIP] and added some comments about TODO changes. Let me know what you see fit. |
@publicarray I've migrated to dsm6 -> dsm7 migration to rsync + backup and support for
As for |
@publicarray I recall you where going to be out for a while. Re-raising this to confirm wetter it is of interest or not? |
@hgy59 and @ymartin59 , in lack of having @publicarray around, would you mind providing feedback on this PR? We need a solution for use cases such as mentioned in #4545 (review) |
IMHO we don't. As we already discussed, the installer must not use any "@*" name but only folders starting with And IMHO we do not need to provide generic support for etc and home folders as those can be left in the care of the packages. |
I agree to disagree and really think we have to. Here's a try at explaining the reasoning behind this :)
There was a bug I was faced with at the time: a sort of race condition happens somewhere between pre and post where "new" files ended-up still residing under former Side effect was silent failing of
Thnx for the reminder, I now recall that discussion. And as mentioned previously, current patchset never made any reference to The delimiter was just convenient at package creation time under the staging directory tree while matching DSM7 naming. Commit 697425d alter that to using
I must admit that
Overall I really think we miss an opportunity here of"
|
* [ffmpeg] vaapi access fix ffmpeg (libaom) in newer gcc versions opencv/opencv#10032 * chromaprint, comskip, tvheadend: Add to "video-driver" group * libvpc: Apply fix for ARMv5 for all DSM versions for that arch * tvheadend: dsm7 remove commands that require root and remove busybox * tvheadend use archive for faster downloading * tvheadend: revert to githash based file name and update cmake flags * tvheadend: remove ${INST_LOG} and fix shellcheck SC2006 (legacy backticks) * Tvheadend: cleanup service-setup.sh, drop DSM5 support * chromaprint: Fix building on DSM7 * tvheadend: Use PR #4579 to manage /var content * tvheadend: Enable fontconfig and fix postinst issue * tvheadend: Remove legacy root dir recording fix Based on feedbacks from previous maintainer remove unecessary code to manage faulty root directory recordings. Ref: #4545 (comment) * tvheadend: fontconfig links are already all good using latest * fix tvh install (as #4579 is not merged yet) Co-authored-by: Sebastian Schmidt <publicarray> Co-authored-by: Vincent Fortier <[email protected]> Co-authored-by: hgy59 <[email protected]>
@hgy59 just a thought... Wouldn't (or shouldn't) python wheels ends-up going under Also, I noticed that some packages make usage of |
Thnx @ymartin59 for this approving this PR, but really the "first" step in achieving this starts with #4797 |
yes please. implemented irssi in a dsm7.x |
* [ffmpeg] vaapi access fix ffmpeg (libaom) in newer gcc versions opencv/opencv#10032 * chromaprint, comskip, tvheadend: Add to "video-driver" group * libvpc: Apply fix for ARMv5 for all DSM versions for that arch * tvheadend: dsm7 remove commands that require root and remove busybox * tvheadend use archive for faster downloading * tvheadend: revert to githash based file name and update cmake flags * tvheadend: remove ${INST_LOG} and fix shellcheck SC2006 (legacy backticks) * Tvheadend: cleanup service-setup.sh, drop DSM5 support * chromaprint: Fix building on DSM7 * tvheadend: Use PR SynoCommunity#4579 to manage /var content * tvheadend: Enable fontconfig and fix postinst issue * tvheadend: Remove legacy root dir recording fix Based on feedbacks from previous maintainer remove unecessary code to manage faulty root directory recordings. Ref: SynoCommunity#4545 (comment) * tvheadend: fontconfig links are already all good using latest * fix tvh install (as SynoCommunity#4579 is not merged yet) Co-authored-by: Sebastian Schmidt <publicarray> Co-authored-by: Vincent Fortier <[email protected]> Co-authored-by: hgy59 <[email protected]>
Motivation:
The
package.tgz
only contains/var/packages/<package>/target
directory (refereed as@appstore
). This PR aim at working around that in order to allow installing files also into@appdata
,@apptemp
and@apphome
directories.A good example is with the
tvheadend
package where a few mandatory files needs to be contained under the new@appdata
directory for the application to function. With the DSM7 new directory structure there are no workaround to allow this. Usage example available here 90985a4With the DSM7 migration, a quick count shows more than 60x packages needing to drop files into the new
/var/packages/<package>/var
instead of the previous/var/packages/<package>/target/var
directory. There are another set of 27xcross/*
usingetc
andvar
directories at build time.This PR creates the following new variable to be used at build time (backward compatible <= DSM6):
INSTALL_PREFIX_ETC
=target/../etc
INSTALL_PREFIX_VAR
=target/../var
INSTALL_PREFIX_TMP
=target/../tmp
INSTALL_PREFIX_HOME
=target/../home
And also creates the following new variables to be used at package creation time (backward compatible <= DSM6):
STAGING_SPKETC
->staging/@etc
STAGING_SPKVAR
->staging/@var
STAGING_SPKTMP
->staging/@tmp
STAGING_SPKHOME
->staging/@home
Linked issues: #4545
TODO
target/@app*
. Currently they are being discarded post-rsync.etc
rsync
+ delete.tgz
copy prior torsync
+ delete at preupgrade.OR if size to big do arsync
+mv
oftarget/var
astarget/var.backup.DSM7-upgrade
so it is kept and not reprocessed at next upgrade.Should then theDiffer for another PR if needed.target/env
used for python wheels be migrated to$HOME
leading to@apphome
?Checklist
all-supported
completed successfully