summaryrefslogtreecommitdiff
path: root/static/openbsd/man1/update-patches.1
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 14:02:27 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 14:02:27 -0400
commit6d8bdc65446a704d0750217efd05532fc641ea7d (patch)
tree8ae6d698b3c9801750a8b117b3842fb369872a3a /static/openbsd/man1/update-patches.1
parent2f467bd7ff8f8db0dafa40426166491d7f57f368 (diff)
docs: OpenBSD Man Pages Added
Diffstat (limited to 'static/openbsd/man1/update-patches.1')
-rw-r--r--static/openbsd/man1/update-patches.1100
1 files changed, 100 insertions, 0 deletions
diff --git a/static/openbsd/man1/update-patches.1 b/static/openbsd/man1/update-patches.1
new file mode 100644
index 00000000..b6d2f7e9
--- /dev/null
+++ b/static/openbsd/man1/update-patches.1
@@ -0,0 +1,100 @@
+.\" $OpenBSD: update-patches.1,v 1.2 2018/06/26 06:56:07 jmc Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: June 26 2018 $
+.Dt UPDATE-PATCHES 1
+.Os
+.Sh NAME
+.Nm update-patches
+.Nd create or update patches for a given port
+.Sh SYNOPSIS
+.Nm update-patches
+.Sh DESCRIPTION
+.Nm
+is a helper script for the target
+.Ar update-patches
+in
+.Xr bsd.port.mk 5 .
+It takes no argument, but uses quite a few environment variables as
+implicit parameters.
+.Pp
+.Nm
+looks under
+.Ev WRKDIST
+for patched files.
+Those are files with extension
+.Ev PATCHORIG ,
+except for those matching also
+.Ev DISTORIG .
+.Pp
+Once those files are found, they are matched against the contents of
+directory
+.Ev PATCHDIR ,
+most specifically files matching wildcard
+.Ev PATCH_LIST .
+Matching files are regenerated on the basis of
+.Pp
+.Dl $ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file
+.Pp
+and compared.
+Modified patches are updated and reported, new patches are generated,
+and old patches that no longer seem to exist are also reported.
+.Pp
+As an exception, if a
+.Pa $file.beforesubst
+original file is found, it is used instead of $file in the diff line:
+.Pp
+.Dl $ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file.beforesubst
+.Pp
+The patch header is normalized to always be:
+.Bd -literal -offset indent
+Index: $file
+--- $file.orig
++++ $file
+.Ed
+.Pp
+Patches with problematic
+.Xr cvs 1
+keywords may be fixed if possible, and reported if not.
+.Pp
+.Nm
+prints the list of changed patches for further study.
+.Sh ENVIRONMENT
+.Bl -tag -width FORCE_REGEN
+.It Ev DIFF_ARGS
+Extra parameters to insert into
+.Xr diff 1 .
+.It Ev DISTORIG
+Extension to original files to ignore entirely.
+.It Ev FORCE_REGEN
+Force patches to be regenerated even if they didn't change.
+.It Ev PATCHDIR
+Path to existing and generated patches.
+.It Ev PATCHORIG
+Extension to match for finding original files.
+.It Ev PATCH_LIST
+Only compare new patches to existing patches matching that pattern.
+.It Ev PATCH_VERBOSE
+Force
+.Nm
+to tell about everything it does.
+.It Ev WRKDIST
+Directory to scan for files to compare.
+.El
+.Sh SEE ALSO
+.Xr cvs 1 ,
+.Xr diff 1 ,
+.Xr patch 1