delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/04/12:52:32

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B9506C5.C6FAD015@etr-usa.com>
Date: Tue, 04 Sep 2001 10:52:21 -0600
From: Warren Young <warren AT etr-usa DOT com>
Organization: -ENOENT
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: press for cygwin
References: <17B78BDF120BD411B70100500422FC6309E334 AT IIS000> <3B939A12 DOT 5040009 AT ece DOT gatech DOT edu> <20010903111442 DOT D2024 AT redhat DOT com>

Christopher Faylor wrote:
> 
> >Somebody else mentioned this earlier -- and explained that Debian did
> >exactly that.  ".deb" files are just ar archives, but .deb implies that
> >they obey some sort of internal format standard ("CYGWIN-PATCHES" ?
> >/etc/postinstall?  )
> >
> >I actually think this is a pretty good idea.
> 
> It does have merits except for the fact that you lose the ability to
> distinguish between a .gz and .bz2 compressed archive.  

A quick peek at /etc/magic tells me that it's simple to distinguish the
two, and in fact it's more reliable, since magic numbers don't lie, but
file names can.  Also, we might say from the outset that Cygwin packages
are all packed with bzip2, not gzip.

I realize the file name detection code exists, so it's easier to leave
it be than to add more code for magic number checking, but it _is_
trivial to add magic number checking.  For gzip, a matter of checking
the first 2 bytes of the file, and for bzip2, the first 3 bytes.

> it says "Bwhaha, this is a WinZip confuser archive.  I will uncompress
> this file with great vigor".  If it sees a .gz file." it thinks "Oh
> well.  I'll uncompress this but I'm not happy about it since the file is
> recognizable to the evil GUI WinZip."

:)

I think it's more likely that WinZip will add bzip2 decompression than a
rule to handle *.cgw files as .tar.gz.  In other words, bzip2 confusing
Winzip might be a short-lived state of affairs.  If you doubt that, ask
yourself if, a few years ago, if you would have guessed that WinZip
would have added tar and gzip code?

> It's probably possible to add magic number detection to setup.exe to
> circumvent this but then, once again, we're moving into development
> areas that need more than just a good idea for anything to happen.

It _does_ solve two recent issues...
-- 
= Warren -- Video articles: http://www.cyberport.com/~tangent/video/
= 
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019