From c8159bb8472d4ad4b9b2f81800d0e76a8bc1bc8f Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 08:15:36 -0500 Subject: [PATCH 1/7] Remove svn-specific administration scripts --- admin/README.md | 16 +- admin/checkout-all.sh | 131 ----------- admin/cvs2svn-smlnj.options | 426 ---------------------------------- admin/freeze-as.sh | 40 ---- admin/stat-all.sh | 32 --- admin/svn-upgrade-all.sh | 39 ---- admin/switch-all-svn-https.sh | 32 --- 7 files changed, 1 insertion(+), 715 deletions(-) delete mode 100755 admin/checkout-all.sh delete mode 100644 admin/cvs2svn-smlnj.options delete mode 100755 admin/freeze-as.sh delete mode 100755 admin/stat-all.sh delete mode 100755 admin/svn-upgrade-all.sh delete mode 100755 admin/switch-all-svn-https.sh diff --git a/admin/README.md b/admin/README.md index 38375775..1527da96 100644 --- a/admin/README.md +++ b/admin/README.md @@ -5,25 +5,11 @@ of the SML/NJ svn repository (and working copies). README.md -- this file - build-tar-files.sh -- script to export sources from the svn repository + build-tar-files.sh -- script to export sources from the git repository and then build zipped tar files for a distribution - checkout-all.sh -- script to checkout all of the sources from the - repository; use the `-e` option to specify the - **export** command to svn. - - cvs2svn-smlnj.options - - freeze-as.sh - make-release.sh -- tags sources with a release number refresh-all.sh -- refresh all of the sources - stat-all.sh -- run `svn status` on all of the sources - - svn-upgrade-all.sh -- run `svn upgrade` on all of the sources - - switch-all-svn-https.sh - zip-bin-lib.sh diff --git a/admin/checkout-all.sh b/admin/checkout-all.sh deleted file mode 100755 index 3d7d194f..00000000 --- a/admin/checkout-all.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh -# -# COPYRIGHT (c) 2020 The Fellowship of SML/NJ (http://www.smlnj.org) -# All rights reserved. -# -# Script to checkout a fresh copy of the SML/NJ sources. -# -# Usage: -# admin/checkout-all.sh [options] [dir] -# -# The options are -# -# -e, --export -- use "svn export" instead of "svn checkout" -# -r ARG -- use ARG as the checkout revision -# --release ARG -- checkout a release that was created with make-release.sh -# --force -- overwrite existing source trees -# - -command=checkout -revision="" -release="" -force=no - -usage() { - echo "usage: checkout-all.sh [-e | --export] [-r ARG | --revision ARG] [--release ARG] [dir]" - exit $1 -} - -while [ $# -ge 1 ] ; do - case $1 in - --export|-e) - command=export - ;; - --revision|-r) - shift - if [ $# -ge 1 ] ; then - revision="-r $1" - else - usage 1 - fi - ;; - --release) - shift - if [ $# -ge 1 ] ; then - release="releases/release-$1" - else - usage 1 - fi - ;; - --help|-h) usage 0 - ;; - --force) - force=yes - ;; - -*) usage 1 - ;; - esac - shift -done - -if [ x"$release" != x -a x"$revision" != x ] ; then - echo "checkout-all.sh: cannot specify both a release and revision" - exit 1 -fi - -if [ $# -ge 1 ] ; then - mkdir $1 - cd $1 -fi - -# default release is the trunk -# -if [ x"$release" = x ] ; then - release="trunk" -fi - -gf=https://smlnj-gforge.cs.uchicago.edu/svn -smlnj=$gf/smlnj - -# checkout source target -checkout(){ - source=$1/$release - target=$2 - if [ ! -d $target ] ; then - echo "svn $command $revision $source $target" - svn $command $revision $source $target - elif [ $force = yes ] ; then - echo Replacing existing $target tree - rm -rf $target - echo "svn $command $revision $source $target" - svn $command $revision $source $target - else - echo Tree $target already exists. - fi -} - -# checkout from smlnj tree -smlnj(){ - checkout $smlnj/$1 $1 -} - -smlnjbase(){ - checkout $smlnj/$1 $2 -} - -smlnj config -smlnjbase sml base -smlnj smlnj-lib -smlnj MLRISC -smlnj ml-yacc -smlnj trace-debug-profile -smlnj pgraph - -smlnj ckit -smlnj cml -smlnj eXene -smlnj smlnj-c -smlnj ml-burg -smlnj ml-lex -smlnj heap2asm -smlnj nlffi - -smlnj doc - -# the following do not get tagged releases, so we fallback to regular -# behavior -release="trunk" -revision="" -checkout $gf/asdl asdl -checkout $gf/ml-lpt ml-lpt -checkout $gf/smldoc smldoc diff --git a/admin/cvs2svn-smlnj.options b/admin/cvs2svn-smlnj.options deleted file mode 100644 index 6c45ccf6..00000000 --- a/admin/cvs2svn-smlnj.options +++ /dev/null @@ -1,426 +0,0 @@ -# (Be in -*- python -*- mode.) -# -# ==================================================================== -# Copyright (c) 2006 CollabNet. All rights reserved. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at http://subversion.tigris.org/license-1.html. -# If newer versions of this license are posted there, you may use a -# newer version instead, at your option. -# -# This software consists of voluntary contributions made by many -# individuals. For exact contribution history, see the revision -# history and logs, available at http://cvs2svn.tigris.org/. -# ==================================================================== - -# An options file like this can be used to configure cvs2svn. The -# file is in Python syntax, but you don't need to know Python to -# modify it. But if you *do* know Python, then you will be happy to -# know that you can use arbitary Python constructs to do fancy -# configuration tricks. - -# Two identifiers will have been defined before this file is executed, -# and can be used freely within this file: -# -# ctx -- a Ctx object (see cvs2svn_lib/context.py), which holds -# many configuration options -# -# run_options -- an instance of the OptionsFileRunOptions class -# (see cvs2svn_lib/run_options.py), which holds some variables -# governing how cvs2svn is run - - -# Import some modules that are used in setting the options: -import re - -from cvs2svn_lib.boolean import * -from cvs2svn_lib import config -from cvs2svn_lib.log import Log -from cvs2svn_lib.project import Project -from cvs2svn_lib.output_option import DumpfileOutputOption -from cvs2svn_lib.output_option import ExistingRepositoryOutputOption -from cvs2svn_lib.output_option import NewRepositoryOutputOption -from cvs2svn_lib.symbol_strategy import AllBranchRule -from cvs2svn_lib.symbol_strategy import AllTagRule -from cvs2svn_lib.symbol_strategy import BranchIfCommitsRule -from cvs2svn_lib.symbol_strategy import ExcludeRegexpStrategyRule -from cvs2svn_lib.symbol_strategy import ForceBranchRegexpStrategyRule -from cvs2svn_lib.symbol_strategy import ForceTagRegexpStrategyRule -from cvs2svn_lib.symbol_strategy import HeuristicStrategyRule -from cvs2svn_lib.symbol_strategy import RuleBasedSymbolStrategy -from cvs2svn_lib.symbol_strategy import UnambiguousUsageRule -from cvs2svn_lib.symbol_transform import RegexpSymbolTransform -from cvs2svn_lib.property_setters import AutoPropsPropertySetter -from cvs2svn_lib.property_setters import BinaryFileDefaultMimeTypeSetter -from cvs2svn_lib.property_setters import BinaryFileEOLStyleSetter -from cvs2svn_lib.property_setters import CVSRevisionNumberSetter -from cvs2svn_lib.property_setters import DefaultEOLStyleSetter -from cvs2svn_lib.property_setters import EOLStyleFromMimeTypeSetter -from cvs2svn_lib.property_setters import ExecutablePropertySetter -from cvs2svn_lib.property_setters import KeywordsPropertySetter -from cvs2svn_lib.property_setters import MimeMapper - - -# To choose the level of logging output, uncomment one of the -# following lines: -#Log().log_level = Log.WARN -#Log().log_level = Log.QUIET -Log().log_level = Log.NORMAL -#Log().log_level = Log.VERBOSE - - -# There are several possible options for where to put the output of a -# cvs2svn conversion. Please choose one of the following and adjust -# the parameters as necessary: - -# Use this output option if you would like cvs2svn to create a new SVN -# repository and store the converted repository there. The first -# argument is the path to which the repository should be written (this -# repository must not already exist). The second (optional) argument -# allows a --fs-type option to be passed to "svnadmin create". The -# third (optional) argument can be specified to set the -# --bdb-txn-nosync option on a bdb repository: -ctx.output_option = NewRepositoryOutputOption( - 'smlnj-svn-sml', # Path to repository - #fs_type='fsfs', # Type of repository to create - #bdb_txn_nosync=False, # For bsd repositories, this option can be added - ) - -# Use this output option if you would like cvs2svn to store the -# converted CVS repository into an SVN repository that already exists. -# The argument is the filesystem path of an existing local SVN -# repository (this repository must already exist): -#ctx.output_option = ExistingRepositoryOutputOption( -# 'svnrepo', # Path to repository -# ) - -# Use this type of output option if you want the output of the -# conversion to be written to a SVN dumpfile instead of committing -# them into an actual repository: -#ctx.output_option = DumpfileOutputOption( -# dumpfile_path='cvs2svn-dump', # Name of dumpfile to create -# ) - - -# Independent of the ctx.output_option selected, the following option -# can be set to True to suppress cvs2svn output altogether: -ctx.dry_run = False - -# Change the following if cvs2svn should use "cvs" to read file -# versions out of *,v files. (The default is to use "co", which is -# part of RCS, and is much faster): -ctx.use_cvs = False - -# Set the name (and optionally the path) of some executables required -# by cvs2svn. 'co' is needed by default; 'cvs' is needed if -# ctx.use_cvs is set to True: -ctx.svnadmin_executable = 'svnadmin' -ctx.co_executable = 'co' -ctx.cvs_executable = 'cvs' -ctx.sort_executable = 'sort' - -# Change the following line to True if the conversion should only -# include the trunk of the repository (i.e., all branches and tags -# should be ignored): -ctx.trunk_only = False - -# Change the following line to True if cvs2svn should delete a -# directory once the last file has been deleted from it: -ctx.prune = True - -# A list of encodings that should be tried when converting filenames, -# author names, log messages, etc. to UTF8. The encoders are tried in -# order in 'strict' mode until one of them succeeds. If none -# succeeds, then ctx.fallback_encoding is used in lossy 'replace' mode -# (if it is configured): -ctx.encoding = [ - #'latin1', - 'ascii', - ] - -# The encoding to use if all of the encodings listed in ctx.encoding -# fail. This encoding is used in 'replace' mode, which always -# succeeds but can cause information loss. To enable this feature, -# set the following value to the name of the desired encoding (e.g., -# 'ascii'). -ctx.fallback_encoding = None - -# The basic strategy for converting symbols (this should usually be -# left unchanged). A CVS symbol might be used as a tag in one file -# and as a branch in another file. The purpose of ctx.symbol_strategy -# is to determine whether to convert a particular symbol as a tag or -# as a branch. - -# A RuleBasedSymbolStrategy decides about each symbol based on a list -# of rules. Rules can be added to this object. The rules are tried -# one by one in order; the first rule that matches a given symbol is -# used. It is a fatal error if no rule matches a symbol. -ctx.symbol_strategy = RuleBasedSymbolStrategy() - -# To force all symbols matching a regular expression to be converted -# as branches, add rules like the following: -#ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('branch.*')) - -# retain certain branches -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('blume-private-devel')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('shao-private-devel')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('idlbasis-devel')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('primop-branch-2')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('primop-branch')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('dbm-branch-2005_09_20')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('dbmdev1-branch')) - -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('SMLNJ')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('smlnj')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('FLINT')) -ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule('ckit')) - -# To force all symbols matching a regular expression to be converted -# as tags, add rules like the following: -#ctx.symbol_strategy.add_rule(ForceTagRegexpStrategyRule('tag.*')) - -# tag releases -ctx.symbol_strategy.add_rule(ForceTagRegexpStrategyRule('release-.*')) - -# To force all symbols matching a regular expression to be excluded -# from the conversion, add rules like the following: -#ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('unknown-.*')) - -# exclude everything else -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('[a-z][a-z]*-[0-9][0-9]*-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume-head-tmp')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume-orig-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('fang-shao-devel')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('fang-shao-devel')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('saha-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('flint-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('league-devel')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume2001.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('leunga-110_.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume-110_.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('mcz-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('Root2-mcz')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('Release_.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('v[0-9].*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('.*root.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('.*tmp.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('sml-mode-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('softs')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('start')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('.*export.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('Version.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('unlabeled.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('local.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume_.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('MJM')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('pre.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('lal-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('home-.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('b1.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume-private-com.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('blume-Release_.*')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('debruijn')) -ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('release-110.8')) - -#ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('smlnj')) -#ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('FLINT')) -#ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('SMLNJ')) -#ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('ckit')) - -# Usually you want this rule, to convert unambiguous symbols (symbols -# that were only ever used as tags or only ever used as branches in -# CVS) the same way they were used in CVS: -#ctx.symbol_strategy.add_rule(UnambiguousUsageRule()) - -# If there was ever a commit on a symbol, then it cannot be converted -# as a tag. Uncomment the following line to convert such symbols -# automatically as branches: -#ctx.symbol_strategy.add_rule(BranchIfCommitsRule()) - -# Last in the list can be a catch-all rule that is used for symbols -# that were not matched by any of the more specific rules above. -# Include at most one of these lines. If none of these are included, -# then the presence of any ambiguous symbols (that haven't been -# disambiguated above) is an error: - -# Convert all ambiguous symbols as branches: -#ctx.symbol_strategy.add_rule(AllBranchRule()) -# Convert all ambiguous symbols as tags: -#ctx.symbol_strategy.add_rule(AllTagRule()) -# Convert ambiguous symbols based on whether they were used more -# often as branches or tags: -#ctx.symbol_strategy.add_rule(HeuristicStrategyRule()) - -# Specify a username to be used for commits generated by cvs2svn. If this options is set to None then no username will be used for such commits: -ctx.username = None -#ctx.username = 'cvs2svn' - -# ctx.svn_property_setters contains a list of rules used to set the -# svn properties on files in the converted archive. For each file, -# the rules are tried one by one. Any rule can add or suppress one or -# more svn properties. Typically the rules will not overwrite -# properties set by a previous rule (though they are free to do so). -ctx.svn_property_setters = [ - # Set the svn:executable flag on any files that are marked in CVS as - # being executable: - ExecutablePropertySetter(), - - # Omit the svn:eol-style property from any files that are listed as - # binary in CVS: - BinaryFileEOLStyleSetter(), - - # To read mime types from a file, uncomment the following line and - # specify a filename: - #MimeMapper('/etc/mime.types'), - MimeMapper('/etc/httpd/mime.types'), - - # To read auto-props rules from a file, uncomment the following line - # and specify a filename. The boolean argument specifies whether - # case should be ignored when matching filenames to the filename - # patterns found in the auto-props file: - #AutoPropsPropertySetter( - # '/home/username/.subversion/config', - # False, - # ), - - # If the file is binary and its svn:mime-type property is not yet - # set, set svn:mime-type to 'application/octet-stream'. - BinaryFileDefaultMimeTypeSetter(), - - # To try to determine the eol-style from the mime type, uncomment - # the following line: - #EOLStyleFromMimeTypeSetter(), - - # Choose one of the following lines to set the default svn:eol-style - # if none of the above rules applied. The argument is the - # svn:eol-style that should be applied, or None if no svn:eol-style - # should be set. - #DefaultEOLStyleSetter(None) - DefaultEOLStyleSetter('native'), - - # If svn:keywords has not been set yet, set it based on the file's - # CVS mode: - KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE), - - # Uncomment the following line to include the original CVS revision - # numbers as file properties in the SVN archive: - #CVSRevisionNumberSetter(), - - ] - -# The directory to use for temporary files: -ctx.tmpdir = 'tmp' - -# To skip the cleanup of temporary files, uncomment the following -# option: -#ctx.skip_cleanup = True - -# To prevent CVS commits from different projects from being merged -# into single SVN commits, change this option to False: -ctx.cross_project_commits = True - -# Now use stanzas like the following to define CVS projects that -# should be converted. The arguments are: -# -# - The filesystem path of the project within the CVS repository. -# -# - The path that should be used for the "trunk" directory of this -# project within the SVN repository. -# -# - The path that should be used for the "branches" directory of this -# project within the SVN repository. -# -# - The path that should be used for the "tags" directory of this -# project within the SVN repository. -# -# - A list of symbol transformations that can be used to rename -# symbols in this project. Each entry is a tuple (pattern, -# replacement), where pattern is a Python regular expression pattern -# and replacement is the text that should replace the pattern. Each -# pattern is matched against each symbol name. If the pattern -# matches, then it is replaced with the corresponding replacement -# text. The replacement can include substitution patterns (e.g., -# r'\1' or r'\g'). Typically you will want to use raw strings -# (strings with a preceding 'r', like shown in the examples) for the -# regexp and its replacement to avoid backslash substitution within -# those strings.""" - -# Create the default project (using ctx.trunk, ctx.branches, and ctx.tags): -ctx.add_project( - Project( - 'sf-cvsrepos/sml', - 'sml/trunk', - 'sml/branches', - 'sml/releases', - symbol_transforms=[ - RegexpSymbolTransform(r'^Release_110_8$', - r'unlabeled-110.8-throwaway'), - RegexpSymbolTransform(r'^Release_(\d+)_(\d+)$', - r'release-\1.\2'), - #RegexpSymbolTransform(r'^release-(\d+)_(\d+)$', - # r'release-\1.\2'), - #RegexpSymbolTransform(r'^release-(\d+)_(\d+)_(\d+)$', - # r'release-\1.\2.\3'), - ], - ) - ) - -ctx.add_project( - Project( - 'sf-cvsrepos/pages', - 'pages/trunk', - 'pages/branches', - 'pages/releases', - symbol_transforms=[ - RegexpSymbolTransform(r'^Release_110_8$', - r'unlabeled-110.8-throwaway'), - RegexpSymbolTransform(r'^Release_(\d+)_(\d+)$', - r'release-\1.\2'), - #RegexpSymbolTransform(r'^release-(\d+)_(\d+)$', - # r'release-\1.\2'), - #RegexpSymbolTransform(r'^release-(\d+)_(\d+)_(\d+)$', - # r'release-\1.\2.\3'), - ], - ) - ) - -ctx.add_project( - Project( - 'sf-cvsrepos/bugs', - 'bugs/trunk', - 'bugs/branches', - 'bugs/releases', - symbol_transforms=[ - RegexpSymbolTransform(r'^Release_110_8$', - r'unlabeled-110.8-throwaway'), - RegexpSymbolTransform(r'^Release_(\d+)_(\d+)$', - r'release-\1.\2'), - #RegexpSymbolTransform(r'^release-(\d+)_(\d+)$', - # r'release-\1.\2'), - #RegexpSymbolTransform(r'^release-(\d+)_(\d+)_(\d+)$', - # r'release-\1.\2.\3'), - ], - ) - ) - -# Add a second project, to be stored to projA/trunk, projA/branches, -# and projA/tags: -#ctx.add_project( -# Project( -# 'my/cvsrepo/projA', -# 'projA/trunk', -# 'projA/branches', -# 'projA/tags', -# symbol_transforms=[ -# #RegexpSymbolTransform(r'^release-(\d+)_(\d+)$', -# # r'release-\1.\2'), -# #RegexpSymbolTransform(r'^release-(\d+)_(\d+)_(\d+)$', -# # r'release-\1.\2.\3'), -# ], -# ) -# ) - -# Change this option to True to turn on profiling of cvs2svn (for -# debugging purposes): -run_options.profiling = False diff --git a/admin/freeze-as.sh b/admin/freeze-as.sh deleted file mode 100755 index 52c0d1f8..00000000 --- a/admin/freeze-as.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -propfile=`mktemp /tmp/propXXXXX` -trap 'rm -f ${propfile}' 0 1 2 3 15 - -revisionOf(){ - svn info $1 | grep '^Revision:' | sed 's/^Revision:[ \t]*\([0-9]*\)$/\1/' -} - -procPropLine(){ - while read f1 f2 f3 ; do - if [ x$f1 != x ] ; then - case $f2 in - -r*) - echo $f1 $f2 $f3 - ;; - *) - rev=`revisionOf $f2` - echo $f1 -r${rev} $f2 - ;; - esac - fi - done -} - -if [ $# != 2 ] ; then - echo usage: $0 from to - exit 1 -fi - -fromdir="$1" -todir="$2" - -svn cp $fromdir $todir - -svn propget svn:externals $fromdir | procPropLine >$propfile - -svn propset svn:externals --file $propfile --quiet $todir - -exit 0 diff --git a/admin/stat-all.sh b/admin/stat-all.sh deleted file mode 100755 index e3ccc096..00000000 --- a/admin/stat-all.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# COPYRIGHT (c) 2017 The Fellowship of SML/NJ (http://www.smlnj.org) -# All rights reserved. -# -# Script to check the svn status of the various working copies -# -# Usage: admin/stat-all.sh [-q] -# - -QUIET="" -if [ $# -gt 2 ] ; then - usage -elif [ x"$1" = "x-q" ] ; then - QUIET=-q -elif [ $# -eq 1 ] ; then - usage -fi - -here=`pwd` - -for tree in admin config base smlnj-lib MLRISC ml-yacc trace-debug-profile pgraph \ - ckit cml eXene smlnj-c ml-burg ml-lex heap2asm nlffi \ - ml-lpt doc asdl smldoc -do - if [ -d $tree -a -d $tree/.svn ] ; then - echo Checking ${tree}... - cd $tree - svn status $QUIET - cd $here - fi -done diff --git a/admin/svn-upgrade-all.sh b/admin/svn-upgrade-all.sh deleted file mode 100755 index f1046ed8..00000000 --- a/admin/svn-upgrade-all.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# Script to run "svn update" on all of the repositories of a normal SML/NJ -# checkout (e.g., one from admin/checkout-all.sh). -# -# usage: admin/svn-upgrade-all.sh -# - -# checkout source target -upgrade() { - if [ -d $1 ] ; then - echo "checking $1 for upgrade" - svn upgrade $1 - fi -} - -upgrade admin -upgrade config -upgrade base -upgrade smlnj-lib -upgrade MLRISC -upgrade ml-yacc -upgrade trace-debug-profile -upgrade pgraph - -upgrade ckit -upgrade cml -upgrade eXene -upgrade smlnj-c -upgrade ml-burg -upgrade ml-lex -upgrade heap2asm -upgrade nlffi - -upgrade asdl -upgrade ml-lpt -upgrade smldoc - -upgrade doc diff --git a/admin/switch-all-svn-https.sh b/admin/switch-all-svn-https.sh deleted file mode 100755 index 102ccb5e..00000000 --- a/admin/switch-all-svn-https.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -r=`pwd` - -switchone(){ - d=$1 - u=`svn info | grep '^URL:' | sed 's/URL: //'` - case $u in - svn://smlnj-gforge*) - n=`echo $u | sed 's/svn:\/\/smlnj-gforge\.cs\.uchicago\.edu/https:\/\/smlnj-gforge\.cs\.uchicago\.edu\/svn/'` - echo $d '->' $n - svn switch --relocate $u $n - ;; - *) - echo Will not switch $d "($u)". - ;; - esac -} - -if [ -d .svn ] ; then - switchone . -else - for d in * ; do - if [ -d $d/.svn ] ; then - cd $d - switchone $d - cd $r - fi - done -fi - -exit 0 From e25d8a665c6995bdb3c7e6b474be73ada01aa613 Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 08:15:52 -0500 Subject: [PATCH 2/7] Create a complete release tarball --- admin/build-tar-files.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/build-tar-files.sh b/admin/build-tar-files.sh index ae1b4988..f76282d1 100755 --- a/admin/build-tar-files.sh +++ b/admin/build-tar-files.sh @@ -78,10 +78,16 @@ rm -rf autom4te.cache ./configure # # generate the documentation into $here/doc/doc -@ +# make doc || exit 1 # # build tar file of generated documentation # tar -czf $here/doc.tgz doc +# TODO: Add boot files +tar -cf "$here/smlnj.tar" -C "$here" "doc" +for d in $dirs; do tar -uf "$here/smlnj.tar" -C "$here" "$d"; done +for d in $base_dirs; do tar -rf "$here/smlnj.tar" -C "$here" "base/$d"; done +gzip --stdout "$here/smlnj.tar" > "$here/smlnj.tgz" +rm -f "$here/smlnj.tar" From ef7c8332ccdb3849cc66e770ed8df750776dcc34 Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 10:08:43 -0500 Subject: [PATCH 3/7] Fixed Makefile rule for doc --- doc/src/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Makefile.in b/doc/src/Makefile.in index ac81f9a0..7cf327ae 100644 --- a/doc/src/Makefile.in +++ b/doc/src/Makefile.in @@ -105,7 +105,7 @@ readmes: # .PHONY: smlnj-lib-doc smlnj-lib-doc: links smlnj-lib/configure - (cd smlnj-lib && configure \ + (cd smlnj-lib && ./configure \ --with-smlnj-root="@ROOT_DIR@/.." \ --with-output-dir="$(HTML_DST_ROOT)/smlnj-lib" \ --with-version="@SMLNJ_VERSION@" \ From 69a1dd86a0ed7139fc75c7f80f82f32e16976b62 Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 10:19:02 -0500 Subject: [PATCH 4/7] Clone the current checkout --- admin/build-tar-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/build-tar-files.sh b/admin/build-tar-files.sh index f76282d1..5c37dc34 100755 --- a/admin/build-tar-files.sh +++ b/admin/build-tar-files.sh @@ -10,7 +10,7 @@ set +x # export all source files into the smlnj directory # -git clone git@github.com:smlnj/legacy.git smlnj +git clone . smlnj cd smlnj here=`pwd` From b41cb7530cd2bf2dc4691720769bb49bb0deecc2 Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 10:54:20 -0500 Subject: [PATCH 5/7] Guard build-tar-files.sh script --- admin/build-tar-files.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/build-tar-files.sh b/admin/build-tar-files.sh index 5c37dc34..57852f68 100755 --- a/admin/build-tar-files.sh +++ b/admin/build-tar-files.sh @@ -11,8 +11,8 @@ set +x # export all source files into the smlnj directory # git clone . smlnj -cd smlnj -here=`pwd` +cd smlnj || exit 1 +here="$(pwd)" # cleanup stuff that shouldn't be in the release # @@ -43,17 +43,17 @@ for d in $dirs ; do # case $d in asdl) - cd asdl + cd asdl || exit 1 autoheader -Iconfig autoconf -Iconfig rm -rf autom4te.cache - cd $here + cd "$here" || exit 1 ;; esac # # build the tarball # - tar -czf $here/$d.tgz $d + tar -czf "$here/$d.tgz" "$d" done base_dirs="\ @@ -64,15 +64,15 @@ base_dirs="\ old-basis \ " -cd $here/base -for d in $base_dirs ; do - tar -czf $here/$d.tgz $d +cd "$here/base" || exit 1 +for d in $base_dirs; do + tar -czf "$here/$d.tgz" "$d" done # building the documentation requires configuring it and then generating the manual pages # and HTML files # -cd $here/doc +cd "$here/doc" || exit 1 autoconf -Iconfig || exit 1 rm -rf autom4te.cache ./configure @@ -83,7 +83,7 @@ make doc || exit 1 # # build tar file of generated documentation # -tar -czf $here/doc.tgz doc +tar -czf "$here/doc.tgz" doc # TODO: Add boot files tar -cf "$here/smlnj.tar" -C "$here" "doc" From cdda9b8b88cf02b22f03c4c48f267cfc697d2737 Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 10:24:53 -0500 Subject: [PATCH 6/7] Remove bashisms to enable scripts to run with /bin/sh --- admin/make-release.sh | 4 +- admin/prepare-release.sh | 86 ++++++++++++++++++++-------------------- admin/refresh-all.sh | 2 +- admin/zip-bin-lib.sh | 4 +- 4 files changed, 47 insertions(+), 49 deletions(-) diff --git a/admin/make-release.sh b/admin/make-release.sh index 74d6c9ae..4f125acf 100755 --- a/admin/make-release.sh +++ b/admin/make-release.sh @@ -7,7 +7,7 @@ # if [ $# -lt 1 ] ; then - echo Usage: $0 '' + echo "Usage: $0 " exit 1 fi @@ -15,5 +15,5 @@ relno=$1 reltag="v"$relno git pull || exit 1 -git tag -a -m "tag release $relno" $reltag || exit 1 +git tag -a -m "tag release $relno" "$reltag" || exit 1 git push || exit 1 diff --git a/admin/prepare-release.sh b/admin/prepare-release.sh index 12aa3c76..ffe6d266 100755 --- a/admin/prepare-release.sh +++ b/admin/prepare-release.sh @@ -12,28 +12,28 @@ # THIS=$0 -HERE=`pwd` +HERE="$(pwd)" -function usage { +usage() { echo "usage: admin/prepare-release.sh [-d ] " exit 1 } -function error_local_changes { +error_local_changes() { echo "$THIS: !!!There are local changes in your repository that need to be pushed." echo "git status" git status exit 1 } -if [ ! -x ./admin/prepare-release.sh ] ; then +if ! [ -x ./admin/prepare-release.sh ] ; then echo "$THIS: !!! must run this script from root of SML/NJ tree" exit 1 fi # get the DATE and VERSION for the release # -if [ x"$1" = x-d ] ; then +if [ "$1" = -d ] ; then if [ $# -ne 3 ] ; then usage fi @@ -42,13 +42,13 @@ if [ x"$1" = x-d ] ; then elif [ $# -ne 1 ] ; then usage else - DATE=`date +"%B %d, %Y"` + DATE="$(date +"%B %d, %Y")" VERSION=$1 fi # the log file # -LOG=$HERE/LOG-$VERSION +LOG="$HERE/LOG-$VERSION" # determine the size of the installed version of SML that we are going to # use to build the release. @@ -66,75 +66,73 @@ fi # function to compile to fixed point and build an installation from # the compiled code. This corresponds to steps 2 -- 6 in the guide. # -function build_from_fixpt { +build_from_fixpt() { # compile to a fixed point echo "compiling to a fixed point ..." - echo "***** cd base/system" >> $LOG - cd base/system - echo "***** ./fixpt $SZ_OPT" >> $LOG - ./fixpt $SZ_OPT >> $LOG 2>&1 || exit 1 + echo "***** cd base/system" >> "$LOG" + cd base/system || exit 1 + echo "***** ./fixpt $SZ_OPT" >> "$LOG" + ./fixpt "$SZ_OPT" >> "$LOG" 2>&1 || exit 1 # makeml echo "makeml ..." - echo "***** ./makeml $SZ_OPT" >> $LOG - ./makeml $SZ_OPT >> $LOG 2>&1 || exit 1 + echo "***** ./makeml $SZ_OPT" >> "$LOG" + ./makeml "$SZ_OPT" >> "$LOG" 2>&1 || exit 1 # installml echo "installml ..." - echo "***** ./installml $SZ_OPT -clean" >> $LOG - ./installml $SZ_OPT -clean >> $LOG 2>&1 || exit 1 + echo "***** ./installml $SZ_OPT -clean" >> "$LOG" + ./installml "$SZ_OPT" -clean >> "$LOG" 2>&1 || exit 1 # install.sh echo "config/install.sh ..." - echo "***** cd $HERE" >> $LOG - cd $HERE - echo "***** ./config/install.sh $SZ_OPT" >> $LOG - ./config/install.sh $SZ_OPT >> $LOG 2>&1 || exit 1 + echo "***** cd $HERE" >> "$LOG" + cd "$HERE" || exit 1 + echo "***** ./config/install.sh $SZ_OPT" >> "$LOG" + ./config/install.sh "$SZ_OPT" >> "$LOG" 2>&1 || exit 1 } # step 0: check for local changes that have not been added/committed # -git diff --quiet -if [ $? != 0 ] ; then +if ! git diff --quiet; then error_local_changes fi -git diff --cached --quiet -if [ $? != 0 ] ; then +if ! git diff --cached --quiet; then error_local_changes fi # step 1: refresh output # echo "refresh sources ..." -echo "***** git pull" > $LOG -git pull >> $LOG 2>&1 || exit 1 -echo "***** git push" > $LOG -git push >> $LOG 2>&1 || exit 1 +echo "***** git pull" > "$LOG" +git pull >> "$LOG" 2>&1 || exit 1 +echo "***** git push" > "$LOG" +git push >> "$LOG" 2>&1 || exit 1 # steps 2-6 build_from_fixpt # step 7: set version and releasedate echo "set version to $VERSION and releasedate to $DATE" -echo "***** cd config" >> $LOG -cd config -echo "***** echo $VERSION > version" >> $LOG -echo $VERSION > version -echo "***** echo $DATE > releasedate" >> $LOG -echo $DATE > releasedate -echo "***** git commit -a -m \"updating version number to $VERSION\"" >> $LOG -git commit -a -m "updating version number to $VERSION" >> $LOG 2>&1 || exit 1 -echo "***** git push" >> $LOG -git push >> $LOG 2>&1 || exit 1 -echo "***** cd $HERE" >> $LOG -cd $HERE +echo "***** cd config" >> "$LOG" +cd config || exit 1 +echo "***** echo $VERSION > version" >> "$LOG" +echo "$VERSION" > version +echo "***** echo $DATE > releasedate" >> "$LOG" +echo "$DATE" > releasedate +echo "***** git commit -a -m \"updating version number to $VERSION\"" >> "$LOG" +git commit -a -m "updating version number to $VERSION" >> "$LOG" 2>&1 || exit 1 +echo "***** git push" >> "$LOG" +git push >> "$LOG" 2>&1 || exit 1 +echo "***** cd $HERE" >> "$LOG" +cd "$HERE" || exit 1 # step 8: repeat steps 2-6 build_from_fixpt # step 9: cross compile echo "cross compile ..." -echo "***** cd base/system" >> $LOG -cd base/system -echo "***** ./allcross" >> $LOG -./allcross $SZ_OPT >> $LOG 2>&1 || exit 1 +echo "***** cd base/system" >> "$LOG" +cd base/system || exit 1 +echo "***** ./allcross" >> "$LOG" +./allcross "$SZ_OPT" >> "$LOG" 2>&1 || exit 1 diff --git a/admin/refresh-all.sh b/admin/refresh-all.sh index 57c83598..564bd0bc 100755 --- a/admin/refresh-all.sh +++ b/admin/refresh-all.sh @@ -4,7 +4,7 @@ # if [ $# -ge 1 ] ; then - cd $1 + cd "$1" || exit fi git pull diff --git a/admin/zip-bin-lib.sh b/admin/zip-bin-lib.sh index df32fd12..c2b13896 100755 --- a/admin/zip-bin-lib.sh +++ b/admin/zip-bin-lib.sh @@ -3,8 +3,8 @@ target=smlnj.zip if [ $# -gt 0 ] ; then - target=$1 + target="$1" shift fi -zip -A -r ${target} bin lib +zip -A -r "$target" bin lib From d320c8a95e3dfd1f114e2726e2dc8160e1934afe Mon Sep 17 00:00:00 2001 From: ssoss Date: Mon, 18 Aug 2025 10:29:25 -0500 Subject: [PATCH 7/7] Add distribution outputs to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 101045ef..8f54c8ff 100644 --- a/.gitignore +++ b/.gitignore @@ -213,4 +213,6 @@ base/system/smlnj/internal/version.sml osx-dist/smlnj.dst osx-dist/smlnj-*.pkg win-dist/smlnj +/LOG-* +/smlnj