From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | CI, macports, darwin version problems |
Date: | 2024-06-25 23:54:09 |
Message-ID: | CA+hUKGLqJdv6RcwyZ_0H7khxtLTNJyuK+vDFzv3uwYbn8hKH6A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Problem #1: we're still using Ventura, but Cirrus has started doing this:
Only ghcr.io/cirruslabs/macos-runner:sonoma is allowed. Automatically upgraded.
It doesn't do it to cfbot, which runs macOS stuff on PGDG-hosted Mac
Minis, but it does it to regular users who use free compute minutes
tagged "instance:OSXCommunityInstance". This causes them to fail,
because:
[11:17:42.711] Error: Current platform "darwin 23" does not match
expected platform "darwin 22"
Sure enough, the sysinfo task shows "... Darwin Kernel Version
23.5.0...", but for cfbot it's still 22.y.z. So probably it's time to
change to macOS 14 AKA sonoma AKA darwin 23.
Problem #2:
Once you do that with a simple s/ventura/sonoma/, it still "upgrades"
to macos-runner:sonoma, which is not the same as
macos-sonoma-base:latest. It has more versions of xcode installed?
Not sure what else will break with that because I haven't successfully
run it yet due to the next problem, but blind patch attached.
Problem #3:
If you have a macports installation cached (eg for CI in your github
account), then the pre-existing macports installation will be for the
wrong darwin version (error shown above). So I think we need to teach
src/tools/ci/ci_macports_packages.sh to detect that condition and do a
clean install. I can look into that, but does anyone already know how
to do it?
I know how to find out which darwin version is running: uname -r | sed
's/\..*//'. What I don't know is how to find the darwin version for a
macports installation. I have found a terrible way to deduce it:
sqlite3 /opt/local/var/macports/registry/registry.db "select
max(os_major) from ports where os_major != 'any'"
But that's stupid. There must be a way to ask it what version it was
installed for ... I think it's the variable macports::os_major[2]
(which is written in TCL, a language I can't follow too well), but I
can't figure out where it's reading it from.... I hope there is a
text file under /opt/local or at worst a SQLite database, or a way to
ask the port command to spit that number out or ask it if it thinks
migration is necessary...
[1] https://github.com/cirruslabs/macos-image-templates/pkgs/container/macos-ventura-xcode
[2] https://github.com/macports/macports-base/blob/bf27e0c98c7443877e081d5f6b6
Attachment | Content-Type | Size |
---|---|---|
0001-ci-Upgrade-macOS-version-from-13-to-14.patch | text/x-patch | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-06-26 00:00:51 | Re: CI, macports, darwin version problems |
Previous Message | Robert Haas | 2024-06-25 23:33:35 | Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin |