Opened 11 years ago

Closed 11 years ago

#38096 closed defect (invalid)

Problem with port selfupdate on OS X 10.8.2

Reported by: xave@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.2
Keywords: Cc:
Port:

Description (last modified by larryv (Lawrence Velázquez))

With sudo port -v selfupdate I receive:

===>making install in doc
/usr/bin/install -c -d -o macports -g 502 -m 0755 /opt/local
/usr/bin/install -c -d -o macports -g 502 -m 0755 /opt/local/etc/macports
< prefix.mtree /usr/sbin/mtree -U -e -p /opt/local > /dev/null
mtree: line 6: unknown group 502
make[1]: *** [install] Error 1
make: *** [install] Error 1
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc 
./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=macports --with-install-group=502 
--with-directory-mode=0755 --enable-readline && make && make install SELFUPDATING=1
Exit code: 2
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

Change History (10)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Component: portsbase
Description: modified (diff)

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Hmm, what is the number of the macports group on your system then, and has it changed since MacPorts was installed?

comment:3 in reply to:  2 Changed 11 years ago by xave@…

Replying to ryandesign@…:

Hmm, what is the number of the macports group on your system then, and has it changed since MacPorts was installed?

Since the first installation of macports I never modified group information
However if this is helpful

xxxx$ id -Gn macports
macports everyone localaccounts com.apple.sharepoint.group.1
xxxx$ id  macports
uid=502(macports) gid=501(macports) groups=501(macports),12(everyone),61(localaccounts),402(com.apple.sharepoint.group.1)
Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 11 years ago by raimue (Rainer Müller)

This means that /opt/local is owned by user macports and group id 502, although no group exists with that group id. Did you copy the prefix around, restore from a backup or anything similar?

comment:5 in reply to:  4 Changed 11 years ago by xave@…

Replying to raimue@…:

This means that /opt/local is owned by user macports and group id 502, although no group exists with that group id. Did you copy the prefix around, restore from a backup or anything similar?

I 've upgraded from Leopard to Snow Leopard with a fresh installation and then to Mountain Lion. Then I've installed macports with MacPorts-2.1.2-10.8-MountainLion.pkg. With the following:

xxxx$ cd /opt xxxx$ ls -lht

total 0

drwxr-xr-x 12 macports 502 408B 26 Ott 16:05 local

drwxr-xr-x 8 root wheel 272B 24 Mag 2012 X11

xxxx$ cd local

local xxxx$ ls -lht

total 8

drwxr-xr-x 594 macports 502 20K 16 Feb 19:27 bin

drwxr-xr-x 58 macports 502 1,9K 16 Feb 19:20 share

drwxr-xr-x 10 root admin 340B 16 Feb 19:01 etc

drwxr-xr-x 354 root admin 12K 16 Feb 19:01 include

drwxr-xr-x 984 macports 502 33K 16 Feb 19:01 lib

drwxr-xr-x 10 root admin 340B 16 Feb 14:34 libexec

drwxr-xr-x 8 root admin 272B 22 Gen 09:41 sbin

drwxr-xr-x 6 root admin 204B 29 Nov 23:07 var

drwxr-xr-x 5 root wheel 170B 29 Nov 20:14 Library

lrwxr-xr-x 1 root admin 9B 11 Ago 2012 man -> share/man

This is a very messy condition

If everything below /opt must be of a specific user and of a specific group can I try the following:

sudo chown -R a_user.a_group /opt ?

Version 0, edited 11 years ago by xave@… (next)

comment:6 Changed 11 years ago by jmroot (Joshua Root)

By default the prefix should be owned by root/admin, not macports. The point of building as another user is that it can't modify files outside of the workpath.

comment:7 in reply to:  6 ; Changed 11 years ago by xave@…

Replying to jmr@…:

By default the prefix should be owned by root/admin, not macports. The point of building as another user is that it can't modify files outside of the workpath.

With

cd /opt 
sudo chgrp macports local
cd local 
sudo chgrp bin lib share macports

it seems that there are no problem with selfupdate and then with upgrade outdated

Thanks for the help

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:8 in reply to:  7 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to xave@…:

With

cd /opt 
sudo chgrp macports local
cd local 
sudo chgrp bin lib share macports

it seems that there are no problem with selfupdate and then with upgrade outdated

No, this is wrong. Your /opt/local should be owned by user root and group admin.

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 in reply to:  8 Changed 11 years ago by xave@…

Replying to larryv@…:

Replying to xave@…:

With

cd /opt 
sudo chgrp macports local
cd local 
sudo chgrp bin lib share macports

it seems that there are no problem with selfupdate and then with upgrade outdated

No, this is wrong. Your /opt/local should be owned by user root and group admin.

OK

changed

Thanks

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Resolution: invalid
Status: newclosed

Please remember to use WikiFormatting.

Note: See TracTickets for help on using tickets.