TheKevJames / puppet-homebrew

homebrew (+brewcask! +taps!) package installer and provider
https://forge.puppet.com/thekevjames/homebrew
Apache License 2.0
18 stars 44 forks source link

/usr/local under High Sierra #99

Closed tkriener closed 6 years ago

tkriener commented 6 years ago

Hello,

under High Sierra the ownership and permissions of /usr/local cannot be changed. Homebrew already fixed it by just checking and modifying folders under /usr/local, with the directory itself. See also https://github.com/Homebrew/brew/issues/3228

I removed /usr/local from $brew_folders in manifests/install.pp. This seems to fix it.

Regards, Thomas

jordigg commented 6 years ago

Hi @tkriener,

This should have been fixed a while ago. We don't modify/manage /usr/local anymore, we specify subfolders to overcome the High Sierra permissions.

Can you link me to the specific line where it breaks?

Jordi

tkriener commented 6 years ago

I got the following messages using the module without removing /usr/local from install.pp

Error: Failed to set group to '80': Operation not permitted @ lchown_internal - /usr/local Error: /Stage[main]/Homebrew::Install/File[/usr/local]/group: change from wheel to admin failed: Failed to set group to '80': Operation not permitted @ lchown_internal - /usr/local Error: failed to set mode 0755 on /usr/local: Operation not permitted @ chmod_internal - /usr/local Error: /Stage[main]/Homebrew::Install/File[/usr/local]/mode: change from 0755 to 0775 failed: failed to set mode 0755 on /usr/local: Operation not permitted @ chmod_internal - /usr/local Notice: /Stage[main]/Homebrew::Install/File[/usr/local/bin]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/bin]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/Cellar]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/Cellar]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/etc]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/etc]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/Frameworks]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/Frameworks]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/include]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/include]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/lib]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/lib]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/lib/pkgconfig]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/lib/pkgconfig]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/opt]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/opt]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/share]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/share]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/share/doc]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/share/doc]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/share/man]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/share/man]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/var]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/var]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/Homebrew]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/Homebrew]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/Exec[install-homebrew]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/Exec[install-homebrew]: Skipping because of failed dependencies Notice: /Stage[main]/Homebrew::Install/File[/usr/local/bin/brew]: Dependency File[/usr/local] has failures: true Warning: /Stage[main]/Homebrew::Install/File[/usr/local/bin/brew]: Skipping because of failed dependencies Notice: Applied catalog in 0.17 seconds

I don't know if it makes a difference, but homebrew was already installed before.

Regards, Thomas

jordigg commented 6 years ago

It shouldn't. Are you using latest? Can you try using latest master from this repo? I'm not sure the latest release on puppetforge is fully updated. This shouldn't happen anymore since December.

CC @TheKevJames

tkriener commented 6 years ago

I used "puppet module install thekevjames-homebrew" to install the module.

And you are right, my install.pp is looking different from the on in the master-branch.

The one I have is the one from version 1.7.1: https://github.com/TheKevJames/puppet-homebrew/blob/e09557c9336d806b252a649ef56633aa5f7c241c/manifests/install.pp

Are you already planning a new version?

jordigg commented 6 years ago

Yes we should. @TheKevJames should be able to help here.

TheKevJames commented 6 years ago

Ah! Totally my bad, I see that the /usr/local fix is unreleased (as is the multi-user option...). I will look into releasing a v1.8.0 today.

TheKevJames commented 6 years ago

Hey guys, sorry for the delay on this. Version 1.8.0 including a /usr/local fix is now on puppet forge.