[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#916613: [winetricks] Don't remove upstream's manual selfupdate option



Package: winetricks
Version: 0.0+20181203-2
Severity: wishlist
Tags: pending


Hi all,

Currently we completely patch out Winetricks' selfupdate feature
(remove-self-update.patch).  Now I plan to only disable the *automatic*
winetricks version check and selfupdate, but keep the option
"--self-update" for manual updates:

The default behavior of the Debian package will still be unchanged then.

One has to execute as root "winetricks --self-update" to download and
install the upstream version in /usr/bin/winetricks.  Further my
proposed version is quite verbose about this, and also requires an
explicit confirmation before updating to the upstream version.

The complete change is at https://salsa.debian.org/wine-team/winetricks.
For easier discussion I also attached the patch with the new implementation.

Any thoughts on this, or need for more explanation?
I'd be especially happy about suggestions for better wording.

jre
>From 9413ec1be8ed1ca3c3daf5668c529ec2a1805a86 Mon Sep 17 00:00:00 2001
From: Jens Reyer <jre.winesim@gmail.com>
Date: Sun, 9 Dec 2018 22:20:43 +0100
Subject: [PATCH] Add disable-automatic-selfupdate.patch.

Disable automatic version check and selfupdate.
Warn and ask on manual selfupdate.
Document this in README.Debian.
---
 debian/README.Debian                          | 14 ++++
 .../disable-automatic-selfupdate.patch        | 79 +++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 94 insertions(+)
 create mode 100644 debian/patches/disable-automatic-selfupdate.patch

diff --git a/debian/README.Debian b/debian/README.Debian
index 3d52574..3ba53b6 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -54,3 +54,17 @@ for more information:
 
   https://bugs.launchpad.net/ubuntu/+source/winetricks/+bug/1006909
 
+
+Winetricks' selfupdate
+======================
+
+Winetricks' automatic selfupdate and version check is disabled in
+Debian.  Although you may still run a manual "winetricks --selfupdate",
+be aware that this will install /usr/bin/winetricks directly from its
+developers, without any lookover from Debian.  What happens then, is out
+of Debian's control.
+Assuming the selfupdate only changed /usr/bin/winetricks, but nothing
+else was changed by this subsequently, then a future update of the
+winetricks package will bring back the regular Winetricks by Debian.
+But again: Debian cannot guarantee this.
+
diff --git a/debian/patches/disable-automatic-selfupdate.patch b/debian/patches/disable-automatic-selfupdate.patch
new file mode 100644
index 0000000..10b3a6c
--- /dev/null
+++ b/debian/patches/disable-automatic-selfupdate.patch
@@ -0,0 +1,79 @@
+Description: Disable automatic version check and selfupdate.
+  Warn and ask on manual selfupdate.
+Author: Jens Reyer <jre.winesim@gmail.com>
+Forwarded: not-needed
+Last-Update: 2018-12-16
+
+--- a/src/winetricks
++++ b/src/winetricks
+@@ -941,6 +941,18 @@ winetricks_check_update_availability()
+         w_warn "You don't have the proper permissions to run this command. Try again with sudo or as root."
+         exit
+     fi
++
++    w_warn "This will install Winetricks directly from its original developers.  Debian has no control over that version."
++    printf %s "To continue press Y or N, then Enter: "
++    read -r debresponse
++    if test "$debresponse" = Y || test "$debresponse" = y; then
++        true
++    elif test "$debresponse" = N || test "$debresponse" = n; then
++        exit
++    else
++        w_warn "Please press Y or N.  Aborting"
++        exit
++    fi
+ }
+ 
+ winetricks_selfupdate()
+@@ -982,6 +994,8 @@ winetricks_selfupdate()
+     w_try chmod +x "$0"
+ 
+     w_warn "Update finished! The current version is $($0 -V). Use 'winetricks --update-rollback' to return to the previous version."
++    w_warn "Winetricks is no more controlled by Debian but by the Winetricks project now."
++    w_warn "The next update of the winetricks package may or may not revert this change."
+ 
+     exit
+ }
+@@ -3168,10 +3182,10 @@ winetricks_latest_version_check()
+     if [ ! "$WINETRICKS_VERSION" = "${latest_version}" ] && [ ! "$WINETRICKS_VERSION" = "${latest_version}-next" ]; then
+         if [ -f "${WINETRICKS_CONFIG}/enable-auto-update" ] ; then
+             w_info "You are running winetricks-${WINETRICKS_VERSION}."
+-            w_info "New upstream release winetricks-${latest_version} is available."
+-            w_info "auto-update enabled: running winetricks_selfupdate"
+-            winetricks_selfupdate
+-        else
++            w_info "The automatic selfupdate is disabled in the Debian packages."
++            #winetricks_selfupdate
++        fi
++        #else
+             case $LANG in
+                 pl*)
+                     w_warn "Korzystasz z winetricks-${WINETRICKS_VERSION}, a najnowszÄ? wersjÄ? winetricks-${latest_version}!"
+@@ -3186,7 +3200,7 @@ winetricks_latest_version_check()
+                     w_warn "You should update using your distribution's package manager, --self-update, or manually."
+                     ;;
+             esac
+-        fi
++        #fi
+     fi
+ }
+ 
+@@ -5321,7 +5335,8 @@ winetricks_init()
+         echo "Using winetricks $(winetricks_print_version) with ${WINETRICKS_ORIG_WINE_VERSION} and WINEARCH=${W_ARCH}"
+     fi
+ 
+-    winetricks_latest_version_check
++    # In Debian during winetricks_init we don't want to automatically connect to a remote site
++    #winetricks_latest_version_check
+ }
+ 
+ winetricks_usage()
+@@ -5398,7 +5413,7 @@ Options:
+     --force           Don't check whether packages were already installed
+     --gui             Show gui diagnostics even when driven by commandline
+     --isolate         Install each app or game in its own bottle (WINEPREFIX)
+-    --self-update     Update this application to the last version
++    --self-update     Update this application to the latest version (non-Debian)
+     --update-rollback Rollback the last self update
+ -k, --keep_isos       Cache isos (allows later installation without disc)
+     --no-clean        Don't delete temp directories (useful during debugging)
diff --git a/debian/patches/series b/debian/patches/series
index b1203ff..7f6476e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+disable-automatic-selfupdate.patch
 appdata-license.patch
 drop-bash-completion-download.patch
-- 
2.19.2


Reply to: