From owner-freebsd-current@FreeBSD.ORG Mon Aug 8 06:23:52 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C161E106566C; Mon, 8 Aug 2011 06:23:52 +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 9F22A8FC0C; Mon, 8 Aug 2011 06:23:52 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id p785taE6012752; Mon, 8 Aug 2011 05:55:36 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.119] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id n3bgpy8fhvu5szzqqvg4s8s5ns; Mon, 08 Aug 2011 05:55:36 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <4E3EBBE4.9080604@cran.org.uk> Date: Sun, 7 Aug 2011 22:55:39 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <86hb5yaav0.fsf@gmail.com> <4E3D73B9.7090406@FreeBSD.org> <4E3EBBE4.9080604@cran.org.uk> To: Bruce Cran X-Mailer: Apple Mail (2.1084) Cc: Test Rat , freebsd-current@freebsd.org, Martin Matuska Subject: Re: bsdtar(1) can't extract new ISO images 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: Mon, 08 Aug 2011 06:23:52 -0000 On Aug 7, 2011, at 9:23 AM, Bruce Cran wrote: > On 06/08/2011 18:02, Martin Matuska wrote: >> The error is in FreeBSD ISO images. >> They are created using makefs and that doesn't create ISO files that >> strictly comple to the ECMA-119 (ISO9660 standard). >>=20 >> I have already filed a PR at NetBSD (bin/45217): >> http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D45217 >>=20 >> The volume_set_id doesn't have to be filled with 0x20 characters, = too. >> I am also preparing a patch for libarchive (different things), but = that >> won't fix that one bug - makefs needs to be fixed. >=20 > Thanks for the information - I suspect this is also the problem I saw = a few weeks ago on OS X Lion when trying to extract an ISO of Windows = Server 2003 R2: >=20 > neutrino:tmp brucec$ tar -xvf = en_win_srv_2003_r2_standard_with_sp2_cd2_X13-68583.iso > neutrino:tmp brucec$ echo $? > 0 >=20 > It would be nice if bsdtar exited with a non-zero code in this case. I agree, it would be nice. ISO images frequently begin with a large block of zero bytes that looks = exactly like a tar end-of-file marker. So if libarchive doesn't = recognize it as an ISO, it will often recognize the file as a valid = empty tar archive that has a bunch of garbage after the end-of-archive = marker. So it successfully extracts no files. This sort of problem should become less common as we continue to refine = the bidding heuristics used in libarchive. If you have ideas for = further improving them, I'm definitely interested. (At a minimum, I'm = always interested in seeing at least the first 32k or so of any file = that "tar -tvvvf" gives the wrong format for.) Tim