Opened 2 months ago

Last modified 2 months ago

#69661 new defect

Disable Homebrew on Apple Silicon GitHub Actions CI runners

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: admin@…
Priority: Normal Milestone:
Component: server/hosting Version:
Keywords: Cc: i0ntempest
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

source:macports-ports/.github/workflows/bootstrap.sh has code that disables the pre-installed Homebrew in /usr/local. But we now have the macOS 14 runner which is on Apple Silicon and on Apple Silicon Homebrew doesn't install in /usr/local; it installs in /opt/homebrew. We haven't disabled that. So Homebrew is still present for our macOS 14 CI builds and it is being used, for example in the run for this PR:

DEBUG: system: cd "/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_textproc_po4a/po4a/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/po4a/po4a-0.71.tar.gz' | /opt/homebrew/bin/gtar --no-same-owner -xf -

Change History (6)

comment:1 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:2 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

And this problem has gotten baked into CI build of MacPorts for Darwin 23 so that will have to get recreated:

% grep /opt/homebrew -r opt 
opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl:	variable lzma_path "/opt/homebrew/bin/lzma"
opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl:	variable xz_path "/opt/homebrew/bin/xz"
opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl:	variable git_path "/opt/homebrew/bin/git"
opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl:	variable openssl_path "/opt/homebrew/bin/openssl"
opt/local/libexec/macports/lib/port1.0/port_autoconf.tcl:	variable tar_command "/opt/homebrew/bin/gtar --no-same-owner"
opt/local/libexec/macports/lib/macports1.0/macports_autoconf.tcl:    variable openssl_path "/opt/homebrew/bin/openssl"
opt/local/libexec/macports/lib/macports1.0/macports_autoconf.tcl:    variable tar_command "/opt/homebrew/bin/gtar --no-same-owner"

comment:3 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

I guess that's not due to bootstrap.sh; it's a separate problem to be fixed in source:macports-base/.github/workflows/main.yml

comment:4 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

I'm not sure why the macports-base and macports-ports workflows use two different strategies for disabling Homebrew. Seems like there should be a single script to do that that can be called from both places.

Or, why does the macports-base workflow need to disable Homebrew at all? We already know that we should set PATH=/usr/bin:/bin:/usr/sbin:/sbin before running ./configure to avoid pulling in dependencies from an already-installed MacPorts. If we had done that, we would have avoided pulling in dependencies from Homebrew and anywhere else too.

comment:5 Changed 2 months ago by jmroot (Joshua Root)

In 55d389d538d03e817bbed26f37d6de821ae0cbde/macports-base (master):

CI: Control configure environment

See: #69661

comment:6 Changed 2 months ago by i0ntempest

Cc: i0ntempest added
Note: See TracTickets for help on using tickets.