aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-20 12:39:58 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-20 12:42:18 -0700
commitd39ccc1403762b19b9966493342867b115294a2e (patch)
tree44e583ad3400a450f3a58e28516e9ae098d16e6c /src
parentfac6720737e25688760621dfc0e1e5d483ef2f1f (diff)
downloadconsfigurator-d39ccc1403762b19b9966493342867b115294a2e.tar.gz
add and use :CONSFIGURATOR named readtable
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src')
-rw-r--r--src/connection.lisp2
-rw-r--r--src/connection/chroot.lisp1
-rw-r--r--src/connection/chroot/fork.lisp1
-rw-r--r--src/connection/chroot/shell.lisp1
-rw-r--r--src/connection/debian-sbcl.lisp1
-rw-r--r--src/connection/local.lisp1
-rw-r--r--src/connection/shell-wrap.lisp2
-rw-r--r--src/connection/ssh.lisp3
-rw-r--r--src/connection/sudo.lisp2
-rw-r--r--src/data.lisp1
-rw-r--r--src/data/asdf.lisp1
-rw-r--r--src/data/pgp.lisp1
-rw-r--r--src/deployment.lisp1
-rw-r--r--src/host.lisp1
-rw-r--r--src/property.lisp2
-rw-r--r--src/property/apt.lisp2
-rw-r--r--src/property/chroot.lisp2
-rw-r--r--src/property/cmd.lisp1
-rw-r--r--src/property/file.lisp2
-rw-r--r--src/property/os.lisp2
-rw-r--r--src/property/service.lisp2
-rw-r--r--src/property/user.lisp2
-rw-r--r--src/propspec.lisp1
-rw-r--r--src/reader.lisp23
-rw-r--r--src/util.lisp1
25 files changed, 47 insertions, 12 deletions
diff --git a/src/connection.lisp b/src/connection.lisp
index 2817cfa..d1c87e2 100644
--- a/src/connection.lisp
+++ b/src/connection.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
;;;; Connections
diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp
index 92d6de6..f8c49a3 100644
--- a/src/connection/chroot.lisp
+++ b/src/connection/chroot.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.chroot)
+(named-readtables:in-readtable :consfigurator)
;; currently we only check whether we're root, but, for example, on Linux, we
;; might have a CAP_* which lets us chroot as non-root
diff --git a/src/connection/chroot/fork.lisp b/src/connection/chroot/fork.lisp
index ab4ab72..4969539 100644
--- a/src/connection/chroot/fork.lisp
+++ b/src/connection/chroot/fork.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.chroot.fork)
+(named-readtables:in-readtable :consfigurator)
#+sbcl (eval-when (:compile-toplevel :load-toplevel :execute)
(require "sb-posix"))
diff --git a/src/connection/chroot/shell.lisp b/src/connection/chroot/shell.lisp
index 77fbdbd..66b2845 100644
--- a/src/connection/chroot/shell.lisp
+++ b/src/connection/chroot/shell.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.chroot.shell)
+(named-readtables:in-readtable :consfigurator)
(defmethod establish-connection ((type (eql :chroot.shell)) remaining &key into)
(declare (ignore remaining))
diff --git a/src/connection/debian-sbcl.lisp b/src/connection/debian-sbcl.lisp
index 208655e..ac9925e 100644
--- a/src/connection/debian-sbcl.lisp
+++ b/src/connection/debian-sbcl.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.debian-sbcl)
+(named-readtables:in-readtable :consfigurator)
(defmethod establish-connection ((type (eql :debian-sbcl)) remaining &key)
(mrun "which sbcl >/dev/null 2>&1 || apt-get -y install sbcl")
diff --git a/src/connection/local.lisp b/src/connection/local.lisp
index 5a7da2d..a689881 100644
--- a/src/connection/local.lisp
+++ b/src/connection/local.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.local)
+(named-readtables:in-readtable :consfigurator)
(defmethod establish-connection ((type (eql :local)) host &key)
(make-instance 'local-connection))
diff --git a/src/connection/shell-wrap.lisp b/src/connection/shell-wrap.lisp
index b1bafc4..dd27f92 100644
--- a/src/connection/shell-wrap.lisp
+++ b/src/connection/shell-wrap.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.shell-wrap)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
(defclass shell-wrap-connection (posix-connection) ())
diff --git a/src/connection/ssh.lisp b/src/connection/ssh.lisp
index da32070..f4903b5 100644
--- a/src/connection/ssh.lisp
+++ b/src/connection/ssh.lisp
@@ -16,8 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.ssh)
-
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
(defmethod establish-connection ((type (eql :ssh)) remaining
&key
diff --git a/src/connection/sudo.lisp b/src/connection/sudo.lisp
index 935fc5b..db0111a 100644
--- a/src/connection/sudo.lisp
+++ b/src/connection/sudo.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.connection.sudo)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
;; Note that a password needed to sudo is technically not a piece of
;; prerequisite data required by a deployment, because it is not used in
diff --git a/src/data.lisp b/src/data.lisp
index 5315762..b786c0c 100644
--- a/src/data.lisp
+++ b/src/data.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
+(named-readtables:in-readtable :consfigurator)
;;;; Prerequisite data
diff --git a/src/data/asdf.lisp b/src/data/asdf.lisp
index dc05d58..2d61c49 100644
--- a/src/data/asdf.lisp
+++ b/src/data/asdf.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.data.asdf)
+(named-readtables:in-readtable :consfigurator)
;; could we have both :asdf-monolithic and :asdf-something_else where in the
;; latter we filter out the names of systems already known to be available on
diff --git a/src/data/pgp.lisp b/src/data/pgp.lisp
index 0324177..51e8a2d 100644
--- a/src/data/pgp.lisp
+++ b/src/data/pgp.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.data.pgp)
+(named-readtables:in-readtable :consfigurator)
;; Simple PGP-encrypted file source of prerequisite data
diff --git a/src/deployment.lisp b/src/deployment.lisp
index 5f93f33..f8a8b17 100644
--- a/src/deployment.lisp
+++ b/src/deployment.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
+(named-readtables:in-readtable :consfigurator)
;;;; Deployments
diff --git a/src/host.lisp b/src/host.lisp
index f4f9ec2..1eae634 100644
--- a/src/host.lisp
+++ b/src/host.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
+(named-readtables:in-readtable :consfigurator)
;;;; Hosts
diff --git a/src/property.lisp b/src/property.lisp
index 55ed83c..95bacd0 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
;;;; Properties
diff --git a/src/property/apt.lisp b/src/property/apt.lisp
index fa5948e..609b581 100644
--- a/src/property/apt.lisp
+++ b/src/property/apt.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.apt)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
;;;; Static definitions
diff --git a/src/property/chroot.lisp b/src/property/chroot.lisp
index 5a4928d..a3a49a0 100644
--- a/src/property/chroot.lisp
+++ b/src/property/chroot.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.chroot)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
(defprop %debootstrapped :posix (root host &rest options)
"Bootstrap The Universal Operating System into ROOT using debootstrap(1)."
diff --git a/src/property/cmd.lisp b/src/property/cmd.lisp
index 1e6a94c..39cc8dd 100644
--- a/src/property/cmd.lisp
+++ b/src/property/cmd.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.cmd)
+(named-readtables:in-readtable :consfigurator)
(defprop single :posix (&rest args)
"A property which can be applied by running a single shell command. ARGS is
diff --git a/src/property/file.lisp b/src/property/file.lisp
index ca9579f..6db1484 100644
--- a/src/property/file.lisp
+++ b/src/property/file.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.file)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
(defun map-file-lines (file function)
"Apply FUNCTION to the lines of FILE. Safe to use in a :POSIX property.
diff --git a/src/property/os.lisp b/src/property/os.lisp
index f80519d..dbfb861 100644
--- a/src/property/os.lisp
+++ b/src/property/os.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.os)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
;;;; Basic OS types
diff --git a/src/property/service.lisp b/src/property/service.lisp
index 7ab220b..9dd10d2 100644
--- a/src/property/service.lisp
+++ b/src/property/service.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.service)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
;;;; Controlling services using service(1)
diff --git a/src/property/user.lisp b/src/property/user.lisp
index d9569b1..3a5e918 100644
--- a/src/property/user.lisp
+++ b/src/property/user.lisp
@@ -16,7 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator.property.user)
-(named-readtables:in-readtable :interpol-syntax)
+(named-readtables:in-readtable :consfigurator)
(defprop has-account :posix (user-name)
"Ensure there is an account for USER-NAME."
diff --git a/src/propspec.lisp b/src/propspec.lisp
index d1fabd1..99eaa4f 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
+(named-readtables:in-readtable :consfigurator)
;;;; Property application specifications
diff --git a/src/reader.lisp b/src/reader.lisp
new file mode 100644
index 0000000..39314be
--- /dev/null
+++ b/src/reader.lisp
@@ -0,0 +1,23 @@
+;;; Consfigurator -- Lisp declarative configuration management system
+
+;;; Copyright (C) 2021 Sean Whitton <spwhitton@spwhitton.name>
+
+;;; This file is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3, or (at your option)
+;;; any later version.
+
+;;; This file is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+(in-package :consfigurator)
+
+(named-readtables:defreadtable :consfigurator
+ (:merge :standard)
+ (:dispatch-macro-char #\# #\? #'cl-interpol:interpol-reader)
+ (:dispatch-macro-char #\# #\> #'cl-heredoc:read-heredoc))
diff --git a/src/util.lisp b/src/util.lisp
index 44ae5b7..3afc228 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -16,6 +16,7 @@
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(in-package :consfigurator)
+(named-readtables:in-readtable :consfigurator)
(defun noop (&rest args)
"Accept any arguments and do nothing."