install-osrf.sh: set ejabberd host correctly during registration on prod
[sitka/sitka-tools.git] / patching / README.txt
CommitLineData
8b032c9e
SC
1README.txt
2
3DESCRIPTION:
4Apply or unapply a patch to remote Evergreen hosts
5
6USAGE:
7./patch-eg.sh -p ID [ -b backup_label ] [ -P rule ] [ -y ] [ -R ] [ -h ] host1 host2...
8
9OPTIONS:
10 -p SHA1 ID of patch to apply (mandatory)
11 -b Backup label of patch
12 Defaults to patch ID
13 -P Patch rule (web, xul, perl) to determine patch directory, user, and strip level
14 Defaults to 'web'
15 -y Yes, apply the patch instead of doing a dry run
16 -R Reverse or undo the patch instead of applying it
17 -h Print this message and exit
18
19EXAMPLES:
20
21Use the script to apply and unapply a Perl patch on two of the production servers:
22
231. Perform a dry run to see what it will do
24
25# patch-eg.sh -p 1234567 -b rt12345 -P perl app1-1 app1-2
26
272. Rerun it using the -y option to actually apply the patch
28
29# patch-eg.sh -p 1234567 -b rt12345 -P perl -y app1-1 app1-2
30
313. To unapply the patch, run the script with the -R option as well
32
33# patch-eg.sh -p 1234567 -b rt12345 -P perl -y -R app1-1 app1-2
34
35NOTES:
36
37The script logs in as 'sitkastaff' via SSH to each host, and then runs the
38patch command via sudo. Consequently, the script can ask for an account
39password many times. To avoid having to repeatedly type a password, run the
40script on the local server as 'sitkastaff' and have the account's public SSH
41key installed on the target servers.
42
43As a convenience, the above procedure has been done on 'sitkastaff@coconut', so
44that if the script is run on 'coconut' as 'sitkastaff', the script will only
45ask for a sudo password. Moreover, requiring a sudo password could be avoided
46if the PAM module PAM_SSH_AGENT_AUTH is installed and configured on target
47hosts.
48
49A limitation to the script is that it cannot easily apply a patch that mixes up
50changes to Perl files, XUL files, or Javascript files, because they would be
51installed on directories differently from their directories in the source
52directory.
53
54TO DO:
55
561. Handle duplicate hostnames specified on the command line. For example,
57
58# patch-eg.sh -p 1234567 app1-1 app1-1
59
60would apply the patch to app1-1 once.
61
622. Perform filename expansion on hostnames. For example
63
64# patch-eg.sh -p 1234567 -P perl app[123]-[12]
65
66would apply the Perl patch to six servers, app1-1, app1-2, app2-1, app2-2,
67app3-1, app3-2.
68
693. Is it possible to get location of patch repository from git configuration?
70