From owner-freebsd-current@FreeBSD.ORG Sun Aug 19 16:45:08 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE7D4106564A for ; Sun, 19 Aug 2012 16:45:07 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id B96CE8FC1A for ; Sun, 19 Aug 2012 16:45:07 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q7JGj6uq044987; Sun, 19 Aug 2012 16:45:06 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id iepnahn9udytbk8p3mmsjsem8w; Sun, 19 Aug 2012 16:45:06 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <20120812132047.GA33526@psconsult.nl> Date: Sun, 19 Aug 2012 09:45:05 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <20120812132047.GA33526@psconsult.nl> To: Paul Schenkeveld X-Mailer: Apple Mail (2.1278) Cc: Current FreeBSD Subject: Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2012 16:45:08 -0000 On Aug 12, 2012, at 6:20 AM, Paul Schenkeveld wrote: > Hi, > > I have a wrapper script that builds packages in a chroot environment > which happily runs on release 6 thru 9 and earlier 10 but fails with: > > tar: getvfsbyname failed: No such file or directory > > on a recent -CURRENT. > > What I could dig up so far is that "make package-recursive" calls > pkg_create(1) which in turn calls "tar -c -f .tbz -j -T -" > and then starts feeding filenames that should go into the tarball. > > Something has changed in libarchive when > src/contrib/libarchive/libarchive/archive_read_disk_posix.c was > introduced (libarchive 3.0.3, svn rev 232153 I think) where > setup_current_filesystem() calls getvfsbyname(). > > Now it's getting too hairy for me so I hope someone with more > insight in this kind of stuff can help me out. > > My chroot environment has a root directory which is a subdir of my build > environment, so not a mountpoint by itself. /usr/src and /usr/ports are > NFS mounted from a fileserver and I have devfs mounted on /dev. libarchive does do an initial getvfsbyname() when you ask it to traverse a directory tree so that it can accurately handle later requests about mountpoints and filesystem types. This code is admittedly a little intricate. You've apparently found a case where getvfsbyname() is getting handed a bad filename argument. Maybe one of the filenames getting fed into -T doesn't exist. (In which case tar should report an error, but it should be a clear error.) Can you add a printf() nearby that getvfsbyname() call, to dump the argument that's causing problems? Tim