debian/0000755000000000000000000000000012201703125007157 5ustar debian/bsdiff.manpages0000644000000000000000000000002312201703125012124 0ustar bsdiff.1 bspatch.1 debian/upstream.changelog0000644000000000000000000000514512201703125012675 0ustar Binary diff/patch utility bsdiff and bspatch are tools for building and applying patches to binary files. By using suffix sorting (specifically, [1]Larsson and Sadakane's qsufsort) and taking advantage of how executable files change, bsdiff routinely produces binary patches 50-80% smaller than those produced by [2]Xdelta, and 15% smaller than those produced by [3].RTPatch (a $2750/seat commercial patch tool). These programs were originally named bdiff and bpatch, but the large number of other programs using those names lead to confusion; I'm not sure if the "bs" in refers to "binary software" (because bsdiff produces exceptionally small patches for executable files) or "bytewise subtraction" (which is the key to how well it performs). Feel free to offer other suggestions. bsdiff and bspatch use bzip2; by default they assume it is in /usr/bin. bsdiff is quite memory-hungry. It requires max(17*n,9*n+m)+O(1) bytes of memory, where n is the size of the old file and m is the size of the new file. bspatch requires n+m+O(1) bytes. bsdiff runs in O((n+m) log n) time; on a 200MHz Pentium Pro, building a binary patch for a 4MB file takes about 90 seconds. bspatch runs in O(n+m) time; on the same machine, applying that patch takes about two seconds. Providing that off_t is defined properly, bsdiff and bspatch support files of up to 2^61-1 = 2Ei-1 bytes. Version 4.3 is available [4]here with MD5 hash e6d812394f0e0ecc8d5df255aa1db22a. Version 4.2 is available in the FreeBSD, NetBSD, and OpenBSD ports trees as misc/bsdiff, in Darwinports as devel/bsdiff, and in gentoo as dev-util/bsdiff. It has also been made into a [5]Python extension module, and there is a [6]Windows port available. The algorithm used by BSDiff 4 is described in my (unpublished) paper [7]Naive differences of executable code; please cite this in papers as Colin Percival, Naive differences of executable code, http://www.daemonology.net/bsdiff/, 2003. A far more sophisticated algorithm, which typically provides roughly 20% smaller patches, is described in my [8]doctoral thesis. References 1. http://www.cs.lth.se/Research/Algorithms/Papers/jesper5.ps 2. http://sourceforge.net/projects/xdelta/ 3. http://www.pocketsoft.com/products.html 4. http://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz 5. http://starship.python.net/crew/atuining/cx_bsdiff/index.html 6. http://sites.inka.de/tesla/f_others.html#bsdiff 7. http://www.daemonology.net/papers/bsdiff.pdf 8. http://www.daemonology.net/papers/thesis.pdf debian/README.Debian0000644000000000000000000000155312201703125011224 0ustar bsdiff ------ This package provides a pair of tools for building (bsdiff) and applying (bspatch) binary patches. When applied to two versions of the same executable the patches produced are significantly smaller than those generated by other binary diff tools. Bsdiff and bspatch were originally written as part of the author's FreeBSD Update tool, where they provide an average 50-fold reduction in the bandwidth used to distribute binary security updates to the FreeBSD base system. Since that time it has been incorporated into a large number of products, including Apple's OS X. The price to pay for the efficient delta compression of executable code comes in speed and memory usage: Bsdiff is many times slower than alternatives, and requires memory equal to 17 times the size of the "old" input file. The website for bsdiff is . debian/clean0000644000000000000000000000001712201703125010162 0ustar bsdiff bspatch debian/watch0000644000000000000000000000016612201703125010213 0ustar version=3 # [Version [Action]] http://www.daemonology.net/bsdiff/ bsdiff-(.+)\.tar\.gz debian/rules0000755000000000000000000000115212201703125010236 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed CHANGELOG = debian/upstream.changelog URL = http://www.daemonology.net/bsdiff/ # Run manually as needed get-changelog: lynx -dump $(URL) > $(CHANGELOG) override_dh_auto_build: gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o bsdiff bsdiff.c -lbz2 gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o bspatch bspatch.c -lbz2 override_dh_installchangelogs: dh_installchangelogs $(CHANGELOG) %: dh $@ # End of file debian/changelog0000644000000000000000000001165512201703125011041 0ustar bsdiff (4.3-15) unstable; urgency=low * debian/control - (Standards-Version): Update to 3.9.4. - (Vcs-*): Update to anonscm.debian.org. * debian/patches - (10): New. Adjust Makefile to not have .ifdef directive. (Closes: #718104). -- Jari Aalto Sun, 11 Aug 2013 15:40:34 +0300 bsdiff (4.3-14) unstable; urgency=low * debain/rules: Adjust linker flag order (FTBFS; #673995). Patch thanks to Jean-Louis Dupond . -- Jari Aalto Wed, 23 May 2012 12:58:42 +0300 bsdiff (4.3-13) unstable; urgency=low * debian/control - (standards-Version): Update to 3.9.3.1. * debian/rules - Use CPPFLAGS for hardening too. - Use DEB_*_MAINT_* variables. -- Jari Aalto Thu, 22 Mar 2012 13:10:15 -0400 bsdiff (4.3-12) unstable; urgency=low * debian/control - (Build-Depends): Rm dpkg-dev; not needed with debhelper 9. - (Standards-Version): Update to 3.9.3. * debian/copyright - Update to format 1.0. * debian/README.Debian - Rename from docs/README. * debian/rules - Enable all hardening flags. - Delete buildflags.mk; not needed with debhelper 9. - (get-changelog): New. - (override_dh_installchangelogs): New * debian/upstream.changelog - New file. -- Jari Aalto Tue, 06 Mar 2012 10:34:28 -0500 bsdiff (4.3-11) unstable; urgency=low * debian/compat - Update to 9 * debian/control - (Build-Depends): Update to debhelper 9, dpkg-dev 1.16.1 - (Standards-Version): Update to 3.9.2. * debian/copyright - Update to latest DEP5 format. * debian/rules - Remove unnecessary rules. - Use hardened CFLAGS (release goal). http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags -- Jari Aalto Sat, 11 Feb 2012 15:13:18 -0500 bsdiff (4.3-10) unstable; urgency=low * Move to format: 3.0 (quilt). * debian/clean - New file. * debian/copyright - (Files: debian/*::Copyright): adjust indent. * debian/rules - (clean): delete. Obsoleted by dh(1). - (dh): New rule. - (bsdiff): New simplified rule; was "build-stamp". - (PHONY): Remove "clean". -- Jari Aalto Tue, 15 Dec 2009 02:11:29 +0200 bsdiff (4.3-9) unstable; urgency=low * New maintainer (Closes: #543933). * debian/control - (Vcs-*): Add Git URLs. * debian/watch - New file. -- Jari Aalto Sat, 28 Nov 2009 19:28:40 +0000 bsdiff (4.3-8) unstable; urgency=low * Removing vcs fields. * Orphaning package. -- Daniel Baumann Thu, 27 Aug 2009 16:38:40 +0200 bsdiff (4.3-7) unstable; urgency=low * Updating vcs fields in control file. * Prefixing debhelper files with package name. * Tidy rules file. * Updating year in copyright file. * Updating package to standards version 3.8.2. * Using correct rfc-2822 date formats in changelog. -- Daniel Baumann Mon, 20 Jul 2009 11:29:40 +0200 bsdiff (4.3-6) unstable; urgency=medium * Replacing install target of rules with debhelper files. * Reordering rules file. * Rewriting copyright file in machine-interpretable format. * Moving README to dedicated subdirectory. * Adding vcs fields in control file. * Upgrading package to debhelper 7. * Removing watch file. * Updating to standards 3.8.0. -- Daniel Baumann Fri, 20 Jun 2008 10:33:00 +0200 bsdiff (4.3-5) unstable; urgency=low * Bumping to new policy. * Using new homepage field in control. -- Daniel Baumann Sun, 23 Dec 2007 12:16:00 +0100 bsdiff (4.3-4) unstable; urgency=low * Minor cleanups. -- Daniel Baumann Fri, 19 Jan 2007 11:11:00 +0100 bsdiff (4.3-3) unstable; urgency=low * New email address. * Bumped policy. -- Daniel Baumann Thu, 06 Jul 2006 07:09:00 +0200 bsdiff (4.3-2) unstable; urgency=low * Upstream changed with 4.3 to standard BSD license, adjusted debian/copyright (Closes: #352908). * Corrected Depends. -- Daniel Baumann Sat, 18 Feb 2006 10:14:00 +0100 bsdiff (4.3-1) unstable; urgency=low * New upstream release. * Bumped policy version. * Minor formal cleanups. * Added watch file. * Added lintian overrides. -- Daniel Baumann Sun, 23 Oct 2005 13:11:00 +0200 bsdiff (4.2-2) unstable; urgency=low * Replaced README file: the old containing the sentences from the website was taken without permission of the upstream author, the new is kindly provided by the upstream author (Closes: #322147). -- Daniel Baumann Wed, 10 Aug 2005 15:48:00 +0200 bsdiff (4.2-1) unstable; urgency=low * Initial Release (Closes: #310736). * Added text from website into README. -- Daniel Baumann Thu, 26 May 2005 07:10:00 +0200 debian/patches/0000755000000000000000000000000012201703125010606 5ustar debian/patches/series0000644000000000000000000000002512201703125012020 0ustar 10-no-bsd-make.patch debian/patches/10-no-bsd-make.patch0000644000000000000000000000076212201703125014147 0ustar From: Jari Aalto Subject: Remove BSDism from Makefile Bug-Debian: http://bugs.debian.org/718104 --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/Makefile +++ b/Makefile @@ -8,8 +8,10 @@ bsdiff: bsdiff.c bspatch: bspatch.c -install: +install-bin: ${INSTALL_PROGRAM} bsdiff bspatch ${PREFIX}/bin -.ifndef WITHOUT_MAN + +install-man: ${INSTALL_MAN} bsdiff.1 bspatch.1 ${PREFIX}/man/man1 -.endif + +install: install-bin install-man debian/bsdiff.install0000644000000000000000000000004112201703125011777 0ustar bsdiff /usr/bin bspatch /usr/bin debian/source/0000755000000000000000000000000012201703125010457 5ustar debian/source/format0000644000000000000000000000001412201703125011665 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212201703125010355 0ustar 9 debian/copyright0000644000000000000000000000316312201703125011115 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: bsdiff Upstream-Contact: Colin Percival Source: http://www.daemonology.net/bsdiff Files: * Copyright: 2003-2005 Colin Percival License: BSD Files: debian/* Copyright: 2009-2012 Jari Aalto , 2005-2009 Daniel Baumann License: BSD License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted providing that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/control0000644000000000000000000000154612201703125010570 0ustar Source: bsdiff Section: utils Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), libbz2-dev Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/bsdiff.git Vcs-Git: git://anonscm.debian.org/collab-maint/bsdiff.git Homepage: http://www.daemonology.net/bsdiff/ Package: bsdiff Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Provides: bspatch Description: generate/apply a patch between two binary files bsdiff and bspatch are tools for building and applying patches to binary files. By using suffix sorting (specifically, Larsson and Sadakane's qsufsort) and taking advantage of how executable files change, bsdiff routinely produces binary patches 50-80% smaller than those produced by Xdelta, and 15% smaller than those produced by .RTPatch (a commercial patch tool).