ports/173892: Mk/bsd.port.mk: make COPYTREE_SHARE handle symbolic links
Thierry Thomas
thierry at FreeBSD.org
Sat Nov 24 16:50:00 UTC 2012
>Number: 173892
>Category: ports
>Synopsis: Mk/bsd.port.mk: make COPYTREE_SHARE handle symbolic links
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 24 16:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Thierry Thomas
>Release: FreeBSD 9.0-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net
>Description:
Weekly run output alerted me that lang/cfortran installs several links
with a bad ownership:
$ find /usr/local/share/examples/cfortran -type l -ls | head
3442403 0 lrwxrwxrwx 1 8290 1300 5 15 déc 1995 /usr/local/share/examples/cfortran/abc/abc.C -> abc.c
3442405 0 lrwxrwxrwx 1 8290 1300 6 15 déc 1995 /usr/local/share/examples/cfortran/cf14/cf14.C -> cf14.c
3442407 0 lrwxrwxrwx 1 8290 1300 16 15 déc 1995 /usr/local/share/examples/cfortran/e2/e2_f.f -> ../easy/easy_f.f
3442408 0 lrwxrwxrwx 1 8290 1300 4 15 déc 1995 /usr/local/share/examples/cfortran/e2/e2.C -> e2.c
3442410 0 lrwxrwxrwx 1 8290 1300 6 15 déc 1995 /usr/local/share/examples/cfortran/easy/easy.C -> easy.c
3442412 0 lrwxrwxrwx 1 8290 1300 4 15 déc 1995 /usr/local/share/examples/cfortran/eq/eq.C -> eq.c
3442414 0 lrwxrwxrwx 1 8290 1300 4 15 déc 1995 /usr/local/share/examples/cfortran/f0/f0.C -> f0.c
3442416 0 lrwxrwxrwx 1 8290 1300 5 23 oct 1996 /usr/local/share/examples/cfortran/f20/f20.C -> f20.c
3442418 0 lrwxrwxrwx 1 8290 1300 5 29 jul 1998 /usr/local/share/examples/cfortran/f27/f27.C -> f27.c
3442420 0 lrwxrwxrwx 1 8290 1300 4 15 déc 1995 /usr/local/share/examples/cfortran/fa/fa.C -> fa.c
>How-To-Repeat:
- Install lang/cfortran
- find /usr/local/share/examples/cfortran -type l -ls
>Fix:
Add -h to chown, so that COPYTREE_SHARE will handle symbolic
links.
I have no example of this bug for COPYTREE_BIN, but guess it
should be handled in the same way.
Note: gahr@ is Cc:'ed because if this patch get committed, at
least PORTREVISION of lang/cfortran should be bumped.
--- bsd.port.mk.diff begins here ---
--- Mk/bsd.port.mk.orig 2012-10-28 16:10:33.000000000 +0100
+++ Mk/bsd.port.mk 2012-11-24 17:36:25.000000000 +0100
@@ -2386,12 +2386,12 @@
.if ${UID} == 0
COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
- ${CHOWN} -R ${BINOWN}:${BINGRP} $$1 && \
+ ${CHOWN} -Rh ${BINOWN}:${BINGRP} $$1 && \
${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \
${FIND} -d $$0 $$2 -type f -exec chmod ${BINMODE} $$1/{} \;' --
COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
- ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \
+ ${CHOWN} -Rh ${SHAREOWN}:${SHAREGRP} $$1 && \
${FIND} -d $$0 $$2 -type d -exec chmod 755 $$1/{} \; && \
${FIND} -d $$0 $$2 -type f -exec chmod ${SHAREMODE} $$1/{} \;' --
.else
--- bsd.port.mk.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list