Hints for using ASDF with CCL
Introduction
ASDF is a system definition facility. Starting with OpenMCL 0.14.2, it is included as part of the standard distribution and can be used with a simple: (require 'asdf).
Clozure CL also includes ASDF-INSTALL, a CPAN-style repository for Common Lisp. The site includes an enumeration of all the useful code it can fetch and install for you.
You may need to add following to ~/.asdf-install to disable gpg sig verification (bad idea):
(setq asdf-install:*verify-gpg-signatures* nil)
Set-up
Prepare the system so that admin users can use asdf-install to install packages for the entire system:
GNU Privacy Guard
You will need the GNU Privacy Guard (GPG) to confirm that the packages you download and install have not been corrupted or tampered with by an attacker. If you do not already have GPG, you will need to install it using either your package installer (e.g., MacPorts? or Fink), or by downloading a native Mac port of the software.
Once you have a copy of GPG, make sure to add the appropriate public keys1 to your local keychain so that you can easily verify the integrity of downloaded software.
gpg --search-keys eweitz@common-lisp.net # Add Dr. Edmund Weitz to your key ring
If you don't want to bother with validation of the packages (a bad idea), you can always disable the check by adding the following statement to your openmcl-init.lisp file:
(setq asdf-install:*verify-gpg-signatures* nil)
Prepare Your System
Once Clozure CL is installed, there are a few directories that need to be setup (and permissions verified) so that you can use ASDF-Install with minimum effort. The instructions are different depending on the method used to obtain Clozure CL.
For Fink Users
sudo chmod -R g+w /sw/lib/openmcl/ccl # The admin group can write into all this directory tree. sudo mkdir /usr/local/asdf-install # Create a directory where the files shall go sudo chgrp admin /usr/local/asdf-install # Make sure it belongs to the admin group sudo chmod g+w /usr/local/asdf-install # The admin group can write into all this directory tree
Now you're ready to start OpenMCL and run asdf-install:
A recipe to get you started:
? (require 'asdf) ; load the bundled version of ASDF
ASDF
NIL
? (push "ccl:tools;asdf-install;"
asdf:*central-registry*) ; add bundled version of ASDF-install to load path
? (asdf:operate 'asdf:load-op 'asdf-install) ; load the bundled version of ASDF-install
For MacPorts Users
These paths are different if you used MacPorts to install the software. The tools/asdf-install directory will already exist after the port install, so you just need to change the file permissions.
sudo chgrp admin /opt/local/share/ccl/1.4/tools/asdf-install sudo chmod -R g+w /opt/local/share/ccl/1.4/tools/asdf-install sudo mkdir /usr/local/asdf-install # create a directory where the files shall go
Then configure your ccl-init.lisp:
? (require 'asdf) ; load the bundled version of ASDF
ASDF
NIL
? (push "ccl:tools;asdf-install;site-systems;"
asdf:*central-registry*) ; add bundled version of ASDF-install to load path
? (push "/opt/local/share/asdf-install/" asdf:*central-registry*) ; Macports-installed stuff
? (asdf:operate 'asdf:load-op 'asdf-install) ; load the bundled version of ASDF-install
Note that pushing in this order means that MacPorts installed stuff will shadow the asdf-install materials that come with CCL.
... And Beyond
If you incorporated the above steps into your OpenMCL ~/.asdf-install file, then you can install random stuff on demand quite quickly.
For example, to install the md5 support:
? (asdf-install:install 'md5) Install where? 0) System-wide install: System in /usr/local/asdf-install/site-systems/ Files in /usr/local/asdf-install/site/ 1) Personal installation: System in /Users/brent/.asdf-install-dir/systems/ Files in /Users/brent/.asdf-install-dir/site/ 2) Abort installation. --> 0 ;;; ASDF-INSTALL: Downloading 9030 bytes from http://files.b9.com/md5/md5-1.8.5.tar.gz to MD5.asdf-install-tmp ... ;;; ASDF-INSTALL: Installing MD5.asdf-install-tmp in /usr/local/asdf-install/site/, /usr/local/asdf-install/site-systems/ md5-1.8.5/ md5-1.8.5/md5.asd md5-1.8.5/md5.lisp #P"/usr/local/asdf-install/site/md5-1.8.5/" #P"/usr/local/asdf-install/site/md5-1.8.5/" ;;; ASDF-INSTALL: Loading system "md5" via ASDF. ; loading system definition from /usr/local/asdf-install/site-systems/md5.asd into #<Package "ASDF2102"> ; registering #<SYSTEM MD5 #x8A653AE> as MD5 NIL ?
See also the ASDF-Install tutorial.
- 1. For more information about public key encryption and its uses, read the Wikipedia write-up on the subject.
