root/1.8.3/branches/experimental/UPGRADING

Revision 1021, 10.6 KB (checked in by shawnw, 18 months ago)

Merged with devel

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