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
Add docs/Linuxbrew.md #5483
Add docs/Linuxbrew.md #5483
Conversation
docs/Linuxbrew.md
Outdated
|
||
# Linuxbrew | ||
|
||
The Homebrew package manager may be used on Linux and Windows 10+, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about), as well as macOS. Homebrew is referred to as Linuxbrew when running on Linux or Windows. It can be installed in your home directory and does not require root access. Recent versions of *glibc* and *gcc* may be installed in your home directory on an older distribution of Linux. A Linuxbrew installation does not use any libraries provided by your host system, except *glibc* and *gcc* if they are sufficiently current. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Linuxbrew installation does not use any libraries provided by your host system, except *glibc* and *gcc* if they are sufficiently current. Otherwise, versions of *glibc* and *gcc* may be installed in your home directory on an older distribution of Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence:
Besides macOS, Homebrew also supports Linux and Windows 10+ (via its Windows Subsystem for Linux (WSL)).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to remove the mention of macOS, as its stating the obvious to say that Homebrew runs on macOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: "The Homebrew package manager may also be used on Linux and Windows 10+, using Windows Subsystem for Linux (WSL)."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to remove the mention of macOS, as its stating the obvious to say that Homebrew runs on macOS.
Agreed.
does not require root access
does not use the root user
may be installed in your home directory
may be installed in your Homebrew prefix (or some similar wording that still works if Linuxbrew is installed outside the home directory)
if they are sufficiently current.
if they are new enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not require root access.
does not use the root user.
went with does not require sudo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sjackman I'm being pedantic but I think it's worth noting when things like sudo
are mentioned that after installation it doesn't use it (ever) rather than doesn't require it (which sounds like it will if it can)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with…
It can be installed in your home directory, in which case it does not use sudo.
…
The installation script installs Linuxbrew to /home/linuxbrew/.linuxbrew
using sudo if possible and in your home directory at ~/.linuxbrew
otherwise. Linuxbrew does not use sudo after installation.
docs/Linuxbrew.md
Outdated
|
||
# Linuxbrew | ||
|
||
The Homebrew package manager may be used on Linux and Windows 10+, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about), as well as macOS. Homebrew is referred to as Linuxbrew when running on Linux or Windows. It can be installed in your home directory and does not require root access. Recent versions of *glibc* and *gcc* may be installed in your home directory on an older distribution of Linux. A Linuxbrew installation does not use any libraries provided by your host system, except *glibc* and *gcc* if they are sufficiently current. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as well as macOS.
-> as well as on macOS.
?
Or maybe just remove that bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem like stating the obvious.
docs/README.md
Outdated
@@ -7,6 +7,7 @@ | |||
- [Frequently Asked Questions](FAQ.md) | |||
- [Common Issues](Common-Issues.md) | |||
- [`brew` Shell Completion](Shell-Completion.md) | |||
- [Linuxbrew: Homebrew on Linux and Windows](Linuxbrew.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an Installation
page above for mac, should we add a comment there for a Linux installation? Or should we try to regroup both installation procedures in one page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually I'd like the same installation procedure (one-line shell snippet) to be used for both macOS and Linux. In the mean time, https://linuxbrew.sh will be the go-to resource for installation instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"and Windows 10".
docs/Linuxbrew.md
Outdated
+ Can install software to your home directory and so does not require sudo | ||
+ Install software not packaged by your host distribution | ||
+ Install up-to-date versions of software when your host distribution is old | ||
+ Use the same package manager to manage your macOS, Linux, and Windows systems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that text not already somewhere else in the mac doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be, but I don't think it hurts to reiterate the fact here as a feature of Linuxbrew.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur with @iMichka: this section is redundant IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These features are particularly relevant to Linux users of Homebrew.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a bit weird to list features after install instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move Features above Install.
docs/Linuxbrew.md
Outdated
|
||
- [@Linuxbrew on Twitter](https://twitter.com/Linuxbrew) | ||
- [Linuxbrew/core on GitHub](https://github.com/Linuxbrew/homebrew-core) | ||
- [Linuxbrew Discourse](https://discourse.brew.sh/c/linuxbrew) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go on the main homebrew readme page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but it doesn't hurt to reiterate it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Linuxbrew category of Homebrew's Discourse"
|
||
[<img alt="CircleCI logo" style="height:1in" src="https://assets.brandfolder.com/otz6k5-cj8pew-e4rk9u/original/circle-logo-horizontal-black.png">](https://circleci.com/) | ||
|
||
[](https://bintray.com/linuxbrew) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this part can go on the main readme page too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We both use Bintray, and that's acknowledged already. Homebrew doesn't use CircleCI though, so here is a better spot for it.
docs/Linuxbrew.md
Outdated
|
||
[Features](#features), [dependencies](#dependencies) and [installation instructions](#install) are described below. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained in the documentation](https://docs.brew.sh/Formula-Cookbook#homebrew-terminology). | ||
|
||
# Install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using ## Install
: there should be only one header (# Linuxbrew
) IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, <title>
is for the title of the document, and <h1>
(aka #
) is for the first level of section headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @maxim-belkin. This will look weird on docs.brew.sh otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty. I'll give in… this time. =p
docs/Linuxbrew.md
Outdated
|
||
# Install | ||
|
||
The installation script installs Linuxbrew to `/home/linuxbrew/.linuxbrew` if possible and in your home directory at `~/.linuxbrew` otherwise. Using `/home/linuxbrew/.linuxbrew` allows the use of more binary packages, called bottles, than installing in your personal home directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, called bottles,
~> ("bottles")
or ,aka "bottles",
or ("bottles" in Homebrew terminology)
than
~> rather than
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally prefer parenthetical commas over parentheses in my writing. I don't feel strongly about this one. Perhaps
… binary packages (bottles) than installing …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ rg 'binary.*bottle|bottle.*binary'
diagnostic.rb: You can install Homebrew anywhere you want but some bottles (binary packages)
brew.sh:you being able to use all the binary packages (bottles) Homebrew provides. We
build_options.rb: # True if a {Formula} is being built as a bottle (i.e. binary package).
formula.rb: # When installing a bottle (binary package) from a local path this will be
cmd/vendor-install.sh:both Bintray (used for Homebrew bottles/binary packages) and GitHub
dev-cmd/bottle.rb:#: Generate a bottle (binary package) from a formula that was installed with
dev-cmd/bottle.rb: Generate a bottle (binary package) from a formula that was installed with
extend/os/linux/diagnostic.rb: You will be unable to use binary packages (bottles).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like parenthetical style for defining bottles is more common in the Homebrew codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if possible
when would it not be possible?
agreed with matching existing style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation script installs Linuxbrew to
/home/linuxbrew/.linuxbrew
if possible
when would it not be possible?
When the user does not have sudo
permissions on their system.
|
||
```sh | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest moving this snippet up to right below the # Install
and then going into details about it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" | ||
``` | ||
|
||
Follow the *Next steps* instructions to add Linuxbrew to your `PATH` and to your bash shell profile script, either `~/.profile` on Debian/Ubuntu or `~/.bash_profile` on CentOS/Fedora/RedHat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why *Next steps*
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the text output by the installer script for both Homebrew and Linuxbrew.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo -> sudo
?
|
||
```sh | ||
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) | ||
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just occurred to me... -d
tests if directory exists. We need to test -d
, -w
, and -x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the directory exists, I prefer the user get an error message if it's not also -w
or -x
, as with the current code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if neither exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commands are meant to be run after a successful run of sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
, after which one of these two directories will exist.
docs/Linuxbrew.md
Outdated
|
||
# Bottles | ||
|
||
Bottles are Linuxbrew's precompiled binary packages. Linuxbrew bottles work on any Linux system. If you're using an older distribution of Linux, installing your first package will also install a recent version of `glibc` and `gcc`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Bottles"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer not to add scare quotes around each use of the word bottles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to repeat stuff from above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted.
docs/Linuxbrew.md
Outdated
|
||
# Linuxbrew | ||
|
||
The Homebrew package manager may be used on Linux and Windows 10+, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about), as well as macOS. Homebrew is referred to as Linuxbrew when running on Linux or Windows. It can be installed in your home directory and does not require root access. Recent versions of *glibc* and *gcc* may be installed in your home directory on an older distribution of Linux. A Linuxbrew installation does not use any libraries provided by your host system, except *glibc* and *gcc* if they are sufficiently current. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to remove the mention of macOS, as its stating the obvious to say that Homebrew runs on macOS.
Agreed.
does not require root access
does not use the root user
may be installed in your home directory
may be installed in your Homebrew prefix (or some similar wording that still works if Linuxbrew is installed outside the home directory)
if they are sufficiently current.
if they are new enough
docs/Linuxbrew.md
Outdated
|
||
The Homebrew package manager may be used on Linux and Windows 10+, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about), as well as macOS. Homebrew is referred to as Linuxbrew when running on Linux or Windows. It can be installed in your home directory and does not require root access. Recent versions of *glibc* and *gcc* may be installed in your home directory on an older distribution of Linux. A Linuxbrew installation does not use any libraries provided by your host system, except *glibc* and *gcc* if they are sufficiently current. | ||
|
||
[Features](#features), [dependencies](#dependencies) and [installation instructions](#install) are described below. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained in the documentation](https://docs.brew.sh/Formula-Cookbook#homebrew-terminology). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally use a Markdown file link here instead
docs/Linuxbrew.md
Outdated
|
||
[Features](#features), [dependencies](#dependencies) and [installation instructions](#install) are described below. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained in the documentation](https://docs.brew.sh/Formula-Cookbook#homebrew-terminology). | ||
|
||
# Install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @maxim-belkin. This will look weird on docs.brew.sh otherwise.
docs/Linuxbrew.md
Outdated
|
||
# Install | ||
|
||
The installation script installs Linuxbrew to `/home/linuxbrew/.linuxbrew` if possible and in your home directory at `~/.linuxbrew` otherwise. Using `/home/linuxbrew/.linuxbrew` allows the use of more binary packages, called bottles, than installing in your personal home directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if possible
when would it not be possible?
agreed with matching existing style
|
||
```sh | ||
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) | ||
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if neither exist?
|
||
## Raspberry Pi | ||
|
||
Linuxbrew can run on Raspberry Pi (32-bit ARM), but no binary packages (bottles) are available. Support for Raspberry Pi is on a best-effort basis. Pull requests are welcome to improve the experience on Raspberry Pi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a "best-effort basis" and no binary packages I think this should be stated by brew doctor
and the pre-installation instructions (like on old versions of macOS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I'll address that in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks.
docs/Linuxbrew.md
Outdated
|
||
## 32-bit x86 | ||
|
||
Linuxbrew does not currently support 32-bit x86 platforms. It would be possible for Linuxbrew to work on 32-bit x86 platforms with some effort. Pull requests would be welcome if someone were to volunteer to maintain the 32-bit x86 support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I'm not sure the "pull requests would be welcome" part; it'd better be to suggest starting a dedicated fork like Tigerbrew and it could be merged back if it's used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with…
Linuxbrew does not currently support 32-bit x86 platforms. It would be possible for Linuxbrew to work on 32-bit x86 platforms with some effort. An interested and dedicated person could maintain a fork of Homebrew to develop support for 32-bit x86.
docs/Linuxbrew.md
Outdated
|
||
# Bottles | ||
|
||
Bottles are Linuxbrew's precompiled binary packages. Linuxbrew bottles work on any Linux system. If you're using an older distribution of Linux, installing your first package will also install a recent version of `glibc` and `gcc`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to repeat stuff from above.
docs/Linuxbrew.md
Outdated
|
||
- [@Linuxbrew on Twitter](https://twitter.com/Linuxbrew) | ||
- [Linuxbrew/core on GitHub](https://github.com/Linuxbrew/homebrew-core) | ||
- [Linuxbrew Discourse](https://discourse.brew.sh/c/linuxbrew) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Linuxbrew category of Homebrew's Discourse"
docs/README.md
Outdated
@@ -7,6 +7,7 @@ | |||
- [Frequently Asked Questions](FAQ.md) | |||
- [Common Issues](Common-Issues.md) | |||
- [`brew` Shell Completion](Shell-Completion.md) | |||
- [Linuxbrew: Homebrew on Linux and Windows](Linuxbrew.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"and Windows 10".
ef805ef
to
9b09cdf
Compare
I believe I've addressed all your comments. Thanks for your feedback. Ready for re-review. |
9b09cdf
to
98723c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sjackman!
docs/Linuxbrew.md
Outdated
|
||
# Linuxbrew | ||
|
||
The Homebrew package manager may be used on Linux and Windows 10, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about). Homebrew is referred to as Linuxbrew when running on Linux or Windows. It can be installed in your home directory, in which case it does not use sudo. Linuxbrew does not use any libraries provided by your host system, except *glibc* and *gcc* if they are new enough. Linuxbrew can install its own current versions of *glibc* and *gcc* for older distribution of Linux. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo -> sudo
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with sudo
docs/Linuxbrew.md
Outdated
|
||
- [@Linuxbrew on Twitter](https://twitter.com/Linuxbrew) | ||
- [Linuxbrew/core on GitHub](https://github.com/Linuxbrew/homebrew-core) | ||
- [Linuxbrew category of Homebrew's Discourse](https://discourse.brew.sh/c/linuxbrew) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Linuxbrew category](https://discourse.brew.sh/c/linuxbrew) of [Homebrew's Discourse](proper-link-here)
?
98723c4
to
441d28d
Compare
441d28d
to
f25eff1
Compare
brew style
with your changes locally?brew tests
with your changes locally?