From owner-freebsd-current@FreeBSD.ORG Sat Jul 25 04:19:46 2009 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 B93A6106566B; Sat, 25 Jul 2009 04:19:46 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 74D248FC1B; Sat, 25 Jul 2009 04:19:46 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n6P4JkPD049800; Fri, 24 Jul 2009 21:19:46 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id n6hxvta25d67u4e8svipmwkt5w; Fri, 24 Jul 2009 21:19:45 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <4A6A87E1.8030504@freebsd.org> Date: Fri, 24 Jul 2009 21:19:45 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Jung-uk Kim References: <4A615602.4090000@freebsd.org> <200907231903.46474.jkim@FreeBSD.org> <4A694DBB.8080800@freebsd.org> <200907241514.18806.jkim@FreeBSD.org> In-Reply-To: <200907241514.18806.jkim@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------060103060203010600040401" Cc: freebsd-current@freebsd.org Subject: Re: Joliet and release ISOs? 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: Sat, 25 Jul 2009 04:19:47 -0000 This is a multi-part message in MIME format. --------------060103060203010600040401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jung-uk Kim wrote: > > Still, there is one minor annoyance: > > %ls -l test > total 0 > lrwxr-xr-x 1 jkim staff 1 7 24 14:54 link1 -> / > lrwxr-xr-x 1 jkim staff 2 7 24 14:55 link2 -> // > lrwxr-xr-x 1 jkim staff 2 7 24 14:55 link3 -> /. > lrwxr-xr-x 1 jkim staff 2 7 24 14:55 link4 -> ./ > lrwxr-xr-x 1 jkim staff 2 7 24 14:55 link5 -> .. > lrwxr-xr-x 1 jkim staff 4 7 24 14:56 link6 -> /tmp > lrwxr-xr-x 1 jkim staff 5 7 24 14:56 link7 -> //tmp > lrwxr-xr-x 1 jkim staff 4 7 24 14:56 link8 -> tmp/ > lrwxr-xr-x 1 jkim staff 5 7 24 14:56 link9 -> /tmp/ > %tar -t --options=\!joliet -v -f test.iso > drwx------ 0 0 0 2048 7 24 14:56 . > lr-xr-xr-x 1 0 0 0 7 24 14:56 link9 -> //tmp/ > lr-xr-xr-x 1 0 0 0 7 24 14:56 link8 -> tmp/ > lr-xr-xr-x 1 0 0 0 7 24 14:56 link7 -> ///tmp > lr-xr-xr-x 1 0 0 0 7 24 14:56 link6 -> //tmp > lr-xr-xr-x 1 0 0 0 7 24 14:55 link5 -> .. > lr-xr-xr-x 1 0 0 0 7 24 14:55 link4 -> ./ > lr-xr-xr-x 1 0 0 0 7 24 14:55 link3 -> //. > lr-xr-xr-x 1 0 0 0 7 24 14:55 link2 -> /// > lr-xr-xr-x 1 0 0 0 7 24 14:54 link1 -> / > > Note there is an additional `/' when the link has a leading `/' (but > not just `/'), i.e., `//' => `///', `/.' => `//.', `/tmp' => `//tmp', > `//tmp' => `///tmp'. For FreeBSD CD-ROMs, `stand -> /rescue' becomes > `stand -> //rescue', etc. Here's another patch for you to try; this changes how libarchive parses Rockridge "SL" extensions. Cheers, Tim P.S. Could you email me privately the "test.iso" image you created on your machine? I tried creating one here and get slightly different behavior. Also, what version of mkisofs do you have installed on your machine? --------------060103060203010600040401 Content-Type: text/x-patch; name="libarchive_iso9660_symlink.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libarchive_iso9660_symlink.patch" Index: archive_read_support_format_iso9660.c =================================================================== --- archive_read_support_format_iso9660.c (revision 195838) +++ archive_read_support_format_iso9660.c (working copy) @@ -1174,12 +1175,12 @@ parse_rockridge_SL1(struct file_info *file, const unsigned char *data, int data_length) { - int component_continues = 1; + const char *separator = ""; - if (!file->symlink_continues) + if (!file->symlink_continues || file->symlink.length < 1) archive_string_empty(&file->symlink); - else - archive_strcat(&file->symlink, "/"); + else if (file->symlink.s[file->symlink.length - 1] != '/') + separator = "/"; file->symlink_continues = 0; /* @@ -1216,9 +1217,8 @@ unsigned char nlen = *data++; data_length -= 2; - if (!component_continues) - archive_strcat(&file->symlink, "/"); - component_continues = 0; + archive_strcat(&file->symlink, separator); + separator = "/"; switch(flag) { case 0: /* Usual case, this is text. */ @@ -1232,7 +1232,7 @@ return; archive_strncat(&file->symlink, (const char *)data, nlen); - component_continues = 1; + separator = ""; break; case 0x02: /* Current dir. */ archive_strcat(&file->symlink, "."); @@ -1243,6 +1243,7 @@ case 0x08: /* Root of filesystem. */ archive_string_empty(&file->symlink); archive_strcat(&file->symlink, "/"); + separator = ""; break; case 0x10: /* Undefined (historically "volume root" */ archive_string_empty(&file->symlink); --------------060103060203010600040401--