aboutsummaryrefslogtreecommitdiff
path: root/src/data.lisp
Commit message (Collapse)AuthorAge
* provide macro WITH-RESET-DATA-SOURCESDavid Bremner2022-05-05
| | | | | | As the docstring hints, this will be used in the test suite. Signed-off-by: David Bremner <david@tethera.net>
* refactor use of gnupg in CONSFIGURATOR.DATA.PGPDavid Bremner2022-05-05
| | | | | | | | | | Add a new low level function GPG, and a function GPG-FILE-AS-STRING intended for use in the pgp data source and the future pass(1) data source. Both of these functions support a new parameter *DATA-SOURCE-GNUPGHOME*, which allows the user (or test suite) to control where key material is stored for accessing data sources. Signed-off-by: David Bremner <david@tethera.net>
* rename PASSPHRASE class and its associated functionsSean Whitton2022-04-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* make argument to GET-LOCAL-CACHED-PREREQUISITE-DATA requiredSean Whitton2022-04-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* tidy up slots of DATA classSean Whitton2022-04-10
| | | | | | | | | | - Rename IDEN1->DATA-IDEN1, IDEN2->DATA-IDEN2. - Require values for DATA-IDEN1, DATA-IDEN2 AND DATA-VERSION slots. - Leave DATA-MIME unbound rather than initialising to NIL. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* drop SKIP-DATA-SOURCE function & unexport the symbolSean Whitton2022-04-04
| | | | | | We don't invoke the restart programmatically anywhere at present. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename READFILE, WRITEFILE, corresponding generics and some wrappersSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace some Scheme-style namesSean Whitton2022-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rework prerequisite data naming conventions & add some validationSean Whitton2022-03-22
| | | | | | | | | | | | | | We now give an exhaustive specification of which IDEN1 are valid, rather than simply reserving some patterns. Also introduce terminology of "prerequisite data identifiers". Drop the idea that IDEN1 might be nil. Additionally reserve IDEN1 beginning with three hyphens. State that third party extensions shouldn't use _CONTEXT. Disallow forms not listed. Thanks to David Bremner for discussion. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace ESCAPE-SH-TOKEN and ESCAPE-SH-COMMAND with new SH-ESCAPESean Whitton2022-03-11
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add LXC properties, :LXC{,-UNPRIV-ATTACH} connections, WITH-HOMEDIRSean Whitton2021-11-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace some functions with a new :CONSFIGURATOR-CACHE connattrSean Whitton2021-10-23
| | | | | | This simplifies the API. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add dep on Anaphora and use APROG1, ALET & AAND in various placesSean Whitton2021-09-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use UIOP:XDG-CACHE-HOMESean Whitton2021-08-31
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* UPLOAD-ALL-PREREQUISITE-DATA: query remote cache contents just onceSean Whitton2021-08-31
| | | | | | | | Should improve performance, especially when connection latency is high. We already implicitly assume that only one attempt to upload prerequisite data is going on at once. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* new approach to calling fork(2) in remote Lisp imagesSean Whitton2021-07-24
| | | | | | | | | | | Drop CAN-PROBABLY-FORK because we now only try to fork(2) in contexts in which there shouldn't ever be any other threads running, apart from Lisp implementation finaliser threads and the like. We no longer need to RESET-DATA-SOURCES before CONTINUE-DEPLOY* because we now only fork(2) in contexts in which *NO-DATA-SOURCES* is t. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* move remote Lisp images part of data.lisp to its own fileSean Whitton2021-07-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* (remove-if #'null ...) -> (remove nil ...) & similarly for DELETE-IFSean Whitton2021-07-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* signal SKIPPED-PROPERTIES & factor out interpreting exit codesSean Whitton2021-07-10
| | | | | | | | | | | | Unconditionally signalling FAILED-CHANGE does not make sense because perhaps the type of condition C is not a subtype of SIMPLE-CONDITION. Moreover, when we invoke the SKIP-PROPERTY restart we do not actually pass the condition. For simplicity, and since all we need is notification that a SKIP-PROPERTY restart was invoked, instead define and signal a special-purpose condition. Additionally, use an exit code to pass the signal between Lisp images. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix not signalling MISSING-DATA when remote cache has some versionSean Whitton2021-06-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add PERIODIC:AT-MOSTSean Whitton2021-06-07
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename REMOTE-FILE-{MODE-AND-SIZE -> STATS} & also return mtimeSean Whitton2021-06-07
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SBCL connection: propagate :NO-CHANGESean Whitton2021-06-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* store record of FASLs as Lisp dataSean Whitton2021-05-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* delete old FASLs for uploaded Lisp systemsSean Whitton2021-05-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* ensure we fail if COMPILE-FILE* failsSean Whitton2021-05-23
| | | | | | | Possibly the load might succeed but the compilation fail, and the user should be informed. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* convert CONNECTION slots to connattrs & fix finding homedirsSean Whitton2021-05-23
| | | | | | | | | | | | HOME does not take into account /etc/passwd inside the chroot, even when starting a login shell with, e.g., "chroot /chroot sh -lc 'echo $HOME'" -- we would need something which emulates login(1), like su(1), but the -c argument to su(1) is not portable. getent(1) is not POSIX. So use tilde expansion. Additionally, avoid having UPLOAD-ALL-PREREQUISITE-DATA store values for the remote UID, remote homedir etc. from *before* the chroot/setuid operation. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DATA-CKSUM: fix argument when calling cksum(1)Sean Whitton2021-05-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* FILE:DATA-UPLOADED, FILE:SECRET-UPLOADED: use MAYBE-WRITEFILE-DATASean Whitton2021-05-20
| | | | | | This avoids writing the file every deploy, even when unchanged. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* reflowSean Whitton2021-05-17
| | | | | | Pure code motion. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* recompile remaining as soon as we've recompiled somethingSean Whitton2021-05-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* output the compile and/or load output when debug level at least 3Sean Whitton2021-05-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* actually print the compile and/or load output on errorSean Whitton2021-05-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* separately upload, compile and load each ASDF systemSean Whitton2021-05-17
| | | | | | | | | | This avoids recompiling unchanged systems on every deploy, which makes for a decent performance boost, especially on systems with less processing power. Drop the idea of relying on distribution packages on the remote side -- we want to use the same version of the source as is running in the root Lisp. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* CONTINUE-DEPLOY*-PROGRAM: avoid exporting unexported symbolsSean Whitton2021-05-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* INFORMAT when don't upload data as remote cache has a >= versionSean Whitton2021-05-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* make CACHED-DATA into a connattr and push to it more consistentlySean Whitton2021-05-15
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* when collecting output, accept UnicodeSean Whitton2021-05-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* RESET-DATA-SOURCES: also reset cache of items of STRING-DATASean Whitton2021-04-30
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* define & use DEFINE-PRINT-OBJECT-FOR-STRUCTLIKESean Whitton2021-04-16
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename and use DELETE-REMOTE-TREE->DELETE-REMOTE-TREESSean Whitton2021-04-07
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* Revert "add workaround for CL-HEREDOC-SYSTEM package"Sean Whitton2021-04-01
| | | | | | | | This reverts commit 3a635a8810fca3fb46e1ab3e7bca6ee502f9acf7. The bug has been fixed in upstream CL-HEREDOC. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace some (REQUIRE "sb-posix") calls with conditional dependencySean Whitton2021-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* convert "upload to root Lisp" error into a warningSean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* don't permit registering data sources in remote Lisp imagesSean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* create "Local caches" and "Remote caches" sectionsSean Whitton2021-03-27
| | | | | | Pure code motion. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* export GET-{REMOTE,LOCAL}-CACHED-PREREQUISITE-DATASean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add a DEFGENERIC for CONNECTION-CLEAR-DATA-CACHESean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* resolve relative pathnames passed to TRY-REGISTER-DATA-SOURCESean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use some accessors instead of SLOT-VALUESean Whitton2021-03-27
| | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>