View Single Post
  #1   (View Single Post)  
Old 24th January 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default Automating patch generation and application for configuration files

1. Automating patch generation and application for configuration files
  • 1.1 Introduction
  • 1.2 Patching '/etc/mail/aliases'manually
  • 1.3 Automating patch creation
  • 1.4 Using 'patchcreate' to create a 'sshd_config' patch
  • 1.5 The 'patchcreate' script
  • 1.6 Comparison of 'sshd' before and after patching


1.1 Introduction

Anyone following mailing lists will have seem messages where a developer asks an user to apply a source code patch for solving a problem or enabling support for a new piece of hardware. This is only one of the multiple uses of patches, they also can be used to customize configuration files.

What does the man pages for patch(1) tell us?

Code:
NAME
     patch - apply a diff file to an original
       
DESCRIPTION
     patch will take a patch file containing any of the four forms of differ-
     ence listing produced by the diff(1) program and apply those differences
     to an original file, producing a patched version.  If patchfile is omit-
     ted, or is a hyphen, the patch will be read from the standard input.
Because 'diff' is the program used to create a patch, an excerpt of it's man page

Code:
NAME
     diff - differential file and directory comparator
       
DESCRIPTION
     The diff utility compares the contents of file1 and file2 and writes to
     the standard output the list of changes necessary to convert one file in-
     to the other.  No output is produced if the files are identical.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote