987 Commits

Author SHA1 Message Date
Bo Anderson
c8214fd1ce
Merge pull request #16860 from Homebrew/reproducible-builds
Reproducible builds for native compiled binaries
2024-03-13 03:55:38 +00:00
Bo Anderson
5582849ae7
Reproducible builds for native compiled binaries 2024-03-11 16:06:55 +00:00
Michael Cho
2d884981c2
cleaner: add types
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-11 11:46:23 -04:00
Mike McQuaid
99e0b69262
Merge pull request #16852 from gliptak/xcode1
Emit more specific error text on outdated Xcode
2024-03-08 08:38:14 +00:00
Mike McQuaid
de73522b5a
os/Mac/diagnostic: include Xcode path and version. 2024-03-08 08:24:45 +00:00
Gábor Lipták
05acfaba33 Emit more specific error text on outdated Xcode
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2024-03-07 16:24:08 -05:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Bo Anderson
1d7101d8a3
Use HOMEBREW_TEMP more universally 2024-02-26 16:58:53 +00:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Bo Anderson
58874de60b
Generalise internal cross-image handling 2024-02-22 17:25:20 +00:00
Mike McQuaid
412852bd5f
Apply suggestions from code review
Co-authored-by: Markus Reiter <me@reitermark.us>
2024-02-19 14:05:12 +00:00
Douglas Eichelberger
d6b3f5031a
Enable and fix warnings 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Issy Long
c63723bd7d
Merge pull request #16501 from issyl0/rubocop-new-rules-style-redundant-freeze
Fix RuboCop `Style/RedundantFreeze` offenses
2024-01-19 15:05:08 +00:00
Issy Long
bc5e422815
Merge pull request #16497 from issyl0/rubocop-new-rules-style-array-intersect
Fix RuboCop `Style/ArrayIntersect` offenses
2024-01-19 13:00:30 +00:00
Patrick Linnane
74a487ccfc
hardware/cpu: add virtualized? check
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-01-18 16:46:59 -08:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Issy Long
0e27dc2564
Fix RuboCop Style/ArrayIntersect offenses 2024-01-18 14:11:43 +00:00
Michael Cho
0ff2458952
extend/ENV/shared: effective_arch as public API 2024-01-13 15:26:38 -05:00
Patrick Linnane
f63b089735
os/mac/hardware/cpu: add update comment 2024-01-06 08:58:20 -08:00
Patrick Linnane
c0e6892c63
os/mac/hardware/cpu: update M3 values 2023-12-28 09:39:21 -08:00
Douglas Eichelberger
3abbf4447e Some minor regexp match perf improvements 2023-12-27 13:16:36 -08:00
Bo Anderson
fba5a874fc os/mac/hardware: use Westmere on >= Ventura 2023-12-23 04:58:53 +00:00
apainintheneck
536b37c766 cmd/config: Add core cask tap to output
This information is occasionally useful when debugging so we should
include it by default to make our lives easier.
2023-12-21 22:54:38 -08:00
Patrick Linnane
9dee80cb2d
various: fix style errors 2023-12-18 09:34:01 -08:00
Bo Anderson
688d87e839
Remove Ruby 2.6 & macOS system Ruby support code 2023-12-12 03:44:31 +00:00
Bo Anderson
b42256d286
Deprecate, disable & delete code for Homebrew 4.2.0 2023-12-07 23:42:13 +00:00
Bo Anderson
cc0a249f48
unpack_strategy/zip: fix super ancestor on macOS without Sorbet Runtime 2023-12-04 16:34:03 +00:00
Francois-Xavier Coudert
7eb2134fa4 Add M3 processors 2023-12-01 15:45:06 +01:00
Rylan Polster
529f7b7953
Remove El Capitan system curl workaround 2023-11-16 11:47:48 -05:00
Rylan Polster
8704e79cc0
Separate MacOS references 2023-11-15 18:19:39 -05:00
Bo Anderson
63a8474ad7
ENV/shared: fix macOS code not applying under HOMEBREW_SORBET_RUNTIME 2023-11-14 02:10:26 +00:00
Bo Anderson
386fd0548a
Support system Ruby 3 on Linux 2023-11-07 19:27:30 +00:00
Bo Anderson
4ec450823c
Portable Ruby 3.1.4 (opt-in beta) 2023-10-27 15:58:43 +01:00
Bo Anderson
e4623cc8f4
Improve performance of brew readall 2023-09-28 14:05:09 +01:00
Francois-Xavier Coudert
e1ca3b5c35 superenv: help gettext-based configure scripts 2023-09-14 15:19:48 +02:00
Steve Peters
94ef9a4b7a codesign in keg_relocate instead of keg methods
Currently the codesign_patched_binary method may be called many
times for the same file when installing a keg.

This removes the calls to codesign_patched_binary from os/mac/keg
and adds a single call to the relocate_dynamic_linkage and
fix_dynamic_linkage methods in extend/os/mac/keg_relocate
to speed up keg installation.
2023-09-09 18:14:28 -07:00
Mike McQuaid
f30788018c
os/mac/hardware: remove TODO.
As discussed in #15938, this TODO can pretty much never be done so
doesn't make sense to leave as-is.
2023-09-02 21:36:27 -04:00
Michael Cho
bc2bb59726
extend/os/linux/system_config: show glibc/gcc version for API users 2023-08-26 22:19:32 -07:00
Michael Cho
7412487891
extend/os/mac/keg: codesign on Intel if invalid signature 2023-08-23 11:48:13 -07:00
Douglas Eichelberger
d01cda2815 Turn up the types 2023-08-12 22:01:22 -07:00
Carlo Cabrera
dbeac59584
keg_relocate: retain framework info in relocatable install names
`dyld` uses the target library's install name to work out whether this
is a Framework or a dylib, which affects how `dyld` searches for the
desired library.

We should therefore avoid confusing `dyld` by including the
`*.framework` part of the install name in the target dylib, which is
what this change does.

Here's a concrete example of what this changes. Before:

    ❯ otool -L /usr/local/bin/python3
    /usr/local/bin/python3:
            @loader_path/../Python (compatibility version 3.11.0, current version 3.11.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

After:

    ❯ otool -L /usr/local/bin/python3
    /usr/local/bin/python3:
            @loader_path/../../../../Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

By retaining the `Python.framework` part of the install name, we make
sure that `dyld` knows that it should be looking for a framework rather
than a dylib.
2023-08-07 14:43:56 +08:00
Mike McQuaid
71888db8ba
bottle: reproducibility fixes.
I noticed from
https://github.com/Homebrew/homebrew-core/actions/runs/5751070010 that
we're no longer creating reproducible bottles between macOS and Linux.

All macOS checksums have changed but Linux ones have not. The main
difference between the two platforms is the `gtar` version used so let's
always just use the formula on both platforms.

While we're here, clear up the ordering and comments a little on the
reproducible `tar` arguments so that it's easier to compare with the
reproducible builds archives documentation.
2023-08-04 10:02:44 +01:00
Ruoyu Zhong
99607e8ec4
development_tools: allow Symbols to be located
Fixes error seen in Homebrew/homebrew-core#138452.
`DevelopmentTools.default_compiler` can return a `Symbol` like `:clang`.
Make sure its result can be fed to `DevelopmentTools.locate`.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-08-04 11:26:30 +08:00
Carlo Cabrera
6b728bf3bd
Implement ruby-macho TODOs
We now have the new release of ruby-macho (#15758), so we can now
finish off the remaining work from #15731.
2023-07-26 11:15:19 +08:00
Douglas Eichelberger
08e46c18cd Add type to Formula attrs 2023-07-24 14:12:36 -07:00
Carlo Cabrera
4c73942fae
extend/os/mac/keg_relocate: improve rpath handling
This implements the TODO that I left as a comment from #15722.

In order to simplify the handling of deleting an absolute rpath that has
a relative duplicate (or vice-versa, i.e., a relative rpath with an
absolute duplicate), we relocate all rpaths first in one pass and then
delete the duplicates in a separate pass.

We currently rely on some lower-level (but still public) methods from
ruby-macho since the standard `#delete_rpath` method changes the order
in which rpaths are resolved. We can switch back to using
`#delete_rpath` when Homebrew/ruby-macho#555 is merged and released.
2023-07-23 00:22:05 +08:00
Carlo Cabrera
aa05c227a0
os/mac/keg_relocate: avoid rpath re-ordering
This should fix the failures seen for `julia` in Homebrew/core.[^1]

I've detailed a better/more comprehensive fix as a `TODO` in a comments.
However, the problems that the better fix would avoid are comparatively
unlikely, so I think we can try this one out for now while I work on
implementing the said fix.

[^1]: https://github.com/Homebrew/homebrew-core/pull/135398#issuecomment-1643041541
2023-07-20 21:49:18 +08:00
Patrick Linnane
c56669e9cd
various: fix miscellaneous typos 2023-07-18 08:52:49 -07:00
Carlo Cabrera
27032e002f
os/mac/keg_relocate: avoid changing to an already existing rpath
Doing `change_rpath(old, new, file)` will error if `new` is already an
rpath for `file`. When this happens, `old` is no longer needed, so we
can delete it.

Fixes a build failure at shivammathur/homebrew-php#1848.
2023-07-18 20:47:10 +08:00