If you are building the misc/compat5x port as root, it can fail to extract properly, if your ports dir is not owned by root:wheel, but for example by root:src. # make -C /usr/ports/misc/compat5x extract ===> Vulnerability check disabled, database not found ===> Extracting for compat5x-i386-5.4.0.8_9 => MD5 Checksum OK for compat5x-i386-5.4.0.8.tar.bz2. => SHA256 Checksum OK for compat5x-i386-5.4.0.8.tar.bz2. chown: /usr/ports/misc/compat5x/work/compat5x/libcrypt.so.2: Operation not permitted chown: /usr/ports/misc/compat5x/work/compat5x/libc.so.5: Operation not permitted chown: /usr/ports/misc/compat5x/work/compat5x/libthr.so.1: Operation not permitted chown: /usr/ports/misc/compat5x/work/compat5x/libpthread.so.1: Operation not permitted chown: /usr/ports/misc/compat5x/work/compat5x/libc_r.so.5: Operation not permitted *** Error code 1 This is caused by rev 1.591 of bsd.port.mk, which (among others) fixes PR 117507: "Reverse the condition so EXTRACT_PRESERVE_OWNERSHIP now work as advertised". E.g. it now extracts by default with tar --no-same-owner, so if your ports dir is group-owned by src, you'll get: ... -r--r--r-- 1 root src - 62308 Oct 24 2005 libbz2.so.1 -r--r--r-- 1 root src schg 884972 Oct 24 2005 libc.so.5 -r--r--r-- 1 root src schg 103176 Oct 24 2005 libc_r.so.5 ... The next thing bsd.port.mk tries to do is .if !defined(EXTRACT_PRESERVE_OWNERSHIP) @if [ `${ID} -u` = 0 ]; then \ ${CHMOD} -R ug-s ${WRKDIR}; \ ${CHOWN} -R 0:0 ${WRKDIR}; \ fi .endif which fails, apparently because chgrp'ing a schg file is not allowed. Fix: Possibly the following, which prevents the chmod/chown -R from above (it's useless anyway, if you are root the tar file is extracted with these permissions and ownerships, and they are also irrelevant for the installation of the port). How-To-Repeat: make -C /usr/ports/misc/compat5x extract
Why is this bug still present in this port? Attached patched of compat5x's "Makefile" works but obviously will be lost with any port update.
edwin 2008-05-28 12:25:15 UTC FreeBSD ports repository Modified files: misc/compat5x Makefile Log: compat5x port can fail to extract if you're root. If you are building the misc/compat5x port as root, it can fail to extract properly, if your ports dir is not owned by root:wheel, but for example by root:src. This is because the files in the distfile archive have the schg flag set. That flag is killed btw in the post-extract phase. PR: ports/122306 Submitted by: Dimitry Andric <dimitry@andric.com> Revision Changes Path 1.18 +2 -0 ports/misc/compat5x/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed, thanks!