Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18B6697C5 for ; Fri, 27 Apr 2012 22:42:08 +0000 (UTC) Received: (qmail 72542 invoked by uid 500); 27 Apr 2012 22:42:07 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 72518 invoked by uid 500); 27 Apr 2012 22:42:07 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 72509 invoked by uid 99); 27 Apr 2012 22:42:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 22:42:07 +0000 X-ASF-Spam-Status: No, hits=0.1 required=5.0 tests=FROM_EXCESS_BASE64,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcaug-uima-user@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 22:41:58 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SNtr0-0001EL-Nn for user@uima.apache.org; Sat, 28 Apr 2012 00:41:31 +0200 Received: from p172-28-131-0.nat.washington.edu ([205.175.123.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Apr 2012 00:41:30 +0200 Received: from tmoleary by p172-28-131-0.nat.washington.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Apr 2012 00:41:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: user@uima.apache.org From: Mike =?utf-8?b?T1xcXCdMZWFyeQ==?= Subject: Re: Repackaging an unpackaged pear file Date: Fri, 27 Apr 2012 22:41:18 +0000 (UTC) Lines: 101 Message-ID: References: <4F986A86.80604@schor.com> <4F991044.1050503@gmx.de> <4F99737F.5050809@schor.com> <4F998E13.3010207@gmx.de> <4F9AB51D.9020100@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 205.175.123.131 (Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19) Thilo Goetz writes: > > On 27/04/12 00:52, Mike O'Leary wrote: > > Mike O'Leary writes: > > > >> > >> Thilo Goetz writes: > >> > >>> > >>> On 26/04/12 18:10, Marshall Schor wrote: > >>>> Thanks Thilo. > >>>> > >>>> Could you unzip the pear with an unzipper, and do the change to fix the > >>>> file path and then zip it back up again? That way the variable > >>>> replacement stuff wouldn't run. > >>>> > >>>> -Marshall > >>>> > >>> > >>> Yes but you need the original pear to do that. If somebody > >>> installed the pear, made modifications and then just zipped > >>> it up, it wouldn't work. On the other hand, a pear that was > >>> just unzipped, not installed, will not run. It was my > >>> understanding that the original poster did not in fact have > >>> the original pear file. > >>> > >>> So what you do, and I suspect that is what Jens also does, > >>> is install the pear, run it, make modifications, and then > >>> migrate your changes from the installed pear into the zip > >>> file. That works, but it's not exactly a smooth process. > >>> > >>> --Thilo > >>> > >>> > >> > >> I do have the original pear file. Would it work to do the following steps: > >> 1. Change the pear file extension from .pear to .zip. > >> 2. Unzip the archive. > >> 3. Change the pathnames in the file from absolute to the correct relative > >> pathnames. > >> 4. Rezip the unzipped directory structure. > >> 5. Change the extension back to .pear. > >> > >> If that works, then I can easily do it. I didn't realize that .pear files used > >> compression that is compatible with that used for .zip files. > >> Thanks, > >> Mike > >> > >> > > > > I guess there must be more to it. When I tried using WinZip and whatever similar > > capability is built into Windows 7 to expand a pear file, change the pathnames > > and rezip it, the archive that was produced was slightly larger than the > > original, and when I tried to install it, I got an IOException with the message > > "installation descriptor not found". I didn't change anything other than the > > pathnames in one file, so the installation descriptor was still in the right > > place. I assume it couldn't find the installation descriptor because it didn't > > recognize the format of the compressed file. What would be a good tool for > > expanding and compressing pear files (without interpreting their contents)? > > Thanks, > > Mike > > > > > > Mike, > > a pear file is nothing but a zip file with a specific > structure and certain files. If you have a pear file > with absolute paths in it, that sounds like a contradiction > to me. I would go back to the source and ask them to > give you a properly packaged pear, with no absolute paths. > > If that is not possible, your only option is to dive into > the pear documentation and try to reconstruct a proper > pear from what you have (which may not be that difficult). > > --Thilo > > I found a solution after some trial and error with unzipping and rezipping the pear file in ways that didn't produce a pear file that UIMA recognized. Instead of unzipping the pear file (renamed to have a .zip extension), I just right- clicked on it and selected Open With->Windows Explorer, which opens the zip file as if it is a directory. I couldn't open any files for editing from that directory, but I did copy the offending file into a normal directory, changed the absolute pathnames to relative ones, copied the file back into the directory representing the zip file, and closed that directory. The result was a zip file of the same size as the original pear file, and when I installed it, it didn't complain about not being able to find the installation descriptor. So fully unzipping and rezipping the pear file didn't work for me, but changing one file while disturbing the pear file as little as possible did. Thank you to everyone who provided information and advice. Mike