xref: /freebsd/usr.bin/bsdiff/bspatch/bspatch.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1ba10db99SColin Percival.\"-
2ba10db99SColin Percival.\" Copyright 2003-2005 Colin Percival
3ba10db99SColin Percival.\" All rights reserved
4ba10db99SColin Percival.\"
5ba10db99SColin Percival.\" Redistribution and use in source and binary forms, with or without
6ba10db99SColin Percival.\" modification, are permitted providing that the following conditions
7ba10db99SColin Percival.\" are met:
8ba10db99SColin Percival.\" 1. Redistributions of source code must retain the above copyright
9ba10db99SColin Percival.\"    notice, this list of conditions and the following disclaimer.
10ba10db99SColin Percival.\" 2. Redistributions in binary form must reproduce the above copyright
11ba10db99SColin Percival.\"    notice, this list of conditions and the following disclaimer in the
12ba10db99SColin Percival.\"    documentation and/or other materials provided with the distribution.
13ba10db99SColin Percival.\"
14ba10db99SColin Percival.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15ba10db99SColin Percival.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16ba10db99SColin Percival.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17ba10db99SColin Percival.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
18ba10db99SColin Percival.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19ba10db99SColin Percival.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20ba10db99SColin Percival.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21ba10db99SColin Percival.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22ba10db99SColin Percival.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
23ba10db99SColin Percival.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24ba10db99SColin Percival.\" POSSIBILITY OF SUCH DAMAGE.
25ba10db99SColin Percival.\"
26*c7a06374SMike Karels.Dd December 22, 2022
27ba10db99SColin Percival.Dt BSPATCH 1
28bf2ed57bSRuslan Ermilov.Os
29ba10db99SColin Percival.Sh NAME
30ba10db99SColin Percival.Nm bspatch
31bf2ed57bSRuslan Ermilov.Nd apply a patch built with
32bf2ed57bSRuslan Ermilov.Xr bsdiff 1
33ba10db99SColin Percival.Sh SYNOPSIS
34ba10db99SColin Percival.Nm
35bf2ed57bSRuslan Ermilov.Ar oldfile newfile patchfile
36ba10db99SColin Percival.Sh DESCRIPTION
37bf2ed57bSRuslan ErmilovThe
38ba10db99SColin Percival.Nm
39bf2ed57bSRuslan Ermilovutility
40ba10db99SColin Percivalgenerates
41bf2ed57bSRuslan Ermilov.Ar newfile
42ba10db99SColin Percivalfrom
43bf2ed57bSRuslan Ermilov.Ar oldfile
44ba10db99SColin Percivaland
45bf2ed57bSRuslan Ermilov.Ar patchfile
46ba10db99SColin Percivalwhere
47bf2ed57bSRuslan Ermilov.Ar patchfile
48bf2ed57bSRuslan Ermilovis a binary patch built by
49bf2ed57bSRuslan Ermilov.Xr bsdiff 1 .
50ba10db99SColin Percival.Pp
51bf2ed57bSRuslan ErmilovThe
52ba10db99SColin Percival.Nm
53bf2ed57bSRuslan Ermilovutility
54ba10db99SColin Percivaluses memory equal to the size of
55bf2ed57bSRuslan Ermilov.Ar oldfile
56ba10db99SColin Percivalplus the size of
57bf2ed57bSRuslan Ermilov.Ar newfile ,
58ba10db99SColin Percivalbut can tolerate a very small working set without a dramatic loss
59ba10db99SColin Percivalof performance.
60ba10db99SColin Percival.Sh SEE ALSO
61ba10db99SColin Percival.Xr bsdiff 1
620afc94c1SUlrich Spörlein.Sh AUTHORS
632b7af31cSBaptiste Daroussin.An Colin Percival Aq Mt cperciva@FreeBSD.org
642bc706c6SColin Percival.Sh BUGS
652bc706c6SColin PercivalThe
662bc706c6SColin Percival.Nm
672bc706c6SColin Percivalutility does not verify that
682bc706c6SColin Percival.Ar oldfile
692bc706c6SColin Percivalis the correct source file for
702bc706c6SColin Percival.Ar patchfile .
712bc706c6SColin PercivalAttempting to apply a patch to the wrong file will usually produce
722bc706c6SColin Percivalgarbage; consequently it is strongly recommended that users of
732bc706c6SColin Percival.Nm
742bc706c6SColin Percivalverify that
752bc706c6SColin Percival.Ar oldfile
762bc706c6SColin Percivalmatches the source file from which
772bc706c6SColin Percival.Ar patchfile
782bc706c6SColin Percivalwas built, by comparing cryptographic hashes, for example.
792bc706c6SColin PercivalUsers may also wish to verify after running
802bc706c6SColin Percival.Nm
812bc706c6SColin Percivalthat
822bc706c6SColin Percival.Ar newfile
832bc706c6SColin Percivalmatches the target file from which
84*c7a06374SMike Karels.Ar patchfile
85*c7a06374SMike Karelswas built.
86