-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Feature Request] Support Fuse overlayfs for layered WINE prefixes #136
Comments
Thank you for the feature request.
Sounds interesting.
I am on vocation atm, will review it on monday.
ср, 5 сент. 2018 г., 7:15 ПП pchome <notifications@github.com>:
… I'm currently experimenting with such prefixes, but it's hard to manually
control all mount/unmount commands. It would be great if q4wine can add
experimental support for prefixes mounted with fuse-overlayfs.
*More details*:
- ValveSoftware/Proton#1011
<ValveSoftware/Proton#1011>
- #69 (comment)
<#69 (comment)>
(partially applied to 4./5.)
- https://github.com/containers/fuse-overlayfs
- https://en.wikipedia.org/wiki/OverlayFS
The main mechanics of OverlayFS relate to the merging of directory
access when both filesystems present a directory for the same name.
Otherwise, OverlayFS presents the object, if any, yielded by one or the
other, with the "upper" filesystem taking precedence. Unlike some other
overlay filesystems, the directory subtrees being merged by OverlayFS do
not necessarily have to be from distinct filesystems.
------------------------------
*For first step*:
-
create such prefixes
- check current WINE version ($ wine --version) and create
corresponding base layer e.g. opfx-win64-base-wine-3.15
- split common components from base to e.g.
opfx-win64-common-wine-3.15
- create "workspace" e.g. opfx-myprefix-user, opfx-myprefix-work
and opfx-myprefix
-
mount/unmount on game/tool run/stop
$ fuse-overlayfs -o lowerdir=opfx-win64-common-wine-3.15:opfx-win64-base-wine-3.15,upperdir=opfx-myprefix-user,workdir=opfx-myprefix-work opfx-myprefix
or for opfx-myprefix2
$ fuse-overlayfs -o lowerdir=opfx-win64-common-wine-3.15:opfx-win64-base-wine-3.15,upperdir=opfx-myprefix2-user,workdir=opfx-myprefix2-work opfx-myprefix2
or add preconfigured template (opfx-myprefix-user layer can be used as
template after an "initial setup stage")
$ fuse-overlayfs -o lowerdir=opfx-win64-template-mypreconf:opfx-win64-common-wine-3.15:opfx-win64-base-wine-3.15,upperdir=opfx-myprefix3-user,workdir=opfx-myprefix3-work opfx-myprefix3
unmount
$ fusermount3 -u opfx-myprefix
*Next step*:
- convert from/to regular WINE prefix
- advanced manage
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#136>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABdDNauPSHvO4cH1HVmIuUJYP_9s7xfks5uX_iGgaJpZM4WbPsy>
.
|
Here is some example scripts (to log required steps). Upgrade from wine-3.15 to wine-3.16 was smooth as expected, except part with x_opfx_conf
x_opfx_init
x_opfx_mount
x_opfx_umount
|
hi @pchome jfyi: there is an ability to specify pre/post execution scripts per "Icon": it does exposing all required wine variables like WINEPREFIX and so on, it could help a bit in testing. getting back to the idea. let's clarify the scope:
this is pretty match to the pre/post scripts idea implemented on pre icon basis. but you would like to have this for prefix level as well? |
I would like an option for prefix settings, which will point a prefix is an overlayed prefix and should be mounted before any wine app/util launched. Then it should be mounted/unmounted on literally every app/util start/stop. In other words : I want internal "links" to work too. And I don't want to keep many prefixes mounted all the time. And all this without manually running anything. Literally built-in overlayfs support. If this feature don't suit q4wine's goals -- you can close this issue. |
right so current pre/post scripts are working as you described.
to get the opfx_dir dir dynamically. you can tests this statements to see if it works as expected on Icon level. If it suits fine -- I could add the same settings/mechanic for the Prefix level too. |
Ok, I'll do it later. |
Let's forget about So using only
#!/bin/bash
opfx_dir="$(sed 's/[^\/]*$//' <<< $WINEPREFIX)"
wine_ver="$(wine --version)"
mkdir -p "${WINEPREFIX}-user" "${WINEPREFIX}-work" "${WINEPREFIX}"
# unmount
fusermount3 -qu ${WINEPREFIX}
# wine updated
cp "${opfx_dir}/opfx-win64-base-${wine_ver}/.update-timestamp" "${WINEPREFIX}-user/"
fuse-overlayfs -o lowerdir=${opfx_dir}/opfx-win64-base-${wine_ver},upperdir=${WINEPREFIX}-user,workdir=${WINEPREFIX}-work ${WINEPREFIX}
#!/bin/bash
opfx_name="$(sed 's/^.*\///' <<< $WINEPREFIX)"
wineserver -w
fusermount3 -u $WINEPREFIX && echo "${opfx_name}: unmounted" Those two scripts works as pre/post run scripts for icon. Note:
|
Hi @pchome I can merge the scripts, but maybe it will be better to implement this as a Q4Wine "Plugin" and just WGET'ing it from your git repo's releases (just like it is currently done for winetricks). So you will not depend on q4wine's release cycle (which is currently a bit weird I believe :D) So pre/post run scripts for icon works fine, right?
I can export this into Q4WINE_DEFAULT_PREFIXDIR env variable or something if you wish. As for the next moves: how you would like this to be integrated? |
I'm not sure I correctly understand how this "Plugin" supposed to work. For q4wine I prefer to see something like
Note: consider to use |
Partially resolved by recent WINE/Proton updates. While |
thank you for the info |
I'm currently experimenting with such prefixes, but it's hard to manually control all mount/unmount commands. It would be great if q4wine can add experimental support for prefixes mounted with
fuse-overlayfs
.More details:
For first step:
create such prefixes
$ wine --version
) and create correspondingbase
layer e.g.opfx-win64-base-wine-3.15
base
to e.g.opfx-win64-common-wine-3.15
opfx-myprefix-user
,opfx-myprefix-work
andopfx-myprefix
mount/unmount on game/tool run/stop
or for
opfx-myprefix2
or add preconfigured template (opfx-myprefix-user layer can be used as template after an "initial setup stage")
unmount
Next step:
The text was updated successfully, but these errors were encountered: