From e10079c3793da3d0f6d76adaf38422cba63bc427 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Mon, 28 Nov 2011 10:39:15 +0100
Subject: Fix minor faults in documentation of release handling
Fix typos or minor faults.
Move out code listing of target_system.erl, and use codeinclude
statement to include this file from sasl/examples directory.
---
system/doc/system_principles/create_target.xmlsrc | 295 +++-------------------
1 file changed, 33 insertions(+), 262 deletions(-)
(limited to 'system/doc/system_principles')
diff --git a/system/doc/system_principles/create_target.xmlsrc b/system/doc/system_principles/create_target.xmlsrc
index 1564423e00..bc2a76db47 100644
--- a/system/doc/system_principles/create_target.xmlsrc
+++ b/system/doc/system_principles/create_target.xmlsrc
@@ -44,9 +44,9 @@
may be irrelevant for the purpose in question. Thus, there is a
need to be able to create a new system based on a given
Erlang/OTP system, where dispensable applications are removed,
- and a set of new applications that are included in the new
- system. Documentation and source code is irrelevant and is
- therefore not included in the new system.
+ and a set of new applications are included. Documentation and
+ source code is irrelevant and is therefore not included in the
+ new system.
This chapter is about creating such a system, which we call a
target system.
In the following sections we consider creating target systems with
@@ -63,10 +63,11 @@
We only consider the case when Erlang/OTP is running on a UNIX
system.
-
There is an example Erlang module target_system.erl that
- contains functions for creating and installing a target system.
- That module is used in the examples below. The source code of
- the module is listed at the end of this chapter.
+
In the sasl application there is an example Erlang
+ module target_system.erl that contains functions for
+ creating and installing a target system. This module is used in
+ the examples below, and the source code of the module is listed
+ at the end of this chapter.
The file releases/FIRST/start.boot is a copy of our
- mysystem.boot, and a copy of the original
- mysystem.rel has been put in the releases
- directory.
+ mysystem.boot
+
The release resource file mysystem.rel is duplicated
+ in the tar file. Originally, this file was only stored in
+ the releases directory in order to make it possible
+ for the release_handler to extract this file
+ separately. After unpacking the tar
+ file, release_handler would automatically copy the
+ file to releases/FIRST. However, sometimes the tar
+ file is unpacked without involving
+ the release_handler (e.g. when unpacking the first
+ target system) and therefore the file is now instead
+ duplicated in the tar file so no manual copying is
+ necessary.
Creates the temporary directory tmp and extracts the tar file
mysystem.tar.gz into that directory. Deletes the erl and start files from
- tmp/erts-5.1/bin. XXX Why.
+ tmp/erts-5.1/bin. These files will be created again from
+ source when installing the release.
Creates the directory tmp/bin.
- Copies the previously creates file plain.boot to
+ Copies the previously created file plain.boot to
tmp/bin/start.boot.Copies the files epmd, run_erl, and
to_erl from the directory tmp/erts-5.1/bin to
the directory tmp/bin.
- Creates the file tmp/releases/start_erl.data with the
- contents "5.1 FIRST".
+ Creates the file tmp/releases/start_erl.data with
+ the contents "5.1 FIRST". This file is to be passed as data
+ file to the start_erl script.
Recreates the file mysystem.tar.gz from the directories
in the directory tmp, and removes tmp.
@@ -210,7 +224,7 @@ os> /usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
file of the release version found
("releases/FIRST/start.boot").
start_erl also assumes that there is sys.config in
- release version directory ("releases/FIRST/sys.config). That
+ release version directory ("releases/FIRST/sys.config"). That
is the topic of the next section (see below).
The start_erl shell script should normally not be
altered by the user.
@@ -222,7 +236,7 @@ os> /usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
sys.config in the release version directory
("releases/FIRST/sys.config"). If there is no such a
file, the system start will fail. Hence such a file has to
- added as well.
+ be added as well.
If you have system configuration data that are neither file
location dependent nor site dependent, it may be convenient to
@@ -245,252 +259,9 @@ os> /usr/local/erl-target/bin/erl -boot /usr/local/erl-target/releases/FI
Listing of target_system.erl
- This module can also be found in the examples directory
+ of the sasl application.