Skip to content

Commit 7dcce4e

Browse files
committed
Allow wine to work
1 parent d38376d commit 7dcce4e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ jobs:
121121
mkdir wine_shims
122122
rustc patches/bcryptprimitives.rs -Copt-level=3 -Clto=fat --out-dir wine_shims --target x86_64-pc-windows-gnu
123123
echo "WINEPATH=$(pwd)/wine_shims" >> $GITHUB_ENV
124+
wine echo || true # create ~/.wine to ensure wine works even when the build system is restricted using landlock
124125
125126
- name: Build
126127
run: ./y.sh build --sysroot none

build_system/landlock.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ pub(super) fn lock_build(cargo: &Path, frozen: bool) {
4949
&[env::current_dir().unwrap().join("build"), env::current_dir().unwrap().join("dist")],
5050
access_all,
5151
))
52+
.unwrap()
53+
.add_rules(path_beneath_rules(
54+
&[
55+
#[allow(deprecated)]
56+
&std::env::home_dir().unwrap().join(".wine"),
57+
Path::new("/run/user/"),
58+
],
59+
access_all,
60+
))
5261
.unwrap();
5362

5463
let ruleset = if frozen {

0 commit comments

Comments
 (0)