| 1 | ============================================================================ |
|---|
| 2 | Upgrading to PennMUSH 1.8.x |
|---|
| 3 | ============================================================================ |
|---|
| 4 | |
|---|
| 5 | This file explains how to upgrade to a new version of PennMUSH. |
|---|
| 6 | |
|---|
| 7 | There are three basic upgrade situations: |
|---|
| 8 | A. You're running a stock ("vanilla") PennMUSH server of some |
|---|
| 9 | version and you want to upgrade to a later version |
|---|
| 10 | B. You've hacked your server source code a little bit here and there |
|---|
| 11 | (adding a flag, for example). Hacks to the *local.c files don't |
|---|
| 12 | count as hacks, as they're easy to handle. |
|---|
| 13 | C. You've hacked your server source code a lot. |
|---|
| 14 | |
|---|
| 15 | There is also a list of upgrade "GOTCHAS" at the end of this file. |
|---|
| 16 | Please read them. |
|---|
| 17 | |
|---|
| 18 | The PennMUSH developers actually only support situation A, but |
|---|
| 19 | we'll give some useful tips for B and C here, too. |
|---|
| 20 | |
|---|
| 21 | DISCLAIMER: It is very wise to always back up your current working |
|---|
| 22 | MUSH directories before you try an upgrade. You were warned. |
|---|
| 23 | |
|---|
| 24 | ============================================================================ |
|---|
| 25 | |
|---|
| 26 | A. Vanilla upgrade |
|---|
| 27 | |
|---|
| 28 | You have basically two choices here: upgrade with patch files, or |
|---|
| 29 | build a whole new distribution. |
|---|
| 30 | |
|---|
| 31 | A.1. Upgrading with patch files |
|---|
| 32 | |
|---|
| 33 | This is the easiest way to upgrade your source code if you're |
|---|
| 34 | keeping up with patches as they come out, or if you're upgrading |
|---|
| 35 | patchlevels within a release (e.g., within 1.8.0). |
|---|
| 36 | |
|---|
| 37 | To upgrade with patch files, get all the patch files for higher |
|---|
| 38 | patchlevels than your current version. For example, if you're running |
|---|
| 39 | 1.8.0p0 and the latest version is 1.8.0p4, you need patches 1-4. |
|---|
| 40 | |
|---|
| 41 | These files are stored at http://ftp.pennmush.org/Source and usually |
|---|
| 42 | named things like 1.8.0-patch02 (the patch from 1.8.0p1 to 1.8.0p2) |
|---|
| 43 | or, in some cases, 1.7.6p16-1.8.0p0.patch (the patch from 1.7.6p16 to |
|---|
| 44 | 1.8.0p0). |
|---|
| 45 | |
|---|
| 46 | Each patch file contains instructions at the top explaining how to |
|---|
| 47 | apply it. FOLLOW THESE! Don't assume they're all the same. |
|---|
| 48 | |
|---|
| 49 | After you've applied all the patches and followed all the instructions, |
|---|
| 50 | you should be good to go. In most cases, you can simply @shutdown/reboot |
|---|
| 51 | after the final successful compile. If @shutdown/reboot crashes, |
|---|
| 52 | you'll have to restart again. |
|---|
| 53 | |
|---|
| 54 | A.2. Building a new distribution |
|---|
| 55 | |
|---|
| 56 | When you're upgrading across release and no patchlevel is provided |
|---|
| 57 | to make the upgrade (e.g. from 1.7.4p3 to 1.8.0p0), it's often |
|---|
| 58 | easier to simply build a new distribution following the INSTALL |
|---|
| 59 | instructions, but with your old configuration stuff. |
|---|
| 60 | |
|---|
| 61 | Move your older version of PennMUSH in a directory called oldpenn/, |
|---|
| 62 | unpack the new one (it will unpack into pennmush/). |
|---|
| 63 | |
|---|
| 64 | All of the steps below should be taken before running Configure for the |
|---|
| 65 | new version: |
|---|
| 66 | |
|---|
| 67 | A.2.a. options.h and game/*.cnf |
|---|
| 68 | |
|---|
| 69 | You can copy the options.h file and game/mush.cnf file from your |
|---|
| 70 | old version to the new version. The 'make update' command (run after |
|---|
| 71 | Configure) will compare your files with the newly distributed ones and |
|---|
| 72 | tell you about options that have been added or removed. If you have any |
|---|
| 73 | options defined that the new version doesn't recognize, you'll be asked |
|---|
| 74 | if you want to retain them (which is safe). |
|---|
| 75 | |
|---|
| 76 | If your mush.cnf file is called something else, copy it to mush.cnf in |
|---|
| 77 | pennmush/game anyway, since that's the file that gets updated. Then make |
|---|
| 78 | a link to that file called whatever.cnf if you want to use that. |
|---|
| 79 | |
|---|
| 80 | If you've modified the restart script, you'll have to decide if |
|---|
| 81 | your modified script is still appropriate, or modify the distributed |
|---|
| 82 | game/restart script again as you like it. The latter is encouraged. |
|---|
| 83 | |
|---|
| 84 | You can also copy your old game/access.cnf, game/sitelock.cnf, and |
|---|
| 85 | game/txt/*.txt files into the appropriate locations. You may wish |
|---|
| 86 | to do the same thing for game/restrict.cnf, but you should compare |
|---|
| 87 | it to the new version, as restrictions that may formerly have been |
|---|
| 88 | compiled into the server may now be specified in restrict.cnf instead. |
|---|
| 89 | |
|---|
| 90 | A.2.b. src/*local.c |
|---|
| 91 | |
|---|
| 92 | You should copy local.c, cmdlocal.c, and funlocal.c from oldpenn/src |
|---|
| 93 | to pennmush/src if you want to retain this local code. Of course, |
|---|
| 94 | it may not still work, but it's quite likely that it will. If you |
|---|
| 95 | don't have any such code, you can skip this step. |
|---|
| 96 | |
|---|
| 97 | A.2.c. Databases |
|---|
| 98 | |
|---|
| 99 | This MUSH version should read databases along the main branch of MUSH |
|---|
| 100 | evolution -- TinyMUD, vanilla TinyMUSH up to 2.0, MicroMUSH, and all |
|---|
| 101 | Pern/PennMUSH versions. If you need to convert a TinyMUSH 2.0 database, |
|---|
| 102 | please contact Amberyl, and she'll mail you an extension to 2.0 that |
|---|
| 103 | will dump a 1.50-readable flatfile. You're probably out of luck with |
|---|
| 104 | databases for TinyMUSH 2.2 and later. |
|---|
| 105 | |
|---|
| 106 | Be sure that your options.h settings correctly reflect the type |
|---|
| 107 | of password encryption that was used on your database. The default |
|---|
| 108 | has changed to SHS, so if your db used crypt(3) encryption, be |
|---|
| 109 | sure you set the appropriate definition in options.h. |
|---|
| 110 | |
|---|
| 111 | *** If you are upgrading from 1.7.4 (or earlier) to 1.7.7 (or later), |
|---|
| 112 | *** you must first load your old database under PennMUSH 1.7.6 and |
|---|
| 113 | *** then dump it, and load this converted database under your |
|---|
| 114 | *** target version of PennMUSH. PennMUSH 1.7.7+ can no longer read |
|---|
| 115 | *** 1.7.4 databases. |
|---|
| 116 | |
|---|
| 117 | ============================================================================ |
|---|
| 118 | |
|---|
| 119 | B. PennMUSH with a few hacks |
|---|
| 120 | |
|---|
| 121 | When you have only a few local hacks outside of the src/*local.c |
|---|
| 122 | files, you can often patch up using the patch file method discussed |
|---|
| 123 | above. Alternatively, you can build a new version and reapply your |
|---|
| 124 | changes. |
|---|
| 125 | |
|---|
| 126 | One small exception is upgrading from a version that used the old flag |
|---|
| 127 | system to one that uses the new flag system (post-1.7.7p5), if you've |
|---|
| 128 | added flags or toggles. You probably had an #define in hdrs/flags.h |
|---|
| 129 | for your flag's bit value. This now should be moved to hdrs/oldflags.h; |
|---|
| 130 | you should leave in the table entry in src/flags.c. If you set up a macro |
|---|
| 131 | for testing your flag in hdrs/mushdb.h, you'll need to change it to use |
|---|
| 132 | the has_flag_by_name() function - see the many examples in that file. |
|---|
| 133 | |
|---|
| 134 | If this isn't suitable (you're crossing releases or your hacks are too |
|---|
| 135 | many for this to work cleanly), see below. |
|---|
| 136 | |
|---|
| 137 | ============================================================================ |
|---|
| 138 | |
|---|
| 139 | C. PennMUSH with a lot of hacks |
|---|
| 140 | |
|---|
| 141 | If you've seriously hacked your server source code, you're on your |
|---|
| 142 | own in terms of keeping up with new patchlevels. Some people apply |
|---|
| 143 | patchfiles and fix the rejected hunks. |
|---|
| 144 | |
|---|
| 145 | A better approach is probably that described in the Guide for Gods, |
|---|
| 146 | and involves creating a set of patches from the distributed old |
|---|
| 147 | version of pennmush (e.g. 1.7.4p16) to your hacked version of pennmush |
|---|
| 148 | (e.g. 1.7.4p16 with hacks), and then applying those patches to the new |
|---|
| 149 | version of PennMUSH (e.g. 1.8.0p0) to create a hacked version thereof. If |
|---|
| 150 | some patch hunks fail, you'll have to apply them manually. |
|---|
| 151 | |
|---|
| 152 | Probably the best approach is to keep all multiple versions of the |
|---|
| 153 | code (old distributed, old hacked, new distributed, new hacked) under |
|---|
| 154 | a source code control system like prcs that can merge changes between |
|---|
| 155 | versions. See the Guide for Gods. |
|---|
| 156 | |
|---|
| 157 | ============================================================================ |
|---|
| 158 | |
|---|
| 159 | IMPORTANT NOTES FOR THOSE UPGRADING TO 1.8.0 FROM 1.7.6: |
|---|
| 160 | |
|---|
| 161 | * Softcode gotchas: |
|---|
| 162 | |
|---|
| 163 | * Wizards (other than God) and royalty are no longer treated as No_Pay |
|---|
| 164 | unless the No_Pay power is explicitly set on them, although they |
|---|
| 165 | can still give (themselves or others) as many pennies as they wish. |
|---|
| 166 | This helps stop runaway wizards in the queue (they'll run out of cash |
|---|
| 167 | like anyone else). To get the old behavior back, @power your admin |
|---|
| 168 | No_Pay. You probably want to @power any globals that use search(), |
|---|
| 169 | children(), mail*stats(), etc, No_Pay as well. |
|---|
| 170 | * @desc can no longer be gotten remotely without privileges. |
|---|
| 171 | @desc on privileged objects can now be evaluated by mortals. |
|---|
| 172 | * @adisconnect is triggered on every disconnection, partial or full. |
|---|
| 173 | This mirrors the behavior of @aconnect. Use %1 (the number of |
|---|
| 174 | remaining connections) to distinguish between partial and full |
|---|
| 175 | disconnects in @adisconnect code. |
|---|
| 176 | * Players can no longer be set CHOWN_OK. If you have existing CHOWN_OK |
|---|
| 177 | players, you probably want to unset this from them, or the results |
|---|
| 178 | will be confusing (they'll continue to appear to have the flag, |
|---|
| 179 | even though it won't be testable or settable or clearable; this is |
|---|
| 180 | desired behavior). |
|---|
| 181 | * New HEAVY admin flag, prevents an object from being teleported |
|---|
| 182 | by a mortal between two containers they own. Admin without this |
|---|
| 183 | flag CAN be teleported. |
|---|
| 184 | |
|---|
| 185 | * Hardcode/db/startup gotchas: |
|---|
| 186 | * After each @startup is enqueued (during startup or @restart/all), |
|---|
| 187 | we immediately run up to 5 queue cycles. This allows, e.g., God's |
|---|
| 188 | @startup to up to five levels of @dol/@tr/@switch/etc and still have |
|---|
| 189 | the queued code run ahead of other startups. This requires that you |
|---|
| 190 | keep God's dbref as #1. |
|---|
| 191 | * netmush is now started with only a single argument - the path to |
|---|
| 192 | the configuration file. The error log file (typically game/netmush.log |
|---|
| 193 | is now configured in mush.cnf. |
|---|
| 194 | * CHAT_SYSTEM option removed. If you don't want to use the chat system, |
|---|
| 195 | use restrict.cnf to disable @channel, @chat, etc. |
|---|
| 196 | * USE_MAILER and MAIL_ALIAS options removed. If you don't want to |
|---|
| 197 | use the @mail or @malias systems, use restrict.cnf to disable |
|---|
| 198 | the associated commands. |
|---|
| 199 | * QUOTA, EMPTY_ATTRS, and FUNCTION_SIDE_EFFECTS options are now |
|---|
| 200 | runtime options, instead of compile-time. |
|---|
| 201 | * SINGLE_LOGFILE option removed, and log filenames are now |
|---|
| 202 | runtime options. You may now give the same name to multiple log |
|---|
| 203 | files and get a more fine-grained version of the same effect. |
|---|
| 204 | * src/Makefile is now autobuilt from src/Makefile.SH. IF you use |
|---|
| 205 | local hacks that require src/Makefile, this is likely to be a problem |
|---|
| 206 | for you. You'll want to start patching Makefile.SH instead. |
|---|
| 207 | * The new code can no longer read databases created by versions of Penn |
|---|
| 208 | before 1.7.5p0. If you need to do this, load it in 1.7.6, shutdown, |
|---|
| 209 | and use that database. |
|---|
| 210 | * PROFILING #define for use when profiling the code (surprise). This |
|---|
| 211 | just disables the CPU timer. |
|---|
| 212 | * help-like commands without arguments now use the command name |
|---|
| 213 | as the argument. E.g. 'news' now looks for topic 'news', instead of |
|---|
| 214 | 'help'. If not found, we fall back on help. |
|---|
| 215 | * Mail messages now track not only the dbref of the sender but the |
|---|
| 216 | sender's creation time, so messages from dbrefs that have been |
|---|
| 217 | nuked and recreated can be distinguished from messages from the |
|---|
| 218 | original sender. This modifies the maildb and make it not usable |
|---|
| 219 | with older versions. All existing @mail is grandfathered in, and |
|---|
| 220 | can't be tracked this way. |
|---|