============================================================================== Log is: /home/perforce/ExtensionDemo/logs/ExtensionDemo.2024-11-12-225449.log Started ExtensionDemo.sh v1.2.0 as perforce@bos-helix-01 on Tue Nov 12 22:54:49 EST 2024 as pid 193215: Initial Command Line: ./ExtensionDemo.sh -y Starting preflight checks and cleanup from earlier runs. Verified: Running on bos-helix-01. Moving aside extension dir from an earlier run. Running: mv /home/perforce/ExtensionDemo/login_motd /home/perforce/ExtensionDemo/login_motd.old.2024-11-12-225449 Moving aside extension package from an earlier run. Running: mv login_motd.p4-extension login_motd.p4-extension.old.2024-11-12-225449 Checking to see if exenstion aready exists. Removing older version of extension Running: p4 extension --delete ExampleInc::LoginMOTDExt --yes Extension 'ExampleInc::LoginMOTDExt and its configurations' successfully deleted. ============================================================================== Preflight checks and cleanup complete. Setting configurables. Operating in: /home/perforce/ExtensionDemo Show if unsigned server-side Extensions are allowed to run. Running: p4 configure show server.extensions.allow.unsigned server.extensions.allow.unsigned:1 (configure) Allow unsigned Extensions are allowed to be installed and run (for demo). Running: p4 configure set server.extensions.allow.unsigned=1 For server 'any', configuration variable 'server.extensions.allow.unsigned' set to '1' Show if client-side Extensions are allowed to run. Running: p4 configure show run.clientexts.allow run.clientexts.allow:1 (configure) Allow client-side Extensions to run (though this demo only illustrates server-side extensons). Running: p4 configure set run.clientexts.allow=1 For server 'any', configuration variable 'run.clientexts.allow' set to '1' ============================================================================== Configurables are set. Downloading files. STEP 1: Create sample extension template. Running: p4 extension --sample login_motd Extension template created in the 'login_motd' directory. STEP 2: Code your extension in Lua. Here we just download sample code. Acquring sample file: https://swarm.workshop.perforce.com/download/guest/perforce_software/extensions/main/login_motd/main.lua Running: curl -s -L -o /home/perforce/ExtensionDemo/login_motd/main.lua https://swarm.workshop.perforce.com/download/guest/perforce_software/extensions/main/login_motd/main.lua Acquring sample file: https://swarm.workshop.perforce.com/download/guest/perforce_software/extensions/main/login_motd/manifest.json Running: curl -s -L -o /home/perforce/ExtensionDemo/login_motd/manifest.json https://swarm.workshop.perforce.com/download/guest/perforce_software/extensions/main/login_motd/manifest.json Acquring sample file: https://swarm.workshop.perforce.com/download/guest/perforce_software/extensions/main/login_motd/ExtUtils.lua Running: curl -s -L -o /home/perforce/ExtensionDemo/login_motd/ExtUtils.lua https://swarm.workshop.perforce.com/download/guest/perforce_software/extensions/main/login_motd/ExtUtils.lua ============================================================================== Downloads complete. Showing default login behavior (pre-extension install). Running: p4 login < $SDP_ADMIN_PASSWORD_FILE Enter password: User perforce logged in. ============================================================================== Loading extensions into p4d. STEP 3: Package your local work to create login_motd.p4-extension. Running: p4 extension --package login_motd Extension packaged successfully. STEP 4: Preview install of extension login_motd. Running: p4 extension --install login_motd.p4-extension Would install Extension 'ExampleInc::LoginMOTDExt' Version: '2019.1' UUID: 7CBE2EDC-FD10-4852-AC2C-A5C78806A7D7 Developer: Perforce Software Inc. Description: [Example Extension, sample code] This Extension allows an administrator to selectively display a MOTD/EULA/etc type text to users before they log in. E.g.: p4 login LoginMOTDExt/UUIDMASK/1.0 beta: **** This is the Extension login message Enter password: User someUser logged in. License: BSD Homepage URL: https://swarm.workshop.perforce.com/files/guest/perforce_software/extensions/2019-1 Compatible products: p4d This was report mode. Use -y to perform the operation. STEP 5: Install extension login_motd. Running: p4 extension --install login_motd.p4-extension --yes Extension 'ExampleInc::LoginMOTDExt' version '2019.1' installed successfully. Perform the following steps to turn on the Extension: # Create a global configuration if one doesn't already exist. p4 extension --configure ExampleInc::LoginMOTDExt # Create an instance configuration to enable the Extension. p4 extension --configure ExampleInc::LoginMOTDExt --name ExampleInc::LoginMOTDExt-instanceName For more information, visit: https://www.perforce.com/manuals/v24.2/extensions/Content/Extensions/Home-extensions.html Displaying extension global config. Running: p4 extension --configure ExampleInc::LoginMOTDExt -o > /tmp/tmp.G8X1GbN6XP Tweaking Extension User (sampleExtensionsUser -> perforce). === BEGIN Extension global config contents === # A Perforce Extension Specification. # # ExtName: The name of the Extension being configured. # ExtDescription: The description of the Extension being configured. # ExtVersion: The version of the Extension being configured. # ExtUUID: The UUID/key of the Extension being configured. # ExtRev: The revision of the Extension being configured. # ExtMaxScriptTime: Maximum seconds the Extension may be run. # ExtMaxScriptMem: Maximum megabytes the Extension may use. # ExtAllowedGroups: Groups whose members may configure the Extension. # ExtEnabled: Enable/Disable this Extension. # ExtP4USER: Perforce user account for the Extension to use. # Name: The name of this Extension config. # Owner: The user who created this Extension config. # Update: Update time for the Extension config spec. # Description: The description of this Extension config. # ExtConfig: Extension-supplied configuration fields. # # See 'p4 help extension' for detailed information. ExtName: LoginMOTDExt ExtDescription: [Example Extension, sample code] This Extension allows an administrator to selectively display a MOTD/EULA/etc type text to users before they log in. E.g.: p4 login LoginMOTDExt/UUIDMASK/1.0 beta: **** This is the Extension login message Enter password: User someUser logged in. ExtVersion: 2019.1 ExtUUID: 7CBE2EDC-FD10-4852-AC2C-A5C78806A7D7 ExtRev: 1 ExtMaxScriptTime: unset ExtMaxScriptMem: unset ExtAllowedGroups: ExtEnabled: true ExtP4USER: perforce Name: LoginMOTDExt Owner: perforce Update: 2024/11/12 22:54:50 Description: The description of your config. ExtConfig: unset === END Extension global config contents === Running: p4 extension --configure ExampleInc::LoginMOTDExt -i < /tmp/tmp.G8X1GbN6XP Extension config LoginMOTDExt saved. Extension config tweaked successfully. STEP 6: Load Extension Instance config with site-local values for Extension configs, e.g. the motd text to display on login. === BEGIN Extension instance config contents === # A Perforce Extension Specification. # # ExtName: The name of the Extension being configured. # ExtDescription: The description of the Extension being configured. # ExtVersion: The version of the Extension being configured. # ExtUUID: The UUID/key of the Extension being configured. # ExtRev: The revision of the Extension being configured. # ExtMaxScriptTime: Maximum seconds the Extension may be run. # ExtMaxScriptMem: Maximum megabytes the Extension may use. # ExtEnabled: Enable/Disable this Extension. # ExtDebug: Enable Extension diagnostics. # Name: The name of this Extension config. # Owner: The user who created this Extension config. # Update: Update time for the Extension config spec. # Description: The description of this Extension config. # ExtConfig: Extension-supplied configuration fields. # # See 'p4 help extension' for detailed information. ExtName: LoginMOTDExt ExtDescription: [Example Extension, sample code] This Extension allows an administrator to selectively display a MOTD/EULA/etc type text to users before they log in. E.g.: p4 login LoginMOTDExt/UUIDMASK/1.0 beta: **** This is the Extension login message Enter password: User someUser logged in. ExtVersion: 2019.1 ExtUUID: 7CBE2EDC-FD10-4852-AC2C-A5C78806A7D7 ExtRev: 1 ExtMaxScriptTime: unset ExtMaxScriptMem: unset ExtEnabled: true ExtDebug: none Name: login_motd::LoginMOTDExt Owner: perforce Update: 2024/11/12 19:02:17 Description: The description of your config. ExtConfig: groups: SuperUsers message: Beware all ye who enter this server. serverID: master.1 === END Extension instance config contents === Running: p4 extension --configure ExampleInc::LoginMOTDExt --name login_motd::LoginMOTDExt -i < NewExtension.extension-instance.p4s Extension config login_motd::LoginMOTDExt saved. Extension instance config loaded successfully. ============================================================================== Showing modified login behavior (with motd installed). Running: p4 login < $SDP_ADMIN_PASSWORD_FILE LoginMOTDExt/7CBE2EDC-FD10-4852-AC2C-A5C78806A7D7/2019.1 GA: Beware all ye who enter this server. Enter password: User perforce logged in. ============================================================================== Demonsration complete. Enjoy Extensions. Time: Demo took about 0 hours 0 minutes 1 seconds. Log is: /home/perforce/ExtensionDemo/logs/ExtensionDemo.2024-11-12-225449.log ==============================================================================