• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

brewdo/brewdo: sandboxing for Homebrew

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

brewdo/brewdo

开源软件地址:

https://github.com/brewdo/brewdo

开源编程语言:

Ruby 66.5%

开源软件介绍:

brewdo

brewdo is a wrapper for Homebrew that sandboxes the installation process, giving you the following advantages:

  • Your user account loses write rights to /usr/local, making it much harder to accidentally break your Homebrew-installed software (or other /usr/local software)

  • Software installations lose write rights to your home directory and other places outside /usr/local, blocking those installations from modifying things they're not supposed to

  • You can cleanly share Homebrew admin rights among multiple users of the same system

brewdo uses sudo(1), but not to run commands as root; rather, to run Homebrew under a dedicated sandbox user account.

brewdo grew out of the experiment in my blog post, Sandboxing Homebrew.

Status

brewdo works and I use it personally, but I do recommend you make sure your system is backed up before running brewdo install or brewdo switch.

brewdo has been tested on:

  • macOS 10.13 High Sierra (primary development platform)
  • macOS 10.11 El Capitan

In the past, brewdo was also tested as far back as macOS 10.8 Mountain Lion, and I think it should still work there.

Installation

If you have a new system with no /usr/local at all, you can install brewdo by first running sudo ./brewdo install in your Git clone; this will set up the sandbox user and Homebrew into a new /usr/local. When this is done, you can optionally run ./brewdo do make install to install the brewdo program and its man page into /usr/local so you can use it across your whole system.

You can also run brewdo directly out of your Git clone; the program is an entirely self-contained script. brewdo.1.ronn is the Ronn-formatted man page for brewdo that you can read directly to get information on using the program.

How it works

brewdo requires a sandbox user account (traditionally _homebrew). This user account is switched to using Sudo whenever you use brewdo to execute a Homebrew command, unless that command is known to not require write rights to the Homebrew root (e.g. help, list). The environment is set so that brewdo-wrapped Homebrew uses the new system-wide log directory (/var/log/homebrew, which was chosen because Console.app finds it transparently). brewdo also takes care of extra steps required by some formulae, such as creating (and cleaning up) a temporary home directory.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap