Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Caution: Do not apply the patch from the example to any JOC Cockpit release different from 2.5.3, for details see JOC-1550.

Applying Patch on Unix

Manual Patching

Code Block
languagebash
titleExample how to apply a patch from a .tar.gz archive to JOC Cockpit for Unix
linenumberstrue
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory

# navigate to the data directory for patches
cd /var/sos-berlin.com/js7/joc/webapps/joc

# verify the directory by checking if this file is available
ls version.json

# take a backup
tar --exclude=./WEB-INF -cvpzf /tmp/backup-joc-cockpit-$(date +"%Y%m%d-%H%M%S").tar.gz .

# remove existing files and directories
find . -maxdepth 1 -type f -delete && rm -d -r ./assets ./styles

# download the patch archive
curl https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz -O

# extract the .tar.gz patch archive
tar -xvpozf js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

# remove the .tar.gz patch archive
rm js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

Automated Patching

Code Block
languagepowershell
titleExample how to apply a patch from a .tar.gz archive to JOC Cockpit for Unix
linenumberstrue
# invoke shell and switch to the user account that owns the JOC Cockpit's data directory

# download from patch URL
curl 'https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz' -O

# apply patch
./js7_install_joc.sh \
    --tarball=js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz \
    --patch=JS-1550 \
    --patch-key=GUI-1 \
    --home=/opt/sos-berlin.com/js7/joc \
    --data=/var/sos-berlin.com/js7/joc \
    --backup-dir=/tmp

Applying Patch on Windows

Manual Patching

Code Block
languagebash
titleExample how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows
linenumberstrue
collapsetrue
@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

@rem verify the directory by checking if this file is available
dir version.json

@rem take a backup
set month=%date:~3,2%
set day=%date:~0,2%
set year=%date:~6,4%
set hour=%time:~0,2%
set minute=%time:~3,2%
set second=%time:~6,2%
tar.exe --exclude .\WEB-INF -cf %TEMP%\backup-joc-cockpit-%year%%month%%day%-%hour%%minute%%second%.zip .

@rem remove existing files and directories
del /q *.*
rmdir /q /s .\assets
rmdir /q /s .\styles

@rem download from URL https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz
@rem copy from download location (could be different from this example)
copy %USERPROFILE%\Downloads\js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz .

@rem extract the .tar.gz patch archive
tar.exe -xf js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

@rem remove the .tar.gz patch archive
del js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

Automated Patching

Code Block
languagepowershell
titleExample how to apply a patch from a .tar.gz archive to JOC Cockpit for Windows
linenumberstrue
collapsetrue
# invoke PowerShell and switch to the user account that owns the JOC Cockpit's data directory

# download from patch URL
Invoke-WebRequest `
    -Uri 'https://download.sos-berlin.com/patches/2.5.3-patch/js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz' `
    -Outfile js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz

# apply patch
./Install-JS7CJoc.ps1 `
    -Tarball js7_joc.2.5.3-PATCH.GUI-1.JOC-1550.tar.gz `
    -Patch JS-1550 `
    -PatchKey GUI-1 `
    -HomeDir $env:ProgamFiles\sos-berlin.com\js7\joc `
    -Data $env:ProgramData\sos-berlin.com\js7\joc `
    -BackupDir $env:TEMP

Note: The JOC Cockpit has to be restarted to apply patches.

...