aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* find XDG_CACHE_HOME without relying on HOMESean Whitton2021-10-23
| | | | | | | | | | CONNECTION-CONNATTR for :REMOTE-HOME avoids relying on the HOME environment variable having the correct value; its docstring describes a case in which HOME's value can be incorrect. As determining :XDG-CACHE-HOME depends in most cases on having the correct value for the remote home directory, don't rely on the HOME environment variable here either. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* make *FORK-CONTROL* contents survive reloads of src/image.lispSean Whitton2021-10-23
| | | | | | | In particular, reloads initiated by the call to ASDF:LOAD-SYSTEM in CONSFIGURATOR.DATA.ASDF::SYSTEM-VERSION-FILES. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* be more specific regarding POSIX and the creation of temporary dirsSean Whitton2021-10-23
| | | | | | POSIX lacks 'mktemp -d' but it does have mkdtemp(3). Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* FORK-CONNECTION POST-FORK: note that must not start up any threadsSean Whitton2021-10-23
| | | | | | Per the docstring of EVAL-IN-GRANDCHILD. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add wrappers of some system functions to manipulate POSIX.1e ACLsSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* install system deps by searching for package managers on PATHSean Whitton2021-10-23
| | | | | | | | | | | | | | | | With this change we handle the situation in which we don't know the OS of a host on which we need to install system packages more cleanly than before. Also rely on the new PACKAGE:INSTALLED to install the OS bootstrapper in INSTALLER:CLEANLY-INSTALLED-ONCE. This allows us to simplify usage of the property by replacing the ORIGINAL-OS argument with ORIGINAL-OS-ARCHITECTURE. Making this change does mean that we now have two ways to specify the different names a package has on different OSs: (i) something like OS:ETYPECASE where each branch applies a property which invokes an OS-specific package manager; and (ii) the plists supplied to PACKAGE:INSTALLED. 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>
* factor out REMOTE-EXECUTABLE-FINDSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* SHELL-WRAP-CONNECTION %READFILE: insert space before shell "&&"Sean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: ensure that the data directory actually existsSean 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>
* add DEFINE-ERROR-RETVAL-CFUN, CHROOT, CLEARENVSean Whitton2021-10-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* release Consfigurator 0.11.0 (-1 to Debian unstable)v0.11.0debian/0.11.0-1archive/debian/0.11.0-1Sean Whitton2021-09-29
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* USER:{HAS-ACCOUNT-WITH-UID,%HAS-UID-GID}: tweak docstringsSean Whitton2021-09-29
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add USER:HAS-LOCKED-PASSWORDDavid Bremner2021-09-29
| | | | | | | This is useful when access is provided by other means (e.g. ssh keypairs) or as part of locking a user out completely. Signed-off-by: David Bremner <david@tethera.net>
* add USER:HAS-ACCOUNT-WITH-UIDDavid Bremner2021-09-29
| | | | | | | | | | | | The anticipated use case is where both uid and gid are to be set; making GID an optional keyword argument just allows a shorthand for the case of matching gid and uid. The limitation to a Debian-like OS is because of the assumption of a primary group per user. Refactor PASSWD-ENTRY to support a new function GROUP-ENTRY that does the same thing, but with the group database instead of the passwd database. Signed-off-by: David Bremner <david@tethera.net>
* programmatic application of properties: error out if no *CONNECTION*Sean Whitton2021-09-29
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* DATA.LOCAL-FILE: fix IN-PACKAGE formSean Whitton2021-09-29
| | | | | Reported-by: David Bremner <david@tethera.net> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* drop obsolete export of CAN-PROBABLY-FORKSean Whitton2021-09-19
| | | | | | The function was removed in f4e9170e73cb4bcfa7328422b4ff4f72d1339dd0. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add SYSTEMD:LINGERING-ENABLEDSean Whitton2021-09-18
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add FILE:LACKS-LINES-MATCHINGSean Whitton2021-09-12
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* IMAGE-DUMPED: fix call to OSICAT-POSIX:CHMODSean Whitton2021-09-12
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* SBUILD:BUILT: add periodically rebuilding the schroot to exampleSean Whitton2021-09-12
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: use OSICAT:USER-INFO rather than parsing id(1) outputSean Whitton2021-09-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* also redirect *DEBUG-IO* output when compiling and loading systemsSean Whitton2021-09-09
| | | | | | CFFI outputs C toolchain commands it runs to *DEBUG-IO*. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* expand notes on alternative to forkingSean Whitton2021-09-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add :SETUID security notesSean Whitton2021-09-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use CFFI, mostly via Osicat, for all syscalls/libc except fork(2)Sean Whitton2021-09-09
| | | | | | | | | | Also replace some calls to chmod(1) with calls to chmod(2). Using CFFI rather than implementation-specific wrappers should be better for portability. Also with this commit we stop hard coding types like uid_t as :UNSIGNED-INT, which was less portable. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* refactor APPLY-AND-PRINT, hopefully in favour of readabilitySean Whitton2021-09-08
| | | | 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>
* refactor SILENT-SEQPROPS and inline WITH-SKIP-PROPERTYSean Whitton2021-09-08
| | | | | | Previously, part of APPLY-AND-PRINT was duplicated in SILENT-SEQPROPS. 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>
* SHELL-WRAP-CONNECTION CONNECTION-WRITEFILE: execute just one commandSean Whitton2021-08-31
| | | | | | Should improve performance, especially when connection latency is high. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :LOCAL CONNECTION-WRITEFILE: use UIOP:RENAME-FILE-OVERWRITING-TARGETSean Whitton2021-08-31
| | | | | | Avoids starting an external process. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* RUN: combine creating the temporary file with running the commandSean Whitton2021-08-31
| | | | | | Should improve performance, especially when connection latency is high. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* MKTEMP: factor out MKSTEMP-CMDSean Whitton2021-08-31
| | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* MKTEMP: also fail if mktemp(1) outputs anything to stderrSean Whitton2021-08-31
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use UIOP:XDG-CACHE-HOMESean Whitton2021-08-31
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* RUN: at level 4, debug printing excludes the redirection of stdoutSean Whitton2021-08-31
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* LOCAL-CONNECTION docstring: connection is not always the root LispSean Whitton2021-08-31
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add CONNECTION-READFILE-AND-REMOVE to improve RUN performanceSean Whitton2021-08-31
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* cache XDG_CACHE_HOME as a connattrSean Whitton2021-08-31
| | | | | | This should provide a performance improvement. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix XDG_CONFIG_HOME -> XDG_CACHE_HOME as intendedSean 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>
* 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>
* mention ssh(1) ControlPersist & add idea about making it automaticSean Whitton2021-08-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* release Consfigurator 0.10.0 (-1 to Debian unstable)v0.10.0debian/0.10.0-1archive/debian/0.10.0-1Sean Whitton2021-08-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* d/control: drop rst backticks around ":POSIX"Sean Whitton2021-08-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* README.rst: tweak wording introducing :POSIX propertiesSean Whitton2021-08-22
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* LIBVIRT:KVM-BOOTS-CHROOT-FOR: on DEBIANLIKE, install initramfs-toolsSean Whitton2021-08-22
| | | | | | | Avoids the subsequent attempt to edit /etc/initramfs-tools/modules failing simply because the directory /etc/initramfs-tools does not exist. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>