aboutsummaryrefslogtreecommitdiff
path: root/src/property.lisp
Commit message (Collapse)AuthorAge
* update copyright noticesSean Whitton2022-04-29
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename ASSERT-EUID-ROOT -> ASSERT-REMOTE-EUID-ROOTSean Whitton2022-04-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add PUSH-HOSTATTR, don't use &rest in PUSH-HOSTATTRS & fix docstringSean Whitton2022-04-04
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename basic propapp accessorsSean Whitton2022-04-04
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* drop mistakenly-introduced blank lineSean Whitton2022-04-04
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* ASSERT-EUID-ROOT: signal ABORTED-CHANGE rather than FAILED-CHANGESean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace uses of COLLAPSE-TYPES & drop the functionSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename COLLAPSE-PROPAPP-TYPES -> COMBINE-PROPAPP-TYPESSean Whitton2022-04-02
| | | | 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>
* ASSERT-CONNECTION-SUPPORTS: signal ABORTED-CHANGESean Whitton2022-03-11
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace uses of CALL-WITH-OS & drop the functionSean Whitton2022-03-11
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace usages of NOOP & drop the functionSean Whitton2022-03-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* COLLAPSE{,-PROPAPP}-TYPES: invert logicSean Whitton2021-11-09
| | | | | | | | | These functions are used to determine whether a composite property is :POSIX or :LISP. If any of the composing properties are :LISP, then we need to return :LISP, such that attempting to apply the composite property using a POSIX-type connection produces an error. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* IMAGE-DUMPED: support skipping when same build of SBCL unavailableSean Whitton2021-10-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* note about PROGRAMMATIC-APPLY-HOSTATTRS for DEFPROPLIST/DEFPROPSPECSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* IGNORING-HOSTATTRS: accept calling properties using APPLY & similarSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add SKIP-SEQUENCE, ABORTED-CHANGE, ESEQPROPS-UNTILSean Whitton2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We establish a SKIP-PROPERTY restart for each sequencing combinator, such that in addition to skipping over individual property applications, it is possible to abandon the whole sequence. However, that restart discards information about whether or not a change was made by the property applications of the abandoned sequence prior to the property application interrupted by an error. The new SKIP-SEQUENCE restart preserves this information by returning from the DOLIST in APPLY-AND-PRINT. The implementation of the SKIP-SEQUENCE restart must take into account the fact that the property application interrupted by the error might have made a change prior to failing. In particular, the new restart must not cause the sequencing combinator to return :NO-CHANGE unless it can infer that the property application interrupted by an error made no change. To achieve this, capture whether the interrupted property application made a change by introducing a distinction between plain FAILED-CHANGE and a new condition class, ABORTED-CHANGE. These changes permit the implementation of a new combinator, ESEQPROPS-UNTIL, which invokes SKIP-SEQUENCE when a given condition is signalled. The new combinator is like SEQPROPS in that it allows for continuing the deployment despite a signalling of FAILED-CHANGE, but it is like ESEQPROPS in not attempting to apply succeeding propapps. It also offers finer-grained control over what kinds of failures are to be tolerated than does SEQPROPS. When the condition is ABORTED-CHANGE or a subclass, ESEQPROPS-UNTIL returns information about whether or not a change was made by the property applications of the abandoned sequence prior to the property application that was interrupted, enabling useful combinations with ON-CHANGE. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* programmatic application of properties: error out if no *CONNECTION*Sean Whitton2021-09-29
| | | | 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>
* DEFPROP: make it possible to RETURN-FROM property subroutinesSean Whitton2021-09-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rework PUSHNEW-HOSTATTRS to use EQUAL not EQL & add PUSHNEW-HOSTATTRSean Whitton2021-08-31
| | | | | | | | | | | | | | | Previously, PUSHNEW-HOSTATTRS always used EQL to determine whether a hostattr was already pushed, which would give the wrong answer for many common cases. Now default to using EQUAL, and provide a way for the caller to specify the test function. PUSHNEW-HOSTATTRS now takes a list of hostattrs as a single parameter, rather than using &REST, in order to make room for the new :TEST keyword parameter. To mitigate the inconvenience of no longer using &REST, add PUSHNEW-HOSTATTR. Also fix some parameter and function names in docstrings. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFPROPSPEC :DESC/:HOSTATTRS/:CHECK: use WITH-*HOST*-*CONSFIG*Sean Whitton2021-07-06
| | | | | | | | | | | | | We already evaluate the lambda list inside WITH-*HOST*-*CONSFIG* when computing the propspec, so this change means we consistently evaluate the lambda list in that context, rather than evaluating it outside that context in the case of some property subroutines. This affects &AUX parameters, &OPTIONAL argument default value forms, etc., which would evaluate differently without WITH-*HOST*-CONSFIG*, such as a call to MAKE-PROPSPEC with no :SYSTEMS keyword parameter supplied. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* hostattrs retrieval: accept explicit NIL for hostSean Whitton2021-06-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix use of MEMBER in PROPAPPARGSSean Whitton2021-06-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* Let's Encrypt: fix looking for changed files & flatten DOMAINSSean Whitton2021-06-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* don't ls & cksum file again if result is already :NO-CHANGESean Whitton2021-06-24
| | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add PROPAPPARGS and some Postfix propertiesSean Whitton2021-06-18
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* don't try to cksum(1) directoriesSean Whitton2021-06-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* PROPUNAPPLY: fix finding the :APPLY subroutineSean Whitton2021-06-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add WITH-UNAPPLY & COLLAPSE-PROPAPP-TYPESSean Whitton2021-06-08
| | | | 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>
* ls(1) parse: set LC_ALL not just LOCALE, and split fields properlySean Whitton2021-06-07
| | | | | | | Previously our code assumed fields were separated with exactly one space, but sometimes there is padding. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use PUNAPPLY not just UNAPPLY & export symbol plist entry namesSean Whitton2021-06-07
| | | | | | | | At least for now let's not prefix all the SETPROP symbol plist entry names with 'p', but at least avoid having to remember which of :APPLY and :UNAPPLY subroutines are in a slot prefixed with a 'p'. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFPROPLIST/SPEC: don't always warn about programmatic applicationSean Whitton2021-06-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* mention IGNORING-HOSTATTRS in programmatic application warningSean Whitton2021-06-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFPROPLIST/DEFPROPSPEC: support supplying :HOSTATTRS subroutinesSean Whitton2021-06-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* include name of property in programmatic application warningSean Whitton2021-06-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* MAP-PROPSPEC-PROPAPPS: trivial-macroexpand-all -> agnostic-lizardSean Whitton2021-06-04
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add GET-SHORT-HOSTNAMESean Whitton2021-06-03
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* IGNORING-HOSTATTRS: don't fail for not-yet-defined propertiesSean Whitton2021-06-03
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* define *PREPROCESSING-HOST* earlierSean Whitton2021-06-03
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* PROPUNAPPLY: fail when there is :APPLY but no :UNAPPLYSean Whitton2021-06-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* PROPAPPUNAPPLY: call PROPUNAPPLY, not PROPAPPUNAPPLY againSean Whitton2021-05-30
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* factor out ENSURE-HOST & call it in hostattrs accessorsSean Whitton2021-05-30
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* hostattrs accessors: call PREPROCESS-HOST in some situationsSean Whitton2021-05-30
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add optional HOST arg to some accessors for hostattrsSean Whitton2021-05-29
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :DESC, :HOSTATTRS: also declare supplied-p parameters IGNORABLESean Whitton2021-05-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFPROP{SPEC,LIST}: include &AUX variables in :HOSTATTRS and :DESCSean Whitton2021-05-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFINE-DOTTED-PROPERTY-MACRO: avoid evaluating default value formsSean Whitton2021-05-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFINE-DOTTED-PROPERTY-MACRO: fix & document handling of &OPTIONALSean Whitton2021-05-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>