|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 20202 (0x4eea)
Types: TextFile
Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦221d54acb⟧
└─⟦this⟧
INSTALL_CUSTOMIZATION => (
Do_Step
(Step => "AUTHORIZATION_CHECK,
RELEASE_RESTORE,
INSTALL_PRODUCT,
REGISTER_TARGET,
RECORD_INSTALLATION");
)
AUTHORIZATION_CHECK => (
declare
package Pp is new Parameter_Parser (Boolean);
use Directory_Tools;
Product : constant string := Naming.Simple_Name (Naming.Full_Name ("^"));
Customization : constant string := Product (Product'First + 4..Product'Last);
Iter : Pp.Iterator := Pp.Parse ("CMVC, CMVC.Source_Control, RCF, " & Customization);
Token_Iter : Pp.Iterator := Pp.Parse ("RCF");
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.Positive_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);
end if;
if Get_Site /= "" and then not Pp.Done (Token_Iter) then
Error := 0;
Log.Put_Line ("Checking Token Count");
declare
Limit, Current, Buy_Out : Natural;
begin
while not Pp.Done (Token_Iter) loop
"Command_Data".
Token_Information
(Product_Name (Token_Iter), Limit, Buy_Out, Current);
if Limit = 0 then
Error := Error + 1;
Log.Put_Line
("No tokens (sessions) for " &
Product_Name (Token_Iter) &
" have been authorized. Do not proceed until you have authorized tokens for this product",
Profile.Error_Msg);
elsif (Buy_Out /= Current) and Current = Limit then
Log.Put_Line
("Tokens (Sessions) have been authorized for " &
Product_Name (Token_Iter) & ", but all are in use",
Profile.Error_Msg);
Log.Put_Line
("Have users which are using these tokens log off (and then back on) before continuing",
Profile.Error_Msg);
Show_Tokens (Product_Filter =>
Product_Name (Token_Iter));
else
Log.Put_Line (Product_Name (Token_Iter) &
" has available tokens",
Profile.Positive_Msg);
end if;
Pp.Next (Token_Iter);
end loop;
end;
else
Log.Put_Line
("Machine has not been configured for per session pricing (product tokens)." &
" Skipping product token check");
end if;
end;
)
RELEASE_RESTORE => (
Io.Set_Output ("Logs.Release_Restore_Log");
Archive.Restore (Options => "promote, replace",
Device => "Release");
if Directory_Tools.Object.Is_Ok (The_Objects =>
Directory_Tools.Naming.Resolution
("Release_Notes.[Data,Index]")) then
Archive.Restore (Options => "promote, replace",
Device => "Release_Notes");
end if;
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"Logs.Release_Restore_Log",
Destination =>
"Logs.Release_Restore_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("Logs.Release_Restore_Log_Summary");
)
INSTALL_PRODUCT => (
declare
use Directory_Tools;
Starting_Context : constant string := Naming.Default_Context;
Product : constant string := Naming.Simple_Name (Naming.Full_Name ("^"));
Customization : constant string := Product (Product'First + 4..Product'Last);
Release : constant string := Naming.Simple_Name (Naming.Full_Name ("$"));
Version : constant string := Release (Release'First + 7..Release'last);
Install_Lib : constant string := "!Targets.Implementation.Release_" & Customization & "_" & Version;
Found : Boolean := False;
function Rcf_Target_File return String is
use Directory_Tools;
begin
if Object.Is_Ok (The_Object =>
Naming.Resolution
("!Machine.Initialization.Rational")) then
return "!Machine.Initialization.Site.RCF_Configuration";
else
return "!Machine.RCF_Targets";
end if;
end Rcf_Target_File;
begin
Io.Set_Output ("!Machine.Temporary.RCF_Targets");
Io.Set_Input (Rcf_Target_File);
while not Io.End_Of_File loop
declare
Name : constant String := String_Utilities.Strip (Io.Get_Line);
begin
Found := Found or (String_Utilities.Locate (Name, Customization) /= 0);
Io.Put_Line (Name);
end;
end loop;
if not Found then
Io.Put_Line (Customization);
end if;
Io.Reset_Output;
Io.Reset_Input;
Lib.Move (From => "!Machine.Temporary.RCF_Targets",
To => Rcf_Target_File,
Response => "<ERRORS>");
Io.Set_Output ("Logs.Install_Product_Log");
Library.Context (To_Be => Install_Lib);
System_Utilities.Set_Page_Limit (16_000);
Program.Run (S => "Install_Customization (""" & Customization & """);",
Context => Install_Lib,
Response => "<PROFILE>");
Library.Context (To_Be => Starting_Context);
Io.Reset_Output;
Log.Filter_Errors
(Log_File => "Logs.Install_Product_Log",
Destination => "Logs.Install_Product_Log_Summary",
Warnings => False,
Auxiliaries => False,
Exceptions => True);
Common.Definition ("Logs.Install_Product_Log_Summary");
end;
)
REGISTER_TARGET => (
declare
use Directory_Tools;
Product : constant string := Naming.Simple_Name (Naming.Full_Name ("^"));
Customization : constant string := Product (Product'First + 4..Product'Last);
begin
Io.Set_Output ("Logs.Register_Target_Log");
Rs6000_Aix_Ibm.Register;
Io.Reset_Output;
Log.Filter_Errors
(Log_File => "Logs.Register_Target_Log",
Destination => "Logs.Register_Target_Log_Summary",
Warnings => False,
Auxiliaries => False,
Exceptions => True);
Common.Definition ("Logs.Register_Target_Log_Summary");
end;
)
TEST_RELEASE => (
declare
use Directory_Tools;
Starting_Context : constant string := Naming.Default_Context;
Product : constant string := Naming.Simple_Name (Naming.Full_Name ("^"));
Customization : constant string := Product (Product'First + 4..Product'Last);
Release : constant string := Naming.Simple_Name (Naming.Full_Name ("$"));
Version : constant string := Release (Release'First + 7..Release'last);
Install_Lib : constant string := "!Targets.Implementation.Release_" & Customization & "_" & Version;
type Ptr_String is access String;
Username, Password, Machine, Directory_Name : Ptr_String;
function Get_Line
(Prompt : String; Min_Length : Natural := 1) return String is
S : String (1 .. 80);
Last : Natural := 0;
begin
loop
Io.Put (Prompt);
Io.Get_Line (S, Last);
exit when Last >= Min_Length;
Io.Put_Line ("ERROR: Must enter a value with" &
Natural'Image (Min_Length) & " characters");
end loop;
return (S (1 .. Last));
end Get_Line;
begin
Machine := new String'(Get_Line ("Enter Remote Machine Name : ", 1));
Io.Put_Line ("Resolved " &
Transport_Name.Host_Id_To_Host
(Transport_Name.Host_To_Host_Id (Machine.all)) &
" successfully.");
Username := new String'(Get_Line ("Enter Remote Username : ", 0));
Password := new String'(Get_Line ("Enter Remote Password : ", 0));
Directory_Name :=
new String'
(Get_Line
("Enter Remote USER Directory pathname (eg: /u/smp) : ", 1) &
"/RS6000_AIX_IBM1_1_0");
Switches.Set (Spec => "Session_Ftp.Username:=""" & Username.all &
""";Session_FTP.Password:=""" &
Password.all & """",
File => "<SESSION>",
Response => "<ERRORS>");
Io.Set_Output
("Logs.Restore_Tests_Log");
Archive.Restore (Options => "Promote,Replace", Device => "Tests");
Library.Context
(To_Be =>
"!TESTS.STAGING.INSTALL_VERIFICATIONS.RCF_RS6000_AIX_IBM.TEST_SUBSYSTEM",
Response => "<PROFILE>");
Rcf_Cmvc.Make_Path
(From_Path => "R1000_Working",
New_Path_Name => Customization,
Remote_Machine => Machine.all,
Remote_Directory => Directory_Name.all,
View_To_Import => "",
Model => "!Model.RS6000_AIX_IBM",
Goal => Compilation.Coded,
Response => "<PROFILE>");
Library.Context (To_Be => "RS6000_AIX_IBM_Working.Units", Response => "<PROFILE>");
Rcf.Link (Main_Unit => "hello",
Make_Uncoded_Units => False,
Executable_Name => "",
Response => "~---,<PROGRESS>");
Rcf.Execute_Remote_Command (Remote_Command => "./hello.exe");
Library.Context (To_Be => Starting_Context);
Io.Reset_Output;
Log.Filter_Errors
(Log_File => "Logs.Restore_Tests_Log",
Destination => "Logs.Restore_Tests_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition ("Logs.Restore_Tests_Log_Summary");
exception
when Transport_Name.Undefined =>
Log.Put_Line
("Cannot resolve the machine name, please enter this into the Transport_Name_Map and rerun this step",
Profile.Error_Msg);
end;
)
LINK_TEST => (
Library.Context
(To_Be =>
"!TESTS.STAGING.INSTALL_VERIFICATIONS.RCF_RS6000_AIX_IBM.RELEASE3_2_0.Rs6000_Aix_Ibm_Working.Units",
Response => "<ERRORS>");
Rcf.Link (Main_Unit => "hello",
Make_Uncoded_Units => False,
Executable_Name => "",
Response => "~---,<PROGRESS>");
)
CONVERT_RCF_VIEWS => (
declare
Count : Natural := 0;
Abort_Execution : Exception;
procedure Kill_Job (Job_Name : String) is
begin
for J in System_Utilities.Job_Id loop
begin
if String_Utilities.Equal
(System_Utilities.Job_Name (J), Job_Name) then
Log.Put_Line ("Killing job " & Job_Name,
Profile.Positive_Msg);
Job.Kill (J);
end if;
exception
when others =>
null;
end;
end loop;
end Kill_Job;
function Job_Running (Job_Name : String) return Boolean is
begin
for J in System_Utilities.Job_Id loop
begin
if String_Utilities.Equal
(System_Utilities.Job_Name (J), Job_Name) then
return True;
end if;
exception
when others =>
null;
end;
end loop;
return False;
end Job_Running;
begin
if Directory_Tools.Naming.Full_Name
("!TARGETS.IMPLEMENTATION.RCF_RELEASE1_1_0.INSTALL_ACTIVITY") =
"" then
Log.Put_Line
("Cannot locate Release1_1_0 activity, you will need to manually start the 1_1_0 RCF and do the conversion",
Profile.Error_Msg);
raise Abort_Execution;
end if;
Io.Set_Output
("!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log");
Log.Put_Line ("Killing RCF and library extensions");
"!TARGETS.IMPLEMENTATION.RCF_USER_INTERFACE.REV3_2_SPEC.UNITS".
Kill_Rcf_Main;
Log.Put_Line ("Starting RS6000 RCF for Release 1_1_0");
Program.Run_Job
(S =>
"""!Targets.Implementation.Rs6000_Ibm'Spec_View.Units"".START_RS6000_RCF;",
Context => "!Machine.Error_Logs",
Response =>
"Activity=!TARGETS.IMPLEMENTATION.RCF_RELEASE1_1_0.INSTALL_ACTIVITY, <PROFILE>");
while not Job_Running ("RCF_Rs6000_Compiler") loop
Count := Count + 1;
if Count > 20 then
Log.Put_Line ("Failed to get RCF_Rs6000_Compiler started",
Profile.Error_Msg);
raise Abort_Execution;
end if;
delay 3.0;
end loop;
Log.Put_Line ("Registering RS6000 target key");
Program.Run
(S =>
"""!Targets.Implementation.Rcf_Library_Integration.Rev1_0_2.Units"".Register;",
Context => "!Machine.Error_Logs",
Response =>
"Activity=!TARGETS.IMPLEMENTATION.RCF_RELEASE1_1_0.INSTALL_ACTIVITY, <PROFILE>");
Count := 0;
while not Job_Running ("Rs6000_Library_Extension") loop
Count := Count + 1;
if Count > 20 then
Log.Put_Line ("Failed to get RS6000_Library_Extension started",
Profile.Error_Msg);
raise Abort_Execution;
end if;
delay 3.0;
end loop;
Log.Put_Line ("Calling Convert_RCF_Views_Main");
"!TARGETS.IMPLEMENTATION.RCF_USER_INTERFACE.REV3_2_SPEC.UNITS".
Convert_Rcf_Views_Main (From_Key => "RS6000",
To_Key => "RS6000_AIX_IBM",
Restore_Object_State => True);
Kill_Job ("Rs6000_Library_Extension");
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log",
Destination =>
"!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log_Summary");
exception
when Abort_Execution =>
Log.Put_Line ("Aborting execution", Profile.Negative_Msg);
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log",
Destination =>
"!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Convert_Views_Log_Summary");
end;
)
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
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_OLD_RELEASES => (
Io.Set_Output
("!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Destroy_Old_Releases_Log");
Cmvc.Destroy_View
(What_View =>
"!Targets.Implementation.Release_Rs6000_Aix_Ibm_1_0_2.[[_install_activity]$$^.@'C(Spec_View,Load_View),~[_install_activity]]",
Demote_Clients => False,
Destroy_Configuration_Also => True,
Comments => "",
Work_Order => "<DEFAULT>",
Response => "<PROFILE>");
Compilation.Destroy
(Unit => "!Targets.Implementation.[Release_Rs6000_Aix_IBM@,~Release_Rs6000_Aix_IBM_1_0_2]",
Threshold => 999,
Limit => "<ALL_WORLDS>",
Response => "<PROFILE>");
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Destroy_Old_Releases_Log",
Destination =>
"!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Destroy_Old_Releases_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF_RS6000_AIX_IBM.Release1_0_2.Logs.Destroy_Old_Releases_Log_Summary");
)
CLEANUP => (
declare
use Directory_Tools;
Starting_Context : constant string := Naming.Default_Context;
Product : constant string := Naming.Simple_Name (Naming.Full_Name ("^"));
Customization : constant string := Product (Product'First + 4..Product'Last);
Release : constant string := Naming.Simple_Name (Naming.Full_Name ("$"));
Version : constant string := Release (Release'First + 7..Release'last);
Install_Lib : constant string := "!Targets.Implementation.Release_" & Customization & "_" & Version;
begin
Library.Context
(To_Be =>
"!Tests.Staging.Install_Verifications.Rcf_Rs6000_Aix_Ibm.Test_Subsystem",
Response => "<ERRORS>");
Cmvc.Destroy_View (What_View => "R1000_Working",
Demote_Clients => False,
Destroy_Configuration_Also => False,
Comments => "",
Work_Order => "<DEFAULT>",
Response => "<ERRORS>");
Rcf_Cmvc.Destroy_View (What_View => "RS6000_AIX_IBM_Working",
Demote_Clients => True,
Destroy_Configuration_Also => False,
Destroy_Remote_Library => True,
Comments => "",
Work_Order => "<DEFAULT>",
Response => "<ERRORS>");
Library.Context
(To_Be =>
"!Tests.Staging.Install_Verifications.Rcf_Rs6000_Aix_Ibm",
Response => "<ERRORS>");
Cmvc.Destroy_Subsystem (What_Subsystem => "Test_Subsystem",
Comments => "",
Work_Order => "<DEFAULT>",
Response => "<ERRORS>");
Library.Context (To_Be => Starting_Context, Response => "<ERRORS>");
Switches.Set (Spec =>
"Session_Ftp.Username:="""";Session_FTP.Password:=""""",
File => "<SESSION>",
Response => "<ERRORS>");
Compilation.Destroy
(Unit => "[$" & "," & Install_Lib & ".[@,~Install_Activity]]",
Threshold => 999,
Limit => "<ALL_WORLDS>",
Response => "<ERRORS>");
end;
)
STEP_CHECK => (
-- This must remain the last step in the step file and is used
-- as a first level verification of the step file parse and
-- tape load.
Log.Put_Line ("Step File parses correctly", Profile.Positive_Msg);