Bug 217181 - emulators/winetricks: the port misses dependencies
Summary: emulators/winetricks: the port misses dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Nikolai Lifanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-17 18:12 UTC by John Smith
Modified: 2017-02-17 21:45 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (lifanov)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2017-02-17 18:12:28 UTC
From winetricks:
# Uses the following non-POSIX system tools:
# - wine is used to execute Win32 apps except on Cygwin.
# - ar, cabextract, unrar, unzip, and 7z are needed by some verbs.
# - aria2c, wget, or curl is needed for downloading.
# - sha1sum or openssl is needed for verifying downloads.
# - zenity is needed by the GUI, though it can limp along somewhat with kdialog.
# - xdg-open (if present) or open (for OS X) is used to open download pages
#   for the user when downloads cannot be fully automated.
# - sudo is used to mount .iso images if the user cached them with -k option.
# - perl is used to munge steam config files

all of these need to be mentioned as dependencies for this port:

ar, cabextract, unrar, unzip, 7z, aria2c, wget or curl, sha1sum or openssl, zenity or kdialog, xdg-open, sudo, perl.
Comment 1 Nikolai Lifanov freebsd_committer freebsd_triage 2017-02-17 19:15:07 UTC
I'll add cabextract, curl, and xdg-open to cover most use cases.

ar - always available
unrar, unzip, 7z - transparent fallback with helpful message if not present
aria2c, wget - superseded by curl (used if all three are present)
sha1sum - fallback to something that's always available
sudo - doesn't enable anything that will work on FreeBSD anyway
perl - heavy dependency, single use in winetricks, helpful error message if missing
Comment 2 Nikolai Lifanov freebsd_committer freebsd_triage 2017-02-17 19:41:18 UTC
Actually, perl is already in the dependency chain, so I'll add it explicitly.
Comment 3 John Smith 2017-02-17 19:55:00 UTC
(In reply to Nikolai Lifanov from comment #1)
> sha1sum - fallback to something that's always available

Are you sure the fallback happens? because when I attempt to install DLLs/libs I get messages like this:

Checksum for /home/user/.cache/winetricks/msls31/InstMsiW.exe did not match, retrying download
Comment 4 Nikolai Lifanov freebsd_committer freebsd_triage 2017-02-17 20:27:45 UTC
Yes. Also, sha1sum is not available for FreeBSD anyway.

$ winetricks msls31                                                            
Using winetricks 20170207 - sha1sum: e9fb56411adfee6b85d978502ce7a2625ec05c72 with wine-2.1 (Staging) and WINEARCH=win32
Executing w_do_call msls31
Executing load_msls31 
Executing cd /home/lifanov/.cache/winetricks/msls31
Downloading http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe to /home/lifanov/.cache/winetricks/msls31
--2017-02-17 15:25:06--  http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe
Resolving download.microsoft.com... 23.53.122.20, 2001:418:1456:79b::e59, 2001:418:1456:79e::e59
Connecting to download.microsoft.com|23.53.122.20|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-02-17 15:25:07 ERROR 404: Not Found.

Executing cd /home/lifanov/.cache/winetricks/msls31
Downloading https://web.archive.org/web/http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe to /home/lifanov/.cache/winetricks/msls31
--2017-02-17 15:25:07--  https://web.archive.org/web/http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe
Resolving web.archive.org... 207.241.225.186
Connecting to web.archive.org|207.241.225.186|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: /web/20160710055851/http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe [following]
--2017-02-17 15:25:07--  https://web.archive.org/web/20160710055851/http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe
Reusing existing connection to web.archive.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 1822848 (1.7M) [application/octet-stream]
Saving to: ‘InstMsiW.exe’

InstMsiW.exe        100%[===================>]   1.74M  1.62MB/s    in 1.1s    

2017-02-17 15:25:09 (1.62 MB/s) - ‘InstMsiW.exe’ saved [1822848/1822848]

Executing cd /home/lifanov/.cache/winetricks/msls31
Executing cabextract -q --directory=/home/lifanov/.wine/dosdevices/c:/windows/temp/_msls31 /home/lifanov/.cache/winetricks/msls31/InstMsiW.exe
Executing cp -f /home/lifanov/.wine/dosdevices/c:/windows/temp/_msls31/msls31.dll /home/lifanov/.wine/dosdevices/c:/windows/system32
Comment 5 Nikolai Lifanov freebsd_committer freebsd_triage 2017-02-17 20:28:25 UTC
This is from non-modified winetricks-20170207
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-02-17 20:30:15 UTC
A commit references this bug:

Author: lifanov
Date: Fri Feb 17 20:29:48 UTC 2017
New revision: 434313
URL: https://svnweb.freebsd.org/changeset/ports/434313

Log:
  emulators/winetricks - add additional dependencies

  PR:		217181
  Reported by:	John Smith <godevilove@ya.ru>

Changes:
  head/emulators/winetricks/Makefile
Comment 7 John Smith 2017-02-17 20:33:11 UTC
(In reply to Nikolai Lifanov from comment #4)
1. I didn't say it failed to download and extract the file. It did, but it had to ignore the sha1 check.

2. There's built-in '/sbin/sha1' on FreeBSD, can't winetricks port be adopted to use it instead of sha1sum?
Comment 8 Nikolai Lifanov freebsd_committer freebsd_triage 2017-02-17 20:38:27 UTC
This falls back to "openssl dgst -sha1".
The winetricks utility bails if no sha1 method is available.

I will see if I can work with upstream to make it a bit more FreeBSD-friendly (i.e., use fetch, sha1, etc.).
Comment 9 John Smith 2017-02-17 20:44:23 UTC
(In reply to Nikolai Lifanov from comment #8)
Thank you in advance. The winetricks developer is usually online in irc on #winehq (wizardedit@irc.freenode.net) and he also accepts patches in his GitHub repo.
https://github.com/Winetricks/winetricks
Comment 10 Nikolai Lifanov freebsd_committer freebsd_triage 2017-02-17 21:45:18 UTC
Cool, thanks! I started doing work toward this. I'll close this PR for now.