aboutsummaryrefslogtreecommitdiff
path: root/src/property.lisp
Commit message (Collapse)AuthorAge
* 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>
* 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>
* 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>
* factor out MAYBE-WRITEFILE-STRINGSean Whitton2021-05-20
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rework bootloader installation so can use property-defining macrosSean Whitton2021-05-09
| | | | | | | | | | | It is better to have the code which installs bootloaders to volumes in property definitions rather than in plain functions, as then we can specify that it's :POSIX or :LISP, specify the OS required for it to run, and similar. This commit enables that by replacing INSTALL-BOOTLOADER with a different generic which returns propspecs. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use RUN not MRUN when parsing command stdoutSean Whitton2021-05-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFPROPSPEC :APPLY subroutine: check the propapp typeSean Whitton2021-05-06
| | | | | | | | If the DEFPROPSPEC code returns a propspec expression including forms obtained by calling other functions, it is useful to check that the declared type for the whole DEFPROPSPEC is correct. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add LOCALSUDO and LOCALHDSean Whitton2021-05-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add & use PROPAPP macroSean Whitton2021-05-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* override *CONSFIG* for all calls to MAKE-PROPSPEC within DEFPROPSPECSean Whitton2021-05-06
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* declare IGNORABLE for all vars in :DESC and :HOSTATTRS subroutinesSean Whitton2021-04-24
| | | | | | These subroutines very often use only some of the property's arguments. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* PUSH-HOSTATTRS, PUSHNEW-HOSTATTRS: preserve order of new hostattrsSean Whitton2021-04-16
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* FILE:HAS-CONTENT: don't return :NO-CHANGE if file mode was changedSean Whitton2021-04-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix handing &AUX in generating Emacs indentation informationSean Whitton2021-04-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* avoid generating indentation information for unexported symbolsSean Whitton2021-04-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* Emacs indentation info: move downcasing to outputSean Whitton2021-04-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* the empty list is now a valid propappSean Whitton2021-04-05
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DEFINE-DOTTED-PROPERTY-MACRO: also ignore -supplied-p varsSean Whitton2021-04-04
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add TODO in DEFPROPSean Whitton2021-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add missing parensSean Whitton2021-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add and export GET-USERSean Whitton2021-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add WITH-CHANGE-IF-CHANGES-FILE{,-CONTENT}Sean Whitton2021-03-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use MUFFLE-WARNINGS functionSean Whitton2021-03-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix extracting indentation declarations in property definitionsSean Whitton2021-03-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* don't generate indentation hints for internal propertiesSean Whitton2021-03-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* make existing hostattrs available to programmatic callsSean Whitton2021-03-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* support passing :CHECK at beginning of DEFPROPLIST and DEFPROPSPECSean Whitton2021-03-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* untabifySean Whitton2021-03-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rework :HOSTATTRS programmatic call warning & add IGNORING-HOSTATTRSSean Whitton2021-03-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>