Hello!

I'm trying to understand a weird permissions related error that a user of one 
of my custom ports is getting and I cannot yet reproduce.

In a nutshell: this port uses an automatically generated subport (a "devport") 
for which I create the destroot as part of the main port's post-destroot. 
That's essentially a file move operation but of course the devport workdir has 
to exist. I haven't yet figured out how to create that directory manually so I 
use `system "port -n -vd fetch $devport"` to take care of that. I have tested 
about all possible scenarios I could think of on my end, but this user is 
getting the error below that cannot explain.

`sudo port destroot acl` means that the post-destroot stage is executed as 
root; indeed I already fixed a previous error in that same github ticket by 
deleting the "offending" file preventively in the post-destroot. If the fetch 
phase is de-escalated to and executed as $macports_user then this should apply 
to both the main and the devport, which means that (in this case) 
/opt/local/var/macports/build/_opt_local_site-ports_sysutils_acl should be 
owned by $macports_user too.

I'm aware that I'm not running the latest "base" version yet but I haven't seen 
any changes to the code that could explain these symptoms ... are we maybe 
dealing with some of the magic Apple sandboxing on their more recent OS 
versions, here? It's either that or I'm overlooking something really (too) 
obvious ...

Maybe just deconstruct the main port's ${workdir} to build my the devport's 
workdir with my own code?

Thanks,
R.

-------------------------------
Forwarded message:
Date: Friday January 19 2024
From: Hamid <notificati...@github.com>
To: RJVB/macstrop <macst...@noreply.github.com>
Cc: René Bertin <rjvber...@gmail.com>, State change 
<state_cha...@noreply.github.com>
Subject: Re: [RJVB/macstrop] acl: destroot fails (Issue #96)


ran these after the commit appeared:
`sudo port clean acl acl-dev
sudo port -n destroot acl`

and now it fails with:
`:info:destroot DEBUG: can't create directory 
"/opt/local/var/macports/build/_opt_local_site-ports_sysutils_acl/acl-dev": not 
owner
:info:destroot     while executing
:info:destroot "file mkdir $workpath/.home"
:info:destroot     (procedure "open_statefile" line 7)
:info:destroot     invoked from within
:info:destroot "open_statefile"
:info:destroot     (procedure "check_variants" line 28)
:info:destroot     invoked from within
:info:destroot "check_variants fetch"
:info:destroot     invoked from within
:info:destroot "$workername eval "check_variants $target"" 
:info:destroot     (procedure "mportexec" line 7) 
:info:destroot     invoked from within
:info:destroot "mportexec $workername $target"
:info:destroot Error: Unable to execute port: can't create directory 
"/opt/local/var/macports/build/_opt_local_site-ports_sysutils_acl/acl-dev": not 
owner
:info:destroot Command failed: port -nok -vd fetch acl-dev 
:info:destroot Exit code: 1`


-- 
Reply to this email directly or view it on GitHub:
https://github.com/RJVB/macstrop/issues/96#issuecomment-1899459109
You are receiving this because you modified the open/close state.

Message ID: <RJVB/macstrop/issues/96/1899459...@github.com>

Reply via email to