Bug 105214

Summary: patch: archivers/unmakeself - extraction fails under certain conditions
Product: Ports & Packages Reporter: Frank W. Josellis <frank>
Component: Individual Port(s)Assignee: Jean-Yves Lefort <jylefort>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
unmakeself.patch none

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 freebsd_triage 2006-11-06 17:20:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jylefort

Over to maintainer
Comment 2 dfilter service freebsd_committer freebsd_triage 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 freebsd_triage 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 freebsd_triage 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/