aboutsummaryrefslogtreecommitdiff
path: root/src/image.lisp
Commit message (Collapse)AuthorAge
* rename %DUMP-CONSFIGURATOR-IN-GRANDCHILD now there is only oneSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* eliminate unneeded indirection via DUMP-CONSFIGURATOR-IN-GRANDCHILDSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* EVAL-IN-{GRANDCHILD,REINVOKED}: convert from macros to functionsSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* MAPC-OPEN-{INPUT,OUTPUT}-STREAMS: don't use &restSean Whitton2022-03-12
| | | | | | This brings these functions closer to MAPC. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename DEFINE-PRINT-OBJECT-FOR-STRUCTLIKE & REINIT-STRUCTLIKESean Whitton2022-03-12
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename MEMSTRING= -> MEMSTR=Sean Whitton2022-03-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* CONTINUE-DEPLOY*-PROGRAM: initialise special variablesSean Whitton2021-12-03
| | | | | | Before this change, the variables would be unbound in IMAGE-DUMPED images. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* EVAL-IN-REINVOKED: use a more descriptive name for the dumped imageSean Whitton2021-11-28
| | | | | | The name will show up in, e.g., top(1) inside containers. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fixes to permit dumping and reinvoking and then dumping againSean Whitton2021-11-14
| | | | | | | | | | | | | | | | | | - Update stored checksums when reinvoking, else the SBCL-specific checks in %DUMP-CONSFIGURATOR-IN-GRANDCHILD will always fail in reinvoked images. - Also update *US* when reinvoking; previously, the code in IMAGE-DUMPED to skip the dump when the target filename is the executable we're running from was using the old value of *US* and thus would probably never skip the dump. - Don't abort the dump just because the target filename is the executable we're running from (I believe the restriction was accidentally included when refactoring a previous work-in-progress version of fbe55a361f). - %DUMP-CONSFIGURATOR-IN-GRANDCHILD: ensure we remove the hook which evaluates the parent process's request so it doesn't get run again. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* *US*: use SB-EXT:*RUNTIME-PATHNAME* not SB-EXT:*CORE-PATHNAME*Sean Whitton2021-11-14
| | | | | | SB-EXT:*RUNTIME-PATHNAME* is the path to the executable. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use higher-numbered codes for change status, 1 for unhandled errorsSean Whitton2021-11-08
| | | | | | | | When SBCL fails to start up, such as when previously-loaded shared libraries cannot be found while trying to reinvoke a dumped image, it exits 1. We must avoid erroneously interpreting this as a successful attempt to make changes. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add Linux namespace-entering connectionsSean Whitton2021-11-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: pass target uid to POSIX-LOGIN-ENVIRONMENT for correct PATHSean Whitton2021-11-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* IMAGE-DUMPED: also abort if shlibs not readableSean Whitton2021-10-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* discuss limitations which apply to dumping images with IMAGE-DUMPEDSean Whitton2021-10-28
| | | | 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>
* HANDLE-FORK-REQUEST: use return values of BT:JOIN-THREADSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* HANDLE-FORK-REQUEST: immediately begin reading from out & err pipesSean Whitton2021-10-23
| | | | | | | Previously we waited for waitpid(2) to return before reading from the pipes. If either pipe filled up before the child process exited, we would deadlock. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename :XDG-CACHE-HOME connattr to :XDG_CACHE_HOMESean Whitton2021-10-23
| | | | 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>
* IMAGE-DUMPED: fix call to OSICAT-POSIX:CHMODSean Whitton2021-09-12
| | | | 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>
* 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>
* use UIOP:XDG-CACHE-HOMESean 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 Lisp systems as tarballs, not concatenated sourceSean Whitton2021-08-22
| | | | | | This should enable depending on Lisp systems which use the CFFI Groveller. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix exit code of remote Lisp image when fail to compile and/or loadSean Whitton2021-07-24
| | | | | | See the RETURN-EXIT and WITH-BACKTRACE-AND-EXIT-CODE macros. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* EVAL-IN-GRANDCHILD: call POSIX-LOGIN-ENVIRONMENT before PREREQUESTSean Whitton2021-07-24
| | | | | | | It's possible that the home directory or username have been changed since the fork control child was created, perhaps by INSTALLER:CLEANLY-INSTALLED-ONCE. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* call POST-FORK before WITH-FORK-CONTROLSean Whitton2021-07-24
| | | | | | | This ensures that the fork control child is in the same context as its parent -- for example, that they're both chrooted. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add IMAGE-DUMPED and CRON:RUNS-CONSFIGURATORSean Whitton2021-07-24
| | | | 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>