genpatch man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

GENPATCH(1)		  BSD General Commands Manual		   GENPATCH(1)

NAME
     genpatch — generate patch quickly in standard FreeBSD ports format

SYNOPSIS
     genpatch newfile
     genpatch oldfile newfile

DESCRIPTION
     This utility is always called by portfix(1), but quite often it is useful
     in its own right.

     It creates patches using the standard FreeBSD ports format defined by the
     "make makepatch" ports utility, but there are different operational
     modes.

     If genpatch is called when the current working directory is a subdirec‐
     tory of WRKDIRPREFIX if defined or PORTSDIR if not, then a patch will be
     saved in the current directory using the naming standard used by "make
     makepatch".  Note that the utility assumes that it has been executed in
     the WRKSRC directory, the standard location for applying ports patches.

     If genpatch is executed outside of WRKDIRPREFIX (or PORTSDIR), then a
     patch will not be created.	 The contents of the patch will be send to
     stdout, so the user will have to direct it to a file manually as desired.

     If only one argument is given, genpatch will search for a file named
     "<newfile>.intermediate" and if found, it will generated diff output
     between it and [newfile].	If that file doesn't exist, it will search for
     "<newfile>.orig" and attempt to create diff output between it and
     [newfile].

ERRORS
     genpatch will abort if no arguments or more than 2 arguments are given.
     If only one argument ( [newfile] ) is given, then a regular file called
     "<newfile>.orig" or "<newfile>.intermediate" must exist otherwise
     genpatch will abort.  If two arguments are given, both must be existing
     regular files.

ENVIRONMENT
     WORKTREE	 Overrides hardcoded WRKDIRPREFIX (or PORTSDIR).  This is use‐
		 ful for ports outside of the tree or when genpatch was
		 installed via binary packages and WRKDIRPREFIX is defined (or
		 PORTSDIR is non-standard)

NOTES
     1.	  FreeBSD does not set WRKDIRPREFIX by default
     2.	  The default PORTSDIR for FreeBSD is /usr/ports so on standard Free‐
	  BSD systems genpatch will generate a patch file in the current
	  directory if executed on any subdirectory of /usr/ports.
     3.	  Dragonfly sets WRKDIRPREFIX to /usr/obj/dports by default, so on
	  standard systems patch files are generated automatically if genpatch
	  is executed from a subdirectory of /usr/obj/dports.
     4.	  The root directory used for this calculation is permanently set when
	  genpatch is built, but it can be overridden with the WORKTREE envi‐
	  ronment variable.

SEE ALSO
     dupe(1), portfix(1)

BSD				 17 May, 2015				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net