anchor.diff:      (uiop:chdir "/usr/ports/www/nginx-devel")
       (uiop:run-program (list "/usr/bin/make" "-DWITH=\"HTTPV2\"" "install" "clean" "BATCH=yes"))))
   
  -(uiop:chdir "/tmp")
  +(let* ((solr-version  "5.4.0")
  +       (solr-checksum "f906356e01eebb08e856a7c64250ba53")
  +       (solr-ext      ".tgz")
  +       (solr-mirror   "http://www.us.apache.org/dist/lucene/solr/")
  +       (solr-fullname (format nil "solr-~a" solr-version))
  +       (solr-filename (format nil "~a~a" solr-fullname solr-ext))
  +       (solr-basedir  "/usr/local")
  +       (solr-installdir (format nil "~a/~a" solr-basedir solr-fullname))
  +       (solr-url      (format nil "~a/~a/~a" solr-mirror solr-version solr-filename))
  +       (tmp-dir       "/tmp"))
  +  (uiop:chdir tmp-dir)
  +  (unless (uiop:directory-exists-p solr-installdir)
  +    (if (uiop:file-exists-p (format nil "~a/~a" tmp-dir solr-filename))
  +        (uiop:run-program (list "/sbin/md5" "-c" solr-checksum solr-filename))
  +        (progn
  +          (format t "Downloading SolR~%")
  +          (uiop:run-program (list "/usr/local/bin/curl" "-O" solr-url) :output *standard-output* :error *standard-output*)
  +          (uiop:run-program (list "/sbin/md5" "-c" solr-checksum solr-filename))))
   
  -(unless (uiop:directory-exists-p "/usr/local/solr-5.4.0")
  -  (if (uiop:file-exists-p "/tmp/solr-5.4.0.tgz")
  -      (uiop:run-program (list "/sbin/md5" "-c" "f906356e01eebb08e856a7c64250ba53" "solr-5.4.0.tgz"))
  -      (progn
  -        (format t "Downloading SolR~%")
  -        (uiop:run-program (list "/usr/local/bin/curl" "-O" "http://www.us.apache.org/dist/lucene/solr/5.4.0/solr-5.4.0.tgz"))
  -        (uiop:run-program (list "/sbin/md5" "-c" "f906356e01eebb08e856a7c64250ba53" "solr-5.4.0.tgz"))))
  +    (format t "Extracting SolR~%")
  +    (uiop:run-program (list "/usr/bin/tar" "-zx" "-C" solr-basedir "-f" (format nil "~a/~a" tmp-dir solr-filename))))
  +  (uiop:run-program (list "/bin/cp" "-r" "/potato/deploy/files/solr/potato" (format nil "~a/server/solr" solr-installdir)))
  +  (unless (has-user? "solr")
  +    (format t "Creating SolR user~%")
  +    (uiop:run-program (list "/usr/sbin/pw" "useradd" "-n" "solr" "-u" "808" "-d" solr-installdir "-c" "SolR account"))))
   
  -  (format t "Extracting SolR~%")
  -  (uiop:run-program (list "/usr/bin/tar" "-zx" "-C" "/usr/local" "-f" "/tmp/solr-5.4.0.tgz")))
  +(unless (uiop:file-exists-p "/usr/local/lib/libfixposix.so")
  +  (format t "Installing libfixposix~%")
  +  (uiop:chdir "/tmp")
  +  (uiop:run-program (list "/usr/local/bin/curl" "-o" "libfixposix.zip" "https://codeload.github.com/sionescu/libfixposix/zip/master"))
  +  (uiop:run-program (list "/usr/bin/unzip" "/tmp/libfixposix.zip"))
  +  (uiop:chdir "/tmp/libfixposix-master")
  +  (uiop:run-program (list "/usr/local/bin/autoreconf" "-i" "-f"))
  +  (uiop:run-program (list "./configure"))
  +  (uiop:run-program (list "make"))
  +  (uiop:run-program (list "make" "install")))
   
  -(uiop:run-program (list "/bin/cp" "-r" "/potato/deploy/files/solr/potato" "/usr/local/solr-5.4.0/server/solr"))
  +(unless (has-group? "users")
  +  (format t "Creating users group~%")
  +  (uiop:run-program (list "/usr/sbin/pw" "groupadd" "-n" "users" "-g" "100")))
   
  -(format t "Installing libfixposix~%")
  -(uiop:chdir "/tmp")
  -(uiop:run-program (list "/usr/local/bin/curl" "-o" "libfixposix.zip" "https://codeload.github.com/sionescu/libfixposix/zip/master"))
  -(uiop:run-program (list "/usr/bin/unzip" "/tmp/libfixposix.zip"))
  -(uiop:chdir "/tmp/libfixposix-master")
  -(uiop:run-program (list "/usr/local/bin/autoreconf" "-i" "-f"))
  -(uiop:run-program (list "./configure"))
  -(uiop:run-program (list "make"))
  -(uiop:run-program (list "make" "install"))
  +(unless (has-user? "potato")
  +  (format t "Creating Potato user~%")
  +  (uiop:run-program (list "/usr/sbin/pw" "useradd" "-n" "potato" "-u" "1214" "-g" "users" "-c" "Potato user" "-m")))
   
  +(uiop:chdir "/home/potato")
   
  +(uiop:run-program (list "/usr/local/bin/curl" "-O" "https://beta.quicklisp.org/quicklisp.lisp"))
  +(uiop:run-program (list "/usr/local/bin/sudo" "-u" "potato" "/usr/local/bin/sbcl" "--noinform" "--non-interactive" "--noprint" "--load" "/home/potato/quicklisp.lisp" "--eval" "(quicklisp-quickstart:install)") :output *standard-output* :error *standard-output*)
  +
  +(with-open-file (stream "/home/potato/.sbclrc" :direction :output :if-exists :rename)
  +  (format stream "#-quicklisp~%")
  +  (format stream "(let ((quicklisp-init (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname))))~%")
  +  (format stream "     (when (probe-file quicklisp-init) (load quicklisp-init)))~%"))
  +
  
positive.code: (defun pkg-info (a-package)
    (uiop:run-program (list "/usr/sbin/pkg" "info" a-package)))
  
  ;-- MAIN
  
  (format t "Hello World!~%")
  (freebsd-update)
  
  ; erlang is a super dependency of couchdb and rabbitmq
  ; openjdk8 pulls libXt and depends on a whole list of X-related packages
  (dolist (p '("sudo" "curl" "git" "bzip2" "zip" "unzip" "bash" "gnutls" "openssl" "ImageMagick-nox11"
               "autoconf" "libtool" "automake" ;; for libfixposix
               "erlang" "couchdb" "rabbitmq" "openjdk8" "memcached" "rabbitmq-c-devel" "leiningen"))
    (cmd-package "install" p))
  
  (with-open-file (stream "/etc/fstab" :direction :io :if-exists :OVERWRITE)
    (let ((found-fs (loop for line = (read-line stream nil)
  
negative.code: ;; mount all new filesystems
  (uiop:run-program (list "/sbin/mount" "-a"))
  
  ;(portsnap "fetch")
  ;(handler-case
  ;    (portsnap "update")
    ;; update failed, maybe we should try "extract" for the initial portsnap
  ;  (uiop:subprocess-error () (portsnap "extract")))
  
  (handler-case
      (pkg-info "nginx-devel")
  