permissions of DESTROOT

Ryan Schmidt ryandesign at macports.org
Sat Jun 11 23:45:16 PDT 2016


On Jun 11, 2016, at 10:51 AM, JASON TILLEY wrote:

> I am attempting to create my first port in a local repository. I can get it to configure, but it seems to be having trouble installing into destroot. I get the error:
> 
> for i in libnn.a; do \
> 	   /usr/bin/install -c -m 644 $i /opt/local/lib/$i; \
> 	done
> install: /opt/local/lib/libnn.a: Operation not permitted
> make: *** [install] Error 71
> make: Leaving directory `/opt/local/var/macports/build/_Users_username_ports_gis_nn-c/nn-c/work/nn-c-1.85/trunk/nn'
> Command failed:  cd "/opt/local/var/macports/build/_Users_username_ports_gis_nn-c/nn-c/work/nn-c-1.85/trunk/nn" && /usr/bin/make -w install /opt/local/var/macports/build/_Users_username_ports_gis_nn-c/nn-c/work/destroot 
> Exit code: 2
> Error: org.macports.destroot for port nn-c returned: command execution failed
> DEBUG: Error code: CHILDSTATUS 14431 2
> DEBUG: Backtrace: command execution failed
>     while executing
> "system -nice 0 $fullcmdstring"
>     ("eval" body line 1)
>     invoked from within
> "eval system $notty $nice \$fullcmdstring"
>     invoked from within
> "command_exec destroot"
>     (procedure "portdestroot::destroot_main" line 2)
>     invoked from within
> "portdestroot::destroot_main org.macports.destroot"
>     ("eval" body line 1)
>     invoked from within
> "eval $procedure $targetname"
> Warning: targets not executed for nn-c: org.macports.activate org.macports.destroot org.macports.install
> 
> The beginning of the destroot phase looks like:
> 
> DEBUG: changing euid/egid - current euid: 0 - current egid: 0
> DEBUG: egid changed to: 501
> DEBUG: euid changed to: 502
> DEBUG: destroot phase started at Sat Jun 11 10:19:29 CDT 2016
> --->  Staging nn-c into destroot
> DEBUG: Can't run destroot under sudo without elevated privileges (due to mtree).
> DEBUG: Run destroot without sudo to avoid root privileges.
> DEBUG: Going to escalate privileges back to root.
> DEBUG: euid changed to: 0. egid changed to: 0.
> . changed
> 	gid expected 0 found 80 modified
> ./usr missing (created)
> . missing (directory not created: File exists)
> ./Applications missing (created)
> 
> etc., etc
> 
> Does anyone know what my problem is? Thanks.

Looking at the makefile.in included in nn-c 1.85, it does not support the DESTDIR variable. Unfortunately the makefile.in looks like it was written manually, rather than by using a tool like automake that would take care of these details. Maybe you can fix the makefile.in so that it does support DESTDIR, then send a pull request of those changes to the developers of nn-c for inclusion in the next version. Or at least you can report this missing feature to the developers of nn-c in the form of a bug report. 




More information about the macports-dev mailing list