Giter VIP home page Giter VIP logo

homebrew-netclient's People

Contributors

breagan-acs avatar jrop avatar mattkasun avatar nothingisdead avatar theguy951357 avatar

Watchers

 avatar  avatar

homebrew-netclient's Issues

[Bug]: brew upgrade netclient failed

I tried to upgrade netclient from 0.16.0 to 0.16.1 on my laptop with M1 chip and macOS Monterey, but brew upgrade netclient failed with the message Error: Cask 'netclient' definition is invalid: uninstall :script without :executable. The same error will also occur if I try brew uninstall netclient or brew reinstall netclient.

> brew upgrade netclient
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.16.0 -> 0.16.1
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.16.1/darwin/netclient-arm64.tgz
Already downloaded: /Users/xyz/Library/Caches/Homebrew/downloads/9f9edc353fa2425663f1294b3bac0a5ff9e472d3e3ddbc873be1b740431f5143--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script
==> Purging files for version 0.16.1 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

By the way, I have to modify the PATH variable in /Library/LaunchDaemons/com.gravitl.netclient.plist manually to make netclient work, since homebrew put the binaries of wireguard-tools in /opt/homebrew/bin instead of /opt/homebrew/sbin on my system.

> which wg
/opt/homebrew/bin/wg

[Bug]: NetClient broken on M1 (arm64) Mac

Contact Details

No response

What happened?

Traditionally, homebrew uses a prefix of /usr/local/bin. This means that netclient would be installed under /usr/local/bin/netclient. This path is also hardcoded in the launch daemon created on installation from homebrew.

On M1 (arm64) Macs, due to the architectural changes, homebrew changed its prefix to /opt/homebrew. This means that netclient is now installed under /opt/homebrew/bin/netclient. This means that the launch daemon is invalid and essentially renders netclient unusable. Additionally, the PATH environment variable in the launch daemon needs to have /opt/homebrew/bin, as this is where wg would be. But what is more, even after fixing these two issues, netclient still does not run due to the raised security level on the new Macs:

Screen Shot 2022-08-21 at 02 04 41

This is trivial to fix though, remove the quarantine flag of the binary in your installation script:

xattr -c /opt/homebrew/bin/netclient

After applying all these changes, I can finally use netclient. I hope you can incorporate what is necessary to fix it for everyone :)

TL;DR of fixes (run as sudo):

sed -i '' 's|/usr/local/bin/netclient|/opt/homebrew/bin/netclient|g' /Library/LaunchDaemons/com.gravitl.netclient.plist
sed -i '' 's|/usr/local/sbin|/opt/homebrew/bin:/usr/local/sbin|g' /Library/LaunchDaemons/com.gravitl.netclient.plist
xattr -c /opt/homebrew/bin/netclient

# if applying changes post-mortem, need to reload launch daemon
launchctl unload /Library/LaunchDaemons/com.gravitl.netclient.plist
launchctl load /Library/LaunchDaemons/com.gravitl.netclient.plist

Thanks!

Version

v0.14.6

What OS are you using?

Mac

Relevant log output

No response

Contributing guidelines

  • Yes, I did.

[Bug]: Uninstalling netclient from homebrew results in error

Contact Details

No response

What happened?

Attempting to uninstall netclient using brew returns an error:

~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

Version

v0.16.3

What OS are you using?

Mac

Relevant log output

~ % brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script 
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

Contributing guidelines

  • Yes, I did.

Cannot tap

Loving this project, BTW, and want to install it on my macOS machine, but...

❯ brew tap gravitl/netclient
==> Tapping gravitl/netclient
Cloning into '/usr/local/Homebrew/Library/Taps/gravitl/homebrew-netclient'...
remote: Enumerating objects: 204, done.
remote: Total 204 (delta 0), reused 0 (delta 0), pack-reused 204
Receiving objects: 100% (204/204), 33.16 MiB | 30.53 MiB/s, done.
Resolving deltas: 100% (66/66), done.
Error: Invalid cask: /usr/local/Homebrew/Library/Taps/gravitl/homebrew-netclient/Casks/netclient.rb
Cask 'netclient' is unreadable: /usr/local/Homebrew/Library/Taps/gravitl/homebrew-netclient/Casks/netclient.rb:3: unexpected fraction part after numeric literal
    version 0.14.1
            ^~~~
Error: Cannot tap gravitl/netclient: invalid syntax in tap!

The installer doesn't currently work

The install command returns 404 error, because of missing v before the version number. If I fix it:

url "https://github.com/gravitl/homebrew-netclient/releases/download/v#{version}/netclient.tgz"

It still fails to find the directory and I'm not sure why:

> brew install netclient
==> Downloading https://github.com/gravitl/homebrew-netclient/releases/download/v0.14.0/netclient.tgz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/f53fd9f8f7bd6272cb3265cbc321a700245cfbcd1abca4c79459f009185d9ba8--netclient.tgz
All formula dependencies satisfied.
==> Installing Cask netclient
==> Running installer script '/opt/homebrew/Caskroom/netclient/0.14.0/install.sh'
Password:
env: /opt/homebrew/Caskroom/netclient/0.14.0/install.sh: No such file or directory
==> Purging files for version 0.14.0 of Cask netclient
Error: Failure while executing; `/usr/bin/sudo -E -- /usr/bin/env PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/Library/Homebrew/shims/shared:/usr/bin:/bin:/usr/sbin:/sbin /opt/homebrew/Caskroom/netclient/0.14.0/install.sh` exited with 127. Here's the output:
env: /opt/homebrew/Caskroom/netclient/0.14.0/install.sh: No such file or directory

It seems there is also only a x86 binary in the tgz archive now and install.sh doesn't handle M1 installations (/opt/homebrew instead of /usr/local).

[Bug]: Brew Audit is failing for the MacOS cask

Contact Details

No response

What happened?

Running brew audit netclient as advised from the install guide, fails.

Looks like the fileserver.netmarker.org isn't part of the URL accepted for the cask. And there isn't an uninstaller.

Version

v0.15.2

What OS are you using?

Mac

Relevant log output

audit for netclient: failed
 - The URL's domain fileserver.netmaker.org does not match the homepage domain github.com, a 'verified' parameter has to be added to the 'url' stanza. See https://docs.brew.sh/Cask-Cookbook#when-url-and-homepage-domains-differ-add-verified
 - installer and pkg stanzas require an uninstall stanza
Error: 2 problems in 1 cask detected

Contributing guidelines

  • Yes, I did.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.