786 Commits

Author SHA1 Message Date
Douglas Eichelberger
7fdd75ad41 brew style --fix 2023-04-17 11:00:55 -07:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
Ruoyu Zhong
f5d414e365
os/mac/xcode: fix Clang version for Xcode 14.3
The one shown on the Wikipedia [^1] seems to be wrong. I can confirm
the actual version locally.

[^1]: https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
2023-04-11 22:27:37 +08:00
Bo Anderson
5c55cd78fd
os/mac/xcode: update for Xcode 14.3 2023-04-11 02:50:44 +01:00
Bo Anderson
4465f36f2c
os/mac/pkgconfig/13: update for macOS 13.3 2023-04-11 02:50:26 +01:00
Carlo Cabrera
fdc113d85c
os/mac/version: add unsupported_release? helper 2023-04-07 22:21:08 +08:00
Carlo Cabrera
a4ebb96fe6
Remove MacOS definition from generic OS
We don't want to define `MacOS` in the generic OS, so let's make sure we
refer to it as `OS::Mac` in the places we need it.

This reverts commit 575cb0263cb1428c63b9428bbd913ffde83bd317.
2023-04-04 23:10:51 +08:00
Carlo Cabrera
575cb0263c
determine-test-runners: fix generic OS test failures
Without this, testing on the generic OS results in errors like

    Error: uninitialized constant Homebrew::MacOS
2023-04-04 22:34:17 +08:00
Douglas Eichelberger
adfd12cfd0 Enable more typing 2023-03-21 21:42:51 -07:00
Douglas Eichelberger
4f2ff3819b Clean up rbi files 2023-03-18 16:03:25 -07:00
Ruoyu Zhong
e9ce4a5a4e
Update path to system settings on Ventura
"System Preferences" has been renamed to "System Settings" on Ventura.
Privacy and security settings have moved, too. This commit makes sure
these changes are reflected. (Some adjustments were already made in
#14092.)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-03-17 19:24:07 +08:00
Douglas Eichelberger
04fa6e24d7 Enable more typing 2023-03-13 09:08:56 -07:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Issy Long
3e7a46f474
rubocop: Drop "v" from Naming/MethodParameterName allowlist
- This was an easy fix, "v" => "version".
2023-03-08 14:40:55 +00:00
Maxim Belkin
2b008ae7fd os/linux.rb: wsl_version: apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-27 16:56:28 +00:00
Maxim Belkin
c9b289fc3d Use 'wslview' instead of 'xdg-open' on Windows 2023-02-27 14:39:56 +00:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Bo Anderson
a99323e5a6
os/mac/xcode: do not recommend softwareupdate CLI 2022-10-30 18:16:08 +00:00
Mike McQuaid
52ae5ec6bb
Merge pull request #14038 from abhillman/patch-1
Suggest `--verbose` for `softwareupdate --all ...`
2022-10-25 08:58:56 +01:00
Bo Anderson
6a7eac25e1
Merge pull request #14003 from Bo98/linux-req
Update Linux requirements
2022-10-24 01:41:50 +01:00
Aryeh Hillman
51643d0ef0
Suggest --verbose for softwareupdate --all ...
Gives information about what is being updated, downloaded, etc. Else the updater is quite silent and it's hard to tell what's going on and when it will complete.

Example with the `--verbose` flag:

```
% softwareupdate --all --install --force --verbose

Software Update Tool

Finding available software
Downloading macOS Ventura 13.0
Password: 
Downloading: 65.02%
```

This feature is documented via `--help`; i.e.:

```
% softwareupdate --help
usage: softwareupdate <cmd> [<args> ...]

** Manage Updates:
	-l | --list		List all appropriate update labels (options:  --no-scan, --product-types)
	-d | --download		Download Only
	-i | --install		Install
		<label> ...	specific updates
		-a | --all		All appropriate updates
		-R | --restart		Automatically restart (or shut down) if required to complete installation.
		-r | --recommended	Only recommended updates
		     --os-only	Only OS updates
		     --safari-only	Only Safari updates
		     --stdinpass	Password to authenticate as an owner. Apple Silicon only.
		     --user	Local username to authenticate as an owner. Apple Silicon only.
	--list-full-installers		List the available macOS Installers
	--fetch-full-installer		Install the latest recommended macOS Installer
		--full-installer-version	The version of macOS to install. Ex: --full-installer-version 10.15
	--install-rosetta	Install Rosetta 2
	--background		Trigger a background scan and update operation

** Other Tools:
	--dump-state		Log the internal state of the SU daemon to /var/log/install.log
	--evaluate-products	Evaluate a list of product keys specified by the --products option 
	--history		Show the install history.  By default, only displays updates installed by softwareupdate.  

** Options:
	--no-scan		Do not scan when listing or installing updates (use available updates previously scanned)
	--product-types <type>		Limit a scan to a particular product type only - ignoring all others
		Ex:  --product-types macOS  || --product-types macOS,Safari 
	--products		A comma-separated (no spaces) list of product keys to operate on. 
	--force			Force an operation to complete.  Use with --background to trigger a background scan regardless of "Automatically check" pref 
	--agree-to-license		Agree to the software license agreement without user interaction.

	--verbose		Enable verbose output
	--help			Print this help
```
2022-10-22 16:09:52 -07:00
Bo Anderson
c092708448
Ventura RC version bumps 2022-10-20 20:04:42 +01:00
Francois-Xavier Coudert
e16afb305e Mark macOS Ventura as supported 2022-10-19 11:21:52 +02:00
Bo Anderson
44f93069bb
os/mac/pkgconfig/13: update for beta 9 SDK 2022-10-17 01:14:01 +01:00
Bo Anderson
1882ae4f6e
Update Linux requirements
* Glibc 2.26+ (we use 2.35) require Linux kernel 3.2 or later.
* Remove GCC requirement given it doesn't matter for bottles (we install GCC ourselves if too old) and is probably wrong for the build-from-source case.
* Remove libxcrypt-compat requirement given we don't use libcrypt.so.1 anymore.
2022-10-16 17:08:17 +01:00
Bo Anderson
cd6b81b28d
os/mac/xcode: require Xcode 14.1 on Ventura 2022-10-07 19:28:35 +01:00
Carlo Cabrera
25910b9c68
Use Array.
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-08-26 22:29:55 +08:00
Carlo Cabrera
ab696cbbb7
linux/diagnostic: fix rpath returning nil.
Fixes #13762.

There's still a bug in the GCC linkage check, but I'll need a bit more
time to work on a fix. This at least makes sure `brew doctor` will not
return the error in the issue linked above.
2022-08-26 22:23:02 +08:00
Michka Popoff
d271614872
install glibc/gcc automatically if too old.
Right now this is done through the gcc@5 formula.
See 9692318ca6/Formula/gcc%405.rb (L33)

This is fragile because when we will migrate to gcc@11
we have to think about migrating the installation from one gcc formula to another..
Also, not having the right glibc version results in a non-functional brew
installation on an older Linux: the glibc installation needs
to be done by brew, and not by a workaround in a specific formula

Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Co-Authored-By: Bo Anderson <mail@boanderson.me>
Co-Authored-By: Shaun Jackman <sjackman@gmail.com>
2022-08-25 11:04:37 +01:00
Rylan Polster
b271ae151b
Cleanup 2022-06-29 11:47:57 -04:00
Rylan Polster
ac067eedb2
Create MacOSVersions module 2022-06-29 11:34:49 -04:00
Rylan Polster
f38db6e100
Define MacOS::Version::SYMBOLS on macOS and linux 2022-06-24 14:39:17 -04:00
Bo Anderson
cd73e6bac5
Introduce more Ruby constants for values set by brew.sh 2022-06-17 19:47:57 +01:00
Bo Anderson
75e76361ac
Preliminary macOS 13 support 2022-06-07 02:39:36 +01:00
Mike McQuaid
f43e9b6c04
os/mac/version: remove Yosemite.
It's no longer possible to run Homebrew there.

Co-authored-by: Bo Anderson <mail@boanderson.me>
2022-06-06 05:18:53 +01:00
Bo Anderson
d857c8416d
os/mac: allow fake El Capitan setup for Portable Ruby builds 2022-05-31 17:56:25 +01:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00
Imre Horvath
60f33370b3
Fix detect_clang_version version extraction
The previous implementation was depending on a fix number of version number segments. Apple has introduced one more tag for the latest CLT version 13.4, which broke the check, leading to a false warning. With this rewritten regex we have a more robust version detection.
2022-05-27 11:18:11 +02:00
Bo Anderson
01d3dac43d
os/mac/xcode: support Xcode 13.4 2022-05-26 18:11:29 +01:00
Bo Anderson
fb358071ce
os/mac/sdk: use unversioned SDK if matching version isn't found 2022-05-16 16:18:48 +01:00
Bo Anderson
7d10bfc6b3
os/mac/pkgconfig/12: update for macOS 12.3 2022-04-27 00:50:13 +01:00
danielnachun
d173b44245
os/mac/keg.rb: move codesign_patched_binary from here 2022-04-08 18:09:32 -07:00
Bo Anderson
51a5776071
os/mac/xcode: fix latest Xcode on Big Sur 2022-03-24 15:09:30 +00:00
Bo Anderson
8a10284baf
os/mac/xcode: support Xcode 13.3 2022-03-23 23:35:06 +00:00
Carlo Cabrera
1447f0853b
Merge pull request #12584 from chris-araman/chris-araman/missing-rpath
linkage: display executables with missing rpath
2022-03-08 17:33:07 +08:00
danielnachun
57e3e62edb
os/mac/keg.rb: rename to codesign_patched_binary 2022-03-03 17:35:16 -08:00
Carlo Cabrera
dee3638653
os/mac/{keg,mach}: fix cache invalidation
We were rewriting dylib IDs and install names using `MachO::Tools`,
which doesn't update the state of the file in memory. This leads to
those changes being undone when we call `delete_rpath`.

We fix this by making sure the state of the file in memory always
matches the state of file on disk.

Closes #12832.
2022-02-11 23:19:15 +08:00
Bo Anderson
f78a3ccb65
os/mac/xcode: support Xcode 13.2.1 2022-02-07 04:28:01 +00:00
Carlo Cabrera
568bc94f3e
os/mac/keg: use MachOFile#delete_rpath instead of MachO::Tools
This will allow us to avoid keeping track of the number of `RPATH`s
while trying to delete duplicates.

See discussion at #12745.
2022-01-19 00:34:39 +08:00
Colin Dean
b632123d6b
Force UTF-8 encoding of lsb_release output
It's possible that the output may be encoded ASCII-8BIT, which cannot be automatically encoded to UTF-8 by Ruby's JSON library.

In this particular case, elementaryOS 6.1 returns `Jólnir` as a part of the lsb_release Description field.
Ruby's IO.popen would return this whole output in ASCII-8BIT.
When this description field was passed to homebrew-bundle to be written in a JSON lockfile,
Ruby throws an exception because it could not automatically reencode from ASCII-8BIT to UTF-8.

This may actually affect other output of the calls to the underlying `Utils.popen_read` but this may be the first thing to trigger it since
JSON requires UTF-8 output and nothing else using that function may require UTF-8.

Fixes #12689 12689
Fixes Homebrew/homebrew-bundle#1043
2022-01-09 21:12:52 -05:00