The Git Autoinstaller * Some parts of the infrastructure will not be touched, although I plan on documenting them. Specifically, we will be keeping: - parallel-find.pl, and the resulting /mit/scripts/sec-tools/store/scriptslist - The current install scripts will be kept in place, sans changes necessary to make them use Git install of copying the script over. Porting these scripts to Python and making them modular would be nice, but is priority. For the long term, seeing this scripts be packaged with rest of our code would be optimal. * The new procedure for generating an update is as follows: 1. Have the Git repository and working copy for the project on hand. 2. Download the new tarball 3. Extract the tarball over the working copy 4. Check if there are any special update procedures, and update the .scripts/update shell script as necessary (this means that any application specific update logic will be kept with the actual source code. The language of this update script will vary depending on context.) X. Check for empty directories and add stub files as necessary (use preserve-empty-dir) 5. Commit your changes, and tag as v1.2.3-scripts1 6. Run the "dry-run script", which uses Git commands to check how many working copies apply the change cleanly, and writes out a logfile with the working copies that don't apply cleanly. 7. Run the "limited run" script, which applies the update to our test-bed, and lets us check the basic functionality of the update. 8. Run the "deploy" script, which applies the update to all working copies possible, and sends mail to users to whom the working copy did not apply cleanly. Note: The last three scripts will need to be implemented, with an eye towards speed. * The repository for a given application will contain the following files: - The actual application's files, as from the official tarball - A .scripts directory, which contains the following information: * .scripts/update shell script (with the +x bit set appropriately), which performs the commands necessary to update a script. This can be in any language. * .scripts/version which contains the version last autoinstalled (as distinct from the actual version the script is) * .scripts/real-version (+x) which checks the source code to find the actual version of the application * .scripts/.htaccess to prevent this directory from being accessed from the web. - Because there will be no .gitignore file, you *must not* run `git add .` on an actual running copy of the application. `git add -u .` will generally be safe. * The migration process shall be as such: 1. git init 2. git add remote origin /foo 3. whatever the merge frob is 4. git fetch origin 5. git reset * We will not add special code to handle .htaccess; thus the kernel patch for allowing Apache access to .htaccess sent to scripts-team@mit.edu must be handled first. * The autoupgrade shall be the process of: git add -u . git commit -m 'automatically generated backup' git pull /mit/scripts/deploy/wordpress.git master if [ $? ne 0 ]; then git reset --hard; echo 'conflicts during upgrade'; fi ./.scripts/update