source: tags/fc13-eol/locker/doc/autoinstallers @ 2334

Last change on this file since 2334 was 1053, checked in by quentin, 16 years ago
Document how to apply patches before generating an update
File size: 2.6 KB
Line 
1-*- text -*-
2
3== How to update an autoinstaller to a new version of the upstream package ==
4
5Things to check beforehand:
6- Make sure /mit/scripts/deploydev is up to date from /mit/scripts/deploy (deploydev is not a svn checkout and is probably missing changes from deploy)
7
8Steps:
9# Example values
10PKG=wordpress
11NEWVERS=2.5.1
12OLDVERS=2.3.3
13URL=http://www.example.com/download/wordpress-2.5.1.tar.gz
14
15# Create a new directory in /mit/scripts/deploydev for the new version
16mkdir /mit/scripts/deploydev/$PKG-$NEWVERS
17
18# Copy any scripts patches to the new directory
19cp /mit/scripts/deploydev/$PKG-$OLDVERS/*.patch /mit/scripts/deploydev/$PKG-$NEWVERS/
20# Some scripts might have other files in here
21# Make sure the patch is still relevant for the current version of the package
22
23# Download the new package from the upstream site
24wget -O /mit/scripts/deploydev/$PKG-$NEWVERS/$PKG-$NEWVERS.tar.gz "$URL"
25
26# Update the symlink for the new package version
27cd /mit/scripts/deploydev && ln -nsf $PKG-$NEWVERS/$PKG-NEWVERS.tar.gz $PKG.tar.gz
28
29# Try an autoinstall
30ssh linerva -t env scriptsdev=dev athrun scripts
31
32# Fix any bugs that were introduced, probably in /mit/scripts/deploydev/bin/$PKG or /mit/scripts/bin/scripts-$PKG, or the patches
33
34# Commit your changes by moving them to /mit/scripts/deploy
35cp -a /mit/scripts/deploydev/$PKG-NEWVERS /mit/scripts/deploydev/$PKG.tar.gz /mit/scripts/deploy/
36
37# Test the new version from linerva and athena.dialup
38
39
40== How to generate an autoupdate ==
41
42cd /tmp
43# Use --dev if you haven't pushed to deploy yet
44/mit/scripts/sbin/propose-update --dev $PKG $OLDVERS $NEWVERS
45cd $PKG-$OLDVERS-to-$NEWVERS.proposal
46# If there is any custom setup that needs to be performed
47# (e.g. something in /mit/scripts/deploy/bin), do so to the
48# $PKG-$OLDVERS and $PKG-$NEWVERS directories, then do
49(cd .. && /mit/scripts/sbin/propose-update --redo-all --dev $PKG $OLDVERS $NEWVERS)
50# Look at the files that were generated to make sure they're sane
51# If necessary, add pre- and post- hooks, such as for a DB update script
52emacs extra/prepatch.sh
53emacs extra/postpatch.sh
54# Generate the patch
55cd ..
56# --dev here means to put the update in /mit/scripts/deploydev/updates
57/mit/scripts/sbin/build-update --dev $PKG $OLDVERS $NEWVERS
58# Test the update by running cd /mit/foo/web_scripts/bar && /mit/scripts/deploydev/updates/$PKG-#OLDVERS-to-$NEWVERS/update "foo"
59
60# If necessary, repeat this process. You can edit the files in the
61# $PKG-$OLDVERS and $PKG-$NEWVERS subdirectories of the proposal,
62# passing --redo-* options to propose-update as necessary to cause it
63# to regenerate the file lists from the subdirectories
Note: See TracBrowser for help on using the repository browser.