890 Commits

Author SHA1 Message Date
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
Chris Araman
caf310038f
linkage: display executables with missing rpath
An executable that links against @rpath-prefixed dylibs must include at least
one runtime path. This will prevent issues like the one resolved in #91485.

Caveats:
1. This won't find executables that have only recursive dylib dependencies with
   @rpath prefixes.
2. This makes no attempt to resolve @rpath, @executable_path or @loader_path
   dylibs, or to verify the correctness of any LC_RPATH entries, or to
   otherwise simulate dlopen logic.
3. Weakly-linked dylibs are still excluded from the search for broken linkage.

The scope is narrow in order to focus on this particular problem. It is meant
only as a sanity check.
2021-12-20 13:44:35 -08:00
Bo Anderson
d8d52ba691
Merge pull request #12399 from Bo98/xcode-13.1-big_sur
os/mac/xcode: update latest Xcode to 13.1 on Big Sur
2021-11-08 19:47:23 +00:00
Bo Anderson
e30b7f118d
os/mac: bump latest SDK 2021-11-08 15:37:15 +00:00
Bo Anderson
404850600f
os/mac/xcode: update latest Xcode to 13.1 on Big Sur 2021-11-08 15:36:54 +00:00
Bo Anderson
4836ea0ba2
Remove XQuartz handling 2021-11-05 12:40:22 +00:00
Bo Anderson
9493cbb80a
os/linux/elf: don't report missing libraries to dependents 2021-10-31 17:03:29 +00:00
Bo Anderson
89d31a3504
Merge pull request #12263 from Bo98/monterey
Mark macOS Monterey as supported
2021-10-21 22:13:53 +01:00
Bo Anderson
1d45d82604
Merge pull request #12262 from Bo98/xcode-13.1
os/mac/xcode: require Xcode 13.1 on Monterey
2021-10-21 12:01:25 +01:00
Bo Anderson
c8752c91f0
Mark macOS Monterey as supported. 2021-10-19 16:57:39 +01:00
Bo Anderson
5d670728f1
os/mac/xcode: require Xcode 13.1 on Monterey 2021-10-19 16:56:06 +01:00
Mike McQuaid
0cda6a0657
Only use patchelf.rb
Remove support for using the `patchelf` formula for writing as it's been
off by default for a long time now.
2021-10-19 15:15:56 +01:00
Carlo Cabrera
231b10beea
os/mac: track only the major version instead 2021-10-11 20:25:55 +08:00
Carlo Cabrera
8824352ab0
os/mac: bump latest_sdk_version
The newest macOS SDK version is 11.3.
2021-10-10 14:28:31 +08:00
Carlo Cabrera
bcc3cd7819
os/mac/xcode: update download url
Closes #12174.
2021-10-04 22:22:20 +08:00
fn ⌃ ⌥
bad19b88cd development_tools: update type signatures 2021-09-29 18:16:34 -07:00
fn ⌃ ⌥
9638e3e8c0 development_tools: update type signatures 2021-09-29 17:44:26 -07:00
fn ⌃ ⌥
61a7ffb999 development_tools: add type signatures 2021-09-29 15:12:53 -07:00
Bo Anderson
1be5ed836e
os/mac/xcode: support Xcode 13 2021-09-28 02:24:18 +01:00
Bo Anderson
ab455d1f38
os/mac/xquartz: fix handling of XQuartz 2.8.0+ 2021-09-23 14:24:16 +01:00
Bo Anderson
ffdd3644fd
os/linux: fix Version::NULL type mixup 2021-09-11 00:10:24 +01:00
Bo Anderson
d742ea94f7
os/mac/pkgconfig/12: update version info 2021-09-09 15:28:56 +01:00
Bo Anderson
49f789d492
os/mac/xcode: bump minimum CLT version to 12.5 2021-08-11 14:19:22 +01:00
Bo Anderson
dae1d89780
os/mac/sdk: use MacOSX11.sdk symlink 2021-08-11 14:19:22 +01:00
Carlo Cabrera
d696250ddb
Fix ELF architecture offset for x86_64
The current offset results in ELF binaries returning an `#arch` of
`:dunno`.

Also, skip the `check_binary_arches` audit on the generic OS.
2021-07-18 16:55:57 +08:00
Carlo Cabrera
488ccfdf70
formula_cellar_checks: check keg for mismatched arches
There have been a few instances I've noticed that we've been silently
installing binaries built for x86_64 on ARM. There's probably more that
I haven't found yet, so it seems useful to check this with an audit.
2021-07-18 11:44:37 +08:00
Sam Ford
0752d25125
OS::Mac: Move version methods into ::Version 2021-06-23 09:03:46 -04:00
Mike McQuaid
30a65342e8
Deprecate, disable, delete code for Homebrew 3.2.0
Do the usual deprecation, disable, delete dance for Homebrew 3.2.0.
2021-06-17 11:34:32 +01:00
Francois-Xavier Coudert
8eb03a951f Updates for Monterey Xcode & CLT 2021-06-09 16:21:46 +02:00
shaunsingh
3a746723c3
Add missing comma 2021-06-07 20:04:48 -04:00
shaunsingh
d7d9a256a1
Add macOS 12 2021-06-07 20:00:18 -04:00
Lorenzo Gatti
c564019a91 debug info now includes CLT version 2021-05-18 16:19:31 +02:00
Lorenzo Gatti
5a24b6aff3 minor changes to the wording 2021-05-17 17:28:58 +02:00
Lorenzo Gatti
b7556350db Better instructions for updating Command Line Tools
Added link to Apple's page with minimum requirements
2021-05-17 17:11:00 +02:00
Carlo Cabrera
28c0caae4d
extend/os/mac/keg_relocate: remove RPATHs rooted in build directory
Keeping dangling `RPATH`s is a security risk, and is bad for build
reproducibility.
2021-05-14 01:07:14 +01:00
Bo Anderson
0950549629
os/mac: use perl 5.18 on Catalina 2021-05-11 01:48:54 +01:00
Bo Anderson
1e567161d1
ENV/shared: specify which Perl version we want to use 2021-05-10 05:50:02 +01:00
Bo Anderson
55f90f972d
os/mac/xcode: support Xcode 12.5 2021-05-09 18:34:09 +01:00
John Bampton
1691e615fe Fix spelling 2021-05-08 11:20:01 +10:00
Carlo Cabrera
4d5971518d
os/mac/keg: add change_rpath method 2021-05-05 21:37:02 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Shaun Jackman
70292829f3
Cache glibc.system_version 2021-04-02 10:58:01 -07:00
Shaun Jackman
393027597b
Cache glibc.version
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-04-02 10:53:47 -07:00
Shaun Jackman
95e7e010ee Add OS::Linux::Glibc.version 2021-04-01 22:16:33 -07:00
Bo Anderson
8288626fe9
Merge pull request #10941 from Bo98/clang-vers-update
os/mac/xcode: update Clang version parsing for CLT 12.5
2021-03-29 12:43:40 +01:00
Bo Anderson
450bc4ab33
Fix brew style 2021-03-26 14:11:03 +00:00
Bo Anderson
0b39690e5c
os/mac/xcode: update Clang version parsing for CLT 12.5 2021-03-26 10:29:27 +00:00