Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#13458 closed defect (fixed)

Lint and Livecheck targets should not require root access

Reported by: rhwood@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.7.0
Component: base Version: 1.6.0
Keywords: lint livecheck Cc:
Port:

Description

The commands port lint foo and port livecheck foo should not require write access at the root level to anything. Perhaps we should distinguish between commands that make changes that should survive the port operation and those that should not survive the port operation (The results of the fetch, extract, patch, configure, build, destroot, archive, install, activate, etc... commands need to be maintained after port has finished, but this is not true for lint and livecheck)

Attachments (1)

patch-macports-state-13458.diff (3.0 KB) - added by raimue (Rainer Müller) 17 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 17 years ago by afb@…

They do have a target_runtype of "always", if that is usable somehow... ?

comment:2 Changed 17 years ago by wsiegrist@…

The problem with lint at least seems to be the need to write to the state file which is in the build area and requires root privileges to write to. These sort of operations dont affect the state of the port so the file shouldnt be written to, IMO. Sorry if this is already obvious to the devs but I wanted to comment here since I ran into the issue and my ticket was marked a dup of this one.

Changed 17 years ago by raimue (Rainer Müller)

comment:3 Changed 17 years ago by raimue (Rainer Müller)

It needs

target_state ${org.macports.foo} no

for every target which is meant to be run without writing to the state file.

I tried to make this possible, but one of the remaining issues is that livecheck tries to write to ${workpath}/livecheck.TMP. Where should livecheck write else? For example /tmp? Tcl does not seem to provide any access to the UNIX syscall mktemp(3), which provides some unique name for a temporary file usually.

With the attached patch it will work if livecheck writes to some other place. At the moment it fails with an Permission denied error (after r34288).

Please review.

comment:4 Changed 17 years ago by afb@…

Looks good to me, added patch as r34513.

comment:5 Changed 17 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Use /tmp for livecheck in r34515.

comment:6 Changed 16 years ago by blb@…

Milestone: MacPorts base bugsMacPorts 1.7.0
Note: See TracTickets for help on using tickets.