Bug 105214 - patch: archivers/unmakeself - extraction fails under certain conditions
Summary: patch: archivers/unmakeself - extraction fails under certain conditions
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jean-Yves Lefort
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-06 17:20 UTC by Frank W. Josellis
Modified: 2006-11-07 16:10 UTC (History)
0 users

See Also:


Attachments
unmakeself.patch (1.65 KB, patch)
2006-11-06 17:20 UTC, Frank W. Josellis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank W. Josellis 2006-11-06 17:20:19 UTC
It appears that the offset calculation is not always correct. The approach
fails in an obvious way if the first line of an archive consists entirely of
printable characters. Unfortunately, this can indeed happen, an example
is the latest GoogleEarthLinux.bin (version 4.0.2414). Please consider the
patch below for a different method to determine the offset.

How-To-Repeat: fetch http://dl.google.com/earth/GE4/GoogleEarthLinux.bin

unmakeself GoogleEarthLinux.bin
Comment 1 Edwin Groothuis freebsd_committer 2006-11-06 17:20:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jylefort

Over to maintainer
Comment 2 dfilter service freebsd_committer 2006-11-06 20:09:12 UTC
jylefort    2006-11-06 20:08:48 UTC

  FreeBSD ports repository

  Modified files:
    archivers/unmakeself Makefile 
    archivers/unmakeself/files unmakeself.c 
  Log:
  - Fix archive offset calculation (problem reported in [1])
  - Various code cleanups
  
  [1]:
  PR:             ports/105214
  Submitted by:   Frank W. Josellis <frank@dynamical-systems.org>
  
  Revision  Changes    Path
  1.5       +12 -12    ports/archivers/unmakeself/Makefile
  1.3       +126 -83   ports/archivers/unmakeself/files/unmakeself.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Jean-Yves Lefort freebsd_committer 2006-11-06 20:10:43 UTC
State Changed
From-To: open->closed

Good catch. However I do not want to execute the script (I don't think the 
command line options are consistent across versions), so I now check for 
gzip/bzip2 magic numbers, and if it does not work I fallback to the 
previous "printable" method. Thanks for the patch anyway.
Comment 4 Frank W. Josellis 2006-11-07 13:58:14 UTC
Thanks for your prompt action, it's ok now with RELENG_6. But on RELENG_5 
(and earlier) we're still in trouble: memmem() is not adopted here.

I remember to have encountered this problem earlier with GNUish software, 
and I had to introduce memmem() explicitly to make it work.
Comment 5 Jean-Yves Lefort freebsd_committer 2006-11-07 16:08:02 UTC
On Tue, 7 Nov 2006 14:58:14 +0100 (CET)
"Frank W. Josellis" <frank@dynamical-systems.org> wrote:

> Thanks for your prompt action, it's ok now with RELENG_6. But on RELENG_5
> (and earlier) we're still in trouble: memmem() is not adopted here.
>
> I remember to have encountered this problem earlier with GNUish software,
> and I had to introduce memmem() explicitly to make it work.

Fixed, thanks.

--
Jean-Yves Lefort

jylefort@FreeBSD.org
http://lefort.be.eu.org/