1
0
mirror of synced 2026-01-12 00:42:56 +00:00

10 Commits

Author SHA1 Message Date
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
Frank Halasz
354c7f035a Update all loadup scripts so that 3 things: 1) call subscripts with /bin/sh so that exec bit need not be set on any loadup script, 2) call medley via scripts/medley/medley.command rather than just medley so that the top-level medley symbolic link is not necessary for loadups and 3) no longer require that the loadup scripts run while cwd is MEDLEYDIR and instead determine MEDLEYDIR from where the loadup script is executed from 2024-05-17 23:53:35 -07:00
Frank Halasz
415a698df5
Overhaul of loadup scripts (#1699)
* Make medley.sh and its associated scripts POSIX compliant - i.e., debashify them

* Added config file for medley script, medley now reads from config file and prepends arguemnts from file to the copmmand line arguments

* WIP. Updates to medley.sh scripts.

* WIP.  More on medley.sh and friends update.

* WIP. Medley redo

* WIP.  Debugging new medley scripts

* Renamed medley.sh/medley.command to be medley_main.sh.  Added code to compile single medley.sh/medley.command script by inlining all of the source'd medley_*.sh files.

* Add temp fix for cygwin Issue #1685

* Minor fixup to medley_utils.sh; take debug code out out of run_medley

* Add README to medley directory to explain how to compile medley.sh (medley.command).

* Ooops. This time really adding the README file to the medley directory explaining how to compile medley.sh (medley.command)

* Update loadup- scripts to use updated medley scripts rather than run-medley

* Fix default setting of $config_file in medley_configfile.sh

* Redo medley compile to pick up last commikt

* Fixing how maiko exe is found and sysout argument error processing - both issues discovered testing on MAcOS

* In medley_configfile, replace echo with printf %s because echo - does not work in zsh

* Supress config file on loadups calls to Medley

* Add oldschool support (use original run-medley) to loadup scripts; improve FAILURE detection so loadup-all won't proceed once one of the components fails

* Add in medley_args.sh add -prog as synonym to --maikoprog to aid in loadup scripts; in medley_run.sh script try to get a good exit code for call to maiko, especially useful for loadup scripts

* Run loadup scripts thru shellcheck and update as necessary to make Posix compliant

* Get rid of -nt comparisons in loadup-setup.sh because they are not posix-complaint.  They were not really needed anyway.

* Removing (for now) use of lde exit codes to decide FAILURE case in loadup-setup.sh since exit codes from lde apperar to be inverted on MacOS.

* Update medley man page.  Add - functionality to more args is medley_args.sh

* Compile medley.sh with changes from last commit

* Ooops.  Left medley_args.sh changes out of last commit.  Rectifying here.

* Added support for LDEKEYBOARDTYPE to medley_run to match run-medley

* Add to medley.sh: auto numbered id's and titles with id's inserted

* Cleanup some shellcheck issues in medley_main.sh

* fix maiko args -nh-xxx.  were -nethub-xxxx. In medley_run.sh

* Overhaul handling of pass-on args to manage the quoting issues prevelant in the previous implementation

* Cleanup minor shellcheck issues in medley_*.sh scripts

* Add underscore as character allowed in ids - makes things clearer when id used with +

* Add a self-numbering id to medley calls in loadup scripts

* Put workaround in medley_run.sh for Issue #1702 - issues with sysout arg processing in Maiko

* Oops.  messed up LDESRCSYSOUT in last commit.  should be LDESOURCESYSOUT

* compile medley.sh
2024-05-09 21:31:27 -07:00
Frank Halasz
3ed4d52f53 Remove junk accidently added to loadup-db.sh. Fix CM file in loadup-db-from-full.sh to add internal/loadups to DIRECTORIES so files in this subdir can be analyzed. Add delay into loadup-mid-from-init.sh to make sure timestamp race conditions are avoided. 2023-08-07 22:30:12 -07:00
Frank Halasz
ed6a6e4e04 move all loadups-related source files into internal/loadups; adjust scripts accordingly; move venuesysouts from loadups into internal/venuesysouts; fix issues in .CM files to allow starting loadups-all from any lisp/full.sysout 2023-08-07 12:34:11 -07:00
Frank Halasz
b59e37b703 Remake loadup scripts to not use MEDLEYDIR/tmp as a working dir AND cleanly separate loadup-all from loadup-db; adjust buildLoadup.yml accordingly 2023-07-31 00:42:23 -07:00
Larry Masinter
5fea4e6666
loadup-db.sh fix -- don't rely on loadups (#1035) 2022-12-29 19:11:19 -08:00
Larry Masinter
d5d21397d4
another pass at variable initialization after logout savevm sysout makesys (#1003)
This corrects some errors in the handling of initializing variables across SAVEVM, LOGOUT, SYSOUT and MAKESYS.
This is all now handled by MEDLEY-INIT-VARS (function and variable) which is called as an EVENTFN.
BEFOREMAKESYS (invoked by ENDLOADUP) clears the variables to a default setting (all directories are just {DSK}).
The other "BEFORE" events save away the current values of the variables in MEDLEY-INIT-VARS.

In order to get this to work it was necessary to change a hack for deciding where to find EXPORTS.ALL and WHEREIS.HASH. Now  if you do `./scripts/loadup-all.sh` to make a full, lisp sysouts, exports.all and whereis.hash it will still build the sysouts in tmp/ but will also "link" new versions in loadups (and library for exports.all). This replaces the previous hack scanning the sysout name for "tmp/".
MEDLEY-INIT-VARS had been called both by the AROUNDEXITFN and AFTER*FORMS.
2022-10-25 14:43:57 -07:00
Larry Masinter
2120f5f458 loadup and run-medley script bug fixes 2022-07-16 11:51:58 -07:00
Larry Masinter
32128f5e19
MEDLEY-UILS loadup-db run-medley fixes (#808)
* MEDLEY-UILS loadup-db run-medley fixes

* UNIXCOMM compile to DFASL; only set UTF-8 if getenv(LANG). loadup-db no lisp.virtualmem
2022-06-28 11:45:59 -07:00