From nobody@FreeBSD.org  Fri Oct 19 15:58:37 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 95B806D3
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Oct 2012 15:58:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 7CFCA8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Oct 2012 15:58:37 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9JFwbJb056863
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 19 Oct 2012 15:58:37 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9JFwbs1056859;
	Fri, 19 Oct 2012 15:58:37 GMT
	(envelope-from nobody)
Message-Id: <201210191558.q9JFwbs1056859@red.freebsd.org>
Date: Fri, 19 Oct 2012 15:58:37 GMT
From: anatoly techtonik <techtonik@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bsdiff/bspatch need version information for synchronization with other forks
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172882
>Category:       bin
>Synopsis:       bsdiff(1)/bspatch(1) need version information for synchronization with other forks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    cperciva
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 19 16:00:00 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon Oct 22 18:20:00 UTC 2012
>Originator:     anatoly techtonik
>Release:        
>Organization:
>Environment:
>Description:
bsdiff in FreeBSD source is copied from canonical version of bsdiff 4.3 by Colin Percival available from http://www.daemonology.net/bsdiff/

There are also many forks with code improvements and potential bug fixes, but before starting any synchronization work there should be way to reference various versions of bsdiff.

I propose to add version strings to bsdiff/bspatch and print them along with usage hints. FreeBSD source tree looks like an official place for the source code now, so 4.4 sounds like a good start.

Sorry for not being able to contribute a patch. I am not a FreeBSD developer and won't be able to test the patch properly. Neither do I know the standards for embedding the version inside C code. I also find it slightly inconvenient to have 3 directories and 3 Makefiles to build tools that always come together.

http://svnweb.freebsd.org/base/head/usr.bin/bsdiff/
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->cperciva 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Oct 20 15:36:18 UTC 2012 
Responsible-Changed-Why:  
over to author. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172882 

From: Colin Percival <cperciva@freebsd.org>
To: bug-followup@FreeBSD.org, techtonik@gmail.com
Cc:  
Subject: Re: bin/172882: bsdiff(1)/bspatch(1) need version information for
 synchronization with other forks
Date: Sun, 21 Oct 2012 23:48:11 -0700

 Why do the various versions of bsdiff/bspatch need to be synchronized?  I'm
 happy to let different people hack it up in a variety of ways for their own
 purposes...
 
 -- 
 Colin Percival
 Security Officer Emeritus, FreeBSD | The power to serve
 Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

From: anatoly techtonik <techtonik@gmail.com>
To: Colin Percival <cperciva@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/172882: bsdiff(1)/bspatch(1) need version information for
 synchronization with other forks
Date: Mon, 22 Oct 2012 11:05:46 +0300

 The main reason is to pull back fix for bsdiff crash when somebody
 get's to it. The second is too add clarity to the code to make it
 easier to hack and cross-platform by default. When forks diverge too
 much it is hard to bring modifications back. I'd be happy to pull
 worthy changes to my Windows version from these forks, but not being a
 C coder I can't do this safe, and I am not sure that the fork is
 tested.
 
 https://github.com/mendsley/bsdiff
 https://github.com/thoughtpolice/minibsdiff
 
 Version info is needed for troubleshooting what modification of
 bsdiff/bspatch users have. Currently `bspatch --version` doesn't show
 anything and neither fork added this even after they've made patch
 format incompatible.
 
 On Mon, Oct 22, 2012 at 9:48 AM, Colin Percival <cperciva@freebsd.org> wrote:
 > Why do the various versions of bsdiff/bspatch need to be synchronized?  I'm
 > happy to let different people hack it up in a variety of ways for their own
 > purposes...
 >
 > --
 > Colin Percival
 > Security Officer Emeritus, FreeBSD | The power to serve
 > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

From: anatoly techtonik <techtonik@gmail.com>
To: Colin Percival <cperciva@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/172882: bsdiff(1)/bspatch(1) need version information for
 synchronization with other forks
Date: Mon, 22 Oct 2012 11:40:09 +0300

 Here is another link. This time Google + Mozilla.
 http://src.chromium.org/svn/trunk/src/chrome/installer/mac/third_party/bsdiff/README.chromium
 
 On Mon, Oct 22, 2012 at 9:48 AM, Colin Percival <cperciva@freebsd.org> wrote:
 > Why do the various versions of bsdiff/bspatch need to be synchronized?  I'm
 > happy to let different people hack it up in a variety of ways for their own
 > purposes...
 >
 > --
 > Colin Percival
 > Security Officer Emeritus, FreeBSD | The power to serve
 > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

From: Colin Percival <cperciva@freebsd.org>
To: anatoly techtonik <techtonik@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: bin/172882: bsdiff(1)/bspatch(1) need version information for
 synchronization with other forks
Date: Mon, 22 Oct 2012 10:42:15 -0700

 Hi Anatoly,
 
 Yes, I'm aware of bsdiff being used widely with a variety of changes.  So what?
 
 On 10/22/12 01:40, anatoly techtonik wrote:
 > Here is another link. This time Google + Mozilla.
 > http://src.chromium.org/svn/trunk/src/chrome/installer/mac/third_party/bsdiff/README.chromium
 > 
 > On Mon, Oct 22, 2012 at 9:48 AM, Colin Percival <cperciva@freebsd.org> wrote:
 >> Why do the various versions of bsdiff/bspatch need to be synchronized?  I'm
 >> happy to let different people hack it up in a variety of ways for their own
 >> purposes...
 >>
 >> --
 >> Colin Percival
 >> Security Officer Emeritus, FreeBSD | The power to serve
 >> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
 > 
 > 
 
 
 -- 
 Colin Percival
 Security Officer Emeritus, FreeBSD | The power to serve
 Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid

From: anatoly techtonik <techtonik@gmail.com>
To: Colin Percival <cperciva@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/172882: bsdiff(1)/bspatch(1) need version information for
 synchronization with other forks
Date: Mon, 22 Oct 2012 21:09:34 +0300

 Hi Colin,
 
 I got my old patched bsdiff.c file and I don't remember where did I
 get the original from and now I have to check it with many sources.
 That's very daunting. If it had a version field then at least I could
 use it as a starting point and detect what was modified faster.
 --
 anatoly t.
 
 
 On Mon, Oct 22, 2012 at 8:42 PM, Colin Percival <cperciva@freebsd.org> wrote:
 > Hi Anatoly,
 >
 > Yes, I'm aware of bsdiff being used widely with a variety of changes.  So what?
 >
 > On 10/22/12 01:40, anatoly techtonik wrote:
 >> Here is another link. This time Google + Mozilla.
 >> http://src.chromium.org/svn/trunk/src/chrome/installer/mac/third_party/bsdiff/README.chromium
 >>
 >> On Mon, Oct 22, 2012 at 9:48 AM, Colin Percival <cperciva@freebsd.org> wrote:
 >>> Why do the various versions of bsdiff/bspatch need to be synchronized?  I'm
 >>> happy to let different people hack it up in a variety of ways for their own
 >>> purposes...
 >>>
 >>> --
 >>> Colin Percival
 >>> Security Officer Emeritus, FreeBSD | The power to serve
 >>> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
 >>
 >>
 >
 >
 > --
 > Colin Percival
 > Security Officer Emeritus, FreeBSD | The power to serve
 > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
>Unformatted:
