Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#37889 closed defect (invalid)

2.1.2 -> 2.1.3 requires root

Reported by: frozencemetery (Robbie Harwood) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.3
Keywords: Cc:
Port:

Description

As the title suggests, the selfupdate from 2.1.2 to 2.1.3 cannot be made; macports attempts to set folders in .../etc to group admin, which I as a user cannot do. Here's the failure:

install: $prefix/etc/macports/archive_sites.conf.default: chown/chgrp: Operation not permitted
install: $prefix/etc/macports/macports.conf.default: chown/chgrp: Operation not permitted
install: $prefix/etc/macports/pubkeys.conf.default: chown/chgrp: Operation not permitted
install: $prefix/etc/macports/sources.conf.default: chown/chgrp: Operation not permitted
install: $prefix/etc/macports/variants.conf.default: chown/chgrp: Operation not permitted
# delete old uncompressed man pages if they exist
for m in port.1; do rm -f $prefix/share/man/man1/$m ; done
for m in macports.conf.5; do rm -f $prefix/share/man/man5/$m ; done
for m in portfile.7 portstyle.7 porthier.7 portgroup.7; do rm -f $prefix/share/man/man7/$m ; done
/usr/bin/install -c -d -o frozencemetery -g admin -m 755 $prefix/share/macports/install
install: chown 1032:80 $prefix/share/macports/install: Operation not permitted
/usr/bin/install -c -o frozencemetery -g admin -m 644 base.mtree $prefix/share/macports/install/
install: $prefix/share/macports/install//base.mtree: chown/chgrp: Operation not permitted
make[1]: *** [install] Error 71
make: *** [install] Error 1
Command failed: cd $prefix/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/\
bin/cc ./configure --prefix=$prefix --with-tclpackage=$prefix/Library/Tcl --with-install-user=frozencemetery --with-install-group=admin --with-directory-mode=0755 --enable-readline && make && make install SELFUPDATING=1
Exit code: 2
Error: $prefix/bin/port: port selfupdate failed: Error installing new MacPorts base: command executi\
on failed

Thanks.

Change History (5)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Version: 2.1.22.1.3

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Are you running the selfupdate as user frozencemetery? Is frozencemetery a member of the admin group? If yes to both, does this work?

touch testfile
mkdir testdir
/usr/bin/install -c -o frozencemetery -g admin -m 644 testfile ./testdir/

It works for me with my username. Did previous selfupdates work?

comment:3 in reply to:  2 Changed 12 years ago by frozencemetery (Robbie Harwood)

Replying to jmr@…:

Are you running the selfupdate as user frozencemetery?

Yes.

Is frozencemetery a member of the admin group?

No. I've never been a member of this group, which is what confuses me.

If yes to both, does this work?

touch testfile
mkdir testdir
/usr/bin/install -c -o frozencemetery -g admin -m 644 testfile ./testdir/

It works for me with my username. Did previous selfupdates work?

Previous selfupdates have worked.

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

Resolution: invalid
Status: newclosed

OK, something other than the macports build system must have set the admin group on your prefix then. The makefile wouldn't have been able to chgrp it when installing, just as shown in your selfupdate log.

The user and group used when selfupdating are taken from the current prefix ownership, so if you chgrp the prefix to a group you are a member of, it should then work.

comment:5 in reply to:  4 Changed 12 years ago by frozencemetery (Robbie Harwood)

Replying to jmr@…:

The user and group used when selfupdating are taken from the current prefix ownership, so if you chgrp the prefix to a group you are a member of, it should then work.

Confused why it needs to change group, but thanks for the fix.

Note: See TracTickets for help on using tickets.