DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ S T

⟦df1cfaa09⟧ TextFile

    Length: 19087 (0x4a8f)
    Types: TextFile
    Names: »STEPS«

Derivation

└─⟦bad92a95e⟧ Bits:30000535 8mm tape, Rational 1000, RPC 1_0_2
    └─ ⟦bb34fe6e2⟧ »DATA« 
        └─⟦this⟧ 

TextFile


AUTHORIZATION_CHECK => (
declare
    subtype Bogus is Natural range 0 .. 1;
    package Pp is new Parameter_Parser (Bogus);
    Iter : Pp.Iterator :=
       Pp.Parse ("CMVC, CMVC.Source_Control,Motorola_68K,MC68020_HP_Unix");
    Error : Natural := 0;

    function Product_Name (Iter : Pp.Iterator) return String is
    begin
        if String_Utilities.Equal (Pp.Name (Iter), "NAME") then
            return Pp.Get_Image (Iter);
        else
            return Pp.Name (Iter);
        end if;
    end Product_Name;
begin
    while not Pp.Done (Iter) loop
        declare
            Name : constant String := Product_Name (Iter);
        begin
            if "!Implementation".Product_Authorization.Is_Registered (Name) then
                Log.Put_Line (Name & " is authorized", Profile.Note_Msg);
            else
                Log.Put_Line ("Need to Authorize " & Name, Profile.Error_Msg);
                Error := Error + 1;
            end if;
        end;
        Pp.Next (Iter);
    end loop;
    if Error /= 0 then
        Log.Put_Line
           ("Do not proceed until all these products have been authorized",
            Profile.Error_Msg);
        Do_Step ("PROMPT=AUTHORIZE_PRODUCT");
    end if;
end;

)

AUTHORIZE_PRODUCT => (
    "!Implementation".Product_Authorization.Register
            (Product_Name => ">>Product Name<<",
             Authorization_Code => ">> Code <<");
)

USERS_CHECK => (
    declare
        Iter : System_Utilities.Session_Iterator;
        Total : Natural := 0;
        use System_Utilities;
    begin
        Operator.Limit_Login (Sessions => 1);
        Log.Put_Line ("Limited logins to 1 user", Profile.Positive_Msg);
        Init (Iter);
        while not Done (Iter) loop
            if Value (Iter) /= Get_Session then
                Log.Put_Line
                   ("User " & User_Name (Value (Iter)) &
                    " is still logged in.  Have s/he log off before proceeding",
                    Profile.Warning_Msg);
            end if;
            Next (Iter);
        end loop;
    end;
)

COMPILER_CHECK => (
declare
    function Job_Running
                (N : String; Kind : Profile.Msg_Kind := Profile.Error_Msg)
                return Boolean is
        Found : Boolean := False;
    begin
        for J in System_Utilities.Job_Id loop
            begin
                if String_Utilities.Locate (N, System_Utilities.Job_Name (J)) /=
                   0 then
                    Log.Put_Line ("Job " & System_Utilities.Job_Name (J) &
                                  " is running", Profile.Positive_Msg);
                    Found := True;
                end if;
            exception
                when others =>
                    null;
            end;
        end loop;
        if not Found then
            Log.Put_Line ("Job " & N & " is not running", Kind);
        end if;
        return Found;
    end Job_Running;
begin
    if Job_Running ("Motorola_68k Compiler Control") and
       Job_Running ("Cross Compiler Common Layer") and
       Job_Running ("Motorola_68k Stream_1") then
        null;
    end if;
end;
)


RELEASE_RESTORE => (
    Io.Set_Output
       ("!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Release_Log");
    Archive.Restore (Options => "replace,promote",
                     Device => "Release");
    Lib.Unfreeze (Existing => "!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.R1000_0_2",
                  Recursive => True,
                  Response => "<ERRORS>");
    Lib.Unfreeze (Existing => "!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.Mc68020_Hpux_Cdf_0_2",
                  Recursive => True,
                  Response => "<ERRORS>");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Release_Log",
        Destination =>
           "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Release_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Release_Log_Summary");
)

MODIFY_R1000 => (
declare
    use Editor, Text, Common;
    function Read_Line
                (Prompt : String; Min_Length : Natural := 1) return String is
    begin
        loop
            Io.Put (Prompt);
            declare
                S : constant String := Io.Get_Line;
            begin
                if S'Length >= Min_Length then
                    return S;
                else
                    Io.Put_Line ("*** Must enter a value with at least" &
                                 Natural'Image (Min_Length) & " characters");
                end if;
            end;
        end loop;
    end Read_Line;
begin
    Editor.Window.Frames (4);
    declare
        Remote_Host : constant String :=
           Read_Line
              ("Remote Host (example - note ',' separator: 89,2,23,4): ", 7);
    begin
        Common.Edit
           ("!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.R1000_0_2.UNITS.COMPLEX_CLIENT'BODY");
        Editor.Image.Beginning_Of (Offset => 0);
        Editor.Search.Next (Target => "remote_host", Wildcard => False);
        Editor.Line.End_Of (Offset => 0);
        Editor.Word.Delete_Backward (Repeat => 4);
        Editor.Char.Insert_String (Remote_Host);
        Ada.Code_Unit;
        if Directory_Tools.Naming.Full_Name
              ("!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.R1000_0_2.UNITS.COMPLEX_CLIENT'BODY'S(Coded)") =
           "" then
            Log.Put_Line
               ("!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.R1000_0_2.UNITS.COMPLEX_CLIENT did not compile",
                Profile.Error_Msg);
        end if;
    end;
end;    
)
    
MODIFY_CDF => (
declare
    use Editor, Text, Common;
    function Read_Line
                (Prompt : String; Min_Length : Natural := 1) return String is
    begin
        loop
            Io.Put (Prompt);
            declare
                S : constant String := Io.Get_Line;
            begin
                if S'Length >= Min_Length then
                    return S;
                else
                    Io.Put_Line ("*** Must enter a value with at least" &
                                 Natural'Image (Min_Length) & " characters");
                end if;
            end;
        end loop;
    end Read_Line;

    function R1000_Tcp_Ip_Host_Id return String is
        F : Io.File_Type;
    begin
        Io.Open (F, Io.In_File, "!Machine.Tcp_IP_Host_ID");
        declare
            S : constant String := Io.Get_Line (F);
            N : String (1 .. S'Length) := S;
        begin
            Io.Close (F);
            for I in N'Range loop
                if N (I) = '.' then
                    N (I) := ',';
                end if;
            end loop;
            return N;
        end;
    end R1000_Tcp_Ip_Host_Id;
begin
    Editor.Window.Frames (4);
    declare
        R1000_Host : constant String := R1000_Tcp_Ip_Host_Id;
        Machine : constant String := Read_Line ("Remote Machine   : ");
        Directory : constant String := Read_Line ("Remote Directory : ");
        Username : constant String := Read_Line ("Remote Username  : ");
        Password : constant String := Read_Line ("Remote Password  : ");
    begin
        Switches.Set
           (Spec => "FTP.Remote_Machine:=""" & Machine &
                       """;FTP.Remote_Directory:=""" & Directory &
                       """;FTP.Username:=""" & Username &
                       """;FTP.Password:=""" & Password & '"',
            File =>
               "!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.MC68020_HPUX_CDF_0_2.STATE.COMPILER_SWITCHES",
            Response => "<ERRORS>");
        Common.Edit
           ("!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.MC68020_HPUX_CDF_0_2.UNITS.COMPLEX_CLIENT'BODY");
        Editor.Image.Beginning_Of (Offset => 0);
        Editor.Search.Next (Target => "remote_host", Wildcard => False);
        Editor.Line.End_Of (Offset => 0);
        Editor.Word.Delete_Backward (Repeat => 4);
        Editor.Char.Insert_String (R1000_Host);
        Ada.Code_Unit;
        if Directory_Tools.Naming.Full_Name
              ("!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.MC68020_HPUX_CDF_0_2.UNITS.COMPLEX_CLIENT'BODY'S(CODED)") =
           "" then
            Log.Put_Line
               ("!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.MC68020_HPUX_CDF_0_2.UNITS.COMPLEX_CLIENT did not compile",
                Profile.Error_Msg);
        end if;
    end;
end;
)

COMPILE_RPC_EXAMPLE => (
    Compilation.Demote
       (Unit =>
           "!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.MC68020_HPUX_CDF_0_2.UNITS.[SERVER_DRIVER'BODY,Client_Driver'Body]",
        Goal => Compilation.Installed,
        Limit => "<ALL_WORLDS>",
        Response => "<ERRORS>");
    Compilation.Make
       (Unit =>
           "!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.[R1000_0_2,MC68020_HPUX_CDF_0_2].UNITS.[SERVER_DRIVER'BODY,Client_Driver'Body]",
        Scope => Compilation.Load_Views,
        Goal => Compilation.Coded,
        Limit => "<ALL_WORLDS>",
        Response => "<ERRORS>");
)

INSTALL_DEMO_SW => (
declare
    use Editor, Text, Common;
    function Read_Line
                (Prompt : String; Min_Length : Natural := 1) return String is
    begin
        loop
            Io.Put (Prompt);
            declare
                S : constant String := Io.Get_Line;
            begin
                if S'Length >= Min_Length then
                    return S;
                else
                    Io.Put_Line ("*** Must enter a value with at least" &
                                 Natural'Image (Min_Length) & " characters");
                end if;
            end;
        end loop;
    end Read_Line;

    procedure Fix_Makefile is
    begin
        Io.Set_Input ("!MACHINE.RELEASE.RPC.REV1_0_2.MAKEFILE");
        Io.Set_Output ("!MACHINE.RELEASE.RPC.REV1_0_2.MAKEFILE_NEW");
        while not Io.End_Of_File loop
            declare
                S : constant String := Io.Get_Line;
            begin
                if String_Utilities.Locate ("server&", S) = 0 then
                    Io.Put_Line (S);
                end if;
            end;
        end loop;
        Io.Reset_Input;
        Io.Reset_Output;
        Library.Move (From => "!MACHINE.RELEASE.RPC.REV1_0_2.MAKEFILE_NEW",
                      To => "!MACHINE.RELEASE.RPC.REV1_0_2.MAKEFILE",
                      Response => "<ERRORS>");
    end Fix_Makefile;
begin
    Library.Context (To_Be => "!MACHINE.RELEASE.RPC.REV1_0_2.INSTALL",
                     Response => "<ERRORS>");
    Io.Put_Line ("starting");
    declare
        Machine : constant String := Read_Line ("Remote Machine   : ");
        Directory : constant String := Read_Line ("Remote Directory : ");
        Username : constant String := Read_Line ("Remote Username  : ");
        Password : constant String := Read_Line ("Remote Password  : ");
    begin
        Io.Set_Output
           ("!Machine.Release.Archive.RPC.Release1_0_2.Logs.Install_Demo_Log");
        Switches.Create (File => "!Machine.Release.Rpc.Rev1_0_2.Switches",
                         Category => 'L',
                         Response => "<ERRORS>");
        Switches.Associate (File => "!Machine.Release.Rpc.Rev1_0_2.Switches",
                            Library => "!Machine.Release.Rpc.Rev1_0_2",
                            Response => "<ERRORS>");
        Switches.Set (Spec =>
                         "Ftp.Send_Port_Enabled:=FALSE;Ftp.Remote_Machine:=""" &
                            Machine & """;Ftp.Remote_Directory:=""" &
                            Directory & """;Ftp.Password:=""" & Password &
                            """;Ftp.Username:=""" & Username & '"',
                      File => "!Machine.Release.Rpc.Rev1_0_2.Switches",
                      Response => "<ERRORS>");
        Library.Context ("!Machine.Release.Rpc.Rev1_0_2",
                         Response => "<ERRORS>");
        Fix_Makefile;
        "!MACHINE.RELEASE.RPC.REV1_0_2".Install
           (Remote_Machine => Machine,
            Username => Username,
            Password => Password,
            Remote_Directory => Directory,
            Output =>
               "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Install_Demo_Remote_Log",
            Error =>
               "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Install_Demo_Remote_Error_Log",
            Response => "<PROFILE>");
    end;
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Install_Demo_Log",
        Destination =>
           "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Install_Demo_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.RPC.Release1_0_2.Logs.Install_Demo_Log_Summary");
end;
)

DEMO_CDF_CLIENT => (
declare
    Id : Program.Job_Id;
    Status : Program.Condition;
begin
    Editor.Window.Frames (5);
    Program.Create_Job
       (S =>
           """!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.R1000_0_2.UNITS"".SERVER_DRIVER",
        Job => Id,
        Status => Status,
        Options => "Name => MC68020_HP_Unix_RPC_Demo_Server",
        Response => "<PROFILE>");
    delay 5.0;
    Library.Context
       (To_Be =>
           "!Targets.Implementation.RPC_Example.MC68020_HPUX_CDF_0_2.Units",
        Response => "<ERRORS>");
    Unix_Remote_Commands.Run (Command => "CLIENT_DRIVER",
                              Remote_Machine => "<DEFAULT>",
                              Remote_Username => "<DEFAULT>",
                              Remote_Password => "<DEFAULT>",
                              Remote_Directory => "<DEFAULT>",
                              Output => "<WINDOW>",
                              Input => "<WINDOW>",
                              Error => "<DEFAULT>",
                              Response => "<ERRORS>");
    Job.Kill (Id);
end;
)

DEMO_R1000_CLIENT => (
declare
    Id : Program.Job_Id;
    Status : Program.Condition;
begin
    Editor.Window.Frames (5);
    Program.Create_Job
       (S => "Unix_Remote_Commands.Run (Command => ""SERVER_DRIVER""," &
                "Output => ""<WINDOW>""," & "Input => ""<WINDOW>""," &
                "Response => ""<PROFILE>"");",
        Job => Id,
        Status => Status,
        Context =>
           "!Targets.Implementation.RPC_Example.MC68020_HPUX_CDF_0_2.Units",
        Options => "Name => MC68020_HP_Unix_RPC_CDF_Demo_Server",
        Response => "<ERRORS>");
    delay 10.0;
    "!Targets.Implementation.RPC_Example.R1000_0_2.Units".
       Client_Driver;
    Library.Context ("!Targets.Implementation.RPC_Example.MC68020_HPUX_CDF_0_2.Units", Response => "<ERRORS>");
    Unix_Remote_Commands.Run (Command => "ps -e|grep SERVER_DRIVER|awk '{print $1}'",
                              Output => "!machine.Temporary.Server_ID",
                              Response => "<ERRORS>");
    Io.Set_Input ("!machine.temporary.server_id");
    Unix_Remote_Commands.Run
       (Command => "kill " & Io.Get_Line, Response => "<ERRORS>");
end;
)

TARGET_DEMO_CDF_CLIENT => (
declare
    Id : Program.Job_Id;
    Status : Program.Condition;
begin
    Editor.Window.Frames (5);
    Program.Create_Job
       (S =>
           """!TARGETS.IMPLEMENTATION.RPC_EXAMPLE.R1000_0_2.UNITS"".SERVER_DRIVER",
        Job => Id,
        Status => Status,
        Options => "Name => MC68020_HP_Unix_RPC_Demo_Server",
        Response => "<PROFILE>");
    delay 5.0;
    Library.Context (To_Be => "!Machine.Release.Rpc.Rev1_0_2", Response => "<ERRORS>");
    Unix_Remote_Commands.Run (Command => "client",
                              Remote_Machine => "<DEFAULT>",
                              Remote_Username => "<DEFAULT>",
                              Remote_Password => "<DEFAULT>",
                              Remote_Directory => "<DEFAULT>",
                              Output => "<WINDOW>",
                              Input => "<WINDOW>",
                              Error => "<DEFAULT>",
                              Response => "<ERRORS>");
    Job.Kill (Id);
end;
)

TARGET_DEMO_R1000_CLIENT => (
declare
    Id : Program.Job_Id;
    Status : Program.Condition;
begin
    Editor.Window.Frames (5);
    Program.Create_Job
       (S => "Unix_Remote_Commands.Run (Command => ""server""," &
                "Output => ""<WINDOW>""," & "Input => ""<WINDOW>""," &
                "Response => ""<PROFILE>"");",
        Job => Id,
        Status => Status,
        Context => "!Machine.Release.Rpc.Rev1_0_2",
        Options => "Name => MC68020_HP_Unix_RPC_CDF_Demo_Server",
        Response => "<ERRORS>");
    delay 10.0;
    "!Targets.Implementation.RPC_Example.R1000_0_2.Units".
       Client_Driver;
    Library.Context ("!Machine.Release.Rpc.Rev1_0_2", Response => "<ERRORS>");
    Unix_Remote_Commands.Run (Command => "ps -e|grep server|awk '{print $1}'",
                              Output => "!machine.Temporary.Server_ID",
                              Response => "<ERRORS>");
    Io.Set_Input ("!machine.temporary.server_id");
    Unix_Remote_Commands.Run
       (Command => "kill " & Io.Get_Line, Response => "<ERRORS>");
end;
)

RESTORE_NOTES => (
    Archive.Restore (Device => "Release_Notes");
)


TEST_RESTORE => (
    Io.Set_Output
       ("!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Tests_Log");
    Archive.Restore (Options => "Promote", Device => "Tests");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Tests_Log",
        Destination =>
           "!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Tests_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.RPC.Release1_0_2.Logs.Restore_Tests_Log_Summary");
)

RECORD_INSTALLATION => (
declare
    Product : constant String := Directory_Tools.Naming.Simple_Name
                                    (Directory_Tools.Naming.Full_Name ("^"));
    Release : constant String := Directory_Tools.Naming.Simple_Name
                                    (Directory_Tools.Naming.Full_Name ("$"));
    Product_Info : constant String :=
       "(RELEASE => " & Release & ", DATE => (" &
          Time_Utilities.Image (Time_Utilities.Get_Time,
                                Time_Utilities.Year_Month_Day) &
          "), USER => " & System_Utilities.User_Name &
          '.' & System_Utilities.Session_Name & ")";
    Product_Filename : constant String := "!Machine.Release.Current.Products";
    F : Io.File_Type;
begin
    Log.Put_Line ("Allowing unlimited logins", Profile.Positive_Msg);
    Operator.Limit_Login;
    Io.Append (F, Name => Product_Filename);
    Io.Put_Line (F, Product & " => " & Product_Info);
    Io.Close (F);
    Log.Put_Line ("Recording product " & Product &
                  " current release as " & Release,
                  Profile.Positive_Msg);
end;
)

DESTROY_ARCHIVE => (
    Library.Delete ("!Machine.Release.Archive.RPC.Release1_0_2");
)