From owner-freebsd-emulation@FreeBSD.ORG  Sun Oct 28 12:18:31 2012
Return-Path: <owner-freebsd-emulation@FreeBSD.ORG>
Delivered-To: freebsd-emulation@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
 by hub.freebsd.org (Postfix) with ESMTP id 74F491E5
 for <freebsd-emulation@freebsd.org>; Sun, 28 Oct 2012 12:18:31 +0000 (UTC)
 (envelope-from jbeich@tormail.org)
Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22])
 by mx1.freebsd.org (Postfix) with ESMTP id 0F5D58FC0A
 for <freebsd-emulation@freebsd.org>; Sun, 28 Oct 2012 12:18:30 +0000 (UTC)
Received: from localhost ([127.0.0.1] helo=internal.tormail.org)
 by outgoing.tormail.org with esmtp (Exim 4.72)
 (envelope-from <jbeich@tormail.org>)
 id 1TSRor-00067r-Fu; Sun, 28 Oct 2012 15:18:22 +0300
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org;
 s=tm; 
 h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From;
 bh=xMqtiQTPwoRUnEUX1YEx0WME+sFqPqz3mD40C2vN6wY=; 
 b=G4aylu6UO+qeaI9pQe3F59niVKVNL20T0VzkRBSeSLC+s/QH46Nk977YFE/93fPSZjGzNQR50ZuuqEiODasFXHljLsxvUwn3bRcCFqTLqUB+mQZJKK9tpKX3SWNvAJt/bohaZxM2iBg55oveDTBmEMM9ZPqsEMtliHyePGjlZNo=;
Received: from jbeich by internal.tormail.org with local (Exim 4.63)
 (envelope-from <jbeich@tormail.org>)
 id 1TSRmd-0007jg-MD; Sun, 28 Oct 2012 12:16:05 +0000
From: Jan Beich <jbeich@tormail.org>
To: David Naylor <naylor.b.david@gmail.com>
Subject: nvidia libs have an unrecognized owner (Was: Wine-fbsd64 updated to
 1.5.16)
In-Reply-To: <201210281149.50550.naylor.b.david@gmail.com> (David Naylor's
 message of "Sun, 28 Oct 2012 11:49:45 +0200")
Date: Sun, 28 Oct 2012 14:02:34 +0200
References: <201210281149.50550.naylor.b.david@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
X-TorMail-User: jbeich
Message-Id: <1TSRmd-0007jg-MD@internal.tormail.org>
Cc: freebsd-emulation@freebsd.org
X-BeenThere: freebsd-emulation@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Development of Emulators of other operating systems
 <freebsd-emulation.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-emulation>, 
 <mailto:freebsd-emulation-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-emulation>
List-Post: <mailto:freebsd-emulation@freebsd.org>
List-Help: <mailto:freebsd-emulation-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-emulation>, 
 <mailto:freebsd-emulation-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 28 Oct 2012 12:18:31 -0000

After running patch-nvidia.sh some files are left not owned by root.

$ ls -l /usr/local/lib32/ | awk '$3 ~ /[[:digit:]]/ || $4 ~ /[[:digit:]]/'
-rwxr-xr-x  1 2402  30       802148 Oct  9 18:30 libGL.so.1
-rwxr-xr-x  1 2402  30     29200980 Oct  9 18:29 libnvidia-glcore.so.1
-rwxr-xr-x  1 2402  30         3588 Oct  9 18:32 libnvidia-tls.so.1

$ tar tvf /d/NVIDIA-FreeBSD-x86-310.14.tar.gz --include \*.so\*
...
-rwxr-xr-x  0 buildmeister gopher 29200980 Oct  9 18:29 NVIDIA-FreeBSD-x86-310.14/obj/libnvidia-glcore.so.1
-rwxr-xr-x  0 buildmeister gopher   136392 Oct  9 18:33 NVIDIA-FreeBSD-x86-310.14/obj/libnvidia-cfg.so.1
-rwxr-xr-x  0 buildmeister gopher   802148 Oct  9 18:30 NVIDIA-FreeBSD-x86-310.14/obj/libGL.so.1

This is caused by tar(1) trying to preserve ownership/permissions when
running under root by default. Here's how the ports tree handles it:

  EXTRACT_AFTER_ARGS?=	| ${TAR} -xf - --no-same-owner --no-same-permissions

But wrong permissions are less noticeble there because install(1) with
-o/-g/-m flags usually discards them anyway.