$!-----------------------------------------------------------------'f$verify(0) $! SELECT.COM $! $! WASD VMS Web Services, Copyright (C) 1996-2020 Mark G.Daniel. $! This package (all associated programs), comes with ABSOLUTELY NO WARRANTY. $! This is free software, and you are welcome to redistribute it under the $! conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or later version. $! http://www.gnu.org/licenses/gpl.txt $! $! This procedure provides a site UPDATE using a full archive as the source. $! It examines the currently installed package to determine the relationship $! between the site and the archive. It then selectively extracts required $! files to bring the site up to revision. It can be used with full source $! archives as well as the optional object module archives. $! $! Using this procedure requires the following steps: $! $! $ SET DEFAULT WASD_ROOT:[INSTALL] $! $ @SELECT.COM dev:[dir]WASDnnnn.ZIP $! $ @UPDATE $! $! Needless-to-say; this procedure requires modification with each release! $! $ SELECT_VERSION = "11.5.1" !(current version) $ SELECT_ARCHIVE = "WASD1150" $! $ SELECT_VERSION51 = "11.5.1" !(recognised version) $ SELECT_VERSION50 = "11.5.0" !(recognised version) $ SELECT_VERSION45 = "11.4.1" !(recognised version) $ SELECT_VERSION44 = "11.4.0" !(recognised version) $ SELECT_VERSION43 = "11.3.0" !(recognised version) $ SELECT_VERSION42 = "11.2.0" !(recognised version) $ SELECT_VERSION41 = "11.1.1" !(recognised version) $ SELECT_VERSION40 = "11.1.0" !(recognised version) $ SELECT_VERSION39 = "11.0.2" !(recognised version) $ SELECT_VERSION38 = "11.0.1" !(recognised version) $ SELECT_VERSION37 = "11.0.0" !(recognised version) $ SELECT_VERSION36 = "10.4.2" !(recognised version) $ SELECT_VERSION35 = "10.4.1" !(recognised version) $ SELECT_VERSION34 = "10.4.0" !(recognised version) $ SELECT_VERSION33 = "10.3.0" !(recognised version) $ SELECT_VERSION32 = "10.2.0" !(recognised version) $ SELECT_VERSION31 = "10.1.1" !(recognised version) $ SELECT_VERSION30 = "10.1.0" !(recognised version) $ SELECT_VERSION29 = "10.0.3" !(recognised version) $ SELECT_VERSION28 = "10.0.2" !(recognised version) $ SELECT_VERSION27 = "10.0.1" !(recognised version) $ SELECT_VERSION26 = "10.0.0" !(recognised version) $ SELECT_VERSION25 = "9.3.0" !(recognised version) $ SELECT_VERSION24 = "9.2.1" !(recognised version) $ SELECT_VERSION23 = "9.2.0" !(recognised version) $ SELECT_VERSION22 = "9.1.4" !(recognised version) $ SELECT_VERSION21 = "9.1.3" !(recognised version) $ SELECT_VERSION20 = "9.1.2" !(recognised version) $ SELECT_VERSION19 = "9.1.1" !(recognised version) $ SELECT_VERSION18 = "9.1.0" !(recognised version) $ SELECT_VERSION17 = "9.0.1" !(recognised version) $ SELECT_VERSION16 = "9.0.0" !(recognised version) $ SELECT_VERSION15 = "8.5.3" !(recognised version) $ SELECT_VERSION14 = "8.5.2" !(recognised version) $ SELECT_VERSION13 = "8.5.1" !(recognised version) $ SELECT_VERSION12 = "8.5.0" !(recognised version) $ SELECT_VERSION11 = "8.4.4" !(recognised version) $ SELECT_VERSION10 = "8.4.3" !(recognised version) $ SELECT_VERSION9 = "8.4.2" !(recognised version) $ SELECT_VERSION8 = "8.4.1" !(recognised version) $ SELECT_VERSION7 = "8.4.0" !(recognised version) $ SELECT_VERSION6 = "8.3.2" !(recognised version) $ SELECT_VERSION5 = "8.3.1" !(recognised version) $ SELECT_VERSION4 = "8.3.0" !(recognised version) $ SELECT_VERSION3 = "8.2.0" !(recognised version) $ SELECT_VERSION2 = "8.1.1" !(recognised version) $ SELECT_VERSION1 = "8.1.0" !(recognised version) $! $! 30-AUG-2020 MGD v11.5.1, update from 11.5.0, 11.4.n, 11.3.n $! 09-JUL-2020 MGD v11.5.0, update from 11.4.n, 11.3.n $! 27-NOV-2019 MGD v11.4.1, update from 11.4.0, 11.3.0 $! 26-JUN-2019 MGD v11.4.0, update from 11.3.0 $! 23-NOV-2018 MGD v11.3.0, update from 11.2.0 $! 11-FEB-2017 MGD v11.2.0, update from 11.1.1 $! 30-JUL-2017 MGD v11.1.1, update from 11.1.0 $! 14-AUG-2016 MGD v11.0.2, update from 11.0.1 $! 03-JUL-2016 MGD v11.0.1, update from 11.0.0 $! 15-APR-2016 MGD v11.0.0, requires full update $! 07-AUG-2015 MGD v10.4.2, update from 10.4.1 $! 06-FEB-2015 MGD v10.4.1, update from 10.4.0 $! 19-AUG-2013 MGD v10.3.0, requires full update $! 15-NOV-2012 MGD v10.2.0, requires full update $! 12-MAY-2012 MGD v10.1.1, update from 10.1.0 $! 02-OCT-2010 MGD v10.0.3, update from 10.0.0/1/2 $! 01-JUL-2010 MGD v10.0.2, update from 10.0.0/1 $! 01-MAR-2010 MGD v10.0.1, update from 10.0.0 $! bugfix; oversights from v10 name changes $! 07-NOV-2009 MGD v10.0.0, requires full update $! 21-MAR-2008 MGD v9.3.0, requires full update $! 19-MAY-2007 MGD v9.2.1, update from 9.2.0 $! 03-NOV-2006 MGD v9.2.0, requires full update $! 10-MAY-2006 MGD bugfix; v9.1.4 restore cgilib.h and formwork.* $! 19-APR-2006 MGD v9.1.4, update from 9.1.0/1/2/3 $! 04-DEC-2005 MGD v9.1.3, update from 9.1.0/1/2 $! 07-SEP-2005 MGD v9.1.2, update from 9.1.0/1 $! 09-JUL-2005 MGD v9.1.1, update from 9.1.0 $! 22-JAN-2005 MGD v9.0.2, update from 9.0.1, $! add selecting SELECT.COM from specified archive $! 18-DEC-2004 MGD v9.0.1, update from 9.0.0 $! 01-DEC-2004 MGD v9.0.0, requires full update $! 01-OCT-2004 MGD v8.5.3, update from 8.5.0/1/2 $! 01-AUG-2004 MGD v8.5.2, update from 8.5.0/1 $! 30-JUN-2004 MGD v8.5.1, update from 8.5.0 $! 16-MAY-2004 MGD v8.4.4, update from 8.4.0/1/2/3 $! 08-MAR-2004 MGD v8.4.3, update from 8.4.0/1/2, $! always determine HTTPd version from SSL image if present $! 04-OCT-2003 MGD v8.3.2, update from 8.3.1 $! 15-AUG-2003 MGD v8.3.1, update from 8.3.0 $! 05-APR-2003 MGD v8.2.0, requires full update $! 12-JAN-2003 MGD v8.1.1, initial $!----------------------------------------------------------------------------- $! $ if f$trnlnm("SELECT$DBUG") .nes. "" then set verify $ ss$_abort = 44 $ say = "write sys$output" $ delete = "delete" $ define /user sys$output nl: $ define /user sys$error nl: $ directory = "directory/date" $ directory /noheader /notrailing wasd_root:[000000]*.* $ if $severity .eqs. "1" then directory = "directory/noheader/notrailing/date" $ wasdRoot = f$parse("WASD_ROOT:[000000]",,,,"NO_CONCEAL") - "][" - ".000000" - ".;" $ archive = p1 + SELECT_ARCHIVE + ".ZIP" $ archive_obj = p1 + SELECT_ARCHIVE + "-*.ZIP" $ switches = """-Voqq""" !(for UNZIP) $ if f$trnlnm("WASD_FILE_DEV") .nes. "" then @WASD_FILE_DEV $! $!(check whether UNZIP is available) $ define /user sys$output nl: $ define /user sys$error nl: $ unzip -h $ if $severity .nes. "1" $ then $ type nl: $ type sys$input ************ * UNZIP? * ************ There appears to be a problem with the UNZIP verb. Here's UNZIP -h ... $ unzip -h $ say "" $ exit $ endif $! $!(if a full archive has been specified extract the lastest SELECT.COM) $ if f$parse(p1,,,"name") .nes. "" $ then $ if f$search(p1) .eqs. "" $ then $ type sys$input **************************************** * COULD NOT LOCATE SPECIFIED ARCHIVE * **************************************** $ exit $ endif $ currentDefault = f$environment("DEFAULT") $ set default 'wasdRoot' $ set default [-] $ set noon $ unzip 'switches' 'p1' wasd_root/install/select.com $ zstatus = $status $ set on $ if zstatus $ then $! (successfully extracted) $ set default wasd_root:[install] $ location = f$parse(p1,,,"device") + f$parse(p1,,,"directory") $! (now execute that latest version) $ @select.com;0 'location' $ else $ type sys$input ********************************************* * COULD NOT EXTRACT THE LATEST SELECT.COM * ********************************************* $ set noon $ set verify $ unzip 'switches' 'p1' wasd_root/install/select.com $! 'f$verify(0) $ set on $ say "" $ endif $ set default 'currentDefault' $ exit $ endif $! $ type sys$input WASD VMS Web Services, Copyright (C) 1996-2020 Mark G.Daniel. This package (all associated programs), comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or any later version. http://www.gnu.org/licenses/gpl.txt ************************************* * SELECTIVELY UPDATE FROM ARCHIVE * ************************************* This procedure provides a site UPDATE using a full archive as the source. It examines the currently installed package to determine the relationship between the site and the archive. It then selectively extracts required files to bring the site up to revision. It can be used with full source archives as well as the optional object module archives. Each full archive is released with an increment in at least the tweak-level digit in the version string (.. e.g. "11.0.0") so this is used to determine the base-level installation of the current site. If for some reason this is not a standard site then do not use this procedure. $ response = "" $ read sys$command response /prompt="Continue? [NO]: " $ say "" $ if .not. response then exit $! $ if f$search(archive) .eqs. "" $ then $ type sys$input ********************************* * COULD NOT LOCATE ARCHIVE(S) * ********************************* The ZIP archive location should be supplied as a parameter. Looking for ... $ say archive $ say "" $ exit $ endif $ obj = 0 $ if f$search(archive_obj) .nes. "" then obj = 1 $! $ type sys$input *************************** * CHECK CURRENT VERSION * *************************** $ call siteVersion $! $ say "This selective update is to ''SELECT_VERSION'" $ say "" $ say "This site has been determined to be ''siteVersion'" $ say "" $! $ if f$extract(0,1,siteVersion) .eqs. "*" $ then $ type sys$input ********************* * CANNOT CONTINUE * ********************* Cannot continue with an unknown or unsupported version. This is what $ HTTPD/VERSION has to say about itself ... $ if f$search("HT_EXE:HTTPD_SSL.EXE") .nes. "" $ then httpd = "$ht_exe:httpd_ssl.exe" $ else httpd = "$ht_exe:httpd.exe" $ endif $ httpd/version $ say "" $ exit $ endif $! $ if siteVersion .eqs. SELECT_VERSION $ then $ type sys$input **************** * UP-TO-DATE * **************** This site appears to be at the required level. $ exit $ endif $! $ on control_y then goto exiting $ on error then goto exiting $ currentDefault = f$environment("DEFAULT") $ set default 'wasdRoot' $ set default [-] $! $ if f$extract(0,6,siteVersion) .eqs. "11.5.1" $ then $ type sys$input If this is not accurate then do not continue! ************************ * UPDATE FROM 11.5.0 * ************************ $ directory wasd_root.dir $ if f$search(archive) .nes. "" then directory 'archive' $ if f$search(archive_obj) .nes. "" then directory 'archive_obj' $ say "" $ response = "" $ read sys$command response /prompt="Continue? [NO]: " $ say "" $ if .not. response then goto exiting $ set noon $ set verify $ unzip 'switches' 'archive' wasd_root/src/httpd/* $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/httpd/*/*.obj $ unzip 'switches' 'archive' wasd_root/src/query/* $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/query/.obj $!'f$verify(0) $ set on $ type sys$input NIGHT AS WELL perform a full update! $ SET DEFAULT WASD_ROOT:[INSTALL] $ HTTPD/DO=EXIT=NOW $ @UPDATE $ @[STARTUP]STARTUP $ delete/symbol/global siteVersion $ endif $! $ if f$extract(0,5,siteVersion) .eqs. "11.4." .or. - f$extract(0,5,siteVersion) .eqs. "11.3." $ then $ type sys$input If this is not accurate then do not continue! ************************ * UPDATE FROM 11.4.n * * -or- 11.3.n * ************************ $ directory wasd_root.dir $ if f$search(archive) .nes. "" then directory 'archive' $ if f$search(archive_obj) .nes. "" then directory 'archive_obj' $ say "" $ response = "" $ read sys$command response /prompt="Continue? [NO]: " $ say "" $ if .not. response then goto exiting $ set noon $ set verify $ unzip 'switches' 'archive' wasd_root/install/* $ unzip 'switches' 'archive' wasd_root/doc/readme.html $ unzip 'switches' 'archive' wasd_root/example/wasd_config_global.conf $ unzip 'switches' 'archive' wasd_root/wasdoc/* $ unzip 'switches' 'archive' wasd_root/src/build_all.com $ unzip 'switches' 'archive' wasd_root/src/expat/* $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/expat/*/*.obj $ unzip 'switches' 'archive' wasd_root/src/httpd/* $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/httpd/*/*.obj $ unzip 'switches' 'archive' wasd_root/src/misc/cgilib.c $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/misc/*/cgilib.obj $ unzip 'switches' 'archive' wasd_root/src/utils/httpdmon.c $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/utils/*/httpdmon.obj $ unzip 'switches' 'archive' wasd_root/src/utils/qdlogstats.c $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/utils/*/qdlogstats.obj $ unzip 'switches' 'archive' wasd_root/src/wasdoc/* $ if (obj) then unzip 'switches' 'archive_obj' wasd_root/src/wasdoc/*/*.obj $!'f$verify(0) $ set on $ type sys$input NIGHT AS WELL perform a full update! $ SET DEFAULT WASD_ROOT:[INSTALL] $ HTTPD/DO=EXIT=NOW $ @UPDATE $ @[STARTUP]STARTUP $ delete/symbol/global siteVersion $ endif $! $ if f$type(siteVersion) .eqs. "" $ then $ type sys$input ********************* * C O M P L E T E * ********************* Now execute $ @UPDATE.COM to update the site. $ else $ type sys$input ************************* * UPDATE NOT POSSIBLE * ************************* From this version to the latest. Please do a full upgrade. $ endif $! $ exiting: $ set default 'currentDefault' $ if f$type(siteVersion) .nes. "" then delete/symbol/global siteVersion $ exit $! $!----------------------------------------------------------------------------- $ siteVersion: subroutine $! $ set noon $ httpdVersion = "" $ count = 0 $! (begin at the most recent version and work backwards) $ versionLoop1: $ count = count + 1 $ if f$type(select_version'count') .eqs. "" then goto versionLoop1End $ goto versionLoop1 $ versionLoop1End: $ versionLoop2: $ count = count - 1 $ if f$type(select_version'count') .eqs. "" then goto versionLoop2End $ version = select_version'count' $ define /user sys$output nl: $ define /user sys$error nl: $ if f$search("HT_EXE:HTTPD_SSL.EXE") .nes. "" $ then search HT_EXE:HTTPD_SSL.EXE "''version'" $ else search HT_EXE:HTTPD.EXE "''version'" $ endif $ if $severity .eqs. "1" $ then $ httpdVersion = version $ goto versionLoop2End $ endif $ goto versionLoop2 $ versionLoop2End: $! $ siteVersion == "*** UNKNOWN/UNSUPPORTED ***" $ if httpdVersion .nes. "" then siteVersion == httpdVersion $! $ exit $ endsubroutine $!-----------------------------------------------------------------------------