<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>159100</bug_id>
          
          <creation_ts>2006-12-25 15:23 0000</creation_ts>
          <short_desc>lha-114i-r6 cannot unpack quake1-demodata</short_desc>
          <delta_ts>2007-07-27 23:11:23 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Games</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jkt@gentoo.org</reporter>
          <assigned_to>usata@gentoo.org</assigned_to>
          <cc>astralsin@gmail.com</cc>
    
    <cc>brad@oatmail.org</cc>
    
    <cc>brebs@sent.com</cc>
    
    <cc>games@gentoo.org</cc>
    
    <cc>ikelos@gentoo.org</cc>
    
    <cc>john_r_graham@mindspring.com</cc>
    
    <cc>vapier@gentoo.org</cc>
    
    <cc>voyageur@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>jkt@gentoo.org</who>
            <bug_when>2006-12-25 15:23:06 0000</bug_when>
            <thetext>velbloud ~ # emerge -av quake1-demodata

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] games-fps/quake1-demodata-1.06  USE=&quot;-symlink&quot; 0 kB

Total size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

&gt;&gt;&gt; Emerging (1 of 1) games-fps/quake1-demodata-1.06 to /
 * quake106.zip MD5 ;-) ...                                                                                                                                                                             [ ok ]
 * quake106.zip RMD160 ;-) ...                                                                                                                                                                          [ ok ]
 * quake106.zip SHA1 ;-) ...                                                                                                                                                                            [ ok ]
 * quake106.zip SHA256 ;-) ...                                                                                                                                                                          [ ok ]
 * quake106.zip size ;-) ...                                                                                                                                                                            [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                    [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                   [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                  [ ok ]
 * checking quake106.zip ;-) ...                                                                                                                                                                        [ ok ]
&gt;&gt;&gt; Unpacking source...
&gt;&gt;&gt; Unpacking quake106.zip to /var/tmp/portage/quake1-demodata-1.06/work
LHa: Error: Checksum error (LHarc file?)

!!! ERROR: games-fps/quake1-demodata-1.06 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_unpack
  ebuild.sh, line 708:   Called src_unpack
  quake1-demodata-1.06.ebuild, line 45:   Called die

!!! lha failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

velbloud ~ # emerge -pv lha

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] app-arch/lha-114i-r6  0 kB

Total size of downloads: 0 kB</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>brebs@sent.com</who>
            <bug_when>2006-12-26 02:10:56 0000</bug_when>
            <thetext>lha-114i-r6 is broken. The same command works in Ubuntu&apos;s Edgy, but not in Gentoo:
lha e resource.1

http://packages.ubuntu.com/edgy/utils/lha</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>voyageur@gentoo.org</who>
            <bug_when>2006-12-29 06:04:17 0000</bug_when>
            <thetext>Thanks for the link, I built a lha binary from ubuntu&apos;s source+diff, and indeed emerge quake1-demodata worked fine</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>brebs@sent.com</who>
            <bug_when>2006-12-29 19:58:58 0000</bug_when>
            <thetext>Created an attachment (id=104968)
lha-114i-r6.ebuild

Compiles Debian&apos;s lha. Works with quake1-demodata.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>brebs@sent.com</who>
            <bug_when>2007-01-01 23:22:32 0000</bug_when>
            <thetext>Shouldn&apos;t this bug be reassigned? It&apos;s a problem with lha. Seems to break quake1-data also:

http://forums.gentoo.org/viewtopic-t-528421.html</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nyhm@gentoo.org</who>
            <bug_when>2007-02-28 21:18:28 0000</bug_when>
            <thetext>*** Bug 168674 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-07-09 22:09:06 0000</bug_when>
            <thetext>*** Bug 184774 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>john_r_graham@mindspring.com</who>
            <bug_when>2007-07-22 18:10:51 0000</bug_when>
            <thetext>Well, there&apos;s good news and bad news.  lha-114i-r5 *can* unpack that file.  It&apos;s no longer in the Portage tree, but, perhaps it should be reinstated (and lha-114i-r6 masked) until the issues are sorted out.

lha-114i-r6 is based on a different upstream tarball that&apos;s pretty significantly different.  lha-114i-r5 did not use autotools and had a pretty significant list of patches.  lha-114i-r6 uses autotools, incorporates all of the patches, uses getopt to parse the command line, and really includes a lot of cleanup which generally looks good.  Too bad it doesn&apos;t work.

Just as an aside, the brand new lha-114i-r7 that I just got put into the tree with the help of the Sunrise folks *does not* address this issue.  It *does* however address *another* issue introduced with -r6.  See bug #184911.

- John</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>john_r_graham@mindspring.com</who>
            <bug_when>2007-07-22 18:13:10 0000</bug_when>
            <thetext>Incidentally, lha-114i-r5 uses the same upstream tarball that Debian is using right now, which explains why the Debian version is working.

- John</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>john_r_graham@mindspring.com</who>
            <bug_when>2007-07-23 03:28:35 0000</bug_when>
            <thetext>Okay, now I am in a quandary.  lha-114i-r5 worked because it was broken.  lha-114i-r6 doesn&apos;t work because it&apos;s not broken.  Read on.

lha contains a function called archive_is_msdos_sfx1() that determines whether or not the archive file is an MS-DOS self-extracting executable archive.  It does so in a very simplistic way, by comparing the last few bytes of the file name against a list of known executable file types (under DOS!).

In lha-114i-r5, this function was broken and almost always returned &quot;true&quot; but the code to skip the embedded DOS self extraction code was smart enough to not skip a non-existent executable blob.

In lha-114i-r6, the archive_is_msdos_sfx1() function was fixed and the skip code was simplified.  The end result is that the code will no longer correctly process self extracting archives whose file name doesn&apos;t end in &quot;.com&quot;, &quot;.exe&quot;, or &quot;.x&quot;.

So the quandary is that lha-114i-r6 is behaving as designed and the file that quake1-demodata cannot extract has been erroneously renamed from something.exe to resource.1.  Technically, the issue is with the quake1-demodata ebuild.

But, I&apos;m unhappy with the archive_is_msdos_sfx1() function.  It&apos;s really easy to look into the contents of a file to tell if it&apos;s an MS-DOS executable.  I&apos;m working on a change to the archive_is_msdos_sfx1() function so that it depends on the contents as opposed to the name.

Advice?  Opinions?

- John</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>john_r_graham@mindspring.com</who>
            <bug_when>2007-07-23 03:44:18 0000</bug_when>
            <thetext>Created an attachment (id=125719)
New quake1-demodata ebuild that works with the existing lha (114i-r6).

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>brebs@sent.com</who>
            <bug_when>2007-07-23 04:07:32 0000</bug_when>
            <thetext>Created an attachment (id=125721)
quake1-demodata-1.06.diff

Works with Debian&apos;s lha, lha-114i-r6 and lha-114i-r7</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2007-07-24 20:06:22 0000</bug_when>
            <thetext>*** Bug 166583 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2007-07-27 23:11:23 0000</bug_when>
            <thetext>OK.  This is FIXED now using the patch from Paul.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>104968</attachid>
            <date>2006-12-29 19:58 0000</date>
            <desc>lha-114i-r6.ebuild</desc>
            <filename>lha-114i-r6.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0yMDA2IEdlbnRvbyBGb3VuZGF0aW9uCiMgRGlzdHJpYnV0ZWQgdW5k
ZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgojICRIZWFk
ZXI6ICQKCmluaGVyaXQgZXV0aWxzCgpNWV9QVj0ke1BWOjA6MX0uJHtQVjoxfQpNWV9QX09SSUc9
IiR7UE59XyR7TVlfUFZ9IgpNWV9QPSIke01ZX1BfT1JJR30tMTAuMSIKREVCSUFOPSJtaXJyb3I6
Ly9kZWJpYW4vcG9vbC9ub24tZnJlZS9sIgoKREVTQ1JJUFRJT049IlV0aWxpdHkgZm9yIGNyZWF0
aW5nIGFuZCBvcGVuaW5nIGx6aCBhcmNoaXZlcyIKSE9NRVBBR0U9Imh0dHA6Ly9saGEuc291cmNl
Zm9yZ2UuanAvIgpTUkNfVVJJPSIke0RFQklBTn0vJHtQTn0vJHtNWV9QX09SSUd9Lm9yaWcudGFy
Lmd6Cgkke0RFQklBTn0vJHtQTn0vJHtNWV9QfS5kaWZmLmd6IgoKTElDRU5TRT0ibGhhIgpTTE9U
PSIwIgpLRVlXT1JEUz0iYWxwaGEgYW1kNjQgYXJtIGhwcGEgaWE2NCBtNjhrIHBwYyBwcGMtbWFj
b3MgcHBjNjQgczM5MCBzaCBzcGFyYyB4ODYgfng4Ni1mYnNkIgpJVVNFPSIiCgpSREVQRU5EPSIi
CkRFUEVORD0iIgoKUz0ke1dPUktESVJ9LyR7UE59LSR7TVlfUFZ9Lm9yaWcKCnNyY191bnBhY2so
KSB7Cgl1bnBhY2sgJHtBfQoKCWVwYXRjaCAuLyR7TVlfUH0uZGlmZgp9CgpzcmNfaW5zdGFsbCgp
IHsKCWRvYmluIHNyYy8ke1BOfSB8fCBkaWUKCgluZXdtYW4gbWFuLyR7UE59Lm1hbiAke1BOfS5u
IHx8IGRpZQoJZG9tYW4gZGViaWFuLyR7UE59LjEgfHwgZGllCgoJZG9kb2MgKi57ZXVjLHR4dH0K
fQo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>125719</attachid>
            <date>2007-07-23 03:44 0000</date>
            <desc>New quake1-demodata ebuild that works with the existing lha (114i-r6).</desc>
            <filename>quake1-demodata-1.06-r1.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0yMDA3IEdlbnRvbyBGb3VuZGF0aW9uCiMgRGlzdHJpYnV0ZWQgdW5k
ZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgojICRIZWFk
ZXI6IC92YXIvY3Zzcm9vdC9nZW50b28teDg2L2dhbWVzLWZwcy9xdWFrZTEtZGVtb2RhdGEvcXVh
a2UxLWRlbW9kYXRhLTEuMDYuZWJ1aWxkLHYgMS41IDIwMDcvMDMvMTIgMTQ6NDc6MTkgZ2Vub25l
IEV4cCAkCgppbmhlcml0IGV1dGlscyB2ZXJzaW9uYXRvciBnYW1lcwoKTVlfUFY9JChkZWxldGVf
YWxsX3ZlcnNpb25fc2VwYXJhdG9ycykKTVlfUE49InF1YWtlIgoKREVTQ1JJUFRJT049IkRlbW8g
ZGF0YSBmb3IgUXVha2UgMSIKSE9NRVBBR0U9Imh0dHA6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kv
UXVha2VfSSIKU1JDX1VSST0ibWlycm9yOi8vaWRzb2Z0d2FyZS8ke01ZX1BOfS8ke01ZX1BOfSR7
TVlfUFZ9LnppcCIKCiMgU2VlIGxpY2luZm8udHh0CkxJQ0VOU0U9InF1YWtlMS1kZW1vZGF0YSIK
U0xPVD0iMCIKS0VZV09SRFM9In5hbWQ2NCB+eDg2IgpJVVNF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IHNvIHRoYXQgcGVvcGxlIGNhbiBqdXN0IHJ1biBp
dCwKCQkjIHdpdGhvdXQgaGF2aW5nIHRvIG1lc3Mgd2l0aCBjb21tYW5kLWxpbmUgb3B0aW9ucy4K
CQljZCAiJHtEfS8ke2Rpcn0iICYmIGxuIC1zZm4gZGVtbyBpZDEKCWZpCgoJcHJlcGdhbWVzZGly
cwp9Cgpwa2dfcG9zdGluc3QoKSB7CglnYW1lc19wa2dfcG9zdGluc3QKCgllbG9nICJUaGlzIGlz
IGp1c3QgdGhlIGRlbW8gZGF0YS4iCgllbG9nICJZb3Ugd2lsbCBzdGlsbCBuZWVkIGEgUXVha2Ug
MSBjbGllbnQsIHRvIHBsYXksIHN1Y2ggYXMgZGFya3BsYWNlcy4iCgllY2hvCgoJaWYgdXNlIHN5
bWxpbmsgOyB0aGVuCgkJZWxvZyAiaWQxIGhhcyBiZWVuIHN5bWxpbmtlZCB0byBkZW1vLCBmb3Ig
Y29udmVuaWVuY2UsIHdpdGhpbjoiCgkJZWxvZyAiJHtkaXJ9IgoJCWVjaG8KCWZpCn0K
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>125721</attachid>
            <date>2007-07-23 04:07 0000</date>
            <desc>quake1-demodata-1.06.diff</desc>
            <filename>quake1-demodata-1.06.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9nYW1lcy1mcHMvcXVha2UxLWRlbW9kYXRhL3F1YWtlMS1kZW1vZGF0
YS0xLjA2LmVidWlsZAkyMDA3LTAzLTEyIDE1OjA1OjQwLjAwMDAwMDAwMCArMDAwMAorKysgcXVh
a2UxLWRlbW9kYXRhLTEuMDYuZWJ1aWxkCTIwMDctMDctMjMgMDQ6NTc6MzMuMDAwMDAwMDAwICsw
MTAwCkBAIC00Miw3ICs0MiwxMCBAQAogc3JjX3VucGFjaygpIHsKIAl1bnBhY2sgJHtBfQogCi0J
bGhhIGVxIHJlc291cmNlLjEgfHwgZGllICJsaGEgZmFpbGVkIgorCSMgRmlsZSByZW5hbWUgZm9y
IGJ1ZyAjMTU5MTAwCisJbXYgcmVzb3VyY2UuezEseH0KKworCWxoYSB4ZnEgcmVzb3VyY2UueCB8
fCBkaWUgImxoYSBmYWlsZWQiCiAJIyBEb24ndCB3YW50IHRvIGNvbmZsaWN0IHdpdGggdGhlIGNk
aW5zdGFsbCBmaWxlcwogCW12IGlkMSBkZW1vCiB9Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>