Patching OTP Applications ========================= Introduction ------------ This document describes the process of patching an existing OTP installation with one or more Erlang/OTP applications of newer versions than already installed. The tool `otp_patch_apply` is available for this specific purpose. It resides in the top directory of the Erlang/OTP source tree. The `otp_patch_apply` tool utilizes the [runtime_dependencies][] tag in the [application resource file][]. This information is used to determine if the patch can be installed in the given Erlang/OTP installation directory. Read more about the [version handling][] introduced in Erlang/OTP release 17, which also describes how to determine if an installation includes one or more patched applications. If you want to apply patches of multiple OTP applications that resides in different OTP versions, you have to apply these patches in multiple steps. It is only possible to apply multiple OTP applications from the same OTP version at once. Prerequisites ------------- It's assumed that the reader is familiar with [building and installing Erlang/OTP][]. To be able to patch an application, the following must exist: * An Erlang/OTP installation. * An Erlang/OTP source tree containing the updated applications that you want to patch into the existing Erlang/OTP installation. Using otp\_patch\_apply ----------------------- > *WARNING*: Patching applications is a one-way process. > Create a backup of your OTP installation directory before > proceeding. First of all, build the OTP source tree at `$ERL_TOP` containing the updated applications. > *NOTE*: Before applying a patch you need to do a *full* build > of OTP in the source directory. If you are building in `git` you first need to generate the `configure` scripts: $ ./otp_build autoconf Configure and build all applications in OTP: $ configure $ make or $ ./otp_build configure $ ./otp_build boot -a If you have installed documentation in the OTP installation, also build the documentation: $ make docs After the successful build it's time to patch. The source tree directory, the directory of the installation and the applications to patch are given as arguments to `otp_patch_apply`. The dependencies of each application are validated against the applications in the installation and the other applications given as arguments. If a dependency error is detected, the script will be aborted. The `otp_patch_apply` syntax: $ otp_patch_apply -s