Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2012 11:47:03 +0200
From:      =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Garrett Cooper <yanegomi@gmail.com>, Current FreeBSD <freebsd-current@freebsd.org>, Paul Schenkeveld <freebsd@psconsult.nl>
Subject:   Re: make package fails in chroot: tar: getvfsbyname failed: No such file or directory
Message-ID:  <CAE-m3X1beXHKDunJ%2BJi1y=Lc5K95aiJf_BBevrvLYK7cjbDm6Q@mail.gmail.com>
In-Reply-To: <20120830143426.GM33100@deviant.kiev.zoral.com.ua>
References:  <20120812132047.GA33526@psconsult.nl> <AC39BA73-E244-4A15-9E07-62CE0433B733@kientzle.com> <CAGH67wRJ4cz1vbntk-PiZ0Z58AoYo1-rm5zAhwZeTQzhU_0YQw@mail.gmail.com> <E2CBB30B-9366-429F-92B7-24677AA5E328@kientzle.com> <CAE-m3X3nymg9B5X9kYv9aRy_jKuiLF5_zw1%2B15rbeL_XpS66Hg@mail.gmail.com> <20120820123142.GY33100@deviant.kiev.zoral.com.ua> <CAE-m3X3W1BiN0xiOGLvL5mD-geuzsxj7mb6AwbZZAhDwGa=8mw@mail.gmail.com> <20120830143426.GM33100@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 30, 2012 at 4:34 PM, Konstantin Belousov
<kostikbel@gmail.com> wrote:
> On Thu, Aug 30, 2012 at 04:07:48PM +0200, Bernhard Fr?hlich wrote:
>> On Mon, Aug 20, 2012 at 2:31 PM, Konstantin Belousov
>> <kostikbel@gmail.com> wrote:
>> > On Mon, Aug 20, 2012 at 01:42:31PM +0200, Bernhard Fr?hlich wrote:
>> >> On Sun, Aug 19, 2012 at 10:01 PM, Tim Kientzle <tim@kientzle.com> wrote:
>> >> >
>> >> > On Aug 19, 2012, at 12:17 PM, Garrett Cooper wrote:
>> >> >
>> >> >> On Sun, Aug 19, 2012 at 9:45 AM, Tim Kientzle <tim@kientzle.com> wrote:
>> >> >>>
>> >> >>> 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.
>> >> >>>
>> >> >>> 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.
>> >> >>
>> >> >>    The problem most likely is the fact that all mountpoints are
>> >> >> exposed via chroot, thus, if it's checking to see if a mountpoint
>> >> >> exists, it may exist outside of the chroot.
>> >> >>
>> >> >
>> >> > I reviewed the code to refresh my memory.   Some
>> >> > of what I said before was not quite right.
>> >> >
>> >> > Libarchive's directory traversal tracks information about
>> >> > the filesystem type so that clients such as bsdtar can
>> >> > efficiently skip synthetic filesystems (/dev or /proc) or
>> >> > network filesystems (NFS or SMB mounts).
>> >> >
>> >> > The net effect is something like this:
>> >> >
>> >> >    For each file:
>> >> >        stat() or lstat() or fstat() the file
>> >> >        look up dev number in an internal cache
>> >> >        if the dev number is new:
>> >> >             fstatfs() the open fd to get the FS name
>> >> >             getvfsbyname() to identify the FS type
>> >> >
>> >> > Unless there's a logic error in libarchive itself, this
>> >> > would suggest that somehow fstatfs() is returning
>> >> > a filesystem type that getvfsbyname() can't
>> >> > identify.
>> >> >
>> >> > Paul:
>> >> >     What filesystem are you using?
>> >> >
>> >> >     What does "mount" show?
>> >> >
>> >> >     Does it work outside the chroot?
>> >>
>> >> I also see the same on the redports.org build machines.
>> >> It builds within a jail there which is completely on a tmpfs.
>> >> Interestinly everything is fine with a 10-CURRENT/amd64
>> >> jail but it breaks in a 10-CURRENT/i386 jail. Both are
>> >> running on the same 10-CURRENT/amd64 which is
>> >> around 2 months old.
>> >>
>> >> https://redports.org/buildarchive/20120814130205-56327/
>> >
>> > Try this.
>>
>> Is it possible that this requires the host system to be quite
>> new? The commit in HEAD seems to doesn't help in my
>> case. Host is 9-stable from Jun 27 and jail is 10-current from
>> a few days ago.
> Doh, the fix was in kernel, and I merged the change back to stable only
> on August 27.
>
> Running HEAD world on stable is not supported anyway.

I've updated the host to a recent 9-stable and it works like a charm now.
Thanks for fixing it!

-- 
Bernhard Froehlich
http://www.bluelife.at/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-m3X1beXHKDunJ%2BJi1y=Lc5K95aiJf_BBevrvLYK7cjbDm6Q>