Opened 3 years ago
Last modified 13 months ago
#63934 new defect
fetchmail-devel build is broken on macOS 11 and 12
Reported by: | steven-michaud (Steven Michaud) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | steven-michaud (Steven Michaud) | |
Port: | fetchmail-devel |
Description
The error is:
:info:destroot PermissionError: [Errno 1] Operation not permitted: '/var/root/Library/Caches/com.apple.python'
It happens while the following command is being run to "compile" fetchmailconf.py
, as a side effect of running /usr/bin/install
on it:
"/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/py_compile.py"
This seems to be some kind of sandbox error. Something similar is reported here: https://issueexplorer.com/issue/matplotlib/matplotlib/21075:
SystemExit: error: SandboxViolation: mkdir('/private/var/root/Library/Caches/com.apple.python/private/tmp/easy_install-e7dh_pwp', 511) {}
The breakage happens because fetchmail-devel's own installer (configure/make) runs Apple's python3
instead of the MacPorts one, even when the MacPorts one is installed and in the PATH.
I've got a fix for this. I'll post it after a bit more testing.
Attachments (2)
Change History (11)
comment:1 Changed 3 years ago by steven-michaud (Steven Michaud)
Cc: | steven-michaud added |
---|
comment:2 Changed 3 years ago by steven-michaud (Steven Michaud)
Changed 3 years ago by steven-michaud (Steven Michaud)
Attachment: | fetchmail-devel-fix.txt added |
---|
Provisional fix
comment:3 Changed 3 years ago by steven-michaud (Steven Michaud)
I just made a minor change to my fix -- I took python out of the depends_lib
line and added it to its own depends_build
line.
That makes better sense. I tested it again and it still works.
comment:4 Changed 3 years ago by steven-michaud (Steven Michaud)
Note that what I installed was the default for fetchmail-devel
:
fetchmail-devel @6.5.0.beta5_1+ssl
I did *not* specify the fetchmailconf
variant. But fetchmail
's own installer still installed fetchmailconf.py
and "compiled" it.
comment:5 Changed 3 years ago by steven-michaud (Steven Michaud)
No errors happen installing the fetchmail
port on macOS 11 and macOS 12 (with the original portfile). So presumably my patch will need to be altered to effect only the fetchmail-devel
subport.
Also, the same sandbox error happens (as reported in my initial comment) when I specify the +fetchmailconf
variant for fetchmail-devel
.
comment:6 Changed 3 years ago by steven-michaud (Steven Michaud)
Summary: | fetchmail-devel is broken on macOS 11 and 12 → fetchmail-devel build is broken on macOS 11 and 12 |
---|
Changed 2 years ago by steven-michaud (Steven Michaud)
Attachment: | fetchmail-devel-local-port.txt added |
---|
Changes to fetchmail portfile for a local port of fetchmail-devel
comment:7 Changed 2 years ago by steven-michaud (Steven Michaud)
I've gotten tired of waiting for MacPorts to fix this. So I followed the instructions at wiki:howto/PatchLocal to create a local port of fetchmail-devel
, to override the broken one on the MacPorts servers. I incorporated my fix for this bug, plus changes to the portfile to download the latest fetchmail 6.5.0
beta (beta7). MacPorts' fetchmail-devel
is still at beta5.
Note that master_sites
line has always been wrong, so the existing portfile can't download anything from the Sourceforge mirrors. Sourceforge doesn't have a "fetchmail-devel" -- only different branches of "fetchmail".
comment:8 Changed 13 months ago by pmetzger (Perry E. Metzger)
Just FYI, patchfiles to Trac don't really get paid attention to any more. If you want to get something fixed, a pull request on Github is generally now the right thing.
comment:9 Changed 13 months ago by steven-michaud (Steven Michaud)
Thanks for the info. I'll get to it at some point. In the meantime I'm happily using my local port.
Here's a fix that works. I tested it on both macOS 11 and macOS 12, on Intel hardware and Apple Silicon hardware.
I'm not at all experienced with portfiles, and it seems a bit clumsy. I won't be surprised if someone else can neaten it up and pare it down.