Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform a clean upgrade for LuLu (lulu.rb) #53078

Closed
7 tasks done
KizzyCode opened this issue Oct 8, 2018 · 9 comments
Closed
7 tasks done

Perform a clean upgrade for LuLu (lulu.rb) #53078

KizzyCode opened this issue Oct 8, 2018 · 9 comments

Comments

@KizzyCode
Copy link

KizzyCode commented Oct 8, 2018

General troubleshooting steps

Description of issue

The LuLu formula does not perform an upgrade but an uninstall/reinstall process. This is a problem because it does not preserve the user data; I always need to export/import my rules before and afterwards which is quite cumbersome.

Output of brew cask doctor

==> Homebrew Version
1.7.6-143-gc6acab6
==> macOS
10.14
==> SIP
Enabled
==> Java
1.8.0_66
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4032 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-macho-2.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/plist-3.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/backports-3.11.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/activesupport-5.2.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/tzinfo-1.2.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/minitest-5.11.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/i18n-1.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib
/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib
/Library/Ruby/Site/2.3.0
/Library/Ruby/Site/2.3.0/x86_64-darwin18
/Library/Ruby/Site/2.3.0/universal-darwin18
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin18
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin18
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin18
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/usr/local/bin/zsh"

Output of brew tap

homebrew/bundle
homebrew/cask
homebrew/core
kizzycode/formulas
@ran-dall
Copy link
Contributor

@KizzyCode Can you find out exactly where LuLu keep the user data? I can try to rewrite the cask so that it doesn't delete the user data. That might do it...I've never used LuLu. Just offering some help...

@KizzyCode
Copy link
Author

Ok, I’ll take a look 👍🏻
But maybe this is not necessary anymore because there’s already a pull request to fix LuLu’s auto update mechanism (objective-see/LuLu#99)
Then we simply could set auto_updates true and leave this stuff to LuLu.

@ran-dall
Copy link
Contributor

@KizzyCode Fair enough. I do like the idea of auto_update truebut there's a fair amount of people that would disagree.

Regardless, it probably still wouldn't hurt for now to have the user data pulled out; if you still want me to give it a shot.

@KizzyCode
Copy link
Author

Ok, apparently LuLu stores it's settings in /Library/Objective-See/LuLu:

  • the rules.plist file contains the firewall rules
  • the preferences.plist file contains some app preferences (but also firewall-related rules like allowApple or allowInstalled)
  • the installedApps.plist file contains a list of the already installed applications that will be allowed if allowInstalled has been set to true

@vitorgalvao
Copy link
Contributor

This situation is indeed a bother, but it’s a hard one to fix.

All casks do an upgrade via uninstall/install. Presumably its uninstall command removes preferences. Ideally this would be changed upstream to not always remove the preferences (maybe an -uninstall_keep_prefs option).

@KizzyCode
Copy link
Author

KizzyCode commented Nov 21, 2018

I was not aware that the Cask upgrade process does this by intention... I mean, if an "upgrade" is supposed to delete all preferences is not an upgrade but a clean reinstallation (of a newer version) and IMHO should not be called "update"/"upgrade".
There are a lot of apps out there that allow a lot of customisation and if things get reset every time you run brew cask upgrade this is neither expected behaviour nor desirable, is it?

@reitermarkus
Copy link
Member

I mean, if an "upgrade" is supposed to delete all preferences is not an upgrade but a clean reinstallation

Yes, in this case it is a clean reinstallation because we have no control over what the upstream's uninstall script does. That's an exception though.

@KizzyCode
Copy link
Author

Ah, ok; I misunderstood vitorgalvao's comment. Sry 😕

@vitorgalvao
Copy link
Contributor

Ideally, this would be solved upstream, but let’s try something. Can you test that, @KizzyCode?

Closing this issue in favour of that PR.

@lock lock bot added the outdated label Jan 15, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@reitermarkus @vitorgalvao @KizzyCode @ran-dall and others