Difference between revisions of "RPM Packager"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
Line 21: Line 21:
 
----
 
----
 
<div><div class="titlepage"><div><div>
 
<div><div class="titlepage"><div><div>
=<span id="id2610884">Preface</span>=
+
=<span id="id2767031">Preface</span>=
 
</div></div></div><p>
 
</div></div></div><p>
 
The Spec File to build the <span class="productname">Adempiere</span> RPM was developed and tested on
 
The Spec File to build the <span class="productname">Adempiere</span> RPM was developed and tested on
Line 30: Line 30:
 
</p><p>
 
</p><p>
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2609432"></span><span id="Version and Release Numbering"></span>Version and Release Numbering
+
;<span id="id2765586"></span><span id="Version and Release Numbering"></span>Version and Release Numbering
 
:<p>
 
:<p>
 
Version information should be in the form:
 
Version information should be in the form:
Line 53: Line 53:
 
</pre><p>
 
</pre><p>
 
</p>
 
</p>
;<span id="id2609432"></span><span id="Pre-built Binaries and Libraries"></span>Pre-built Binaries and Libraries
+
;<span id="id2765586"></span><span id="Pre-built Binaries and Libraries"></span>Pre-built Binaries and Libraries
 
:<p>
 
:<p>
 
All binaries and libraries in <span class="productname">Fedora</span> packages must be built from source code.
 
All binaries and libraries in <span class="productname">Fedora</span> packages must be built from source code.
Line 71: Line 71:
 
for the time being.
 
for the time being.
 
</p>
 
</p>
;<span id="id2609432"></span><span id="Spec File Legibility"></span>Spec File Legibility
+
;<span id="id2765586"></span><span id="Spec File Legibility"></span>Spec File Legibility
 
:<p>
 
:<p>
 
All efforts have been made to keep the Spec File legible, whereby priority has been given to
 
All efforts have been made to keep the Spec File legible, whereby priority has been given to
Line 111: Line 111:
 
starting with number 100.
 
starting with number 100.
 
</p>
 
</p>
;<span id="id2609432"></span><span id="Tags"></span>Tags
+
;<span id="id2765586"></span><span id="Tags"></span>Tags
 
:<p>
 
:<p>
 
The <code class="varname">Packager</code> and <code class="varname">Vendor</code> tags are used in spite of the guideline's
 
The <code class="varname">Packager</code> and <code class="varname">Vendor</code> tags are used in spite of the guideline's
Line 120: Line 120:
 
<span class="productname">RedHat</span>-like systems.
 
<span class="productname">RedHat</span>-like systems.
 
</p>
 
</p>
;<span id="id2609432"></span><span id="Requirements"></span>Requirements
+
;<span id="id2765586"></span><span id="Requirements"></span>Requirements
 
:<p>
 
:<p>
 
<span class="productname">Adempiere</span> requires <span class="productname">Java</span> to run. As of
 
<span class="productname">Adempiere</span> requires <span class="productname">Java</span> to run. As of
Line 135: Line 135:
 
distribution he wants, but <span class="productname">openJDK</span> must at least be installed.
 
distribution he wants, but <span class="productname">openJDK</span> must at least be installed.
 
</p>
 
</p>
;<span id="id2609432"></span><span id="Documentation"></span>Documentation
+
;<span id="id2765586"></span><span id="Documentation"></span>Documentation
 
:<p>
 
:<p>
 
<span class="productname">Adempiere</span> mainly uses online documentation. Text files such as README
 
<span class="productname">Adempiere</span> mainly uses online documentation. Text files such as README
Line 142: Line 142:
 
found and without distinguishing whether they are for users, administrators or developers.
 
found and without distinguishing whether they are for users, administrators or developers.
 
</p>
 
</p>
;<span id="id2609432"></span><span id="Users and Groups"></span>Users and Groups
+
;<span id="id2765586"></span><span id="Users and Groups"></span>Users and Groups
 
:<p>
 
:<p>
 
If the <code class="code">adempiere</code> user or group already exists on the target system, an attempt is made
 
If the <code class="code">adempiere</code> user or group already exists on the target system, an attempt is made
Line 151: Line 151:
  
 
<div>
 
<div>
=<span id="id2609858">Introduction</span>=
+
=<span id="id2766011">Introduction</span>=
 
</div><div><div class="titlepage"><div><div>
 
</div><div><div class="titlepage"><div><div>
==<span id="id2609864">Platform Independence</span>==
+
==<span id="id2766018">Platform Independence</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
<span class="productname">Adempiere</span> is written in <span class="productname">Java</span> and as such strives to run on
 
<span class="productname">Adempiere</span> is written in <span class="productname">Java</span> and as such strives to run on
Line 169: Line 169:
 
which shall be examined in more detail.
 
which shall be examined in more detail.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
==<span id="id2609938">Linux Issues</span>==
+
==<span id="id2766092">Linux Issues</span>==
 
</div></div></div><div><div class="titlepage"><div><div>
 
</div></div></div><div><div class="titlepage"><div><div>
===<span id="id2609944">The Filesystem Hierarchy Standard</span>===
+
===<span id="id2766098">The Filesystem Hierarchy Standard</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
<span class="productname">Linux</span> follows the Filesystem Hierarchy Standard
 
<span class="productname">Linux</span> follows the Filesystem Hierarchy Standard
Line 184: Line 184:
 
</p><p>
 
</p><p>
 
For such cases the FHS provides the <code class="filename">/opt</code> directory, where add-on packages may install
 
For such cases the FHS provides the <code class="filename">/opt</code> directory, where add-on packages may install
all static files in their own subdirectory.<sup>[[#ftn.id2610206|1]]</sup>
+
all static files in their own subdirectory.<sup>[[#ftn.id2766361|1]]</sup>
 
</p><p>
 
</p><p>
 
Technically, even when using the <code class="filename">/opt</code> hierarchy, configuration files should actually still
 
Technically, even when using the <code class="filename">/opt</code> hierarchy, configuration files should actually still
Line 195: Line 195:
 
But would strictly following the FHS standard really make sense?
 
But would strictly following the FHS standard really make sense?
 
</p><div><div class="titlepage"><div><div>
 
</p><div><div class="titlepage"><div><div>
====<span id="id2610260">Configuration Files</span>====
+
====<span id="id2766414">Configuration Files</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
The rational for having all host-specific configuration files under a single directory is that
 
The rational for having all host-specific configuration files under a single directory is that
Line 222: Line 222:
 
directories as hidden files (filenames preceded with a .).
 
directories as hidden files (filenames preceded with a .).
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
====<span id="id2610340">Executable Binaries</span>====
+
====<span id="id2766494">Executable Binaries</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
Having all executables in one directory makes it easy to include that directory in a user's path so that
 
Having all executables in one directory makes it easy to include that directory in a user's path so that
Line 240: Line 240:
 
Executables are thefore best left where they are.
 
Executables are thefore best left where they are.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
====<span id="id2610404">Libraries and Resources</span>====
+
====<span id="id2766558">Libraries and Resources</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
Libraries and resources are exactly the kind of files to be placed under <code class="filename">/opt/adempiere</code>,
 
Libraries and resources are exactly the kind of files to be placed under <code class="filename">/opt/adempiere</code>,
Line 246: Line 246:
 
nothing needs to be changed.
 
nothing needs to be changed.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
====<span id="id2610422">Documentation</span>====
+
====<span id="id2766576">Documentation</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
<span class="productname">Adempiere</span> mainly uses online documentation for users and a
 
<span class="productname">Adempiere</span> mainly uses online documentation for users and a
Line 255: Line 255:
 
<code class="filename">/usr/share/doc/adempiere</code> where they can easily be found.
 
<code class="filename">/usr/share/doc/adempiere</code> where they can easily be found.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
====<span id="id2610456">Data and Variable State Files</span>====
+
====<span id="id2766609">Data and Variable State Files</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
<span class="productname">Adempiere</span> does not keep its own data files but rather stores all data in an external
 
<span class="productname">Adempiere</span> does not keep its own data files but rather stores all data in an external
 
database such as <span class="productname">Oracle</span> or <span class="productname">postgreSQL</span>.
 
database such as <span class="productname">Oracle</span> or <span class="productname">postgreSQL</span>.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
====<span id="id2610478">Log Files</span>====
+
====<span id="id2766632">Log Files</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
Although the FHS states that no files should exist outside of the <code class="filename">/opt</code>, <code class="filename">/var/opt</code>,
 
Although the FHS states that no files should exist outside of the <code class="filename">/opt</code>, <code class="filename">/var/opt</code>,
Line 274: Line 274:
 
logging) than clogging up the <span class="productname">Adempiere</span> partition.
 
logging) than clogging up the <span class="productname">Adempiere</span> partition.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
====<span id="id2611258">Exceptional Files</span>====
+
====<span id="id2767401">Exceptional Files</span>====
 
</div></div></div><p>
 
</div></div></div><p>
 
Other files which would need to reside in specific locations to function properly would include
 
Other files which would need to reside in specific locations to function properly would include
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2611268"></span><span id="/etc/rc.d/init.d/adempiere"></span>/etc/rc.d/init.d/adempiere
+
;<span id="id2767410"></span><span id="/etc/rc.d/init.d/adempiere"></span>/etc/rc.d/init.d/adempiere
 
:<p>An init script to start and stop the application server.</p>
 
:<p>An init script to start and stop the application server.</p>
;<span id="id2611268"></span><span id="/etc/sysconfig/adempiere"></span>/etc/sysconfig/adempiere
+
;<span id="id2767410"></span><span id="/etc/sysconfig/adempiere"></span>/etc/sysconfig/adempiere
 
:<p>Configuration file for the init script.</p>
 
:<p>Configuration file for the init script.</p>
;<span id="id2611268"></span><span id="/etc/profile.d/adempiere.sh"></span>/etc/profile.d/adempiere.sh
+
;<span id="id2767410"></span><span id="/etc/profile.d/adempiere.sh"></span>/etc/profile.d/adempiere.sh
 
:<p>A short script to set the <code class="varname">ADEMPIERE_HOME</code> variable system-wide for all users.</p>
 
:<p>A short script to set the <code class="varname">ADEMPIERE_HOME</code> variable system-wide for all users.</p>
;<span id="id2611268"></span><span id="/usr/share/applications/adempiere.desktop"></span>/usr/share/applications/adempiere.desktop
+
;<span id="id2767410"></span><span id="/usr/share/applications/adempiere.desktop"></span>/usr/share/applications/adempiere.desktop
 
:<p>A descriptive file to add a menu item for starting the client on the users' desktop.</p>
 
:<p>A descriptive file to add a menu item for starting the client on the users' desktop.</p>
;<span id="id2611268"></span><span id="/var/log/adempiere"></span>/var/log/adempiere
+
;<span id="id2767410"></span><span id="/var/log/adempiere"></span>/var/log/adempiere
 
:<p>
 
:<p>
 
As previously explained, a central log file used by the system logger to collect and manage all
 
As previously explained, a central log file used by the system logger to collect and manage all
Line 295: Line 295:
 
the vanilla <span class="productname">Adempiere</span> distribution.
 
the vanilla <span class="productname">Adempiere</span> distribution.
 
</p></div></div><div><div class="titlepage"><div><div>
 
</p></div></div><div><div class="titlepage"><div><div>
===<span id="id2611357">Running as Daemon</span>===
+
===<span id="id2767501">Running as Daemon</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
The standard <span class="productname">Adempiere</span> distribution comes with the <span class="command"><strong>RUN_Server2.sh</strong></span>
 
The standard <span class="productname">Adempiere</span> distribution comes with the <span class="command"><strong>RUN_Server2.sh</strong></span>
and <span class="command"><strong>RUN_Server2Stop.sh</strong></span> commands to start respectively stop the application server.<sup>[[#ftn.id2611378|2]]</sup>
+
and <span class="command"><strong>RUN_Server2Stop.sh</strong></span> commands to start respectively stop the application server.<sup>[[#ftn.id2767522|2]]</sup>
 
</p><p>
 
</p><p>
 
The scripts are designed to run in the foreground dumping log information to the console from which they
 
The scripts are designed to run in the foreground dumping log information to the console from which they
Line 318: Line 318:
 
<span class="command"><strong>chkconfig</strong></span>.
 
<span class="command"><strong>chkconfig</strong></span>.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
===<span id="id2611464">Desktop Integration</span>===
+
===<span id="id2767606">Desktop Integration</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
Any user who wants to run the server or client must have the <code class="varname">ADEMPIERE_HOME</code> environment variable
 
Any user who wants to run the server or client must have the <code class="varname">ADEMPIERE_HOME</code> environment variable
Line 327: Line 327:
 
than having to open a console and typing <span class="command"><strong>$ADEMPIERE_HOME/RUN_Adempiere.sh</strong></span>.
 
than having to open a console and typing <span class="command"><strong>$ADEMPIERE_HOME/RUN_Adempiere.sh</strong></span>.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
===<span id="id2611495">Package Management</span>===
+
===<span id="id2767637">Package Management</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
On <span class="productname">RedHat</span>-like systems, software installation, upgrading, and uninstallation should
 
On <span class="productname">RedHat</span>-like systems, software installation, upgrading, and uninstallation should
Line 333: Line 333:
 
and servers.
 
and servers.
 
</p></div></div><div><div class="titlepage"><div><div>
 
</p></div></div><div><div class="titlepage"><div><div>
==<span id="id2611513">How the Adempiere Source-RPM works</span>==
+
==<span id="id2767655">How the Adempiere Source-RPM works</span>==
 
</div></div></div><div><div class="titlepage"><div><div>
 
</div></div></div><div><div class="titlepage"><div><div>
===<span id="id2611519">Preparation</span>===
+
===<span id="id2767661">Preparation</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
The <span class="productname">Adempiere</span> source code is downloaded from the
 
The <span class="productname">Adempiere</span> source code is downloaded from the
Line 361: Line 361:
 
project instead of just silently applying them to his local copy).
 
project instead of just silently applying them to his local copy).
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
===<span id="id2611608">Building</span>===
+
===<span id="id2767750">Building</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
First the orginal source is compiled to build the pristine package.
 
First the orginal source is compiled to build the pristine package.
Line 382: Line 382:
 
As a last step, the documentation for the Source-RPM (this text!) is generated.
 
As a last step, the documentation for the Source-RPM (this text!) is generated.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
===<span id="id2611661">Packaging</span>===
+
===<span id="id2767803">Packaging</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
The build results are installed in a root file system as they should appear on the target system when they
 
The build results are installed in a root file system as they should appear on the target system when they
Line 405: Line 405:
 
be distributed and installed on other machines.
 
be distributed and installed on other machines.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
===<span id="id2611743">Installation on the Target System</span>===
+
===<span id="id2767885">Installation on the Target System</span>===
 
</div></div></div><p>
 
</div></div></div><p>
 
When the <span class="productname">Adempiere</span> packages are installed on the target machines, their behavior differs
 
When the <span class="productname">Adempiere</span> packages are installed on the target machines, their behavior differs
 
depending on the kind of package (client, server, pristine) and the type of installation (installation, upgrade, removal).
 
depending on the kind of package (client, server, pristine) and the type of installation (installation, upgrade, removal).
 
</p><div><div class="titlepage"><div><div>
 
</p><div><div class="titlepage"><div><div>
====<span id="id2611760">Installation</span>====
+
====<span id="id2767902">Installation</span>====
 
</div></div></div><div class="informaltable"><span id="tblInstallation"></span><table border="1"><tr><th align="left">Step</th><th align="center">Client</th><th align="center">Server</th><th align="center">Pristine</th></tr><tr><td rowspan="3" align="left">pre-install</td><td align="center">---</td><td align="center">create <code class="code">adempiere</code> user</td><td align="center">---</td></tr><tr><td colspan="3" align="center">create user home directory</td></tr><tr><td colspan="3" align="center">configure rsyslog</td></tr><tr><td align="left">install</td><td colspan="3" align="center">install files</td></tr><tr><td rowspan="2" align="left">post-install</td><td colspan="2" align="center">create ADEMPIERE_HOME symbolic link</td><td align="center">---</td></tr><tr><td align="center">---</td><td align="center">autostart server on system boot</td><td align="center">---</td></tr></table></div></div><div><div class="titlepage"><div><div>
 
</div></div></div><div class="informaltable"><span id="tblInstallation"></span><table border="1"><tr><th align="left">Step</th><th align="center">Client</th><th align="center">Server</th><th align="center">Pristine</th></tr><tr><td rowspan="3" align="left">pre-install</td><td align="center">---</td><td align="center">create <code class="code">adempiere</code> user</td><td align="center">---</td></tr><tr><td colspan="3" align="center">create user home directory</td></tr><tr><td colspan="3" align="center">configure rsyslog</td></tr><tr><td align="left">install</td><td colspan="3" align="center">install files</td></tr><tr><td rowspan="2" align="left">post-install</td><td colspan="2" align="center">create ADEMPIERE_HOME symbolic link</td><td align="center">---</td></tr><tr><td align="center">---</td><td align="center">autostart server on system boot</td><td align="center">---</td></tr></table></div></div><div><div class="titlepage"><div><div>
====<span id="id2611987">Upgrade</span>====
+
====<span id="id2768130">Upgrade</span>====
 
</div></div></div><div class="informaltable"><span id="tblUpgrade"></span><table border="1"><tr><th align="left">Step</th><th align="center">Client</th><th align="center">Server</th><th align="center">Pristine</th></tr><tr><td rowspan="3" align="left">pre-install</td><td align="center">---</td><td align="center">create <code class="code">adempiere</code> user</td><td align="center">---</td></tr><tr><td colspan="3" align="center">create user home directory</td></tr><tr><td colspan="3" align="center">configure rsyslog</td></tr><tr><td align="left">install</td><td colspan="3" align="center">install new files</td></tr><tr><td rowspan="2" align="left">post-install</td><td colspan="2" align="center">create <code class="varname">ADEMPIERE_HOME</code> symbolic link</td><td align="center">---</td></tr><tr><td align="center">---</td><td align="center">autostart server on system boot</td><td align="center">---</td></tr><tr><td align="left">pre-uninstall</td><td colspan="3" align="center">---</td></tr><tr><td align="left">uninstall</td><td colspan="3" align="center">remove old files</td></tr><tr><td align="left">post-uninstall</td><td align="center">---</td><td align="center">restart server</td><td align="center">---</td></tr></table></div></div><div><div class="titlepage"><div><div>
 
</div></div></div><div class="informaltable"><span id="tblUpgrade"></span><table border="1"><tr><th align="left">Step</th><th align="center">Client</th><th align="center">Server</th><th align="center">Pristine</th></tr><tr><td rowspan="3" align="left">pre-install</td><td align="center">---</td><td align="center">create <code class="code">adempiere</code> user</td><td align="center">---</td></tr><tr><td colspan="3" align="center">create user home directory</td></tr><tr><td colspan="3" align="center">configure rsyslog</td></tr><tr><td align="left">install</td><td colspan="3" align="center">install new files</td></tr><tr><td rowspan="2" align="left">post-install</td><td colspan="2" align="center">create <code class="varname">ADEMPIERE_HOME</code> symbolic link</td><td align="center">---</td></tr><tr><td align="center">---</td><td align="center">autostart server on system boot</td><td align="center">---</td></tr><tr><td align="left">pre-uninstall</td><td colspan="3" align="center">---</td></tr><tr><td align="left">uninstall</td><td colspan="3" align="center">remove old files</td></tr><tr><td align="left">post-uninstall</td><td align="center">---</td><td align="center">restart server</td><td align="center">---</td></tr></table></div></div><div><div class="titlepage"><div><div>
====<span id="id2612280">Removal</span>====
+
====<span id="id2768422">Removal</span>====
</div></div></div><div class="informaltable"><span id="tblRemoval"></span><table border="1"><tr><th align="left">Step</th><th align="center">Client</th><th align="center">Server</th><th align="center">Pristine</th></tr><tr><td rowspan="3" align="left">pre-uninstall</td><td align="center">---</td><td align="center">stop server</td><td align="center">---</td></tr><tr><td colspan="3" align="center">unconfigure autostart of server on system boot if no other server packages are installed</td></tr><tr><td colspan="3" align="center">remove <code class="varname">ADEMPIERE_HOME</code> symbolic link if it points to this installation</td></tr><tr><td align="left">uninstall</td><td colspan="3" align="center">remove old files</td></tr><tr><td rowspan="7" align="left">post-uninstall</td><td colspan="3" align="center">remove installation directory</td></tr><tr><td colspan="3" align="center">unconfigure rsyslog if no more server installations exist</td></tr><tr><td colspan="3" align="center">unconfigure system-wide setting of <code class="varname">ADEMPIERE_HOME</code> if no more server or client installations exist</td></tr><tr><td colspan="3" align="center">remove desktop menu entry if no more server or client installations exist</td></tr><tr><td colspan="3" align="center">remove <code class="varname">ADEMPIERE_HOME</code> symbolic link if no more server or client installations exist</td></tr><tr><td colspan="3" align="center">remove user home directory and documentation if no other installations exist</td></tr><tr><td colspan="3" align="center">create <code class="varname">ADEMPIERE_HOME</code> symbolic link to newest server or client if any server or client installations exist</td></tr></table></div></div></div></div><div class="footnotes"><br><hr width="100" align="left"><div><p><sup>[<span id="ftn.id2610206" class="para">1</span>] </sup>Which means that according to the FHS,
+
</div></div></div><div class="informaltable"><span id="tblRemoval"></span><table border="1"><tr><th align="left">Step</th><th align="center">Client</th><th align="center">Server</th><th align="center">Pristine</th></tr><tr><td rowspan="3" align="left">pre-uninstall</td><td align="center">---</td><td align="center">stop server</td><td align="center">---</td></tr><tr><td colspan="3" align="center">unconfigure autostart of server on system boot if no other server packages are installed</td></tr><tr><td colspan="3" align="center">remove <code class="varname">ADEMPIERE_HOME</code> symbolic link if it points to this installation</td></tr><tr><td align="left">uninstall</td><td colspan="3" align="center">remove old files</td></tr><tr><td rowspan="7" align="left">post-uninstall</td><td colspan="3" align="center">remove installation directory</td></tr><tr><td colspan="3" align="center">unconfigure rsyslog if no more server installations exist</td></tr><tr><td colspan="3" align="center">unconfigure system-wide setting of <code class="varname">ADEMPIERE_HOME</code> if no more server or client installations exist</td></tr><tr><td colspan="3" align="center">remove desktop menu entry if no more server or client installations exist</td></tr><tr><td colspan="3" align="center">remove <code class="varname">ADEMPIERE_HOME</code> symbolic link if no more server or client installations exist</td></tr><tr><td colspan="3" align="center">remove user home directory and documentation if no other installations exist</td></tr><tr><td colspan="3" align="center">create <code class="varname">ADEMPIERE_HOME</code> symbolic link to newest server or client if any server or client installations exist</td></tr></table></div></div></div></div><div class="footnotes"><br><hr width="100" align="left"><div><p><sup>[<span id="ftn.id2766361" class="para">1</span>] </sup>Which means that according to the FHS,
<span class="productname">Adempiere</span> should always be installed in <code class="filename">/opt/adempiere</code>.</p></div><div><p><sup>[<span id="ftn.id2611378" class="para">2</span>] </sup>The <span class="quote">&#8220;<span class="quote">2</span>&#8221;</span> is presumabely a remnant from the days before <span class="productname">Adempiere</span>
+
<span class="productname">Adempiere</span> should always be installed in <code class="filename">/opt/adempiere</code>.</p></div><div><p><sup>[<span id="ftn.id2767522" class="para">2</span>] </sup>The <span class="quote">&#8220;<span class="quote">2</span>&#8221;</span> is presumabely a remnant from the days before <span class="productname">Adempiere</span>
 
forked from <span class="productname">Compiere</span>, where these scripts where used to control the new version 2
 
forked from <span class="productname">Compiere</span>, where these scripts where used to control the new version 2
 
server, as opposed to <span class="command"><strong>RUN_Server.sh</strong></span> and <span class="command"><strong>RUN_ServerStop.sh</strong></span> controlling
 
server, as opposed to <span class="command"><strong>RUN_Server.sh</strong></span> and <span class="command"><strong>RUN_ServerStop.sh</strong></span> controlling
Line 422: Line 422:
  
 
<div>
 
<div>
=<span id="id2612583">Preparing the Package Building Environment</span>=
+
=<span id="id2768725">Preparing the Package Building Environment</span>=
 
</div><div><div class="titlepage"><div><div>
 
</div><div><div class="titlepage"><div><div>
==<span id="id2612589">Required Development Tools</span>==
+
==<span id="id2768731">Required Development Tools</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Install the tools required for building the <span class="productname">Adempiere</span> RPM. (This needs to be done as <code class="code">root</code>).
 
Install the tools required for building the <span class="productname">Adempiere</span> RPM. (This needs to be done as <code class="code">root</code>).
Line 430: Line 430:
 
<code class="prompt"># </code><span class="command"><strong>yum install rpm-build rpmdevtools gnupg mercurial java-1.6.0-openjdk-devel desktop-file-utils docbook5-style-xsl libxslt fop</strong></span>
 
<code class="prompt"># </code><span class="command"><strong>yum install rpm-build rpmdevtools gnupg mercurial java-1.6.0-openjdk-devel desktop-file-utils docbook5-style-xsl libxslt fop</strong></span>
 
</p></div></div><div><div class="titlepage"><div><div>
 
</p></div></div><div><div class="titlepage"><div><div>
==<span id="id2612623">RPM Build Tree</span>==
+
==<span id="id2768765">RPM Build Tree</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Create the RPM build tree in your home directory.
 
Create the RPM build tree in your home directory.
Line 533: Line 533:
  
 
<div>
 
<div>
=<span id="id2612862">Using the Adempiere SRPM</span>=
+
=<span id="id2769004">Using the Adempiere SRPM</span>=
 
</div><div><div class="titlepage"><div><div>
 
</div><div><div class="titlepage"><div><div>
==<span id="id2612871">Installing the Source-RPM</span>==
+
==<span id="id2769014">Installing the Source-RPM</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Once your package building environment has been set up, you can download and unpack the <span class="productname">Adempiere</span>
 
Once your package building environment has been set up, you can download and unpack the <span class="productname">Adempiere</span>
Line 547: Line 547:
 
in <code class="filename">~/rpmbuild/SPECS/adempiere.spec</code>
 
in <code class="filename">~/rpmbuild/SPECS/adempiere.spec</code>
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
==<span id="id2612924">Configuring the Build Process</span>==
+
==<span id="id2769067">Configuring the Build Process</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Build behavior is controlled by various parameters which are set at the beginning of the Spec File.
 
Build behavior is controlled by various parameters which are set at the beginning of the Spec File.
See [[apndxA Appendix A]] for a detailed description.
+
See [[apndxA|Appendix A]] for a detailed description.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
 
==<span id="secAddCustom">Adding Customizations</span>==
 
==<span id="secAddCustom">Adding Customizations</span>==
Line 632: Line 632:
 
The patch file number is specified with the <code class="option">-P</code> (upper case P) option, and the <code class="option">-p</code>
 
The patch file number is specified with the <code class="option">-P</code> (upper case P) option, and the <code class="option">-p</code>
 
(lower case p) option tells the patch command how many leading slashes and directories are to be omitted from
 
(lower case p) option tells the patch command how many leading slashes and directories are to be omitted from
filenames in the patch file. This will be explained in the [[parPatches next chapter]].
+
filenames in the patch file. This will be explained in the [[parPatches|next chapter]].
 
</p><p>
 
</p><p>
 
For building <span class="productname">Adempiere</span> packages, the <span class="command"><strong>%patch</strong></span> macro has been extended
 
For building <span class="productname">Adempiere</span> packages, the <span class="command"><strong>%patch</strong></span> macro has been extended
 
to accept following additional parameters:
 
to accept following additional parameters:
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2613100"></span><span id="-F fuzz factor"></span>-F fuzz factor
+
;<span id="id2769242"></span><span id="-F fuzz factor"></span>-F fuzz factor
 
:<p>
 
:<p>
 
Use the given <em>fuzz factor</em>
 
Use the given <em>fuzz factor</em>
 
</p>
 
</p>
;<span id="id2613100"></span><span id="-d directory"></span>-d directory
+
;<span id="id2769242"></span><span id="-d directory"></span>-d directory
 
:<p>
 
:<p>
 
change to <em>directory</em> before doing anything
 
change to <em>directory</em> before doing anything
 
</p>
 
</p>
;<span id="id2613100"></span><span id="-a filename"></span>-a filename
+
;<span id="id2769242"></span><span id="-a filename"></span>-a filename
 
:<p>
 
:<p>
 
Apply patch only if <em>filename</em> exists.
 
Apply patch only if <em>filename</em> exists.
Line 652: Line 652:
 
absolute path, otherwise it is relative to <code class="varname">RPM_BUILD_DIR</code>.
 
absolute path, otherwise it is relative to <code class="varname">RPM_BUILD_DIR</code>.
 
</p>
 
</p>
;<span id="id2613100"></span><span id="-x regular expression"></span>-x regular expression
+
;<span id="id2769242"></span><span id="-x regular expression"></span>-x regular expression
 
:<p>
 
:<p>
 
requires <span class="command"><strong>-a</strong></span>.
 
requires <span class="command"><strong>-a</strong></span>.
Line 661: Line 661:
 
if <em>regular expression</em> does <span class="emphasis"><em>not</em></span> exist in <em>filename</em>.
 
if <em>regular expression</em> does <span class="emphasis"><em>not</em></span> exist in <em>filename</em>.
 
</p></dl></div></div><div><div class="titlepage"><div><div>
 
</p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2613241">Building the RPM packages</span>==
+
==<span id="id2769384">Building the RPM packages</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Packages are generated using the <span class="command"><strong>rpmbuild --sign -b&#8230; /path/to/adempiere.spec</strong></span> command,
 
Packages are generated using the <span class="command"><strong>rpmbuild --sign -b&#8230; /path/to/adempiere.spec</strong></span> command,
 
where the <code class="option">--sign</code> option will sign the package using the
 
where the <code class="option">--sign</code> option will sign the package using the
[[secGpgSign gpg-signature we created earlier]], and the stage up to which the packages are
+
[[secGpgSign|gpg-signature we created earlier]], and the stage up to which the packages are
 
built is defined with the <code class="option">-b&#8230;</code> switch:
 
built is defined with the <code class="option">-b&#8230;</code> switch:
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2613271"></span><span id="-bp"></span>-bp
+
;<span id="id2769413"></span><span id="-bp"></span>-bp
 
:<p>
 
:<p>
 
build up to "prep" phase only, which means downloading the source and applying patches.
 
build up to "prep" phase only, which means downloading the source and applying patches.
 
</p>
 
</p>
;<span id="id2613271"></span><span id="-bc"></span>-bc
+
;<span id="id2769413"></span><span id="-bc"></span>-bc
 
:<p>
 
:<p>
 
build up to "build" phase only, which means compiling the source.
 
build up to "build" phase only, which means compiling the source.
 
</p>
 
</p>
;<span id="id2613271"></span><span id="-bi"></span>-bi
+
;<span id="id2769413"></span><span id="-bi"></span>-bi
 
:<p>
 
:<p>
 
build up to "install" phase only, the resulting files are installed in a directory structure as
 
build up to "install" phase only, the resulting files are installed in a directory structure as
 
they would be on the target machine.
 
they would be on the target machine.
 
</p>
 
</p>
;<span id="id2613271"></span><span id="-bb"></span>-bb
+
;<span id="id2769413"></span><span id="-bb"></span>-bb
 
:<p>
 
:<p>
 
build binary packages (adempiere-&#8230;.noarch.rpm, adempiere-server-&#8230;.noarch.rpm, adempiere-client-&#8230;.noarch.rpm).
 
build binary packages (adempiere-&#8230;.noarch.rpm, adempiere-server-&#8230;.noarch.rpm, adempiere-client-&#8230;.noarch.rpm).
 
</p>
 
</p>
;<span id="id2613271"></span><span id="-bs"></span>-bs
+
;<span id="id2769413"></span><span id="-bs"></span>-bs
 
:<p>
 
:<p>
 
build source package (adempiere-&#8230;.srpm).
 
build source package (adempiere-&#8230;.srpm).
 
</p>
 
</p>
;<span id="id2613271"></span><span id="-ba"></span>-ba
+
;<span id="id2769413"></span><span id="-ba"></span>-ba
 
:<p>
 
:<p>
 
build all packages (both binary and source).
 
build all packages (both binary and source).
Line 699: Line 699:
 
</p><p>
 
</p><p>
 
When using <code class="option">--sign</code>, <span class="command"><strong>rpmbuild</strong></span> will prompt you for a passphrase. Enter the same
 
When using <code class="option">--sign</code>, <span class="command"><strong>rpmbuild</strong></span> will prompt you for a passphrase. Enter the same
phrase which was used when the [[uiPassphrase gpg key was generated]].
+
phrase which was used when the [[uiPassphrase|gpg key was generated]].
 
</p></div>
 
</p></div>
  
 
<div>
 
<div>
=<span id="id2613406">Creating Patches</span>=
+
=<span id="id2769548">Creating Patches</span>=
 
</div><p>
 
</div><p>
 
Patches are text files generated by the <span class="command"><strong>diff</strong></span> tool which compares files or directories and records
 
Patches are text files generated by the <span class="command"><strong>diff</strong></span> tool which compares files or directories and records
Line 725: Line 725:
 
</p></div><p>
 
</p></div><p>
 
Start hacking your heart out and make any changes you want in <code class="filename">adempiere.new</code>.
 
Start hacking your heart out and make any changes you want in <code class="filename">adempiere.new</code>.
<sup>[[#ftn.id2613511|3]]</sup>
+
<sup>[[#ftn.id2769653|3]]</sup>
 
When you are done, go back to the parent directory and run <span class="command"><strong>diff</strong></span> to compare
 
When you are done, go back to the parent directory and run <span class="command"><strong>diff</strong></span> to compare
 
<code class="filename">adempiere.orig</code> with <code class="filename">adempiere.new</code>
 
<code class="filename">adempiere.orig</code> with <code class="filename">adempiere.new</code>
Line 733: Line 733:
 
These are the options used in above <span class="command"><strong>diff</strong></span> command:
 
These are the options used in above <span class="command"><strong>diff</strong></span> command:
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2613559"></span><span id="-d"></span>-d
+
;<span id="id2769702"></span><span id="-d"></span>-d
 
:<p>forces <span class="command"><strong>diff</strong></span> to search for smaller sets of changes than it normally would</p>
 
:<p>forces <span class="command"><strong>diff</strong></span> to search for smaller sets of changes than it normally would</p>
;<span id="id2613559"></span><span id="-u"></span>-u
+
;<span id="id2769702"></span><span id="-u"></span>-u
 
:<p>generates unified output format, which is required by <span class="command"><strong>patch</strong></span></p>
 
:<p>generates unified output format, which is required by <span class="command"><strong>patch</strong></span></p>
;<span id="id2613559"></span><span id="-r"></span>-r
+
;<span id="id2769702"></span><span id="-r"></span>-r
 
:<p>recursively compare subdirectories</p>
 
:<p>recursively compare subdirectories</p>
;<span id="id2613559"></span><span id="-N"></span>-N
+
;<span id="id2769702"></span><span id="-N"></span>-N
 
:<p>if a file is only found in one directory, treat it as present but empty in the other directory</p>
 
:<p>if a file is only found in one directory, treat it as present but empty in the other directory</p>
;<span id="id2613559"></span><span id="-b"></span>-b
+
;<span id="id2769702"></span><span id="-b"></span>-b
 
:<p>ignores changes only in whitespace</p>
 
:<p>ignores changes only in whitespace</p>
;<span id="id2613559"></span><span id="-B"></span>-B
+
;<span id="id2769702"></span><span id="-B"></span>-B
 
:<p>ignores changes only in blank lines</p></dl></div><p>
 
:<p>ignores changes only in blank lines</p></dl></div><p>
 
</p><p>
 
</p><p>
 
The resulting patch file can be added to the <code class="filename">SOURCES</code> directory and listed in the Spec File as
 
The resulting patch file can be added to the <code class="filename">SOURCES</code> directory and listed in the Spec File as
[[secAddCustom previously explained]].
+
[[secAddCustom|previously explained]].
 
</p><p><span id="parPatches"></span>
 
</p><p><span id="parPatches"></span>
 
Note that when the patch file was created, you were in the parent directory which contains the source directory tree. But when the
 
Note that when the patch file was created, you were in the parent directory which contains the source directory tree. But when the
Line 753: Line 753:
 
directory component of filenames generated by <span class="command"><strong>diff</strong></span> must be ignored when running the <span class="command"><strong>patch</strong></span>
 
directory component of filenames generated by <span class="command"><strong>diff</strong></span> must be ignored when running the <span class="command"><strong>patch</strong></span>
 
command. This is achieved by passing <code class="option">-p1</code> to <span class="command"><strong>patch</strong></span>.
 
command. This is achieved by passing <code class="option">-p1</code> to <span class="command"><strong>patch</strong></span>.
</p><div class="footnotes"><br><hr width="100" align="left"><div><p><sup>[<span id="ftn.id2613511" class="para">3</span>] </sup>
+
</p><div class="footnotes"><br><hr width="100" align="left"><div><p><sup>[<span id="ftn.id2769653" class="para">3</span>] </sup>
 
Be careful not to actually compile the code! You only want to save changes made to the source code.
 
Be careful not to actually compile the code! You only want to save changes made to the source code.
 
But if you compile the code, many new files will be created which do not exist in the original source, and
 
But if you compile the code, many new files will be created which do not exist in the original source, and
Line 760: Line 760:
  
 
<div>
 
<div>
=<span id="id2613687">Distributing RPM Packages</span>=
+
=<span id="id2769829">Distributing RPM Packages</span>=
 
</div><div><div class="titlepage"><div><div>
 
</div><div><div class="titlepage"><div><div>
==<span id="id2613692">Installing with RPM</span>==
+
==<span id="id2769835">Installing with RPM</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
The binary packages generated by <span class="command"><strong>rpmbuild</strong></span> can now be installed on target
 
The binary packages generated by <span class="command"><strong>rpmbuild</strong></span> can now be installed on target
Line 784: Line 784:
 
manually.
 
manually.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
==<span id="id2613771">Creating a YUM Repository</span>==
+
==<span id="id2769913">Creating a YUM Repository</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
A web server is needed to distribute packages from a yum repository. The <span class="command"><strong>httpd</strong></span> server can be
 
A web server is needed to distribute packages from a yum repository. The <span class="command"><strong>httpd</strong></span> server can be
Line 820: Line 820:
 
<span class="command"><strong>createrepo .</strong></span> again.
 
<span class="command"><strong>createrepo .</strong></span> again.
 
</p></div><div><div class="titlepage"><div><div>
 
</p></div><div><div class="titlepage"><div><div>
==<span id="id2613927">Installing with YUM</span>==
+
==<span id="id2770070">Installing with YUM</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Before being able to use your new <span class="productname">Adempiere</span> repository, client
 
Before being able to use your new <span class="productname">Adempiere</span> repository, client
Line 853: Line 853:
 
=<span id="apndxA">Configuration Parameters</span>=
 
=<span id="apndxA">Configuration Parameters</span>=
 
</div></div></div><div><div class="titlepage"><div><div>
 
</div></div></div><div><div class="titlepage"><div><div>
==<span id="id2614061">General Settings</span>==
+
==<span id="id2770204">General Settings</span>==
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2614067"></span><span id="name"></span>name
+
;<span id="id2770210"></span><span id="name"></span>name
 
:<p>The name of the resulting package</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global name adempiere</code></p>
 
:<p>The name of the resulting package</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global name adempiere</code></p>
;<span id="id2614067"></span><span id="company"></span>company
+
;<span id="id2770210"></span><span id="company"></span>company
 
:<p>The name of the packager (your company)</p><p>default: <code class="constant">custom</code></p><p>example: <code class="code">%global company Some Company, Inc.</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>The name of the packager (your company)</p><p>default: <code class="constant">custom</code></p><p>example: <code class="code">%global company Some Company, Inc.</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2614125">Compile Settings</span>==
+
==<span id="id2770267">Compile Settings</span>==
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2614131"></span><span id="applyQuickFix"></span>applyQuickFix
+
;<span id="id2770273"></span><span id="applyQuickFix"></span>applyQuickFix
 
:<p>whether quick fixes should be applied</p><p>Sometimes the source does not compile and some quick fixes or workarounds must be applied. The script <code class="filename">SOURCES/s041_quickFix.sh</code> is called to apply such workarounds.</p><p>values:
 
:<p>whether quick fixes should be applied</p><p>Sometimes the source does not compile and some quick fixes or workarounds must be applied. The script <code class="filename">SOURCES/s041_quickFix.sh</code> is called to apply such workarounds.</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not apply quick Fixes</p></li><li><p><code class="constant">1</code> = apply quick Fixes</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not apply quick Fixes</p></li><li><p><code class="constant">1</code> = apply quick Fixes</p></li></ul></div><p>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global applyQuickFix 1</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global applyQuickFix 1</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2614195">Version Settings</span>==
+
==<span id="id2770337">Version Settings</span>==
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2614200"></span><span id="version"></span>version
+
;<span id="id2770343"></span><span id="version"></span>version
 
:<p>the <span class="productname">Adempiere</span> version to download and compile</p><p>values:
 
:<p>the <span class="productname">Adempiere</span> version to download and compile</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">current</code>, <code class="constant">head</code> = download newest files of the current <span class="productname">Adempiere</span> version</p></li><li><p><code class="constant">release</code> = download original files of the current <span class="productname">Adempiere</span> version as it was originally released</p></li><li><p><code class="constant">previous</code> = download newest files of the previous <span class="productname">Adempiere</span> version (just before it changed to the current version)</p></li><li><p><em>version</em> = specific <span class="productname">Adempiere</span> version to download</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">current</code>, <code class="constant">head</code> = download newest files of the current <span class="productname">Adempiere</span> version</p></li><li><p><code class="constant">release</code> = download original files of the current <span class="productname">Adempiere</span> version as it was originally released</p></li><li><p><code class="constant">previous</code> = download newest files of the previous <span class="productname">Adempiere</span> version (just before it changed to the current version)</p></li><li><p><em>version</em> = specific <span class="productname">Adempiere</span> version to download</p></li></ul></div><p>
 
</p><p>
 
</p><p>
Note that versions are relative to the current branch (see [[hgBranch hgBranch]]) in the <span class="productname">Mercurial</span> repository.
+
Note that versions are relative to the current branch (see [[hgBranch|hgBranch]]) in the <span class="productname">Mercurial</span> repository.
 
</p><p>
 
</p><p>
 
When comparing the <span class="productname">Adempiere</span> version with tags in the <span class="productname">Mercurial</span> repository,
 
When comparing the <span class="productname">Adempiere</span> version with tags in the <span class="productname">Mercurial</span> repository,
Line 881: Line 881:
 
Alternatively, it is possible to directly specify a <span class="productname">Mercurial</span> revision.
 
Alternatively, it is possible to directly specify a <span class="productname">Mercurial</span> revision.
 
In this case it is assumed that you know what you are doing, and no further sanity checks are performed.
 
In this case it is assumed that you know what you are doing, and no further sanity checks are performed.
This also overrides any settings in the [[hgBranch hgBranch]] parameter.
+
This also overrides any settings in the [[hgBranch|hgBranch]] parameter.
 
</p><p>
 
</p><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">tip</code> = download the current <span class="productname">Mercurial</span> tip</p></li><li><p><code class="constant">hg</code><em>revision</em> = download specific <span class="productname">Mercurial</span> revision</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">tip</code> = download the current <span class="productname">Mercurial</span> tip</p></li><li><p><code class="constant">hg</code><em>revision</em> = download specific <span class="productname">Mercurial</span> revision</p></li></ul></div><p>
Line 888: Line 888:
 
as literal string.
 
as literal string.
 
</p></dl></div></div><div><div class="titlepage"><div><div>
 
</p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2614405">Mercurial Settings</span>==
+
==<span id="id2770547">Mercurial Settings</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
<span class="productname">Mercurial</span> is needed to download the source code as well as gather information on the version.
 
<span class="productname">Mercurial</span> is needed to download the source code as well as gather information on the version.
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2614419"></span><span id="hgOptions"></span>hgOptions
+
;<span id="id2770561"></span><span id="hgOptions"></span>hgOptions
 
:<p>general options to use with the hg command</p><p>default: <code class="constant">--noninteractive --encoding utf8</code></p><p>example: <code class="code">%global hgOptions --quiet --noninteractive --encoding utf8</code></p>
 
:<p>general options to use with the hg command</p><p>default: <code class="constant">--noninteractive --encoding utf8</code></p><p>example: <code class="code">%global hgOptions --quiet --noninteractive --encoding utf8</code></p>
;<span id="id2614419"></span><span id="hgRepository"></span>hgRepository
+
;<span id="id2770561"></span><span id="hgRepository"></span>hgRepository
 
:<p>URL of the source code repository</p><p>default: <code class="constant">http://adempiere.hg.sourceforge.net:8000/hgroot/adempiere/adempiere</code></p><p>example: <code class="filename">%global hgRepository http://adempiere.hg.sourceforge.net/hgroot/adempiere/adempiere</code></p>
 
:<p>URL of the source code repository</p><p>default: <code class="constant">http://adempiere.hg.sourceforge.net:8000/hgroot/adempiere/adempiere</code></p><p>example: <code class="filename">%global hgRepository http://adempiere.hg.sourceforge.net/hgroot/adempiere/adempiere</code></p>
;<span id="id2614419"></span><span id="hgBranch"></span>hgBranch
+
;<span id="id2770561"></span><span id="hgBranch"></span>hgBranch
 
:<p>Named branch in the source code repository</p><p>values:
 
:<p>Named branch in the source code repository</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">master</code> = the main stable branch containing official releases</p></li><li><p><code class="constant">development</code> = the main development branch with newest features and bugfixes</p></li><li><p><code class="constant">release/</code><em>name</em> = temporary branch with "frozen" code of the next release candidate</p></li><li><p><code class="constant">hotfix/</code><em>name</em> = temporary branch for fixing bugs found in live production version of master branch</p></li><li><p><em>name</em> = any other named branch</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">master</code> = the main stable branch containing official releases</p></li><li><p><code class="constant">development</code> = the main development branch with newest features and bugfixes</p></li><li><p><code class="constant">release/</code><em>name</em> = temporary branch with "frozen" code of the next release candidate</p></li><li><p><code class="constant">hotfix/</code><em>name</em> = temporary branch for fixing bugs found in live production version of master branch</p></li><li><p><em>name</em> = any other named branch</p></li></ul></div><p>
 
</p><p>default: <code class="constant">master</code></p><p>example: <code class="code">%global hgBranch master</code></p>
 
</p><p>default: <code class="constant">master</code></p><p>example: <code class="code">%global hgBranch master</code></p>
;<span id="id2614419"></span><span id="hgVersionFile"></span>hgVersionFile
+
;<span id="id2770561"></span><span id="hgVersionFile"></span>hgVersionFile
 
:<p>the file from which to read version information</p><p>default: <code class="constant">base/src/org/compiere/Adempiere.java</code></p><p>example: <code class="code">%global hgVersionFile base/src/org/compiere/Adempiere.java</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>the file from which to read version information</p><p>default: <code class="constant">base/src/org/compiere/Adempiere.java</code></p><p>example: <code class="code">%global hgVersionFile base/src/org/compiere/Adempiere.java</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2614591">Adempiere User Settings</span>==
+
==<span id="id2770733">Adempiere User Settings</span>==
 
</div></div></div><p>OS level environment settings for the 'adempiere' user</p><div><dl>
 
</div></div></div><p>OS level environment settings for the 'adempiere' user</p><div><dl>
;<span id="id2614601"></span><span id="userDir"></span>userDir
+
;<span id="id2770743"></span><span id="userDir"></span>userDir
 
:<p>the home directory of the adempiere user</p><p>(this will be the parent directory of <code class="varname">ADEMPIERE_HOME</code>)</p><p>default: <code class="constant">/opt/adempiere</code></p><p>example: <code class="code">%global userDir /opt/adempiere</code></p>
 
:<p>the home directory of the adempiere user</p><p>(this will be the parent directory of <code class="varname">ADEMPIERE_HOME</code>)</p><p>default: <code class="constant">/opt/adempiere</code></p><p>example: <code class="code">%global userDir /opt/adempiere</code></p>
;<span id="id2614601"></span><span id="adempiereHome"></span>adempiereHome
+
;<span id="id2770743"></span><span id="adempiereHome"></span>adempiereHome
 
:<p>the location of <code class="varname">ADEMPIERE_HOME</code></p><p>If starting with a /, it is the absolute path to <code class="varname">ADEMPIERE_HOME</code>. Otherwise it will be a subdirectory under <code class="varname">%{userDir}</code>.</p><p>Note that <code class="varname">%{adempiereHome}</code> will not actually be a directory, but a symbolic link.</p><p>The package will be installed under <code class="varname">%{userDir}</code> with version information, for example
 
:<p>the location of <code class="varname">ADEMPIERE_HOME</code></p><p>If starting with a /, it is the absolute path to <code class="varname">ADEMPIERE_HOME</code>. Otherwise it will be a subdirectory under <code class="varname">%{userDir}</code>.</p><p>Note that <code class="varname">%{adempiereHome}</code> will not actually be a directory, but a symbolic link.</p><p>The package will be installed under <code class="varname">%{userDir}</code> with version information, for example
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="filename">/opt/adempiere/adempiere360lts</code> for the pristine package</p></li><li><p><code class="filename">/opt/adempiere/server360lts</code> for the server package</p></li><li><p><code class="filename">/opt/adempiere/client360lts</code> for the client package</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="filename">/opt/adempiere/adempiere360lts</code> for the pristine package</p></li><li><p><code class="filename">/opt/adempiere/server360lts</code> for the server package</p></li><li><p><code class="filename">/opt/adempiere/client360lts</code> for the client package</p></li></ul></div><p>
Line 915: Line 915:
 
and by changing the symbolic link you can choose which version to run.
 
and by changing the symbolic link you can choose which version to run.
 
</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global adempiereHome /opt/adempiere/adempiere</code></p>
 
</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global adempiereHome /opt/adempiere/adempiere</code></p>
;<span id="id2614601"></span><span id="userName"></span>userName
+
;<span id="id2770743"></span><span id="userName"></span>userName
 
:<p>the name of the adempiere user</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global userName adempiere</code></p>
 
:<p>the name of the adempiere user</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global userName adempiere</code></p>
;<span id="id2614601"></span><span id="userID"></span>userID
+
;<span id="id2770743"></span><span id="userID"></span>userID
 
:<p>the user ID number for the adempiere user</p><p>If the requested user ID is already taken, the next available system ID will be used.</p><p>values: <code class="constant">200</code> &lt;= x &lt; <code class="constant">500</code></p><p>default: <code class="constant">215</code></p><p>example: <code class="code">%global userID 215</code></p>
 
:<p>the user ID number for the adempiere user</p><p>If the requested user ID is already taken, the next available system ID will be used.</p><p>values: <code class="constant">200</code> &lt;= x &lt; <code class="constant">500</code></p><p>default: <code class="constant">215</code></p><p>example: <code class="code">%global userID 215</code></p>
;<span id="id2614601"></span><span id="groupName"></span>groupName
+
;<span id="id2770743"></span><span id="groupName"></span>groupName
 
:<p>the adempiere user's private group name</p><p>default: same as <code class="varname">%{userName}</code></p><p>example: <code class="code">%global groupName adempiere</code></p>
 
:<p>the adempiere user's private group name</p><p>default: same as <code class="varname">%{userName}</code></p><p>example: <code class="code">%global groupName adempiere</code></p>
;<span id="id2614601"></span><span id="groupID"></span>groupID
+
;<span id="id2770743"></span><span id="groupID"></span>groupID
 
:<p>the primary group ID number for the adempiere user</p><p>If the requested group ID is already taken, the next available system ID will be used.</p><p>values: <code class="constant">200</code> &lt;= x &lt; <code class="constant">500</code></p><p>default: <code class="constant">215</code></p><p>example: <code class="code">%global groupID 215</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>the primary group ID number for the adempiere user</p><p>If the requested group ID is already taken, the next available system ID will be used.</p><p>values: <code class="constant">200</code> &lt;= x &lt; <code class="constant">500</code></p><p>default: <code class="constant">215</code></p><p>example: <code class="code">%global groupID 215</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2614884">Pristine Package Settings</span>==
+
==<span id="id2771027">Pristine Package Settings</span>==
 
</div></div></div><p>The pristine package is the release as distributed by <span class="productname">Adempiere</span> without any extensions or patches. It can be used for testing before filing support requests or bug reports.</p><p>It contains both server and client, and it is not pre-configured.</p><div><dl>
 
</div></div></div><p>The pristine package is the release as distributed by <span class="productname">Adempiere</span> without any extensions or patches. It can be used for testing before filing support requests or bug reports.</p><p>It contains both server and client, and it is not pre-configured.</p><div><dl>
;<span id="id2614904"></span><span id="buildPristine"></span>buildPristine
+
;<span id="id2771047"></span><span id="buildPristine"></span>buildPristine
 
:<p>whether to build the pristine package</p><p>values:
 
:<p>whether to build the pristine package</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not build the pristine package</p></li><li><p><code class="constant">1</code> = build the pristine package</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not build the pristine package</p></li><li><p><code class="constant">1</code> = build the pristine package</p></li></ul></div><p>
 
</p><p>default: <code class="constant">0</code></p><p>example: <code class="code">%global buildPristine 0</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
</p><p>default: <code class="constant">0</code></p><p>example: <code class="code">%global buildPristine 0</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2614959">Client Package Settings</span>==
+
==<span id="id2771101">Client Package Settings</span>==
 
</div></div></div><p>The client package is installed on remote machines.</p><p>It includes desktop menu entries for connection to the server.</p><p>The client package is a custom release to which patches and extensions are applied.</p><div><dl>
 
</div></div></div><p>The client package is installed on remote machines.</p><p>It includes desktop menu entries for connection to the server.</p><p>The client package is a custom release to which patches and extensions are applied.</p><div><dl>
;<span id="id2614978"></span><span id="buildClient"></span>buildClient
+
;<span id="id2771120"></span><span id="buildClient"></span>buildClient
 
:<p>whether to build the client package</p><p>values:
 
:<p>whether to build the client package</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not build the client package</p></li><li><p><code class="constant">1</code> = build the client package</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not build the client package</p></li><li><p><code class="constant">1</code> = build the client package</p></li></ul></div><p>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global buildClient 1</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global buildClient 1</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2615032">Server Package Settings</span>==
+
==<span id="id2771174">Server Package Settings</span>==
 
</div></div></div><p>The server package is the live server. It also includes its own client.</p><p>The server package is a custom release to which patches and extensions are applied.</p><div><dl>
 
</div></div></div><p>The server package is the live server. It also includes its own client.</p><p>The server package is a custom release to which patches and extensions are applied.</p><div><dl>
;<span id="id2615047"></span><span id="buildServer"></span>buildServer
+
;<span id="id2771189"></span><span id="buildServer"></span>buildServer
 
:<p>whether to build the server package</p><p>values:
 
:<p>whether to build the server package</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not build the server package</p></li><li><p><code class="constant">1</code> = build the server package</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not build the server package</p></li><li><p><code class="constant">1</code> = build the server package</p></li></ul></div><p>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global buildServer 1</code></p>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global buildServer 1</code></p>
;<span id="id2615047"></span><span id="preconfigureServer"></span>preconfigureServer
+
;<span id="id2771189"></span><span id="preconfigureServer"></span>preconfigureServer
 
:<p>whether to pre-configure the server so that it will run out of the box without executing <span class="command"><strong>./RUN_Setup.sh</strong></span></p><p>values:
 
:<p>whether to pre-configure the server so that it will run out of the box without executing <span class="command"><strong>./RUN_Setup.sh</strong></span></p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not pre-configure the server package</p></li><li><p><code class="constant">1</code> = pre-configure the server package</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not pre-configure the server package</p></li><li><p><code class="constant">1</code> = pre-configure the server package</p></li></ul></div><p>
 
</p><p>default: <code class="constant">0</code></p><p>example: <code class="code">%global preconfigureServer 0</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
</p><p>default: <code class="constant">0</code></p><p>example: <code class="code">%global preconfigureServer 0</code></p></dl></div></div><div><div class="titlepage"><div><div>
==<span id="id2615154">Server Configuration Parameters</span>==
+
==<span id="id2771297">Server Configuration Parameters</span>==
 
</div></div></div><p>These parameters are used for pre-configuring the server</p><div><div class="titlepage"><div><div>
 
</div></div></div><p>These parameters are used for pre-configuring the server</p><div><div class="titlepage"><div><div>
===<span id="id2615165">Certificate Configuration</span>===
+
===<span id="id2771307">Certificate Configuration</span>===
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2615170"></span><span id="serverFQDN"></span>serverFQDN
+
;<span id="id2771313"></span><span id="serverFQDN"></span>serverFQDN
 
:<p>The fully qualified domain name of the server</p><p>This string is used to identify the application server as well generate default entries for mail and database server.</p><p>default: <code class="constant">localhost.localdomain</code></p><p>example: <code class="code">%global serverFQDN myAppServer.mydomain.com</code></p>
 
:<p>The fully qualified domain name of the server</p><p>This string is used to identify the application server as well generate default entries for mail and database server.</p><p>default: <code class="constant">localhost.localdomain</code></p><p>example: <code class="code">%global serverFQDN myAppServer.mydomain.com</code></p>
;<span id="id2615170"></span><span id="keystore"></span>keystore
+
;<span id="id2771313"></span><span id="keystore"></span>keystore
 
:<p>the server's keystore file (relative to <code class="varname">ADEMPIERE_HOME</code>)</p><p>default: <code class="constant">keystore/myKeystore</code></p><p>example: <code class="code">%global keystore keystore/myKeystore</code></p>
 
:<p>the server's keystore file (relative to <code class="varname">ADEMPIERE_HOME</code>)</p><p>default: <code class="constant">keystore/myKeystore</code></p><p>example: <code class="code">%global keystore keystore/myKeystore</code></p>
;<span id="id2615170"></span><span id="keystorePass"></span>keystorePass
+
;<span id="id2771313"></span><span id="keystorePass"></span>keystorePass
 
:<p>the password for the server's keystore</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global keystorePass adempiere</code></p>
 
:<p>the password for the server's keystore</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global keystorePass adempiere</code></p>
;<span id="id2615170"></span><span id="keystoreCN"></span>keystoreCN
+
;<span id="id2771313"></span><span id="keystoreCN"></span>keystoreCN
 
:<p>The CN (common name) component of the DN (distinguished name) for the server's keystore.</p><p>default: name portion of <code class="varname">serverFQDN</code></p><p>example: <code class="code">%global keystoreCN myAppServer</code></p>
 
:<p>The CN (common name) component of the DN (distinguished name) for the server's keystore.</p><p>default: name portion of <code class="varname">serverFQDN</code></p><p>example: <code class="code">%global keystoreCN myAppServer</code></p>
;<span id="id2615170"></span><span id="keystoreOU"></span>keystoreOU
+
;<span id="id2771313"></span><span id="keystoreOU"></span>keystoreOU
 
:<p>The OU (organizational unit) component of the DN (distinguished name) for the server's keystore.</p><p>default: name of currently logged-in user</p><p>example: <code class="code">%global keystoreOU myName</code></p>
 
:<p>The OU (organizational unit) component of the DN (distinguished name) for the server's keystore.</p><p>default: name of currently logged-in user</p><p>example: <code class="code">%global keystoreOU myName</code></p>
;<span id="id2615170"></span><span id="keystoreO"></span>keystoreO
+
;<span id="id2771313"></span><span id="keystoreO"></span>keystoreO
 
:<p>The O (organization) component of the DN (distinguished name) for the server's keystore.</p><p>default: <code class="constant">AdempiereUser</code></p><p>example: <code class="code">%global keystoreO AdempiereUser</code></p>
 
:<p>The O (organization) component of the DN (distinguished name) for the server's keystore.</p><p>default: <code class="constant">AdempiereUser</code></p><p>example: <code class="code">%global keystoreO AdempiereUser</code></p>
;<span id="id2615170"></span><span id="keystoreL"></span>keystoreL
+
;<span id="id2771313"></span><span id="keystoreL"></span>keystoreL
 
:<p>The L (location) component of the DN (distinguished name) for the server's keystore.</p><p>default: <code class="constant">myTown</code></p><p>example: <code class="code">%global keystoreL myTown</code></p>
 
:<p>The L (location) component of the DN (distinguished name) for the server's keystore.</p><p>default: <code class="constant">myTown</code></p><p>example: <code class="code">%global keystoreL myTown</code></p>
;<span id="id2615170"></span><span id="keystoreST"></span>keystoreST
+
;<span id="id2771313"></span><span id="keystoreST"></span>keystoreST
 
:<p>The ST (state) component of the DN (distinguished name) for the server's keystore.</p><p>default: <code class="constant">myState</code></p><p>example: <code class="code">%global keystoreST myState</code></p>
 
:<p>The ST (state) component of the DN (distinguished name) for the server's keystore.</p><p>default: <code class="constant">myState</code></p><p>example: <code class="code">%global keystoreST myState</code></p>
;<span id="id2615170"></span><span id="keystoreC"></span>keystoreC
+
;<span id="id2771313"></span><span id="keystoreC"></span>keystoreC
 
:<p>The C (country) component of the DN (distinguished name) for the server's keystore.</p><p>default: country from system's <code class="varname">LANG</code> setting in <code class="filename">/etc/sysconfig/i18n</code></p><p>example: <code class="code">%global keystoreC US</code></p>
 
:<p>The C (country) component of the DN (distinguished name) for the server's keystore.</p><p>default: country from system's <code class="varname">LANG</code> setting in <code class="filename">/etc/sysconfig/i18n</code></p><p>example: <code class="code">%global keystoreC US</code></p>
;<span id="id2615170"></span><span id="keystoreCodeAlias"></span>keystoreCodeAlias
+
;<span id="id2771313"></span><span id="keystoreCodeAlias"></span>keystoreCodeAlias
 
:<p>the certificate alias for code signing on the server</p><p>Note that although this is a configurable parameter, the alias 'adempiere' is hardcoded in some source files, so it might be a bad idea to change it.</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global keystoreCodeAlias adempiere</code></p>
 
:<p>the certificate alias for code signing on the server</p><p>Note that although this is a configurable parameter, the alias 'adempiere' is hardcoded in some source files, so it might be a bad idea to change it.</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global keystoreCodeAlias adempiere</code></p>
;<span id="id2615170"></span><span id="keystoreWebAlias"></span>keystoreWebAlias
+
;<span id="id2771313"></span><span id="keystoreWebAlias"></span>keystoreWebAlias
 
:<p>the certificate alias for secure web connections to the server</p><p>Note that although this is a configurable parameter, the alias 'adempiere' is hardcoded in some source files, so it might be a bad idea to change it.</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global keystoreWebAlias adempiere</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>the certificate alias for secure web connections to the server</p><p>Note that although this is a configurable parameter, the alias 'adempiere' is hardcoded in some source files, so it might be a bad idea to change it.</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global keystoreWebAlias adempiere</code></p></dl></div></div><div><div class="titlepage"><div><div>
===<span id="id2615502">Java Configuration</span>===
+
===<span id="id2771644">Java Configuration</span>===
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2615508"></span><span id="javaType"></span>javaType
+
;<span id="id2771650"></span><span id="javaType"></span>javaType
 
:<p>the Java type installed on the server</p><p>Note that ibm is not implemented yet, and there are still some issues with openJDK.</p><p>values: <code class="constant">sun</code>, <code class="constant">mac</code>, <code class="constant">ibm</code>, <code class="constant">OpenJDK</code></p><p>default: <code class="constant">OpenJDK</code></p><p>example: <code class="code">%global javaType OpenJDK</code></p>
 
:<p>the Java type installed on the server</p><p>Note that ibm is not implemented yet, and there are still some issues with openJDK.</p><p>values: <code class="constant">sun</code>, <code class="constant">mac</code>, <code class="constant">ibm</code>, <code class="constant">OpenJDK</code></p><p>default: <code class="constant">OpenJDK</code></p><p>example: <code class="code">%global javaType OpenJDK</code></p>
;<span id="id2615508"></span><span id="javaHome"></span>javaHome
+
;<span id="id2771650"></span><span id="javaHome"></span>javaHome
 
:<p>the Java path on the server</p><p>default: <code class="constant">/usr/lib/jvm/java-openjdk</code></p><p>example: <code class="code">%global javaHome /usr/lib/jvm/java-openjdk</code></p>
 
:<p>the Java path on the server</p><p>default: <code class="constant">/usr/lib/jvm/java-openjdk</code></p><p>example: <code class="code">%global javaHome /usr/lib/jvm/java-openjdk</code></p>
;<span id="id2615508"></span><span id="javaOptions"></span>javaOptions
+
;<span id="id2771650"></span><span id="javaOptions"></span>javaOptions
 
:<p>options with which to start the virtual machine under which Adempiere is run</p><p>(see Java documentation)</p><p>default: <code class="constant">-Xms64M -Xmx512M</code></p><p>example: <code class="code">%global javaOptions -Xms64M -Xmx512M</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>options with which to start the virtual machine under which Adempiere is run</p><p>(see Java documentation)</p><p>default: <code class="constant">-Xms64M -Xmx512M</code></p><p>example: <code class="code">%global javaOptions -Xms64M -Xmx512M</code></p></dl></div></div><div><div class="titlepage"><div><div>
===<span id="id2615619">Application Server Configuration</span>===
+
===<span id="id2771761">Application Server Configuration</span>===
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2615625"></span><span id="serverType"></span>serverType
+
;<span id="id2771767"></span><span id="serverType"></span>serverType
 
:<p>the type of application server</p><p>values: <code class="constant">jboss</code>, <code class="constant">glassfish</code></p><p>default: <code class="constant">jboss</code></p><p>example: <code class="code">%global serverType jboss</code></p>
 
:<p>the type of application server</p><p>values: <code class="constant">jboss</code>, <code class="constant">glassfish</code></p><p>default: <code class="constant">jboss</code></p><p>example: <code class="code">%global serverType jboss</code></p>
;<span id="id2615625"></span><span id="deployDir"></span>deployDir
+
;<span id="id2771767"></span><span id="deployDir"></span>deployDir
 
:<p>the application server deployment directory (relative to <code class="varname">ADEMPIERE_HOME</code>)</p><p>default:
 
:<p>the application server deployment directory (relative to <code class="varname">ADEMPIERE_HOME</code>)</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">jboss/server/adempiere/deploy</code> for JBoss</p></li><li><p><code class="constant">glassfish/glassfish/domains/domain1</code> for Glassfish</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">jboss/server/adempiere/deploy</code> for JBoss</p></li><li><p><code class="constant">glassfish/glassfish/domains/domain1</code> for Glassfish</p></li></ul></div><p>
 
</p><p>example: <code class="code">%global deployDir jboss/server/adempiere/deploy</code></p>
 
</p><p>example: <code class="code">%global deployDir jboss/server/adempiere/deploy</code></p>
;<span id="id2615625"></span><span id="jnpPort"></span>jnpPort
+
;<span id="id2771767"></span><span id="jnpPort"></span>jnpPort
 
:<p>the JNP port (whatever that is)</p><p>default:
 
:<p>the JNP port (whatever that is)</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">1099</code> for JBoss</p></li><li><p><code class="constant">3700</code> for Glassfish</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">1099</code> for JBoss</p></li><li><p><code class="constant">3700</code> for Glassfish</p></li></ul></div><p>
 
</p><p>example: <code class="code">%global jnpPort 1099</code></p>
 
</p><p>example: <code class="code">%global jnpPort 1099</code></p>
;<span id="id2615625"></span><span id="webPort"></span>webPort
+
;<span id="id2771767"></span><span id="webPort"></span>webPort
 
:<p>the TCP port to be used by the application server for HTTP</p><p>default: <code class="constant">8888</code></p><p>example: <code class="code">%global webPort 8888</code></p>
 
:<p>the TCP port to be used by the application server for HTTP</p><p>default: <code class="constant">8888</code></p><p>example: <code class="code">%global webPort 8888</code></p>
;<span id="id2615625"></span><span id="sslPort"></span>sslPort
+
;<span id="id2771767"></span><span id="sslPort"></span>sslPort
 
:<p>the TCP port to be used by the application server for HTTPS</p><p>default: <code class="constant">8443</code></p><p>example: <code class="code">%global sslPort 8443</code></p>
 
:<p>the TCP port to be used by the application server for HTTPS</p><p>default: <code class="constant">8443</code></p><p>example: <code class="code">%global sslPort 8443</code></p>
;<span id="id2615625"></span><span id="logFacility"></span>logFacility
+
;<span id="id2771767"></span><span id="logFacility"></span>logFacility
 
:<p>which facility to use for the system logger</p><p>values: <code class="constant">local0</code> &#8230; <code class="constant">local7</code></p><p>default: <code class="constant">local1</code></p><p>example: <code class="code">%global logFacility local1</code></p>
 
:<p>which facility to use for the system logger</p><p>values: <code class="constant">local0</code> &#8230; <code class="constant">local7</code></p><p>default: <code class="constant">local1</code></p><p>example: <code class="code">%global logFacility local1</code></p>
;<span id="id2615625"></span><span id="logLevel"></span>logLevel
+
;<span id="id2771767"></span><span id="logLevel"></span>logLevel
 
:<p>the minimum severity level for messages to be logged</p><p>values: <code class="constant">DEBUG</code>, <code class="constant">INFO</code>, <code class="constant">NOTICE</code>, <code class="constant">WARNING</code>, <code class="constant">ERROR</code>, <code class="constant">CRITICAL</code>, <code class="constant">ALERT</code>, <code class="constant">EMERGENCY</code></p><p>default: <code class="constant">INFO</code></p><p>example: <code class="code">%global logLevel INFO</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>the minimum severity level for messages to be logged</p><p>values: <code class="constant">DEBUG</code>, <code class="constant">INFO</code>, <code class="constant">NOTICE</code>, <code class="constant">WARNING</code>, <code class="constant">ERROR</code>, <code class="constant">CRITICAL</code>, <code class="constant">ALERT</code>, <code class="constant">EMERGENCY</code></p><p>default: <code class="constant">INFO</code></p><p>example: <code class="code">%global logLevel INFO</code></p></dl></div></div><div><div class="titlepage"><div><div>
===<span id="id2615907">Database Configuration</span>===
+
===<span id="id2772049">Database Configuration</span>===
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2615913"></span><span id="dbServer"></span>dbServer
+
;<span id="id2772055"></span><span id="dbServer"></span>dbServer
 
:<p>the name of the database server</p><p>default: name portion of <code class="varname">%{serverFQDN}</code> (assuming that <span class="productname">Adempiere</span> is installed on the same machine as the database)</p><p>example: <code class="code">%global dbServer myDatabaseServer</code></p>
 
:<p>the name of the database server</p><p>default: name portion of <code class="varname">%{serverFQDN}</code> (assuming that <span class="productname">Adempiere</span> is installed on the same machine as the database)</p><p>example: <code class="code">%global dbServer myDatabaseServer</code></p>
;<span id="id2615913"></span><span id="dbType"></span>dbType
+
;<span id="id2772055"></span><span id="dbType"></span>dbType
 
:<p>the type of database (database vendor)</p><p>values: <code class="constant">oracle</code>, <code class="constant">oracleXE</code>, <code class="constant">postgresql</code></p><p>default: <code class="constant">postgresql</code></p><p>example: <code class="code">%global dbType postgresql</code></p>
 
:<p>the type of database (database vendor)</p><p>values: <code class="constant">oracle</code>, <code class="constant">oracleXE</code>, <code class="constant">postgresql</code></p><p>default: <code class="constant">postgresql</code></p><p>example: <code class="code">%global dbType postgresql</code></p>
;<span id="id2615913"></span><span id="dbPort"></span>dbPort
+
;<span id="id2772055"></span><span id="dbPort"></span>dbPort
 
:<p>the database port</p><p>default:
 
:<p>the database port</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">5432</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">1521</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">5432</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">1521</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><p>example: <code class="code">%global dbPort 1521</code></p>
 
</p><p>example: <code class="code">%global dbPort 1521</code></p>
;<span id="id2615913"></span><span id="dbName"></span>dbName
+
;<span id="id2772055"></span><span id="dbName"></span>dbName
 
:<p>the name of the database</p><p>default:
 
:<p>the name of the database</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">adempiere</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">orcl</code> for <span class="productname">Oracle</span></p></li><li><p><code class="constant">xe</code> for <span class="productname">OracleXE</span></p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">adempiere</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">orcl</code> for <span class="productname">Oracle</span></p></li><li><p><code class="constant">xe</code> for <span class="productname">OracleXE</span></p></li></ul></div><p>
 
</p><p>example: <code class="code">%global dbName adempiere</code></p>
 
</p><p>example: <code class="code">%global dbName adempiere</code></p>
;<span id="id2615913"></span><span id="dbUrl"></span>dbUrl
+
;<span id="id2772055"></span><span id="dbUrl"></span>dbUrl
 
:<p>the url for the jdbc driver to connect to the database</p><p>default:
 
:<p>the url for the jdbc driver to connect to the database</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p>jdbc:postgresql://<code class="varname">%{dbServer}</code>:<code class="varname">%{dbPort}</code>/<code class="varname">%{dbName}</code> for <span class="productname">PostgreSQL</span></p></li><li><p>jdbc:oracle:thin:@//<code class="varname">%{dbServer}</code>:<code class="varname">%{dbPort}</code>/<code class="varname">%{dbName}</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p>jdbc:postgresql://<code class="varname">%{dbServer}</code>:<code class="varname">%{dbPort}</code>/<code class="varname">%{dbName}</code> for <span class="productname">PostgreSQL</span></p></li><li><p>jdbc:oracle:thin:@//<code class="varname">%{dbServer}</code>:<code class="varname">%{dbPort}</code>/<code class="varname">%{dbName}</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><p>example: <code class="code">%global dbUrl jdbc:postgresql://myDatabaseServer:5432/adempiere</code></p>
 
</p><p>example: <code class="code">%global dbUrl jdbc:postgresql://myDatabaseServer:5432/adempiere</code></p>
;<span id="id2615913"></span><span id="dbUser"></span>dbUser
+
;<span id="id2772055"></span><span id="dbUser"></span>dbUser
 
:<p>the name of the adempiere database user</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global dbUser adempiere</code></p>
 
:<p>the name of the adempiere database user</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global dbUser adempiere</code></p>
;<span id="id2615913"></span><span id="dbPassword"></span>dbPassword
+
;<span id="id2772055"></span><span id="dbPassword"></span>dbPassword
 
:<p>the password of the adempiere database user</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global dbPassword adempiere</code></p>
 
:<p>the password of the adempiere database user</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global dbPassword adempiere</code></p>
;<span id="id2615913"></span><span id="dbSystemUser"></span>dbSystemUser
+
;<span id="id2772055"></span><span id="dbSystemUser"></span>dbSystemUser
 
:<p>the user name of the database system administrator</p><p>default:
 
:<p>the user name of the database system administrator</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">postgres</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">system</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">postgres</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">system</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><p>example: <code class="code">%global dbSystemUser postgres</code></p>
 
</p><p>example: <code class="code">%global dbSystemUser postgres</code></p>
;<span id="id2615913"></span><span id="dbSystemPassword"></span>dbSystemPassword
+
;<span id="id2772055"></span><span id="dbSystemPassword"></span>dbSystemPassword
 
:<p>the password of the database system administrator</p><p>default:
 
:<p>the password of the database system administrator</p><p>default:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">postgres</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">manager</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">postgres</code> for <span class="productname">PostgreSQL</span></p></li><li><p><code class="constant">manager</code> for <span class="productname">Oracle</span></p></li></ul></div><p>
 
</p><p>example: <code class="code">%global dbSystemPassword postgres</code></p>
 
</p><p>example: <code class="code">%global dbSystemPassword postgres</code></p>
;<span id="id2615913"></span><span id="oracleHome"></span>oracleHome
+
;<span id="id2772055"></span><span id="oracleHome"></span>oracleHome
 
:<p>When using Oracle, the adempiere user needs to have access to the Oracle client on the local machine.</p><p>This is the <code class="varname">ORACLE_HOME</code> environment variable pointing to the oracle product directory.</p><p>To keep the adempiere packages independent of the installed Oracle version, if the Oracle product directory contains a version in its name, it is recommended to create symbolic link from the Oracle product directory to a version-free name such as <code class="filename">/opt/oracle/oracle</code> at the time of Oracle installation.</p><p>This can be done with the command</p><div class="informalexample"><p><code class="prompt"># </code><span class="command"><strong>ln -s /opt/oracle/product/10.2.01 /opt/oracle/oracle</strong></span></p></div><p>default: <code class="constant">/opt/oracle/oracle</code></p><p>example: <code class="code">%global oracleHome /opt/oracle/product/10.2.01</code></p>
 
:<p>When using Oracle, the adempiere user needs to have access to the Oracle client on the local machine.</p><p>This is the <code class="varname">ORACLE_HOME</code> environment variable pointing to the oracle product directory.</p><p>To keep the adempiere packages independent of the installed Oracle version, if the Oracle product directory contains a version in its name, it is recommended to create symbolic link from the Oracle product directory to a version-free name such as <code class="filename">/opt/oracle/oracle</code> at the time of Oracle installation.</p><p>This can be done with the command</p><div class="informalexample"><p><code class="prompt"># </code><span class="command"><strong>ln -s /opt/oracle/product/10.2.01 /opt/oracle/oracle</strong></span></p></div><p>default: <code class="constant">/opt/oracle/oracle</code></p><p>example: <code class="code">%global oracleHome /opt/oracle/product/10.2.01</code></p>
;<span id="id2615913"></span><span id="oracleTnsAdmin"></span>oracleTnsAdmin
+
;<span id="id2772055"></span><span id="oracleTnsAdmin"></span>oracleTnsAdmin
 
:<p>When using Oracle, the adempiere user needs to have access to the Oracle client on the local machine.</p><p>This is the <code class="varname">TNS_ADMIN</code> environment variable pointing to the location where Oracle Net Services look for configuration files.</p><p>default: <code class="varname">%{oracleHome}</code>/network/admin</p><p>example: <code class="code">%global oracleTnsAdmin /opt/oracle/product/10.2.01/network/admin</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>When using Oracle, the adempiere user needs to have access to the Oracle client on the local machine.</p><p>This is the <code class="varname">TNS_ADMIN</code> environment variable pointing to the location where Oracle Net Services look for configuration files.</p><p>default: <code class="varname">%{oracleHome}</code>/network/admin</p><p>example: <code class="code">%global oracleTnsAdmin /opt/oracle/product/10.2.01/network/admin</code></p></dl></div></div><div><div class="titlepage"><div><div>
===<span id="id2616417">FTP Configuration</span>===
+
===<span id="id2772560">FTP Configuration</span>===
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2616423"></span><span id="ftpServer"></span>ftpServer
+
;<span id="id2772565"></span><span id="ftpServer"></span>ftpServer
 
:<p>name of the FTP server</p><p>default: name portion of <code class="varname">%{serverFQDN}</code></p><p>example: <code class="code">%global ftpServer myAppServer</code></p>
 
:<p>name of the FTP server</p><p>default: name portion of <code class="varname">%{serverFQDN}</code></p><p>example: <code class="code">%global ftpServer myAppServer</code></p>
;<span id="id2616423"></span><span id="ftpPrefix"></span>ftpPrefix
+
;<span id="id2772565"></span><span id="ftpPrefix"></span>ftpPrefix
 
:<p>the FTP prefix to use</p><p>(no idea what this does)</p><p>default: <code class="constant">my</code></p><p>example: <code class="code">%global ftpPrefix my</code></p>
 
:<p>the FTP prefix to use</p><p>(no idea what this does)</p><p>default: <code class="constant">my</code></p><p>example: <code class="code">%global ftpPrefix my</code></p>
;<span id="id2616423"></span><span id="ftpUser"></span>ftpUser
+
;<span id="id2772565"></span><span id="ftpUser"></span>ftpUser
 
:<p>the FTP user</p><p>default: <code class="constant">anonymous</code></p><p>example: <code class="code">%global ftpUser anonymous</code></p>
 
:<p>the FTP user</p><p>default: <code class="constant">anonymous</code></p><p>example: <code class="code">%global ftpUser anonymous</code></p>
;<span id="id2616423"></span><span id="ftpPassword"></span>ftpPassword
+
;<span id="id2772565"></span><span id="ftpPassword"></span>ftpPassword
 
:<p>the FTP user's password</p><p>default: <code class="constant">user@host.com</code></p><p>example: <code class="code">%global ftpPassword user@host.com</code></p></dl></div></div><div><div class="titlepage"><div><div>
 
:<p>the FTP user's password</p><p>default: <code class="constant">user@host.com</code></p><p>example: <code class="code">%global ftpPassword user@host.com</code></p></dl></div></div><div><div class="titlepage"><div><div>
===<span id="id2616538">E-Mail Configuration</span>===
+
===<span id="id2772681">E-Mail Configuration</span>===
 
</div></div></div><div><dl>
 
</div></div></div><div><dl>
;<span id="id2616544"></span><span id="mailServer"></span>mailServer
+
;<span id="id2772687"></span><span id="mailServer"></span>mailServer
 
:<p>the mail server to use</p><p>default: mailserver.(domain portion of <code class="varname">%{serverFQDN}</code>)</p><p>example: <code class="code">%global mailServer mailserver.mydomain.com</code></p>
 
:<p>the mail server to use</p><p>default: mailserver.(domain portion of <code class="varname">%{serverFQDN}</code>)</p><p>example: <code class="code">%global mailServer mailserver.mydomain.com</code></p>
;<span id="id2616544"></span><span id="mailAddress"></span>mailAddress
+
;<span id="id2772687"></span><span id="mailAddress"></span>mailAddress
 
:<p>the default administrative mail address to use</p><p>It can be overwritten on client level</p><p>default: adempiere@(domain portion of <code class="varname">%{serverFQDN}</code>)</p><p>example: <code class="code">%global mailAddress adempiere@mydomain.com</code></p>
 
:<p>the default administrative mail address to use</p><p>It can be overwritten on client level</p><p>default: adempiere@(domain portion of <code class="varname">%{serverFQDN}</code>)</p><p>example: <code class="code">%global mailAddress adempiere@mydomain.com</code></p>
;<span id="id2616544"></span><span id="mailUser"></span>mailUser
+
;<span id="id2772687"></span><span id="mailUser"></span>mailUser
 
:<p>the user of the default mail account</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global mailUser adempiere</code></p>
 
:<p>the user of the default mail account</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global mailUser adempiere</code></p>
;<span id="id2616544"></span><span id="mailPassword"></span>mailPassword
+
;<span id="id2772687"></span><span id="mailPassword"></span>mailPassword
 
:<p>the password of the default mail account</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global mailPassword adempiere</code></p></dl></div></div></div><div><div class="titlepage"><div><div>
 
:<p>the password of the default mail account</p><p>default: <code class="constant">adempiere</code></p><p>example: <code class="code">%global mailPassword adempiere</code></p></dl></div></div></div><div><div class="titlepage"><div><div>
==<span id="id2616666">Corporate Format Settings</span>==
+
==<span id="id2772808">Corporate Format Settings</span>==
 
</div></div></div><p>
 
</div></div></div><p>
 
Some sites may want to enforce their own corporate formats, i.e. no matter what locale the user is working in or what
 
Some sites may want to enforce their own corporate formats, i.e. no matter what locale the user is working in or what
Line 1,066: Line 1,066:
 
It has therefore been incorporated as a script in the %prep section.
 
It has therefore been incorporated as a script in the %prep section.
 
</p><div><dl>
 
</p><div><dl>
;<span id="id2616695"></span><span id="useCorporateFormat"></span>useCorporateFormat
+
;<span id="id2772837"></span><span id="useCorporateFormat"></span>useCorporateFormat
 
:<p>whether to apply the corporate format patch</p><p>Note that this changes the locale conventions for the complete installation and thus affects all clients.</p><p>values:
 
:<p>whether to apply the corporate format patch</p><p>Note that this changes the locale conventions for the complete installation and thus affects all clients.</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not use corporate formats</p></li><li><p><code class="constant">1</code> = use corporate formats</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = do not use corporate formats</p></li><li><p><code class="constant">1</code> = use corporate formats</p></li></ul></div><p>
 
</p><p>default: <code class="constant">0</code></p><p>example: <code class="code">%global useCorporateFormat 0</code></p>
 
</p><p>default: <code class="constant">0</code></p><p>example: <code class="code">%global useCorporateFormat 0</code></p>
;<span id="id2616695"></span><span id="formatDecimal"></span>formatDecimal
+
;<span id="id2772837"></span><span id="formatDecimal"></span>formatDecimal
 
:<p>whether to use a point as decimal separator</p><p>values:
 
:<p>whether to use a point as decimal separator</p><p>values:
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = use a comma as decimal separator</p></li><li><p><code class="constant">1</code> = use a point as decimal separator</p></li></ul></div><p>
 
</p><div><ul class="itemizedlist" type="disc" compact><li><p><code class="constant">0</code> = use a comma as decimal separator</p></li><li><p><code class="constant">1</code> = use a point as decimal separator</p></li></ul></div><p>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global formatDecimal 1</code></p>
 
</p><p>default: <code class="constant">1</code></p><p>example: <code class="code">%global formatDecimal 1</code></p>
;<span id="id2616695"></span><span id="formatDate"></span>formatDate
+
;<span id="id2772837"></span><span id="formatDate"></span>formatDate
 
:<p>the date format to use</p><p>
 
:<p>the date format to use</p><p>
 
The formats are probably described somewhere in Java documentation.
 
The formats are probably described somewhere in Java documentation.
 
Have a look at looks/src/org/compiere/util/Language.java for examples.
 
Have a look at looks/src/org/compiere/util/Language.java for examples.
 
</p><p>default: <code class="constant">yyyy-MM-dd</code></p><p>example: <code class="code">%global formatDate yyyy-MM-dd</code></p>
 
</p><p>default: <code class="constant">yyyy-MM-dd</code></p><p>example: <code class="code">%global formatDate yyyy-MM-dd</code></p>
;<span id="id2616695"></span><span id="formatPaper"></span>formatPaper
+
;<span id="id2772837"></span><span id="formatPaper"></span>formatPaper
 
:<p>the paper size to use.</p><p>
 
:<p>the paper size to use.</p><p>
 
The formats are probably described somewhere in Java documentation.
 
The formats are probably described somewhere in Java documentation.
 
Have a look at looks/src/org/compiere/util/Language.java for examples.
 
Have a look at looks/src/org/compiere/util/Language.java for examples.
</p><p>values: <code class="constant">ISO.A4</code>, <code class="constant">NA.LETTER</code></p><p>default: <code class="constant">ISO.A4</code></p><p>example: <code class="code">%global formatPaper ISO.A4</code></p></dl></div></div></div>[[Category:Developer documentation]]
+
</p><p>values: <code class="constant">ISO.A4</code>, <code class="constant">NA.LETTER</code></p><p>default: <code class="constant">ISO.A4</code></p><p>example: <code class="code">%global formatPaper ISO.A4</code></p></dl></div></div></div>
 +
[[Category:Developer documentation]]
 
[[Category:Projects and Tools]]
 
[[Category:Projects and Tools]]

Revision as of 23:54, 19 September 2011

RPM User Manual
Adempiere RPM Packager
by Stefan Christians
2011-08-02

This program is part of Adempiere ERP Bazaar
http://www.adempiere.org

Copyright © Stefan Christians
Copyright © Contributors

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Contributors: Stefan Christians
Sponsors: K.K. Alice

Adempiere is a registered trademark of Adempiere, Inc.
All other company or product names are mentioned for identification purposes only, and may be trademarks of their respective owners.


Packaging and Distributing Adempiere on RedHat-like Systems

This source package includes the Spec File and tools to download, customize, compile, configure, distribute, install, and run Adempiere on RedHat-like systems which use RPM as their package manager.


The Spec File to build the Adempiere RPM was developed and tested on Fedora 13.

The Fedora Packaging Guidelines have been followed, with some exceptions:

Version and Release Numbering

Version information should be in the form:

majorVersion.minorVersion-buildNumber.patchNumber[<span class="optional">.releaseTag</span>]

So if upstream releases its product as adempiere351a, it should be packaged as:

adempiere-3.5-1.X.a

(where 1 is the build number and X is the packager's "patch level", which is incremented on each build).

However, upstream maintains the build number as part of the version number, and it does not follow the convention of 0=pre-release, 1=release, >1=post-release. For RPM's version control method, it therefore makes more sense to use the revision in the Mercurial repository as build number.

We also want to have automatic patch-level numbering, and the build date seems most suitable for that purpose.

Therefore, our version numbering will have following syntax:

majorVersion.minorVersion.buildNumber-hgRevision.<em>buildDate</em>[<span class="optional">.releaseTag</span>]

which would result in following package names:

								adempiere331	-> adempiere-3.3.1-1943.<em>buildDate</em>
								adempiere354a	-> adempiere-3.5.4-5276.<em>buildDate</em>.a
								adempiere360lts	-> adempiere-3.6.0-6510.<em>buildDate</em>.lts
							

Pre-built Binaries and Libraries

All binaries and libraries in Fedora packages must be built from source code. The source package is not allowed to contain pre-built binaries and libraries.

However, Adempiere comes with various *.jar archives containing pre-built *.class files.

Some of them are simply used as tools in the build-chain and would easily be replaceable with open-source Fedora libraries.

Others are used in the final product such as the jdbc-drivers for database connections. They would be more difficult to replace, although it would certainly be possible.

Since we are going to build Adempiere packages for our own use and not for distribution with Fedora, we will gracefully ignore this requirement for the time being.

Spec File Legibility

All efforts have been made to keep the Spec File legible, whereby priority has been given to legibility in terms of humanly readable over being able to read and understand the algorithms.

Normally the user would only have to set or modify parameters at the beginning of the file (marked SETTINGS), add his sources and patches to the preamble (marked your custom sources come here and your custom patches come here), and install or apply them in the %prep section (marked install your sources here and apply your patches here). Everything else should just work.

Many different parameters can be used in the Spec File, and commenting them all in place would result in a very long settings section where important or conflicting parameters could easily be overlooked. Instead, the parameters are explained with their default values in the appendix of this manual. All parameters have sensible default values, so even if no parameters are set the Spec File will still produce an installable and runnable package.

Macros used by the build and installation scripts are defined and evaluated in a section titled INITIALIZATION, which comes between the settings and the preamble. Inside the scripts, the function and contents of those macros can be understood intuitively by their names, and as most people will not want to get into the detailed algorithms of how they were defined, the definitions are written in a way that keeps the Spec File nice and tidy and easily readable by humans. For debugging purposes, it is recommendable to expand those macros to multiple lines where necessary for easier understanding of conditions, loops, etc.

A lot of regular expressions are used in combination with grep, sed, and awk in the macro definitions. They are not further explained, as commenting one line of code with twenty lines of explanation would make the Spec File difficult to read as a whole.

Since all sub packages use exactly the same installation scripts (behavior is tweaked for each sub package by just setting some variables at the beginning of the scripts), rather than writing the scripts again and again, they have been included as source files which will be dynamically expanded when the packages are built.

The SOURCES directory easily becomes very messy when numerous source files and patches are scattered about. For this reason, the files distributed with the Source-RPM are prefixed with sXXX_ (for sources) and pXXX_ (for patches), where XXX corresponds to the patch or source number in the Spec File. Users are encouraged to name their sources and patches following the same scheme, starting with number 100.

Tags

The Packager and Vendor tags are used in spite of the guideline's recommendation not to do so. They are used for identification and documentation purposes to differentiate between the original distribution and patched versions.

The BuildRoot tag is present for compatibility with other RedHat-like systems.

Requirements

Adempiere requires Java to run. As of Adempiere 3.6.0, JDK 1.6 is required.

Actually any Java distribution can be used, and the original Sun Java software is most tested and reliable for Adempiere. But since it is not distributed as an RPM, and theoretically can be installed at any location, it is virtually impossible to check for it as a build or target requirement.

Therefore the openJDK distribution is listed as requirement for both compiling the source and installing the RPM on a target machine. The user is still free to use any Java distribution he wants, but openJDK must at least be installed.

Documentation

Adempiere mainly uses online documentation. Text files such as README in the source code are often meaningless. However, all pdf files found in the source after compiling are copied into the documentation folder for all sub packages, regardless in which sub package they were found and without distinguishing whether they are for users, administrators or developers.

Users and Groups

If the adempiere user or group already exists on the target system, an attempt is made to change the uid and gid to those defined in the Spec File, and to move the home directory to the location defined in the Spec File.

Introduction

Platform Independence

Adempiere is written in Java and as such strives to run on any operating system which is supported by Java. In effect it means that Adempiere can run on any modern operating system such as Windows, Mac OS X, Solaris, and Linux.

To install Adempiere, you download the binary package as zip-file from sourceforge, drop it somewhere into the directory tree, unzip the file, run RUN_setup.sh, and you have Adempiere installed and configured. The procedure is the same on any operating system.

While this platform independence is remarkable, it comes at a cost: The software can not be optimized for any particular system. Particularly on Linux machines, there are several issues which shall be examined in more detail.

Linux Issues

The Filesystem Hierarchy Standard

Linux follows the Filesystem Hierarchy Standard (FHS) which defines where what kind of files should be located.

According to the FHS, we would expect Adempiere to install its files in the following directories:

configuration files/etc/adempiere/
executable binaries/usr/bin/
libraries and resources/usr/lib/adempiere/
documentation/usr/share/doc/adempiere/
data and variable state files/var/lib/adempiere/
log files/var/log

But instead all files are just installed in one big chunk with its own sub-directory tree originating wherever you extracted the zip-file.

For such cases the FHS provides the /opt directory, where add-on packages may install all static files in their own subdirectory.1

Technically, even when using the /opt hierarchy, configuration files should actually still be located in /etc/opt/adempiere, and data and variable state files in /var/opt/adempiere. Executables should be placed in /opt/adempiere/bin. And a restriction exists that no files should exist outside the /opt, /var/opt, and /etc/opt hierarchies (except for those which must reside in specific locations to function properly).

But would strictly following the FHS standard really make sense?

Configuration Files

The rational for having all host-specific configuration files under a single directory is that users can easily predict their location. Hardcore Linux users much prefer tweaking settings in a configuration file by hand rather than being guided through a lengthy setup program.

But Adempiere does not expect anybody to modify its settings from outside and rather insists that RUN_setup.sh is used for that purpose. Programs under Linux expect that their configurations could have been changed any time, so they adjust themselves to the configured settings after those have been loaded and checked for sanity. Adempiere works the other way round: RUN_setup.sh checks the configuration parameters for sanity, adjusts all programs and libraries to the configured settings, and then saves those settings quasi as a saved-state file. When the programs are started, they load their last state from the configuration file and continue from there. Should you modify anything manually from outside of RUN_setup.sh, things will get seriously messed up.

In addition, the configuration files are all located near the executables and binaries where they are being used, which is not bad for testing and debugging.

Under these considerations, it probably makes sense to keep the configuration files where they are and not to move them to /etc/opt/adempiere.

But there is an issue with user-based configuration files for running the client, which are placed as visible files into the current working directory. These should be modified to be located in user's home directories as hidden files (filenames preceded with a .).

Executable Binaries

Having all executables in one directory makes it easy to include that directory in a user's path so that all commands for a particular package are always available.

In the case of Adempiere, there actually are no binaries but only Java classes which are called from shell scripts, and for ordinary users actually only one such script (RUN_Adempiere.sh) is required to start the client. And that would normally not be executed from a command line anyway, but rather from a menu on the desktop.

For administrators, although arguably it is sometimes difficult to understand why a particular script is to be found in ADEMPIERE_HOME, while another is in ADEMPIERE_HOME/utils, those are actually the only directories with interesting scripts to run. Furthermore, many of the scripts in the utils subdirectory actually require a certain structure of helper files and directory trees under them, which would be broken if they were to be moved to a separate bin directory.

Executables are thefore best left where they are.

Libraries and Resources

Libraries and resources are exactly the kind of files to be placed under /opt/adempiere, and the vendor is free to create any structure he wishes under his own subdirectory. So this is FHS compliant, and nothing needs to be changed.

Documentation

Adempiere mainly uses online documentation for users and a wiki for adminstrators and developers.

However, there is some documentation available in the source code which is not found in the binary distribution. Some of those files might be interesting for administrators or developers and should therefore be placed in /usr/share/doc/adempiere where they can easily be found.

Data and Variable State Files

Adempiere does not keep its own data files but rather stores all data in an external database such as Oracle or postgreSQL.

Log Files

Although the FHS states that no files should exist outside of the /opt, /var/opt, and /etc/opt hierarchies, it probably makes sense to cover log files with the files which must reside in specific locations to function properly exception.

Out of the box, Adempiere's log files are scattered over its subdirectories, often with duplicate and redundant information.

These log files can grow very big over time. If, as would be good practice, a separate partition is mounted on /opt/adempiere, that partion could easily get filled up with logs. It would be much better to use the operating system's logging facilities with all its advantages (for example, file rotation or remote logging) than clogging up the Adempiere partition.

Exceptional Files

Other files which would need to reside in specific locations to function properly would include

/etc/rc.d/init.d/adempiere

An init script to start and stop the application server.

/etc/sysconfig/adempiere

Configuration file for the init script.

/etc/profile.d/adempiere.sh

A short script to set the ADEMPIERE_HOME variable system-wide for all users.

/usr/share/applications/adempiere.desktop

A descriptive file to add a menu item for starting the client on the users' desktop.

/var/log/adempiere

As previously explained, a central log file used by the system logger to collect and manage all logs in one place.

Such files are very specific to RedHat-like systems and are not included in the vanilla Adempiere distribution.

Running as Daemon

The standard Adempiere distribution comes with the RUN_Server2.sh and RUN_Server2Stop.sh commands to start respectively stop the application server.2

The scripts are designed to run in the foreground dumping log information to the console from which they were started. The administrator is supposed to follow the state of the server by examinig the log messages on the console. Thus the server would be started on one console and left running, and to stop it a new console would need to be opened from which the stop command would be initiated. The administrator would then have to switch back to the original console to verify from the log messages that the server has really stopped.

While such procedure is acceptable for development purposes, it definitely does not scale well for production environments.

Apart from being impractical, under Linux another issue arises that the server would be running with the privileges and limitations of the user who started it, which could be any user or even root, raising very valid security concerns.

It would be much better to have a designated adempiere user for no other purpose than running the server, being able to start and stop the server with service adempiere start or service adempiere stop like any other daemon, and configuring startup and shutdown behavior with chkconfig.

Desktop Integration

Any user who wants to run the server or client must have the ADEMPIERE_HOME environment variable set to the correct location. That means ADEMPIERE_HOME should be set system-wide on both server and client machines.

And for users who want to run the client, having an item in their desktop menu is surely more comfortable than having to open a console and typing $ADEMPIERE_HOME/RUN_Adempiere.sh.

Package Management

On RedHat-like systems, software installation, upgrading, and uninstallation should be managed by RPM. This ensures consistent deployment and allows for centralized management of clients and servers.

How the Adempiere Source-RPM works

Preparation

The Adempiere source code is downloaded from the Mercurial repository at SourceForge.net, and file formats (end-of line difference between Windows and Linux) and file permissions (scripts should be executable) are corrected.

The standard building behavior is modified so that build results are not e-mailed to anybody, building stops after compilation and does not proceed to actual file installation, and generation of the distributable zip-file (the binary package which is distributed by Adempiere) is suppressed.

If required, some quick fixes are applied to solve known issues which need to be addressed before compiling.

Then a copy of the whole source tree is made. The idea is that two different products should be compiled, one from the pristine source which was downloaded, and one from a source containing additions and patches for customizations. Help and support will generally only be available for the original product, not for any extended or customized versions. By having an RPM with the pristine code available, problems can be replicated in the original product before filing support requests or bug reports.

Standard patches (those distributed with this Source-RPM) are applied.

After that, the packager has the opportunity to add his own sources and patches for customizations or local extensions or bugfixes. (Although it would of course be much nicer if the packager would contribute his bugfixes back to the Adempiere project instead of just silently applying them to his local copy).

Building

First the orginal source is compiled to build the pristine package.

Then the customized source is compiled to build the server subpackage.

Any pdf files found in the original or customized source after compilation are extracted as documentation files.

If requested, the server is "pre-configured". All parameters which would normally be set after installation when executing RUN_setup.sh can already be configured now, resulting in a server package which can run out of the box when it is installed on the target machine. This makes the administrator's life very easy, but of course it also means that the resulting RPM is location-specific and can not be distributed publicly.

The server is then configured to send its log messages to the system logger rather than using local files.

The client code is extracted from the server package and modified so that the user's properties file is a hidden file in his home directory.

As a last step, the documentation for the Source-RPM (this text!) is generated.

Packaging

The build results are installed in a root file system as they should appear on the target system when they get installed.

In addition to the compiled code, some support files are installed for additonal Linux-specific functionality:

A file is dropped into /etc/profile.d to set the ADEMPIERE_HOME environment variable on a system-wide level.

An init script and its configuration file are installed to allow starting up or shutting down or otherwise controlling the server with the service adempiere start or service adempiere stop or chkconfig adempiere commands.

A desktop file is dropped into /usr/share/applications to include the Adempiere client in the users' desktop menu.

Documentation files are placed into the /usr/share/doc directory.

RPM packages are built from this root filesystem (one for client, one for server, one for the pristine product), which can be distributed and installed on other machines.

Installation on the Target System

When the Adempiere packages are installed on the target machines, their behavior differs depending on the kind of package (client, server, pristine) and the type of installation (installation, upgrade, removal).

Installation

StepClientServerPristine
pre-install---create adempiere user---
create user home directory
configure rsyslog
installinstall files
post-installcreate ADEMPIERE_HOME symbolic link---
---autostart server on system boot---

Upgrade

StepClientServerPristine
pre-install---create adempiere user---
create user home directory
configure rsyslog
installinstall new files
post-installcreate ADEMPIERE_HOME symbolic link---
---autostart server on system boot---
pre-uninstall---
uninstallremove old files
post-uninstall---restart server---

Removal

StepClientServerPristine
pre-uninstall---stop server---
unconfigure autostart of server on system boot if no other server packages are installed
remove ADEMPIERE_HOME symbolic link if it points to this installation
uninstallremove old files
post-uninstallremove installation directory
unconfigure rsyslog if no more server installations exist
unconfigure system-wide setting of ADEMPIERE_HOME if no more server or client installations exist
remove desktop menu entry if no more server or client installations exist
remove ADEMPIERE_HOME symbolic link if no more server or client installations exist
remove user home directory and documentation if no other installations exist
create ADEMPIERE_HOME symbolic link to newest server or client if any server or client installations exist


[1] Which means that according to the FHS, Adempiere should always be installed in /opt/adempiere.

[2] The 2 is presumabely a remnant from the days before Adempiere

forked from Compiere, where these scripts where used to control the new version 2 server, as opposed to RUN_Server.sh and RUN_ServerStop.sh controlling

the old version 1 server, which has since been lost.

Preparing the Package Building Environment

Required Development Tools

Install the tools required for building the Adempiere RPM. (This needs to be done as root).

# yum install rpm-build rpmdevtools gnupg mercurial java-1.6.0-openjdk-devel desktop-file-utils docbook5-style-xsl libxslt fop

RPM Build Tree

Create the RPM build tree in your home directory.

$ rpmdev-setuptree

This command creates the following directory tree required by rpmbuild and configures your build settings in ~/.rpmmacros

rpmbuild
+-- BUILD
+-- RPMS
+-- SOURCES
+-- SPECS
+-- SRPMS
			

You can move the generated rpmbuild directory to any place you like, but then you must adjust the %_topdir setting in ~/.rpmmacros to point to that location.

Digital Signature

For security reasons, the packages you build should be digitally signed. The digital signature allows users to verify that the package has been built by you, a trusted source, and has not been tampered with since then.

First, generate a public/private key pair with the gpg --gen-key command:

<code class="prompt">$ </code><span class="command"><strong>gpg --gen-key</strong></span>
gpg (GnuPG) 1.4.10; Copyright (C) 2008 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
	(1) RSA and RSA (default)
	(2) DSA and Elgamal
	(3) DSA (sign only)
	(4) RSA (sign only)
Your selection? <strong><code>1</code></strong>
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) <strong><code>2048</code></strong>
Requested keysize is 2048 bits
Please specify how long the key should be valid.
				0 = key does not expire
			<n>  = key expires in n days
			<n>w = key expires in n weeks
			<n>m = key expires in n months
			<n>y = key expires in n years
Key is valid for? (0) <strong><code>0</code></strong>
Key does not expire at all
Is this correct? (y/N) <strong><code>y</code></strong>

You need a user ID to identify your key; the software constructs the user
ID from the Real Name, Comment and Email Address in this form:
		"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"

Real name: <strong><code>www.mycompany.com</code></strong>
Email address: <strong><code>devnull@mycompany.com</code></strong>
Comment: <strong><code>rpm signature</code></strong>

You selected this USER-ID:
		"www.mycompany.com (rpm signature) <devnull@mycompany.com>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <strong><code>O</code></strong>
You need a Passphrase to protect your secret key.

Enter passphrase: <strong><code><span id="uiPassphrase"></span>secret passphrase</code></strong>
Repeat passphrase: <strong><code>secret passphrase</code></strong>

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
.+++++
........+++++
..+++++
gpg: key F9D8EE90 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
pub   2048R/F9D8EE90 2010-10-17
			Key fingerprint = 983D 704A 024A 861F 9FCB  5CA2 4875 7B66 F9D8 EE90
uid   www.mycompany.com (rpm signature) <devnull@mycompany.com>
sub   2048R/496CD9ED 2010-10-17
			

Next, the public key needs to be extracted:

$ gpg --export --armor www.mycompany.com > MYCOMPANY-RPM-GPG-KEY

This file needs to be publicly distributed so that users can verify the signature of the RPM packages which you built and signed.

Finally, you need to configure rpmbuild to use the signature you just created by adding the %_signature and %_gpg_name macros to the .rpmmacros file in your home directory. The file should now look something like this:

%_topdir        /home/<em>username</em>/rpmbuild
%_signature     gpg
%_gpg_name      www.mycompany.com (rpm signature) <devnull@mycompany.com>
…
…
			

Using the Adempiere SRPM

Installing the Source-RPM

Once your package building environment has been set up, you can download and unpack the Adempiere source RPM:

The source files will have been installed in ~/rpmbuild/SOURCES, and the specification file ("Spec" file) in ~/rpmbuild/SPECS/adempiere.spec

Configuring the Build Process

Build behavior is controlled by various parameters which are set at the beginning of the Spec File. See Appendix A for a detailed description.

Adding Customizations

Additional sources and patches can be added to the SOURCES directory to apply extensions and customizations to the Adempiere source code.

As new files are added, the SOURCES directory quickly gets very messy. For this reason, the files distributed with the Source-RPM are prefixed with sXXX_ (for sources) and pXXX_ (for patches), where XXX corresponds to the patch or source number in the Spec File. Users are encouraged to name their sources and patches following the same naming scheme.

Sources and patches must be listed in the Spec File using the Source<number>: filename and Patch<number>: filename pragmas.

Source and patch numbers 0-99 are reserved for the maintainer of the Adempiere source RPM, so you may add source files and patches starting with number 100.

…
…
# Sources
# -------

# standard sources
…
…

# your custom sources come here
# (start with number 100)
Source100:	s100_MMyModel.java
Source101:	s101_myScript.sh


# Patches
# -------

# standard patches
…
…

# your custom patches come here
# (start with number 100)
Patch100:	p100_myPatch1.patch
Patch101:	p101_myPatch2.patch
…
…
			

The sources and patches thus defined in the Spec File's preamble must be installed or applied in the %prep section, which is usually done with the install shell command and %patch macro.

…
…
%prep
…
…
	cd $rpmBuildDir/source/custom

# standard patches
# ----------------
…
…

# install your sources here
# -------------------------
install -pD -m0644 %{SOURCE100} base/src/org/adempiere/model/MMyModel.java
install -pD -m0755 %{SOURCE101} utils/myScript.sh

# apply your patches here
# -----------------------
%patch -P100 -p1
%patch -P101 -p1
…
…
			

The install command works like cp, with the addition that it will create all leading components in the path to the target file if they are missing (-D option), preserve the source file's timestamp (-p option), and set the permission mode of the target file (-m option).

The %patch macro invokes the patch command to apply patches to the source. The patch file number is specified with the -P (upper case P) option, and the -p (lower case p) option tells the patch command how many leading slashes and directories are to be omitted from filenames in the patch file. This will be explained in the next chapter.

For building Adempiere packages, the %patch macro has been extended to accept following additional parameters:

-F fuzz factor

Use the given fuzz factor

-d directory

change to directory before doing anything

-a filename

Apply patch only if filename exists.

If filename starts with a /, it describes an absolute path, otherwise it is relative to RPM_BUILD_DIR.

-x regular expression

requires -a.

Apply patch only if regular expression exists in filename.

If regular expression starts with a !, apply patch only if regular expression does not exist in filename.

Building the RPM packages

Packages are generated using the rpmbuild --sign -b… /path/to/adempiere.spec command, where the --sign option will sign the package using the gpg-signature we created earlier, and the stage up to which the packages are built is defined with the -b… switch:

-bp

build up to "prep" phase only, which means downloading the source and applying patches.

-bc

build up to "build" phase only, which means compiling the source.

-bi

build up to "install" phase only, the resulting files are installed in a directory structure as they would be on the target machine.

-bb

build binary packages (adempiere-….noarch.rpm, adempiere-server-….noarch.rpm, adempiere-client-….noarch.rpm).

-bs

build source package (adempiere-….srpm).

-ba

build all packages (both binary and source).

rpmbuild --sign -ba ~/rpmbuild/SPECS/adempiere.spec

The resulting RPM packages can be found in ~/rpmbuild/RPMS/noarch, and the source RPM in ~/rpmbuild/SRPMS.

When using --sign, rpmbuild will prompt you for a passphrase. Enter the same phrase which was used when the gpg key was generated.

Creating Patches

Patches are text files generated by the diff tool which compares files or directories and records the differences in a certain format. Those differences can then be re-applied to the original source using patch.

To create a patch file, you therefore need the original source and a copy. You can program your changes by editing, adding, or deleting files in the copy. Then use diff to compare the original source with the changes you made in the copy and record those changes in a patch file.

Normally you would want to add your changes to source files to which all previous patches have already been applied. You can obtain the patched source code by using the -bp option with rpmbuild, which downloads the code and applies all patches.

$ rpmbuild -bp ~/rpmbuild/SPECS/adempiere.spec

Then you can copy the source directory to new locations, one ending on .orig and the other ending on .new.

$ cp -r ~/rpmbuild/BUILD/adempiere-…/source/custom adempiere.orig

$ cp -r ~/rpmbuild/BUILD/adempiere-…/source/custom adempiere.new

Start hacking your heart out and make any changes you want in adempiere.new. 3 When you are done, go back to the parent directory and run diff to compare adempiere.orig with adempiere.new

$ diff -durNbB adempiere.orig adempiere.new > myPatch.patch

These are the options used in above diff command:

-d

forces diff to search for smaller sets of changes than it normally would

-u

generates unified output format, which is required by patch

-r

recursively compare subdirectories

-N

if a file is only found in one directory, treat it as present but empty in the other directory

-b

ignores changes only in whitespace

-B

ignores changes only in blank lines

The resulting patch file can be added to the SOURCES directory and listed in the Spec File as previously explained.

Note that when the patch file was created, you were in the parent directory which contains the source directory tree. But when the patch is being applied by rpmbuild, you will actually be inside the source directory tree. Therefore, the first directory component of filenames generated by diff must be ignored when running the patch command. This is achieved by passing -p1 to patch.



[3]

Be careful not to actually compile the code! You only want to save changes made to the source code. But if you compile the code, many new files will be created which do not exist in the original source, and diff would regard all of those files as additions you made to the source.

Distributing RPM Packages

Installing with RPM

The binary packages generated by rpmbuild can now be installed on target machines using the rpm command. Before doing so, the public GPG key must be loaded into the rpm database. Both must be done as root.

# rpm --import MYCOMPANY-RPM-GPG-KEY

# rpm --ivH adempiere-server-….noarch.rpm

or

# rpm --ivH adempiere-client-….noarch.rpm

But of course it would be much more efficient to have a central repository from which client machines can use tools like yum for automatic installation and upgrading.

Distributing the server package through a central yum repository might not be such a good idea, especially if it was built using pre-configured settings. That would enable anybody to download the server package and access critical information such us database passwords. And anyway, servers should always be upgraded manually.

Creating a YUM Repository

A web server is needed to distribute packages from a yum repository. The httpd server can be installed using yum, and for our purposes it can be started out of the box without having to configure it. Below commands have to be run as root.

# yum install httpd createrepo

# service httpd start

Create an adempiere directory under /var/www/html, and copy the GPG public key and the RPM packages to be distributed into it. Make sure that everybody has read permissions for those files.

$ mkdir -p /var/www/html/adempiere

$ cp MYCOMPANY-RPM-GPG-KEY /var/www/html/adempiere/

$ cp adempiere-….noarch.rpm /var/www/html/adempiere/

$ chmod o+x /var/www/html/adempiere

$ chmod -R o+r /var/www/html/adempiere

Create the repository by executing createrepo . (the last dot is important!) inside /var/www/html/adempiere

$ cd /var/www/html/adempiere

$ createrepo .

Your yum repository is now up and running and can be accessed from client machines.

For distributing upgrades, simply drop the new RPM files into the repository and run createrepo . again.

Installing with YUM

Before being able to use your new Adempiere repository, client machines must be aware that it exists. As root, create a file adempiere.repo in /etc/yum.repos.d with following contents:

[adempiere]
name=Adempiere
baseurl=http://<em>address.of.your.web.server</em>/adempiere
enabled=1
			

And of course the public key for signature verification must be imported into the RPM database (needs to be done as root):

# rpm --import http://address.of.your.web.server/adempiere/MYCOMPANY-RPM-GPG-KEY

Now yum can be used to install, upgrade, or remove your Adempiere packages:

# yum install adempiere-client

or

# yum upgrade adempiere-client

or

# yum remove adempiere-client

If the client machine has daily run of yum enabled, it will automatically upgrade to the newest package published in the adempiere repository.

Configuration Parameters

General Settings

name

The name of the resulting package

default: adempiere

example: %global name adempiere

company

The name of the packager (your company)

default: custom

example: %global company Some Company, Inc.

Compile Settings

applyQuickFix

whether quick fixes should be applied

Sometimes the source does not compile and some quick fixes or workarounds must be applied. The script SOURCES/s041_quickFix.sh is called to apply such workarounds.

values:

  • 0 = do not apply quick Fixes

  • 1 = apply quick Fixes

default: 1

example: %global applyQuickFix 1

Version Settings

version

the Adempiere version to download and compile

values:

  • current, head = download newest files of the current Adempiere version

  • release = download original files of the current Adempiere version as it was originally released

  • previous = download newest files of the previous Adempiere version (just before it changed to the current version)

  • version = specific Adempiere version to download

Note that versions are relative to the current branch (see hgBranch) in the Mercurial repository.

When comparing the Adempiere version with tags in the Mercurial repository, both are converted to lower-case, all non-alphanumeric characters are stripped, and any "adempiere" or "release" prepending the version number are removed. Thus release-2.5.3b-initial becomes 253binitial, adempiere340-trunk-frozen becomes 340trunkfrozen, and Adempiere360LTS becomes 360lts.

default: current

example: %global version 360lts

Alternatively, it is possible to directly specify a Mercurial revision. In this case it is assumed that you know what you are doing, and no further sanity checks are performed. This also overrides any settings in the hgBranch parameter.

  • tip = download the current Mercurial tip

  • hgrevision = download specific Mercurial revision

Prefixing the version information with hg will prevent such transformation and it will be treated as literal string.

Mercurial Settings

Mercurial is needed to download the source code as well as gather information on the version.

hgOptions

general options to use with the hg command

default: --noninteractive --encoding utf8

example: %global hgOptions --quiet --noninteractive --encoding utf8

hgRepository

URL of the source code repository

default: http://adempiere.hg.sourceforge.net:8000/hgroot/adempiere/adempiere

example: %global hgRepository http://adempiere.hg.sourceforge.net/hgroot/adempiere/adempiere

hgBranch

Named branch in the source code repository

values:

  • master = the main stable branch containing official releases

  • development = the main development branch with newest features and bugfixes

  • release/name = temporary branch with "frozen" code of the next release candidate

  • hotfix/name = temporary branch for fixing bugs found in live production version of master branch

  • name = any other named branch

default: master

example: %global hgBranch master

hgVersionFile

the file from which to read version information

default: base/src/org/compiere/Adempiere.java

example: %global hgVersionFile base/src/org/compiere/Adempiere.java

Adempiere User Settings

OS level environment settings for the 'adempiere' user

userDir

the home directory of the adempiere user

(this will be the parent directory of ADEMPIERE_HOME)

default: /opt/adempiere

example: %global userDir /opt/adempiere

adempiereHome

the location of ADEMPIERE_HOME

If starting with a /, it is the absolute path to ADEMPIERE_HOME. Otherwise it will be a subdirectory under %{userDir}.

Note that %{adempiereHome} will not actually be a directory, but a symbolic link.

The package will be installed under %{userDir} with version information, for example

  • /opt/adempiere/adempiere360lts for the pristine package

  • /opt/adempiere/server360lts for the server package

  • /opt/adempiere/client360lts for the client package

Then a symbolic link will be created from the package directory to %{adempiereHome}, for example

ln -s /opt/adempiere/server360lts /opt/adempiere/adempiere

This way it is possible to have different packages and versions installed on the same machine, and by changing the symbolic link you can choose which version to run.

default: adempiere

example: %global adempiereHome /opt/adempiere/adempiere

userName

the name of the adempiere user

default: adempiere

example: %global userName adempiere

userID

the user ID number for the adempiere user

If the requested user ID is already taken, the next available system ID will be used.

values: 200 <= x < 500

default: 215

example: %global userID 215

groupName

the adempiere user's private group name

default: same as %{userName}

example: %global groupName adempiere

groupID

the primary group ID number for the adempiere user

If the requested group ID is already taken, the next available system ID will be used.

values: 200 <= x < 500

default: 215

example: %global groupID 215

Pristine Package Settings

The pristine package is the release as distributed by Adempiere without any extensions or patches. It can be used for testing before filing support requests or bug reports.

It contains both server and client, and it is not pre-configured.

buildPristine

whether to build the pristine package

values:

  • 0 = do not build the pristine package

  • 1 = build the pristine package

default: 0

example: %global buildPristine 0

Client Package Settings

The client package is installed on remote machines.

It includes desktop menu entries for connection to the server.

The client package is a custom release to which patches and extensions are applied.

buildClient

whether to build the client package

values:

  • 0 = do not build the client package

  • 1 = build the client package

default: 1

example: %global buildClient 1

Server Package Settings

The server package is the live server. It also includes its own client.

The server package is a custom release to which patches and extensions are applied.

buildServer

whether to build the server package

values:

  • 0 = do not build the server package

  • 1 = build the server package

default: 1

example: %global buildServer 1

preconfigureServer

whether to pre-configure the server so that it will run out of the box without executing ./RUN_Setup.sh

values:

  • 0 = do not pre-configure the server package

  • 1 = pre-configure the server package

default: 0

example: %global preconfigureServer 0

Server Configuration Parameters

These parameters are used for pre-configuring the server

Certificate Configuration

serverFQDN

The fully qualified domain name of the server

This string is used to identify the application server as well generate default entries for mail and database server.

default: localhost.localdomain

example: %global serverFQDN myAppServer.mydomain.com

keystore

the server's keystore file (relative to ADEMPIERE_HOME)

default: keystore/myKeystore

example: %global keystore keystore/myKeystore

keystorePass

the password for the server's keystore

default: adempiere

example: %global keystorePass adempiere

keystoreCN

The CN (common name) component of the DN (distinguished name) for the server's keystore.

default: name portion of serverFQDN

example: %global keystoreCN myAppServer

keystoreOU

The OU (organizational unit) component of the DN (distinguished name) for the server's keystore.

default: name of currently logged-in user

example: %global keystoreOU myName

keystoreO

The O (organization) component of the DN (distinguished name) for the server's keystore.

default: AdempiereUser

example: %global keystoreO AdempiereUser

keystoreL

The L (location) component of the DN (distinguished name) for the server's keystore.

default: myTown

example: %global keystoreL myTown

keystoreST

The ST (state) component of the DN (distinguished name) for the server's keystore.

default: myState

example: %global keystoreST myState

keystoreC

The C (country) component of the DN (distinguished name) for the server's keystore.

default: country from system's LANG setting in /etc/sysconfig/i18n

example: %global keystoreC US

keystoreCodeAlias

the certificate alias for code signing on the server

Note that although this is a configurable parameter, the alias 'adempiere' is hardcoded in some source files, so it might be a bad idea to change it.

default: adempiere

example: %global keystoreCodeAlias adempiere

keystoreWebAlias

the certificate alias for secure web connections to the server

Note that although this is a configurable parameter, the alias 'adempiere' is hardcoded in some source files, so it might be a bad idea to change it.

default: adempiere

example: %global keystoreWebAlias adempiere

Java Configuration

javaType

the Java type installed on the server

Note that ibm is not implemented yet, and there are still some issues with openJDK.

values: sun, mac, ibm, OpenJDK

default: OpenJDK

example: %global javaType OpenJDK

javaHome

the Java path on the server

default: /usr/lib/jvm/java-openjdk

example: %global javaHome /usr/lib/jvm/java-openjdk

javaOptions

options with which to start the virtual machine under which Adempiere is run

(see Java documentation)

default: -Xms64M -Xmx512M

example: %global javaOptions -Xms64M -Xmx512M

Application Server Configuration

serverType

the type of application server

values: jboss, glassfish

default: jboss

example: %global serverType jboss

deployDir

the application server deployment directory (relative to ADEMPIERE_HOME)

default:

  • jboss/server/adempiere/deploy for JBoss

  • glassfish/glassfish/domains/domain1 for Glassfish

example: %global deployDir jboss/server/adempiere/deploy

jnpPort

the JNP port (whatever that is)

default:

  • 1099 for JBoss

  • 3700 for Glassfish

example: %global jnpPort 1099

webPort

the TCP port to be used by the application server for HTTP

default: 8888

example: %global webPort 8888

sslPort

the TCP port to be used by the application server for HTTPS

default: 8443

example: %global sslPort 8443

logFacility

which facility to use for the system logger

values: local0local7

default: local1

example: %global logFacility local1

logLevel

the minimum severity level for messages to be logged

values: DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY

default: INFO

example: %global logLevel INFO

Database Configuration

dbServer

the name of the database server

default: name portion of %{serverFQDN} (assuming that Adempiere is installed on the same machine as the database)

example: %global dbServer myDatabaseServer

dbType

the type of database (database vendor)

values: oracle, oracleXE, postgresql

default: postgresql

example: %global dbType postgresql

dbPort

the database port

default:

  • 5432 for PostgreSQL

  • 1521 for Oracle

example: %global dbPort 1521

dbName

the name of the database

default:

  • adempiere for PostgreSQL

  • orcl for Oracle

  • xe for OracleXE

example: %global dbName adempiere

dbUrl

the url for the jdbc driver to connect to the database

default:

  • jdbc:postgresql://%{dbServer}:%{dbPort}/%{dbName} for PostgreSQL

  • jdbc:oracle:thin:@//%{dbServer}:%{dbPort}/%{dbName} for Oracle

example: %global dbUrl jdbc:postgresql://myDatabaseServer:5432/adempiere

dbUser

the name of the adempiere database user

default: adempiere

example: %global dbUser adempiere

dbPassword

the password of the adempiere database user

default: adempiere

example: %global dbPassword adempiere

dbSystemUser

the user name of the database system administrator

default:

  • postgres for PostgreSQL

  • system for Oracle

example: %global dbSystemUser postgres

dbSystemPassword

the password of the database system administrator

default:

  • postgres for PostgreSQL

  • manager for Oracle

example: %global dbSystemPassword postgres

oracleHome

When using Oracle, the adempiere user needs to have access to the Oracle client on the local machine.

This is the ORACLE_HOME environment variable pointing to the oracle product directory.

To keep the adempiere packages independent of the installed Oracle version, if the Oracle product directory contains a version in its name, it is recommended to create symbolic link from the Oracle product directory to a version-free name such as /opt/oracle/oracle at the time of Oracle installation.

This can be done with the command

# ln -s /opt/oracle/product/10.2.01 /opt/oracle/oracle

default: /opt/oracle/oracle

example: %global oracleHome /opt/oracle/product/10.2.01

oracleTnsAdmin

When using Oracle, the adempiere user needs to have access to the Oracle client on the local machine.

This is the TNS_ADMIN environment variable pointing to the location where Oracle Net Services look for configuration files.

default: %{oracleHome}/network/admin

example: %global oracleTnsAdmin /opt/oracle/product/10.2.01/network/admin

FTP Configuration

ftpServer

name of the FTP server

default: name portion of %{serverFQDN}

example: %global ftpServer myAppServer

ftpPrefix

the FTP prefix to use

(no idea what this does)

default: my

example: %global ftpPrefix my

ftpUser

the FTP user

default: anonymous

example: %global ftpUser anonymous

ftpPassword

the FTP user's password

default: user@host.com

example: %global ftpPassword user@host.com

E-Mail Configuration

mailServer

the mail server to use

default: mailserver.(domain portion of %{serverFQDN})

example: %global mailServer mailserver.mydomain.com

mailAddress

the default administrative mail address to use

It can be overwritten on client level

default: adempiere@(domain portion of %{serverFQDN})

example: %global mailAddress adempiere@mydomain.com

mailUser

the user of the default mail account

default: adempiere

example: %global mailUser adempiere

mailPassword

the password of the default mail account

default: adempiere

example: %global mailPassword adempiere

Corporate Format Settings

Some sites may want to enforce their own corporate formats, i.e. no matter what locale the user is working in or what language a business partner has defined, always the same decimal point, date format, and paper size are used, regardless of what the locale conventions are.

(And the locale conventions are often wrong in Java, anyway).

This is technically a patch, but as the target file may change frequently, it would be very cumbersome to always keep the patch file up to date.

It has therefore been incorporated as a script in the %prep section.

useCorporateFormat

whether to apply the corporate format patch

Note that this changes the locale conventions for the complete installation and thus affects all clients.

values:

  • 0 = do not use corporate formats

  • 1 = use corporate formats

default: 0

example: %global useCorporateFormat 0

formatDecimal

whether to use a point as decimal separator

values:

  • 0 = use a comma as decimal separator

  • 1 = use a point as decimal separator

default: 1

example: %global formatDecimal 1

formatDate

the date format to use

The formats are probably described somewhere in Java documentation. Have a look at looks/src/org/compiere/util/Language.java for examples.

default: yyyy-MM-dd

example: %global formatDate yyyy-MM-dd

formatPaper

the paper size to use.

The formats are probably described somewhere in Java documentation. Have a look at looks/src/org/compiere/util/Language.java for examples.

values: ISO.A4, NA.LETTER

default: ISO.A4

example: %global formatPaper ISO.A4