Bug 226593 - linux-c6-* ports fail to install on current
Summary: linux-c6-* ports fail to install on current
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-14 05:21 UTC by darius
Modified: 2019-08-05 13:23 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description darius 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 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 darius 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 darius 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.