[MacPorts] #60676: Install from source --with-no-root-privileges fails on Catalina - 'couldn't create error file for command: permission denied'
MacPorts
noreply at macports.org
Thu Jun 18 01:17:02 UTC 2020
#60676: Install from source --with-no-root-privileges fails on Catalina - 'couldn't
create error file for command: permission denied'
----------------------+--------------------
Reporter: chucko58 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.6.2
Keywords: | Port:
----------------------+--------------------
I'm trying to install MacPorts 2.6.2 from source without root privileges
on Catalina (macOS 10.15.5). This is a US Gov't owned computer and the
system is heavily locked down.
I do my usual workaround for the user fullname containing backslashes
(gov't insists on using MS Active Directory), then I hit this problem:
{{{
/Users/cfry/MacPorts/libexec/macports/bin/tclsh8.5
./src/upgrade_sources_conf_default.tcl "/Users/cfry/MacPorts"
couldn't create error file for command: permission denied
while executing
"open "|$mktemp -t macports_sources_upgrade.XXXXXXXXXX" r"
invoked from within
"set mktempChannel [open "|$mktemp -t macports_sources_upgrade.XXXXXXXXXX"
r]"
(file "./src/upgrade_sources_conf_default.tcl" line 31)
make: *** [install] Error 1
bebop-tango:MacPorts-2.6.2 cfry$
}}}
I searched the archives and it appears the way to get past this is to open
up permissions on the temp directory. But I can't:
{{{
bebop-tango:MacPorts-2.6.2 cfry$ temp="$(mktemp -t foo)"
bebop-tango:MacPorts-2.6.2 cfry$ echo "$temp"
/var/folders/qx/q_vy827n3tq37jvt8c02pfpczpxbgs/T/foo.LkkIu6ai
bebop-tango:MacPorts-2.6.2 cfry$ ls -l "$temp"
-rw------- 1 cfry 1286109195 0 Jun 17 18:11
/var/folders/qx/q_vy827n3tq37jvt8c02pfpczpxbgs/T/foo.LkkIu6ai
bebop-tango:MacPorts-2.6.2 cfry$ ls -ld "$(dirname "$temp")"
drwx------@ 93 cfry 1286109195 2976 Jun 17 18:11
/var/folders/qx/q_vy827n3tq37jvt8c02pfpczpxbgs/T
bebop-tango:MacPorts-2.6.2 cfry$ chmod a+rwx "$(dirname "$temp")"
chmod: Unable to change file mode on
/var/folders/qx/q_vy827n3tq37jvt8c02pfpczpxbgs/T: Operation not permitted
bebop-tango:MacPorts-2.6.2 cfry$
}}}
I don't read tcl well enough to understand what the line in question is
doing, but if all it's trying to do is get the name of a temp file from
'mktemp -t' as I suspect, I am at a loss to explain why it doesn't work.
--
Ticket URL: <https://trac.macports.org/ticket/60676>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list