Bug 226593

Summary: linux-c6-* ports fail to install on current
Product: Ports & Packages Reporter: Daniel O'Connor <darius>
Component: Individual Port(s)Assignee: freebsd-emulation (Nobody) <emulation>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: darius, tijl, w.schwarzenfeld
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Daniel O'Connor 2018-03-14 05:21:34 UTC
Hi,
The linux-c6-* ports fail on -current with errors like...
cpio: usr: Cannot extract through symlink /tmp/work/usr/ports/devel/linux-c6-libgfortran/work/stage/compat/linux/usr
cpio: usr/lib: Cannot extract through symlink /tmp/work/usr/ports/devel/linux-c6-libgfortran/work/stage/compat/linux/usr/lib

etc..
(This causes some errors later on in staging)

The following patch fixes it but I am not sure if that has any wider ramifications.

--- /usr/ports/Mk/Uses/linux.mk.orig	2018-03-14 05:11:44.746867000 +0000
+++ /usr/ports/Mk/Uses/linux.mk	2018-03-14 05:11:54.686219000 +0000
@@ -267,7 +267,7 @@
 .if !target(do-install)
 do-install:
 	(cd ${WRKSRC} && \
-		${FIND} * | ${CPIO} -dumpl --quiet ${STAGEDIR}${PREFIX})
+		${FIND} * | ${CPIO} --insecure -dumpl --quiet ${STAGEDIR}${PREFIX})
 .for d in bin lib lib64 sbin
 	[ ! -e ${STAGEDIR}${PREFIX}/${d} -o -L ${STAGEDIR}${PREFIX}/${d} ] || \
 		(cd ${STAGEDIR}${PREFIX} && \
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2018-03-14 08:38:05 UTC
(In reply to darius from comment #0)
> cpio: usr: Cannot extract through symlink /tmp/work/usr/ports/devel/linux-c6-libgfortran/work/stage/compat/linux/usr

Which element in this patch is a symlink?
Comment 2 Daniel O'Connor 2018-03-14 10:14:46 UTC
I assumed the link was made by the port but that's not true - on this system /tmp is a symlink to /local0/tmp (and WRKDIRPREFIX is set to /tmp/work)

I just tried setting WRKDIRPREFIX to /local/tmp/work and that works.
Comment 3 Walter Schwarzenfeld freebsd_triage 2019-08-05 11:46:15 UTC
Is this still relevant?
Comment 4 Daniel O'Connor 2019-08-05 13:15:59 UTC
I haven't tried it again after I found the work around and I don't have an up to date -current box available right now to test it against.
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-08-05 13:23:38 UTC
Thanks! So I close here. Please, reopen if you have same problems again.