...
- Patches are offered from .jar Java archive files or from .tar.gz tarball archive files.
- The same patch files are applied to Unix and Windows.
- Patch file names follow the scheme:
- Unix, Windows:
js7_joc.<release>-PATCH.API-<sequence>.<issue-key>[.<security-level>].[jar|tar.gz|jar}
- The following placeholders are used:
release
: The JS7 release number, see Releases.sequence
: Patches for a given release are assigned ascending numbers starting from 1. Patches with a higher number include any patches with lower numbers.issue-key
: The issue key in the SOS Change Management System, for example: JS-1984.security-level
: The security level applies if the patch is specific for JOC Cockpit running in one of the security levels low, medium, high. For details see JS7 - Security Architecture.
- Example:
- Unix, Windows:
js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
, js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz
- Patch .tar.gz archive files do not include a directory hierarchy.
...
Before applying patches users might want to verify the integrity and authenticity of downloaded patch files, see JS7 - Verifying releases.
...
The patch examples will not impact a JOC Cockpit installation and are used for instructional purposes only, for details see JS-1984.
Applying Patch on Unix
Manual Patching
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .jar file to JOC Cockpit for Unix |
---|
linenumbers | true |
---|
|
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory
# navigate to the targetdata directory for patches
cd /var/sos-berlin.com/js7/joc/webapps/joc/WEB-INF/classes
# verify the directory by checking if this file is available
ls api-schema-version.json
# download the .jar patch file
curl https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar -O
# extract the .jar file (use "jar" or "unzip" command)
jar -xf js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
# remove the .jar file
rm js7_joc.2.2.3-PATCH.API-1.JS-1984.jar |
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .tar.gz archive to JOC Cockpit for Unix |
---|
linenumbers | true |
---|
collapse | true |
---|
|
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory
# navigate to the targetdata directory for patches
cd /var/sos-berlin.com/js7/joc/webapps/joc/WEB-INF/classes
# verify the directory by checking if this file is available
ls api-schema-version.json
# download the .tar.gz patch archive
curl https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz -O
# extract the patch archive that includes .jar files
tar -xvpozf js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz
# extract each .jar file (use "jar" or "unzip" command)
jar -xf js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
# remove the .jar file and .tar.gz patch archive
rm js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
rm js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz |
...
Automated Patching
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .jar file to JOC Cockpit for WindowsUnix |
---|
linenumbers | true |
---|
|
@rem# invoke shell and switch to the user account that owns the JOC Cockpit's data directory
@rem# navigatedownload to the target.jar directorypatch for patches
cd %ProgramData%\file
curl 'https://download.sos-berlin.com\js7\joc\webapps\joc\WEB-INF\classes
@rem verify the directory by checking if this file is available
dir api-schema-version.json
@rem download from URL https://download./patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar' -O
# apply patch
./js7_install_joc.sh \
--patch-jar=js7_joc.2.2.3-PATCH.API-1.JS-1984.jar \
--patch=JS-1984 \
--patch-key=API-1 \
--home=/opt/sos-berlin.com/js7/joc \
--data=/var/sos-berlin.com/js7/joc |
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .tar.gz archive to JOC Cockpit for Unix |
---|
linenumbers | true |
---|
collapse | true |
---|
|
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory
# download the .tar.gz patch archive
curl 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz' -O
# apply the patch
./js7_install_joc.sh \
--tarball=js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz \
--patch=JS-1984 \
--patch-key=API-1 \
--home=/opt/sos-berlin.com/js7/joc \
--data=/var/sos-berlin.com/js7/joc |
Applying Patch on Windows
Manual Patching
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .jar file to JOC Cockpit for Windows |
---|
linenumbers | true |
---|
|
@rem invoke shell and switch to the user account that owns the JOC Cockpit's data directory
@rem navigate to the data directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\webapps\joc\WEB-INF\classes
@rem verify the directory by checking if this file is available
dir api-schema-version.json
@rem download from URL https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.jar
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc.2.2.3-PATCH.API-1.JS-1984.jar .
@rem extract the .jar file (use "jar" or "unzip" command)
jar -xf js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
@rem remove the .jar file
del js7_joc.2.2.3-PATCH.API-1.JS-1984.jar |
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows |
---|
linenumbers | true |
---|
collapse | true |
---|
|
@rem invoke shell and switch to the user account that owns the JOC Cockpit's data directory
@rem navigate to the data directory for patches
cd %ProgramData%\sos-berlin.com\js7\joc\webapps\joc\WEB-INF\classes
@rem verify the directory by checking if this file is available
dir api-schema-version.json
@rem download from URL https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.tar.gz
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz .
@rem extract the .tar.gz patch archive that includes .jar files
tar.exe -xf js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz
@rem extract each .jar file (use "jar" or "unzip" command)
jar -xf js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
@rem remove the .jar files and .tar.gz patch archive
del js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
del js7_jocpatches/2.2.3-patch/js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.jar
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc.2.2.3-PATCH.API-1.JS-1984.jar .
@rem extract the .jar file (use "jar" or "unzip" command)
jar -xf .tar.gz |
Automated Patching
Code Block |
---|
language | powershell |
---|
title | Example how to apply a patch from a .jar file to JOC Cockpit for Windows |
---|
linenumbers | true |
---|
|
# invoke PowerShell and switch to the user account that owns the JOC Cockpit's data directory
# download from URL
Invoke-WebRequest `
-Uri 'https://download.sos-berlin.com/patches/2.2.3-patch/js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
@rem remove the .jar file
deljar' `
-Outfile js7_joc.2.2.3-PATCH.API-1.JS-1984.jar |
Code Block |
---|
language | bash |
---|
title | Example how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows |
---|
linenumbers | true |
---|
|
@rem switch to the user account that owns the JOC Cockpit's data directory
@rem navigate to the target directory for patches
cd %ProgramData%
# apply the patch
./Install-JS7CJoc.ps1 `
-PatchJar js7_joc.2.2.3-PATCH.API-1.JS-1984.jar `
-Patch JS-1984 `
-PatchKey API-1 `
-HomeDir $env:ProgramFiles\sos-berlin.com\js7\joc\webapps\joc\WEB-INF\classes
@rem verify the directory by checking if this file is available
dir api-schema-version.json
@rem download from URL https://download. `
-Data $env:ProgramData\sos-berlin.com\js7\joc |
Code Block |
---|
language | powershell |
---|
title | Example how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows |
---|
linenumbers | true |
---|
collapse | true |
---|
|
# invoke PowerShell and switch to the user account that owns the JOC Cockpit's data directory
# download from URL
Invoke-WebRequest `
-Uri 'https://download.sos-berlin.com/patches/2.2.3-patch//patches/2.2.3-patch/js7_joc_windows.2.2.3-PATCH.API-1.JS-1984.tar.gz
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz .
@rem extract the -1984.tar.gz' patch`
archive that includes .jar files
tar.exe -xf-Outfile js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gz
@rem# extractapply each .jar file (use "jar" or "unzip" command)
jar -xfthe patch
./Install-JS7CJoc.ps1 `
-Tarball js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.jar
@rem remove the .jar files and .tar.gz patch archive
del js7_joc.2.2.3-PATCH.API-1.JS-1984.jar
del js7_joc.2.2.3-PATCH.API-1.JS-1984.tar.gzgz `
-Patch JS-1984 `
-PatchKey API-1 `
-HomeDir $env:ProgramFiles\sos-berlin.com\js7\joc `
-Data $env:ProgramData\sos-berlin.com\js7\joc |
Notes
The examples use the jar
command that is available from a Java JDK. Should a Java JDK not be in place then the unzip
command can be used.
...