[-- Attachment #1: Type: text/plain, Size: 2248 bytes --]
Closed issue by Anachron on void-packages repository
https://github.com/void-linux/void-packages/issues/34988
Description:
I'm currently testing a `i686` repo on `/r32` with the following.
`wine` needs an ugly wrapper so far:
```
#!/bin/sh
export WINEDLLPATH="/lib/wine/i386-unix"
sudo -E chroot /r32 "/usr/libexec/wine/wine" "${@}"
```
`/usr/libexec/wine/wine` needs to be symlinked to this script in order for `/bin/wine` (see https://github.com/void-linux/void-packages/blob/master/srcpkgs/wine/files/wine) to find it.
I've put `/usr/bin/chroot /r32` inside my `sudoers` file to not need to type any password for chroots on this path.
The tool `bottles` (see https://github.com/void-linux/void-packages/pull/27066) can now find and launch wine on `32bit`:
```
$ bottles
2022-01-11 09:13:38 INFO: Dxvk found: [dxvk-1.9.2]
2022-01-11 09:13:38 INFO: Vkd3d found: [vkd3d-proton-2.5]
2022-01-11 09:13:38 INFO: Nvapi found: [dxvk-nvapi-v0.5.1]
2022-01-11 09:13:38 INFO: Runners found: [sys-wine-7.0-rc5
|caffe-6.23]
2022-01-11 09:13:41 INFO: Bottles gestartet!
```
For convinience I wrote a little `xp32` helper to handle packages inside the `x86` chroot:
```sh
#!/bin/sh
export XBPS_ARCH="i686"
pl=$(xbps-query -p repository -s multilib | sed 's/-[^:-]*: .*//g')
test -z "${pl}" || {
printf '%s\n' "${pl}" > xp32-pkg.list
xbps-remove ${pl}
}
test -d "/r32" || {
mkdir -v /r32
repo="http://alpha.de.repo.voidlinux.org/current"
xbps-install -S -R "${repo}" -r /r32 base-system || rm -rfv /r32
unlink /lib32
rm -rf /usr/lib32
test -L /lib32 || ln -s /r32/lib /lib32
test -L /usr/lib32 || ln -s /r32/lib /usr/lib32
rm /r32/dev/null
rmdir /r32/{dev,home,mnt,media,proc,sys,tmp}
}
case "${1}" in
c|reconf) shift; xbps-reconfigure -r /r32 "${@}";;
d|pkgdb) shift; xbps-pkgdb -r /r32 "${@}";;
i|install) shift; xbps-install -r /r32 "${@}";;
q|query) shift; xbps-query -r /r32 "${@}";;
r|remove) shift; xbps-remove -r /r32 "${@}";;
w|wine)
shift
test -e /r32/bin/wine || xbps-install -r /r32 wine
ln -vs <PATH-TO-WINEWRAPPER> /usr/libexec/wine/wine
;;
esac
```
(Don't blindly run this, it will eat you alive)
This is a WIP.