From owner-freebsd-questions@FreeBSD.ORG Wed Mar 14 23:35:11 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08F6F16A401 for ; Wed, 14 Mar 2007 23:35:11 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7AB5C13C45B for ; Wed, 14 Mar 2007 23:35:10 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.8/8.13.1) with ESMTP id l2ENZGOE066528; Wed, 14 Mar 2007 15:35:17 -0800 (PST) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.8/8.13.1/Submit) id l2ENZGk6066527; Wed, 14 Mar 2007 15:35:16 -0800 (PST) (envelope-from kline) Date: Wed, 14 Mar 2007 15:35:15 -0800 From: Gary Kline To: youshi10@u.washington.edu Message-ID: <20070314233515.GB96282@thought.org> References: <20070314201221.3503c338@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing twenty years of service to the Unix community Cc: freebsd-questions@freebsd.org Subject: Re: binary patches? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 23:35:11 -0000 On Wed, Mar 14, 2007 at 12:29:58PM -0700, youshi10@u.washington.edu wrote: > On Wed, 14 Mar 2007, Fabian Keil wrote: > > >Wojciech Puchar wrote: > > > >>> Regarding most (or many) of the port changes--say, upgrading > >>> foo-2.1.9_5 to foo-2.1.9_6, if the upgrade could be done by > >>> downloading a binary diff file, could the resulting > >>> /usr/local/bin/foo-2.1.9_6 be achieved by downloading a > >>> relatively small binary patch? Seems to me that smaller scale > >>> upgrades could be done this way in preference to re-compiling > >>> ports or downloading entire pacakes. --Same would go for any > >>> dependencies. > >>> > >>> Why is this a bad idea! > >>> > >>because if you change say 5 lines in program source of 1MB binary > >>program, resulting new 1MB binary will be MUCH different > >>byte-by-byte mostly because of address shifting so lots of pointers to > >>code (or data, rodata) will change. so diff will be big. > > > >Is that a guess or did you actually test and verify this? > > > >Fabian > > Well, this can be done by diffing two different copies of a similar binary. > Frankly, binary patches should be done thought IMHO because like Wojciech > mentioned the differences would be huge. > > Besides, the patches aren't portable, so the program would have to be > recompiled in the target arch, diffed, then put to a patch file. This as a > hunch / gut feeling I have, but the majority of the patches produced using > this method would soon approach the original packages size (assuming that > there were changes over the entire package and not a portion of it). All valid points. How far the idea of patches goes would clearly depend on how many type/flavors of patches there were and how many version. I've crom things to update daily, so for me, the max-diffs would be 2. Using "foo" above: if I had foo-2.1.9_5 and somehow missed _6 and _7, too bad; a rebuild or package download would be needed. The main thing (as I understand the issue) would be the size of the patch. A small reorg of binary can mean a large patch... . > > If you're thinking of creating a hotfix system though, that would be a good > idea (assuming everything's dynamically linked as opposed to statically > linked). When M$ moved their patch release infrastructure to their current > smaller one, update sizes did decrease by a fairly large amount (2-3+ > times?). The only thing is that keeping track of versions becomes an > important thing and making sure that you have all the successive patches in > a line becomes a mess--hence, you have to go to the Windows update site > multiple times to update one Windows component, like .NET 1.1 for instance. Yep. I (may) know somebody at M$ who says that they've got headaches that a million Exceedrin wouldn't help. A friend tried to patch his recent XP to get the new daylight time. He gave up after an hour of ping-ponging around. gary > > Just a few thoughts on the topic. > -Garrett > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org www.thought.org Public Service Unix