Opened 10 years ago

Closed 10 years ago

#26463 closed defect (fixed)

mpkg target needs to regain root privileges before running pkg target on dependencies

Reported by: nerdling (Jeremy Lavergne) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.9.99
Keywords: Cc:
Port:

Description

The past couple days I've been trying to make an mdmg for pspp-devel. It errors out with a permissions message when working with Xft2 (see attached debug log):

Error: Target org.macports.mpkg returned: can't create directory "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_Xft2": permission denied

I've run clean on Xft2 and retried but it doesn't make any impact. Is it base's fault or is something else going on?

Attachments (1)

mdmg_permissions_fail.tbz2 (5.8 KB) - added by nerdling (Jeremy Lavergne) 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by nerdling (Jeremy Lavergne)

Attachment: mdmg_permissions_fail.tbz2 added

comment:1 Changed 10 years ago by nerdling (Jeremy Lavergne)

Since Xft2 is the first dependency it might be that some directory that contains its working directory might not exist prior to the pkg creation.

That is, I can skip the issue by running sudo port pkg Xft2 and then sudo port mpkg pspp-devel.

Perhaps the creation of the full path for the working directory needs permissions that are being dropped.

comment:2 Changed 10 years ago by nerdling (Jeremy Lavergne)

You'll also notice that after successfully doing mpkg, there's another permissions issue when creating the disk image:

/opt/local/var/macports/build/_Users_aeetes_math_pspp-devel/work/pspp-devel-0.7.5.mpkg: Authentication error
hdiutil: create failed - Permission denied

That error is the cause of the return code 1.

Rerunning the same command with sudo is successful.

comment:3 Changed 10 years ago by ryandesign (Ryan Schmidt)

Summary: investigate permature permissions dropped in mdmginvestigate premature permissions dropped in mdmg

comment:4 Changed 10 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Summary: investigate premature permissions dropped in mdmgmpkg target needs to regain root privileges before running pkg target on dependencies

It's not premature privilege dropping, the mpkg target is just weird. r72237

Note: See TracTickets for help on using tickets.