[BACK]Return to update-patches.1 CVS log [TXT][DIR] Up to [local] / src / share / man / man1

File: [local] / src / share / man / man1 / update-patches.1 (download)

Revision 1.2, Tue Jun 26 06:56:07 2018 UTC (5 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, HEAD
Changes since 1.1: +3 -3 lines

various minor tweaks;

.\"	$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