diff --git a/_service b/_service
index 7ae6513..7269078 100644
--- a/_service
+++ b/_service
@@ -3,7 +3,7 @@
@PARENT_TAG@
v(.*)
https://github.com/wine-compholio/wine-staging.git
- refs/tags/v2.20
+ refs/tags/v2.21
v*.*
git
diff --git a/wine-staging-2.20.tar.xz b/wine-staging-2.20.tar.xz
deleted file mode 100644
index 2a3c970..0000000
--- a/wine-staging-2.20.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a20300e18be553de96a0f400ac1406420e04d190dc329437d130db9df9d5a70c
-size 7709416
diff --git a/wine-staging-2.21.tar.xz b/wine-staging-2.21.tar.xz
new file mode 100644
index 0000000..c4e7be6
--- /dev/null
+++ b/wine-staging-2.21.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5df468532ada7ff8713cf31a186f80e19cdf16fb913974a8989c2c86c3428373
+size 7730272
diff --git a/wine.spec b/wine.spec
index 933eb59..144cd81 100644
--- a/wine.spec
+++ b/wine.spec
@@ -118,7 +118,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %{ix86} x86_64 ppc %arm
%if %{staging}
# upstream patch target version
-%define staging_version 2.20
+%define staging_version 2.21
Source100: wine-staging-%{staging_version}.tar.xz
BuildRequires: gtk3-devel
BuildRequires: libOSMesa-devel
diff --git a/winetricks b/winetricks
index 376706c..13a94cb 100644
--- a/winetricks
+++ b/winetricks
@@ -2741,14 +2741,25 @@ w_call()
w_try w_do_call "$@"
}
+w_backup_reg_file()
+{
+ W_reg_file=$1
+
+ w_get_sha256sum "$W_reg_file"
+
+ w_try cp "$W_reg_file" "$W_TMP_EARLY/_reg_$(echo "$_W_gotsha256sum" | cut -c1-8)"_$$.reg
+
+ unset W_reg_file _W_gotsha256sum
+}
+
w_register_font()
{
- file=$1
+ W_file=$1
shift
- font=$1
+ W_font=$1
- case "$file" in
- *.TTF|*.ttf) font="$font (TrueType)";;
+ case "$W_file" in
+ *.TTF|*.ttf) W_font="$W_font (TrueType)";;
esac
# Kludge: use _r to avoid \r expansion in w_try
@@ -2756,23 +2767,25 @@ w_register_font()
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts]
-"$font"="$file"
+"$W_font"="$W_file"
_EOF_
# too verbose
w_try_regedit "$W_TMP_WIN"\\_register-font.reg
# shellcheck disable=SC1037
- cp "$W_TMP"/*.reg "$W_TMP_EARLY"/_reg$$.reg
+ w_backup_reg_file "$W_TMP"/_register-font.reg
# Wine also updates the win9x fonts key, so let's do that, too
cat > "$W_TMP"/_register-font.reg <<_EOF_
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Fonts]
-"$font"="$file"
+"$W_font"="$W_file"
_EOF_
w_try_regedit "$W_TMP_WIN"\\_register-font.reg
# shellcheck disable=SC1037
- cp "$W_TMP"/*.reg "$W_TMP_EARLY"/_reg$$-2.reg
+ w_backup_reg_file "$W_TMP"/_register-font.reg
+
+ unset W_file W_font
}
w_register_font_replacement()
@@ -2788,6 +2801,9 @@ REGEDIT4
"$_W_alias"="$_W_font"
_EOF_
w_try_regedit "$W_TMP_WIN"\\_register-font-replacements.reg
+
+ w_backup_reg_file "$W_TMP"/_register-font-replacements.reg
+
unset _W_alias _W_font
}
@@ -4743,6 +4759,11 @@ winetricks_init()
USERNAME="$LOGNAME"
fi
+ # Running Wine as root is (generally) bad, mmkay?
+ if [ "$(id -u)" = 0 ]; then
+ w_warn "Running Wine/winetricks as root is highly discouraged. See https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F"
+ fi
+
# Ephemeral files for this run
WINETRICKS_WORKDIR="$W_TMP_EARLY/w.$LOGNAME.$$"
test "$W_OPT_NOCLEAN" = 1 || rm -rf "$WINETRICKS_WORKDIR"
@@ -6309,7 +6330,7 @@ w_metadata dxsdk_jun2010 dlls \
load_dxsdk_jun2010()
{
- w_download https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe 11a0ddeb293040f8b99eeb1bdf6197ae1b26fdb74c036e5717d8e45db9c1576e
+ w_download https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe 9f818a977c32b254af5d649a4cec269ed8762f8a49ae67a9f01101a7237ae61a
# Without dotnet20, install aborts halfway through
w_call dotnet20