Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ogcvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!tektronix!ogcvax!root From: root@ogcvax.UUCP (Bruce Jerrick) Newsgroups: net.unix-wizards,net.sources Subject: Auto-configuring software -- potential problems Message-ID: <421@ogcvax.UUCP> Date: Wed, 3-Oct-84 18:03:33 EDT Article-I.D.: ogcvax.421 Posted: Wed Oct 3 18:03:33 1984 Date-Received: Fri, 5-Oct-84 05:48:02 EDT Organization: Oregon Graduate Center, Beaverton, OR Lines: 59 There seems to be a trend toward interactive configuration and installation of contributed software. I think that unless this is done carefully, there are going to be maintainability problems. The problem is that some installation procedures permanently and irrevokably alter the distribution. Then, six months later when someone says "I have a new version of XYZ, can you install it here?", the question will arise (or at least, should arise): "How does this differ from what we have, and which version do we want?" And of course this is complicated by local mods. Normally one can use something like RCS to retain the originals, then make mods, and still be able to check out a completely original version, to do, say, "diff -r ..." against a new version. Some auto-configuring distributions I have seen make it difficult to keep virgin copies of the distribution; for example, XYZ might "sed" its Makefile then copy it back onto itself. It is also difficult to foresee what an auto-configure procedure is going to alter, so one doesn't know what to save. So, I would like to suggest these guidelines, so that a maintainer can get the distribution back to the same state in which it was received: 1. If the auto-configuration procedure modifies files, have it start with a template version of the file, or create it from scratch, rather than modifying the file in place. E.g., do this: sed ... Makefile.templ > Makefile or: Makefile.SH (as in Larry Wall's trick "rn" distribution) instead of: sed ... Makefile > tmp cp tmp Makefile Doing it the first way allows one to make mods to Makefile.templ or Makefile.SH, which doesn't change by itself. Otherwise, one has to make mods to a moving target. 2. Have a "clean:" target in the Makefile that will get rid of files created in the auto-configuration procedure. Doing a "make clean", then checking the original versions back out should get everything back to the state as it was when distributed. Intelligent comments are welcome -- Bruce Jerrick Oregon Graduate Center (503) 645-1121 ex. 355 CSNet: bruce@Oregon-Grad UUCP: ...tektronix!ogcvax!bruce -- Bruce Jerrick Oregon Graduate Center