Homebrew / homebrew-cask-drivers

💀 Casks of Drivers (deprecated)
458 stars 446 forks source link

SafeNet Authentication Client installing wrong version #2323

Closed tnaumann closed 3 years ago

tnaumann commented 3 years ago

Description of issue

The current formula only supports Catalina, but Safenet Authentication Client has several versions for MacOS:

SafeNet Version OS X 10.09 OS X 10.10 OS X 10.11 OS X 10.12 OS Catalina OS Big Sur
10.2
10.2
10.0

(Source: https://support.globalsign.com/ssl/ssl-certificates-installation/safenet-drivers)

Specifically, the following versions are supposed to be used:

Ideally, the formula could check MacOS version and install the appropriate version of SafeNet. Minimally, the formula should be updated to install on Big Sur.

Command that failed

brew install safenet-authentication-client

Output of command with --verbose --debug

Click to expand


brew install --verbose --debug safenet-authentication-client
==> Cask::Installer#install
==> Printing caveats
==> Cask::Installer#fetch
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.2.2-52-g83821cf\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.4\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --silent --head --request GET https://www.globalsign.com/en/safenet-drivers/USB/10.2/Safenet_10.2_Post_GA_R3.zip
==> Downloading https://www.globalsign.com/en/safenet-drivers/USB/10.2/Safenet_10.2_Post_GA_R3.zip
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.2.2-52-g83821cf\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.4\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --head https://www.globalsign.com/en/safenet-drivers/USB/10.2/Safenet_10.2_Post_GA_R3.zip
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.2.2-52-g83821cf\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.4\)\ curl/7.64.1 --header Accept-Language:\ en --fail --retry 3 --location --remote-time --output /Users/tjn/Library/Caches/Homebrew/downloads/8c897a163abe1902aa9e7c8fbe3e487a937b929c9c5bef158a5fa82668fbd52e--Safenet_10.2_Post_GA_R3.zip.incomplete https://www.globalsign.com/en/safenet-drivers/USB/10.2/Safenet_10.2_Post_GA_R3.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8200k    0 8200k    0     0  3054k      0 --:--:--  0:00:02 --:--:-- 3054k
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/tjn/Library/Caches/Homebrew/downloads/8c897a163abe1902aa9e7c8fbe3e487a937b929c9c5bef158a5fa82668fbd52e--Safenet_10.2_Post_GA_R3.zip
/usr/bin/xattr -p com.apple.quarantine /Users/tjn/Library/Caches/Homebrew/downloads/8c897a163abe1902aa9e7c8fbe3e487a937b929c9c5bef158a5fa82668fbd52e--Safenet_10.2_Post_GA_R3.zip
==> /Users/tjn/Library/Caches/Homebrew/downloads/8c897a163abe1902aa9e7c8fbe3e487a937b929c9c5bef158a5fa82668fbd52e--Safenet_10.2_Post_GA_R3.zip is not quarantined
==> Quarantining /Users/tjn/Library/Caches/Homebrew/downloads/8c897a163abe1902aa9e7c8fbe3e487a937b929c9c5bef158a5fa82668fbd52e--Safenet_10.2_Post_GA_R3.zip
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift /Users/tjn/Library/Caches/Homebrew/downloads/8c897a163abe1902aa9e7c8fbe3e487a937b929c9c5bef158a5fa82668fbd52e--Safenet_10.2_Post_GA_R3.zip https://www.globalsign.com/en/safenet-drivers/USB/10.2/Safenet_10.2_Post_GA_R3.zip https://support.globalsign.com/ssl/ssl-certificates-installation/safenet-drivers
==> Verifying checksum for cask 'safenet-authentication-client'
Error: macOS Catalina is required for this software.
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:272:in `macos_dependencies'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:263:in `satisfy_dependencies'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:75:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:100:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:69:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:68:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:68:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:167:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:122:in `
'

Output of brew doctor --verbose

Click to expand


==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL
==> $LOAD_PATHS
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/warning-1.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tapioca-0.4.23/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/spoom-1.0.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thor-1.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-runtime-stub-0.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-cobertura-1.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-0.21.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov_json_formatter-0.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-html-0.12.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.5.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-sorbet-0.6.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rails-2.11.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.11.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-1.18.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unicode-display_width-2.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-progressbar-1.11.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-ast-1.8.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec_junit_formatter-0.4.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-wait-0.0.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-sorbet-1.8.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-0.5.6274/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-static-0.5.6274-universal-darwin-14/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-retry-0.6.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-its-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-github-2.3.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-3.10.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-mocks-3.10.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-expectations-3.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-core-3.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-support-3.10.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ronn-0.7.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/regexp_parser-2.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rdiscount-2.2.0.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/rdiscount-2.2.0.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rack-2.2.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/pry-0.14.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.6.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/patchelf-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parlour-6.0.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-runtime-0.5.6274/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rainbow-3.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parser-3.0.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel_tests-3.7.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel-1.20.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mustache-1.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/method_source-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.8.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/webrobots-0.1.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/webrick-1.7.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubyntlm-0.6.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/nokogiri-1.11.7-x86_64-darwin/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/racc-1.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/racc-1.5.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mini_portile2-2.5.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-persistent-4.0.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-digest_auth-1.4.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-3.3.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-data-3.2021.0704/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/http-cookie-1.0.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/hpricot-0.8.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/hpricot-0.8.6
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/elftools-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/domain_name-0.5.20190701/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf-0.1.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf_ext-0.0.7.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/unf_ext-0.0.7.7
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/docile-1.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/diff-lcs-1.4.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/did_you_mean-1.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/connection_pool-2.2.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/commander-4.6.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/highline-2.0.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/colorize-0.8.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/coderay-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/byebug-11.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/byebug-11.1.3
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bootsnap-1.7.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/bootsnap-1.7.5
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/msgpack-1.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/msgpack-1.4.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bindata-2.4.10/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ast-2.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/addressable-2.8.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/public_suffix-4.0.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.1.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-2.0.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/minitest-5.14.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.10/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby
/Library/Ruby/Gems/2.6.0/gems/did_you_mean-1.3.0/lib
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/x86_64-darwin20
/Library/Ruby/Site/2.6.0/universal-darwin20
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/x86_64-darwin20
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin20
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/x86_64-darwin20
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20
/usr/local/Homebrew/Library/Homebrew
==> Homebrew Version
3.2.2-52-g83821cf
==> macOS
11.4
==> SIP
Enabled
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3953 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (179 casks)
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /usr/local/Caskroom/miniconda/base/bin/python3-config
  /usr/local/Caskroom/miniconda/base/bin/ncursesw6-config
  /usr/local/Caskroom/miniconda/base/bin/python3.8-config

Output of brew tap

Click to expand


homebrew/cask
homebrew/cask-drivers
homebrew/core
homebrew/services

tnaumann commented 3 years ago

For the minimal suggestion above, the following modification should work:

cask "safenet-authentication-client" do
  version "10.2.111.0"
  sha256 "af622151e7188d25f326420d3d210dc676002c765a670bd756fd40bd050fd0a5" 

  url "https://www.globalsign.com/en/safenet-drivers/USB/#{version.major_minor}/Safenet_#{version.major_minor}_Post_GA_(R4).zip"
  name "SafeNet Authentication Client"
  desc "Client for smart card readers and security tokens"
  homepage "https://support.globalsign.com/ssl/ssl-certificates-installation/safenet-drivers"

  livecheck do
    skip "No version information available"
  end

  depends_on macos: :big_sur
  container nested: "Safenet #{version.major_minor} Post GA (R4) 2/SafeNet Authentication Client #{version.major_minor}.pkg"

  pkg "SafeNet Authentication Client #{version.major_minor}.pkg"

  uninstall launchctl: [
    "com.SafeNet.SACMonitor",
    "com.SafeNet.SACSrv",
  ],
            quit:        [
              "com.gemalto.Gemalto-Smart-Card-Token.PKCS11-Token",
              "SACMonitor",
            ],
            pkgutil:   [
              "com.safenet.safenetAuthenticationClient.eTokenConf.pkg",
              "com.safenet.safenetAuthenticationClient.eTokenFramework.pkg",
              "com.safenet.safenetAuthenticationClient.scripts.pkg",
            ],
            delete:    "/Applications/SafeNet"

  zap trash: "~/Library/Application Scripts/com.gemalto.Gemalto-Smart-Card-Token.PKCS11-Token"
end
bevanjkay commented 3 years ago

Hi @tnaumann, your solution looks like it will work for installing Big Sur. You are welcome to submit a PR to update the cask. You could add a conditional statement to the cask to support the different MacOS versions.