1
0
mirror of synced 2026-02-27 17:32:34 +00:00
Files
Interlisp.medley/scripts
Frank Halasz a4b9099b80 Extensive loadup scripts revamp (#2111)
This PR is an extensive revamp of the loadup scripts including the following changes:

New omnibus script scripts/loadup which is meant to be the single interface to the loadup system. The man page for this script can be found here: https://online.interlisp.org/downloads/man_loadup.html

The new loadup script allows you to restart the loadup process from any particular stage - init, mid, lisp, full, etc. For example, you can start the loadup from an existing init-mid.sysout and have it run thru creating the full.sysout. The call for this would be: ./scripts/loadup --target full --start mid. (See man page for all options to the loadup script as well as examples of their use.)

In order to facilitate this target/start feature, the loadup workdir has been moved to a single location per MEDLEYDIR, specifically to MEDLEDIR/loadups/build. (Previously, it was different for every invocation in /tmp/loadups-$$)

When restarting the loadup from, say, lisp.sysout, the script will look for the lisp.sysout to start from first in MEDLEYDIR/loadups and then in MEDLEYDIR/loadups/build. If the starting sysout is found in loadups, it will be copied (non-versioned) into the workdir before doing the loadup, overwriting whatever is already there.

There is now a lock (MEDLEYDIR/loadups/build/lock) that prevents concurrent loadups from running (and very occassionally needs to be manually removed).

At successful completion of a loadup run, the created .sysouts and other files are moved into the loadups directory as before (unless the --nocopy option is specified). BUT the build files - including the dribble files - are left in the working directory (i.e., in loadups/build)

The loadup script now supersedes the former loadup-all.sh, loadup-full.sh and loadup-db.sh scripts. But I have left in their place scripts that call the new loadup script with the right options. loadup-all.sh is now just a link to the single loadup script, who's options are (hopefully) a superset of loadup-all.sh.

All of the worker scripts (e.g., loadup-full-from-lisp.sh) have been updated to use better mechanisms to catch and report errors, including the new (LOGOUT T EXITCODE) feature. The main script has been updated to better catch errors in these worker scripts when they do happen.

You can now specify a MAIKODIR for the loadup, either using the MAIKODIR env variable or thru the --maikodir command line option.

All of the loadup scripts have been moved down one level into scripts/loadups. But there are links from the scripts/ directory into the scripts/loadups directory for all of the top-level legacy scripts - loadup-all.sh, loadup-db.sh, loadup-full.sh so that you do not have to change your own scripts unless you need to use some of the new features. More importantly, none of the github workflows need to change right now.

The SYSOUTCOMMITS mechanism had to be changed since there is no guarantee that e.g., lisp.sysout and full.sysout are built on the same commit. So (ASSOC 'MEDLEY SYSOUTCOMMITS) now returns an assoc list of sysouts, e.g., ((INIT "aaa")(LISP "bbb")(FULL "ccc")(APPS "ddd")), showing the commits for the various layers of the loadup.

The new loadup scheme allows different sysouts to be created from different commits, so there is an issue with RDSYS (and RDSYS.LCOM) being out of sync with one or more of the sysout in loadups. RDSYS(.LCOM) are copied into library when ever a loadup of the Init stage completes successfully (unless the -nocopy option is specified). The only way to solve this issue when it arises is to do a complete loadup from starter.sysout to full.sysout (or apps.sysout) to ensure evrything is built on the same commit.
2025-04-26 16:24:04 -07:00
..
2024-03-19 21:24:35 -07:00
2025-04-26 16:24:04 -07:00
2023-08-04 12:29:40 -07:00

The Medley scripts directory

doing different kinds of "load ups"

Loading from an old 'starter' sysout

  • loadup-init.sh -- phase 1 (create init.dlinit)
  • loadup-mid-from-init.sh -- phase 2 (creates init.sysout)
  • loadup-lisp-from-mid.sh -- phase 3 (creates lisp.sysout)
  • loadup-full-from-lisp.sh -- phase 4 (creates full.sysout)
  • loadup-apps-from-full.sh -- phase 5 (creates app.sysout, with notecards, rooms and clos; optional)
  • loadup-aux.sh -- phase 6 (creates exports.all whereis.hash)
  • loadup-db-from-full.sh -- phase 7 (makes unreleased 'fuller.sysout' and fuller.database)

All of these scripts read from and write to a directory specified by the env variable LOADUP_WORKDIR. LOADUP_WORKDIR defaults to /tmp/loadups-(where is the PID of the script). Note that all /tmp files are cleared after 10 days or upon system reboot. You can replicate the old work directory scheme where files were never deleted automatically by simply setting LOADUP_WORKDIR to "./tmp"

  • loadup-all.sh [-apps] -- Phases 1-4 & 6 (plus Phase 5 with -apps flag)
  • loadup-db.sh -- phase 7 only based on full.syout in loadup directory

These two scripts call the 7 scripts above as specified and then (if successful) copy (ln) the results to the loadups directory using a versioned copy. The files are hardlinked into loadups from the workdir if workdir and loadups are on the same filesystem, otherwise they are copied.

  • loadup-full.sh -- Phases 1-4 only, no copy into loadups at the end.

releases

  • release-medley.sh -- will create Medley release tars and upload as a release on github.
    Arguments: -d to make a draft release. <Tag> to use as a tag for this release on github (defaults to meldey-<date>-<seconds since epoch>). Both are optional.

  • release-make-tars.sh -- will create the Medley release tars and store them in the releases directory.

possibly handy scripts

  • lsee -- show lisp file with font-control-characters rendered as linux color changes
  • cpv file1 file2 -- hardlinks (or copies) file1 to file2 (or directory name) adding versions choice of hardlink or copy depends on whether the files are on the same filesystem.
  • restore-versions.sh -- pulls out old versions from git history and links in with medley versioning conventions

Not useful anymore

  • eolconv.sh -- convert CR to LF and delete font control characters (use lsee)
  • install-diff-filter.sh -- installed eolconv.sh as a filter before using github diff (use Lisp GitFns instead)
  • fixlinks & fixlinks.aux -- put back hardlinks between file and file.NN where NN is highest version (restore-versions does this)