5 * Migrate and upgrade the lone mediawiki-1.5.6 install
6 * Create the migration script
10 * Some parts of the infrastructure will not be touched, although I plan
11 on documenting them. Specifically, we will be keeping:
13 - parallel-find.pl, and the resulting
14 /mit/scripts/sec-tools/store/scriptslist
16 - The current install scripts will be kept in place, sans changes
17 necessary to make them use Git install of copying the script over.
18 Porting these scripts to Python and making them modular would be
19 nice, but is priority. For the long term, seeing this scripts
20 be packaged with rest of our code would be optimal.
22 * The new procedure for generating an update is as follows:
24 1. Have the Git repository and working copy for the project on hand.
26 2. Download the new tarball
28 3. Extract the tarball over the working copy (`cp -R a/. b` works well)
30 4. Check if there are any special update procedures, and update the
31 .scripts/update shell script as necessary (this means that any
32 application specific update logic will be kept with the actual
33 source code. The language of this update script will vary
34 depending on context.)
36 X. Check for empty directories and add stub files as necessary
37 (use preserve-empty-dir)
39 5. Commit your changes, and tag as v1.2.3-scripts
41 6. Run the "dry-run script", which uses Git commands to check how many
42 working copies apply the change cleanly, and writes out a logfile
43 with the working copies that don't apply cleanly.
45 7. Run the "limited run" script, which applies the update to our
46 test-bed, and lets us check the basic functionality of the update.
48 8. Run the "deploy" script, which applies the update to all working
49 copies possible, and sends mail to users to whom the working copy
50 did not apply cleanly. (It also frobs .scripts/version)
52 Note: The last three scripts will need to be implemented, with an
55 * How to migrate an old autoinstaller to the new autoinstaller
57 - Find the oldest tarball/patch set for the application that still
58 is in use and upgradable.
60 - Untar, apply patch, place in a directory (unfurl) and git init
62 - Commit this as the "pristine" version (branch "pristine")
64 - Apply scripts patches
66 - Create the .scripts directory and populate it with the interesting
67 information (see below)
69 - Commit this as the "scripts" version (branch "master")
71 * How to update the autoinstaller repository
73 - Checkout pristine branch
74 - Delete contents of pristine branch (excluding .git, try rm -Rf * and remove stragglers)
76 - Commit as new pristine branch
77 - Checkout scripts branch
78 - Merge pristine branch
81 * The repository for a given application will contain the following files:
83 - The actual application's files, as from the official tarball
85 - A .scripts directory, which contains the following information:
87 * .scripts/update shell script (with the +x bit set appropriately),
88 which performs the commands necessary to update a script. This can
91 * .scripts/.htaccess to prevent this directory from being accessed
94 * .scripts/database (generated) contains the database the
95 user installed the script to, so scripts-remove can clean it
97 * .scripts/version (generated) which contains the version
98 last autoinstalled (as distinct from the actual version
99 the script is) (This is the same as .scripts-version right
100 now; probably want to keep that for now)
102 - Because there will be no .gitignore file, you *must not* run
103 `git add .` on an actual running copy of the application.
104 `git add -u .` will generally be safe, but preferred mode
105 of operation is to operate on a clean install.
107 * The migration process shall be as such:
111 2. git remote add origin /foo
113 3. git config branch.master.merge refs/heads/master
117 5. git reset v1.2.3-scripts
119 5. git checkout .scripts
121 6. Setup .scripts/version (probably pipe the output of real-version)
122 UNCLEAR if this is a good thing; if it is, make sure we add
123 a .gitignore to the .scripts directory
125 * We will not add special code to handle .htaccess; thus the kernel patch
126 for allowing Apache access to .htaccess sent to scripts-team@mit.edu
127 must be handled first.
129 * The autoupgrade shall be the process of:
131 # Make the directory not accessible by the outside world (htaccess, but be careful!)
133 git commit -m 'automatically generated backup'
134 git pull origin master
135 if [ $? ne 0 ]; then git reset --hard; echo 'conflicts during upgrade'; fi
139 (with some more robust error checking)
141 * Make install-statistics generate nice pretty graphs of installs by date
142 (more histograms, will need to check actual .scripts-version files.)