Sponsored Content
Full Discussion: Patching
Operating Systems Solaris Patching Post 302323084 by pgarousi on Friday 5th of June 2009 10:37:19 AM
Old 06-05-2009
I can just imagine how irritating it must be to patch those servers, especially since they have not been patched for years.

Are you familiar with xVM Ops Center 2.1 by any chance? It's Sun new product which is great for patching and provisioning. It has an intelligent knowledge base and it makes the patching scalable and automated. You might want to take a look at it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Patching Solaris

Hi quick and question for the unix expert here i downloaded the lastest patch from sun. i'm ready to patch my production server. should i just patch it as is or go in to init 1 or init S to do the patching. someone told me that you can just patch the server in init 3 and some other... (2 Replies)
Discussion started by: xNYx
2 Replies

2. Solaris

Patching

Hi all, I'm new to Solaris. How can i make sure that all my servers are patched to the same level. When i do a uname -a, i see different level. How can i make sure that they are having the same patches. Any expert to guide me through pls? eg. ServerA#uname -a SunOS ServerA 5.10... (0 Replies)
Discussion started by: ahlude
0 Replies

3. Solaris

Patching error

Hi Gurus I wanted to patch two servers yesterday with the SUN provided patch_cluster for solaris 10 One server is had the same patchlevel before and after patching SunOS svr10008 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200 The other had after the patching a different patchlevel... (3 Replies)
Discussion started by: gnom
3 Replies

4. Solaris

Patching utility?

I know the smpatch utility has the set-uid 0 bit on it, so I'm wondering what privileges does it take to use this tool? I don't have to be root do I? How can I let a normal account do maintenance? Thanks in advance. (4 Replies)
Discussion started by: solarisx86
4 Replies

5. Solaris

Solaris Patching.

Hi All, I have a question ? Which all patches need to be applied in single user mode and which all not .Is there any rule all patches need to be applied in /var/tmp.Thanks in advance for answers.:) (1 Reply)
Discussion started by: rama krishna
1 Replies

6. Solaris

Mirror patching

HI Friends.... kindly explain os mirror patching?in SVM and Vxvm. :wall: (1 Reply)
Discussion started by: Rajesh_Apple
1 Replies

7. Solaris

patching a zone.

what are prerequisites or precautions we take before we install a patch in a zone.what if zone fails to boot after patching.How to recover form this situation.? Thanks in advance..:) (1 Reply)
Discussion started by: ravijanjanam12
1 Replies

8. Solaris

patching solaris 8

OK, finally managed to get root access to the machines. Now running # uname -a SunOS unknown 5.8 Generic_108528-22 sun4u sparc SUNW,UltraAX-e2 # showrev -p Patch: 112668-01 Obsoletes: Requires: Incompatibles: Packages: SUNWgzip Patch: 109889-01 Obsoletes: 109353-04 Requires: ... (2 Replies)
Discussion started by: Norman Khine
2 Replies

9. Red Hat

Java patching

hello, I'm a Solaris admin and I was asked to patch some RHEL servers. I'm having trouble trying to figure out the RHEL java version. Can someone help me? This what I do in Solaris java -version java version "1.5.0_34" java(TM) 2 Runtime Envirement, Standard Edition (build 1.5.0_34-b03)... (5 Replies)
Discussion started by: bitlord
5 Replies

10. Solaris

ldom patching

Greetings everyone! I have the task of patching six ldoms and two control domains. I have never done this before and would like to know of any pitfalls or "gotchas" I may encounter. I have been looking online but have found very little about patching ldoms. Thank you all. (4 Replies)
Discussion started by: desertdenizen
4 Replies
patch(1)							   User Commands							  patch(1)

NAME
patch - apply changes to files SYNOPSIS
patch [-blNR] [-c | -e | -n | -u] [-d dir] [-D define] [-i patchfile] [-o outfile] [-p num] [-r rejectfile] [file] DESCRIPTION
The patch command reads a source (patch) file containing any of the three forms of difference (diff) listings produced by the diff(1) com- mand (normal, context or in the style of ed(1)) and apply those differences to a file. By default, patch reads from the standard input. patch attempts to determine the type of the diff listing, unless overruled by a -c, -e, or -n option. If the patch file contains more than one patch, patch attempts to apply each of them as if they came from separate patch files. (In this case the name of the patch file must be determinable for each diff listing.) OPTIONS
The following options are supported: -b Saves a copy of the original contents of each modified file, before the differences are applied, in a file of the same name with the suffix .orig appended to it. If the file already exists, it is overwritten. If multiple patches are applied to the same file, the .orig file is written only for the first patch. When the -o outfile option is also specified, file.orig is not created but, if outfile already exists, outfile.orig is created. -c Interprets the patch file as a context difference (the output of the command diff when the -c or -C options are specified). -d dir Changes the current directory to dir before processing as described in EXTENDED DESCRIPTION. -D define Marks changes with the C preprocessor construct: #ifdef define ... #endif The option-argument define is used as the differentiating symbol. -e Interprets the patch file as an ed script, rather than a diff script. -i patchfile Reads the patch information from the file named by the path name patchfile, rather than the standard input. -l (The letter ell.) Causes any sequence of blank characters in the difference script to match any sequence of blank charac- ters in the input file. Other characters is matched exactly. -n Interprets the script as a normal difference. -N Ignores patches where the differences have already been applied to the file; by default, already-applied patches are rejected. -o outfile Instead of modifying the files (specified by the file operand or the difference listings) directly, writes a copy of the file referenced by each patch, with the appropriate differences applied, to outfile. Multiple patches for a single file is applied to the intermediate versions of the file created by any previous patches, and results in multiple, concatenated versions of the file being written to outfile. -p num For all path names in the patch file that indicate the names of files to be patched, deletes num path name components from the beginning of each path name. If the path name in the patch file is absolute, any leading slashes are considered the first component (that is, -p 1 removes the leading slashes). Specifying -p 0 causes the full path name to be used. If -p is not specified, only the basename (the final path name component) is used. -R Reverses the sense of the patch script. That is, assumes that the difference script was created from the new version to the old version. The -R option cannot be used with ed scripts. patch attempts to reverse each portion of the script before applying it. Rejected differences is saved in swapped format. If this option is not specified, and until a portion of the patch file is successfully applied, patch attempts to apply each portion in its reversed sense as well as in its normal sense. If the attempt is successful, the user is prompted to determine if the -R option should be set. -r rejectfile Overrides the default reject file name. In the default case, the reject file has the same name as the output file, with the suffix .rej appended to it. See Patch Application. -u Interprets the patch file as a unified context difference, that is, the output of the command diff when the -u or -U options are specified. OPERANDS
The following operand is supported: file A path name of a file to patch. USAGE
The -R option does not work with ed scripts because there is too little information to reconstruct the reverse operation. The -p option makes it possible to customize a patch file to local user directory structures without manually editing the patch file. For example, if the file name in the patch file was /curds/whey/src/blurfl/blurfl.c: o Setting -p 0 gives the entire path name unmodified. o Setting -p 1 gives: curds/whey/src/blurfl/blurfl.c o Without the leading slash, -p 4 gives: blurfl/blurfl.c o Not specifying -p at all gives: blurfl.c When using -b in some file system implementations, the saving of a .orig file might produce unwanted results. In the case of 12-, 13-, or 14-character file names, on file systems supporting 14-character maximum file names, the .orig file overwrites the new file. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of patch: LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_TIME, and NLSPATH. Affirmative responses are processed using the extended regular expression defined for the yesexpr keyword in the LC_MESSAGES category of the user's locale. The locale specified in the LC_COLLATE category defines the behavior of ranges, equivalence classes, and multi-character collating elements used in the expression defined for yesexpr. The locale specified in LC_CTYPE determines the locale for interpretation of sequences of bytes of text data a characters, the behavior of character classes used in the expression defined for the yesexpr. See locale(5). OUTPUT FILES
The output of patch the save files (.orig suffixes) and the reject files (.rej suffixes) are text files. EXTENDED DESCRIPTION
A patch file can contain patching instructions for more than one file. File names are determined as specified in Patch Determination. When the -b option is specified, for each patched file, the original is saved in a file of the same name with the suffix .orig appended to it. For each patched file, a reject file can also be created as noted in Patch Application. In the absence of an -r option, the name of this file is formed by appending the suffix .rej to the original file name. Patch File Format The patch file must contain zero or more lines of header information followed by one or more patches. Each patch must contain zero or more lines of file name identification in the format produced by diff -c, and one or more sets of diff output, which are customarily called hunks. patch recognizes the following expression in the header information: Index:pathname The file to be patched is named pathname. If all lines (including headers) within a patch begin with the same leading sequence of blank characters, patch removes this sequence before proceeding. Within each patch, if the type of difference is context, patch recognizes the following expressions: *** filename timestamp The patches arose from filename. --- filename timestamp The patches should be applied to filename. Each hunk within a patch must be the diff output to change a line range within the original file. The line numbers for successive hunks within a patch must occur in ascending order. File Name Determination If no file operand is specified, patch performs the following steps to obtain a path name: 1. If the patch contains the strings *** and ---, patch strips components from the beginning of each path name (depending on the presence or value of the -p option), then tests for the existence of both files in the current directory (or directory specified with the -d option). 2. If both files exist, patch assumes that no path name can be obtained from this step. If the header information contains a line with the string Index:, patch strips components from the beginning of the path name (depending on -p), then tests for the exis- tence of this file in the current directory (or directory specified with the -d option). 3. If an SCCS directory exists in the current directory, patch attempts to perform a get -e SCCS/s.filename command to retrieve an editable version of the file. 4. If no path name can be obtained by applying the previous steps, or if the path names obtained do not exist, patch writes a prompt to standard output and request a file name interactively from standard input. Patch Application If the -c, -e, -n, or -u option is present, patch interprets information within each hunk as a context difference, an ed difference, a nor- mal difference, or a unified context difference, respectively. In the absence of any of these options, patch determines the type of differ- ence based on the format of information within the hunk. For each hunk, patch begins to search for the place to apply the patch at the line number at the beginning of the hunk, plus or minus any offset used in applying the previous hunk. If lines matching the hunk context are not found, patch scans both forwards and backwards at least 1000 bytes for a set of lines that match the hunk context. If no such place is found and it is a context difference, then another scan takes place, ignoring the first and last line of context. If that fails, the first two and last two lines of context is ignored and another scan is made. Implementations can search more extensively for installation locations. If no location can be found, patch appends the hunk to the reject file. The rejected hunk is written in context-difference format regard- less of the format of the patch file. If the input was a normal or ed -style difference, the reject file can contain differences with zero lines of context. The line numbers on the hunks in the reject file can be different from the line numbers in the patch file since they reflect the approximate locations for the failed hunks in the new file rather than the old one. If the type of patch is an ed diff, the implementation can accomplish the patching by invoking the ed command. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 One or more lines were written to a reject file. >1 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
ed(1), diff(1), attributes(5), environ(5), standards(5) SunOS 5.11 17 Jul 2007 patch(1)
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy