From: Steffen Beyer <sb@sdm.de> Subject: RFC: "Build'n'Play" installation tool Date: 4 Oct 1998 09:28:03 GMT The german section of O'Reilly is currently preparing the german version of the book "Programming with Perl Modules", which will be accompanied by a CD-ROM with a current snapshot of CPAN, "as usually" :-) . Moreover this CD-ROM is planned to include a tool for automatically installing Perl and most of the modules from CPAN (some subsets have also been defined) called "Build'n'Play", or "BnP" for short. This tool will be released under the "Artistic" and the "GNU General Public" Licenses (just like Perl) and will be available from CPAN right after the book from O'Reilly went to market (due in November). This tool has been developed by Ralf S. Engelschall (author of some famous software packages such as mod_rewrite, mod_ssl, ePerl and WML) and has been rewritten for this occasion by myself (Ralf considered his original version unsuitable for publication and wanted it "polished" for cleanness before going into "the world"). A more detailed description of "BnP" follows below. The tool has some characteristics which remind of "CPAN.pm", but it also has some unique features not found elsewhere (for details, see below). Michael Gerth <mic@oreilly.de> from O'Reilly and myself (Steffen Beyer <sb@engelschall.com>) would be very glad if some volunteers could take a look at this tool ("peer review") before actual publication and if they would share with us a) their opinions about and b) their experiences with this tool! Because of the deadlines involved in this book project we would need this feedback on October 15th at the latest, in order to be able to fix any errors which might have been found before the CD-ROM goes into mass production. Here the more detailed description of what "Build'n'Play" is and does: -------------------- cut here -------------------- cut here -------------------- Have you never built the Perl distribution before, or do you find building it tedious work? Did you ever hesitate to upgrade your Perl installation, because doing so would also necessitate the recompilation of innumerable installed modules due to the binary incompatibility between the two Perl versions? Or did you ever want to get rid of the many superfluous modules that got installed over time, to start anew from scratch and to install a fresh copy of Perl with only the modules that you really want and need? And did you ever think about automating this recompilation and installation process? Do you routinely install UNIX servers and did you ever wish to be able to automate the whole installation process, not just for Perl but also for other important software packages which require many many steps to install, like for instance a C compiler? (Which usually needs to be compiled at least _THREE_ times in a bootstrapping process?) Did you ever get the "software rage" ;-) (a term coined by Scott Adams, as it seems, the famous author of "The Dilbert Principle") when something went wrong and you had to go back to the beginning and do it all over again? Did you ever hate the common software installation practice where all the binaries get installed into the same place (such as "/usr/local/bin", for instance), trampling over one another, and other files getting copied all over your file system, thus making the de-installation of a package extremely difficult (which files belong to this package and which don't, and where are they?!)? Did you ever want to organize your software packages in a neat, hierarchical way (grouped in categories, i.e., subdirectories) for a maximum of clarity, and allowing the easy de-installation without any residues whatsoever? If the answer to any of these questions is yes, "Build'n'Play" might be the right solution for you: "Build'n'Play" allows you to write installation scripts for _ANY_ software package you want (not just Perl) _IN_PERL_ (which means that you have all the flexibility and computing power of Perl at your disposition, and not only shell scripts which you might have been using for this purpose until now). This also means that you do not need to spend hours in front of the console anymore typing in commands, but that you can let the installation run and only check it from time to time, freeing you for other, less tedious tasks. Moreover, these installation scripts will be able to automatically resume at the exact position where they aborted after an error occurred (a compilation error, for instance), thus greatly simplifying the installation process. Better still, "Build'n'Play" allows you to install Perl itself in this very same way, even if there is no Perl installed at all yet! How can "Build'n'Play" _INSTALL_ Perl _USING_ a Perl script if there is no Perl installed?! It does so by a bootstrapping process (using "miniperl", for the technically interested) performed by the "build" command of "Build'n'Play", which is a shell script for this very reason. And finally, "Build'n'Play" comprises a tool called "genopt" for maintaining a software package installation hierarchy which allows you to organize your various software packages in categories and which allows easy de-installation without any remains. (This latter tool is also a shell script, because it is intended to be useable at the time when you first install a new machine starting from zero - just as the "build" command!) Installing Perl and its modules requires about 3,200 shell commands, which you normally would have to type in manually, worth about one day's (eight hours) work. With "Build'n'Play", you can just say "build perl", lean back and wait for the installation to complete (this takes about three hours on a Pentium 133 MHz with 32 MB of RAM running FreeBSD 2.2.6). Note again that unlike "CPAN.pm", "Build'n'Play" does _NOT_ require Perl to be installed already! Note also that "Build'n'Play" proper does not handle dependencies between Perl modules automatically, because "Build'n'Play" is not a Perl-specific tool (such an automatic mechanism could be built into the "perl.bnp" installation script (which installs Perl and its modules), though). In the installation script "perl.bnp" - as it is provided in the current distribution of "Build'n'Play" - these dependencies have already been taken care of, by defining appropriate subsets of the modules to be installed which encompass all relevant dependencies. Moreover, "Build'n'Play" allows you to automatically install bundles of Perl modules which require non-Perl software packages like "Gimp" and "ImageMagick", for example (which "CPAN.pm" doesn't allow you to do). Be aware of the fact that "Build'n'Play" doesn't update your installation automatically when a new version of a module or software package becomes available; you will have to change the corresponding installation script manually (this usually just means to adjust the version number in the script for the module or package in question) and re-run "Build'n'Play". Sometimes (for instance when new versions of modules or packages are broken or if they do not work together well with already installed versions of other modules or packages) this may even be an advantage! "Build'n'Play" is capable, however, of automatically downloading such a new distribution file, if configured properly (just as "CPAN.pm" is, but without the need for any Perl modules in order to perform the actual download). (This is crucial for "Build'n'Play" because it is intended to be useable already when installing a machine for the first time, but you will actually need a tool for downloading such as "snarf" or "lynx", though.) -------------------- cut here -------------------- cut here -------------------- The necessary files can be downloaded via anonymous ftp from: ftp://ftp.engelschall.com/pub/bnp/ Note that some source files that have disappeared from CPAN in the meantime are included in the file "Sources.tar.gz", which is also included in the "fat" versions of "BnP" you'll see under the above URL. For the purpose of updates, the "plain" distributions of "BnP" (without these sources) are also available. Note further that the installation instructions are still mostly in German. But issuing "./build" after unpacking the distribution prints a help screen (in English) that should get you going. The principle is simple: Think of "Build'n'Play" as something very similar to "make" and "Makefiles": There is a command called "build" (the equivalent of "make") and several "Buildfiles" (called "perl.bnp", "gimp.bnp" and so on) for the different "targets" you can "build"; just say "build perl" for building and installing Perl and its modules, for instance. There is also a command "build clean" (the equivalent of "make clean") for deleting the internal temporary workspace, which should always be used between different builds (but not if restarting an aborted installation, of course!). If you want to build a subset of a target, just append the subset(s) or "subtarget(s)" in question to the name of the target using dots: % ./build perl.core.fox This command will install Perl itself ("core") plus those modules that will be discussed more thoroughly in the book (the fox will be the animal on its cover), for instance. If you want to know which subtargets are available, use the tool "tags" from the "misc" subdirectory, e.g. % ./misc/tags perl For a list of available targets, just call "build" without parameters. Thank you very much for _ANY_ feedback!! Best regards, -- Steffen Beyer <sb@engelschall.com> Free Perl and C Software for Download: www.engelschall.com/u/sb/download/