Blob Blame History Raw
<?xml version="1.0"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

    <title>CentOS Artwork Repository: 2.72 The trunk/Scripts/Functions/Verify Directory</title>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta name="description" content="CentOS Artwork Repository: 2.72 The trunk/Scripts/Functions/Verify Directory" />
    <meta name="keywords" content="CentOS Artwork Repository: 2.72 The trunk/Scripts/Functions/Verify Directory" />
    <meta name="resource-type" content="document" />
    <meta name="distribution" content="global" />
    <meta name="generator" content="texi2html 1.76" />
    <meta name="copyright" content="2009-2011 Alain Reguera Delgado" />

    <link href="/home/centos/artwork/trunk/Identity/Manual/repository.css" rel="stylesheet" type="text/css" media="screen projection" />

</head>

<body>

<a name="top" />

<div id="wrap">

    <div id="page-body">

        <div id="content">

<!-- Created on March, 30 2011 by texi2html 1.76 -->
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="repository_78.xhtml#SEC407" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC409" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="repository_7.xhtml#SEC12" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="repository_7.xhtml#SEC12" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="repository_80.xhtml#SEC416" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="repository.xhtml#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="repository_toc.xhtml#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="repository_80.xhtml#SEC416" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="repository_abt.xhtml#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Directories-trunk-Scripts-Functions-Verify"></a>
<a name="SEC408"></a>
<h2 class="section"> 2.72 The <tt>`trunk/Scripts/Functions/Verify'</tt> Directory </h2>

<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC409"></a>
<h3 class="subsection"> 2.72.1 Goals </h3>

<p>This section exists to organize files related to <tt>`centos-art.sh'</tt>
script <samp>`verify'</samp> functionality.  The <samp>`verify'</samp>
functionality of <tt>`centos-art.sh'</tt> script helps you to verify the
workstation configuration you are planning to use as host for your
working copy of CentOS Artwork Repository.
</p>
<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC410"></a>
<h3 class="subsection"> 2.72.2 Description </h3>

<p>The first time you download CentOS Artwork Repository you need to
configure your workstation in order to use <tt>`centos-art.sh'</tt>
script.  These preliminar configurations are based mainly on auxiliar
RPM packages installation, symbolic links creations, and environment
variables definitions.  The <samp>`verify'</samp> functionality of
<tt>`centos-art.sh'</tt> script guides you through this preliminar
configuration process.  
</p>
<p>If this is the first time you run <tt>`centos-art.sh'</tt> script, the
appropriate way to use its <samp>`verify'</samp> functionality is not using
the <tt>`centos-art.sh'</tt> script directly, but the absolute path to
<code>centos-art.sh</code> script instead (i.e.,
<tt>`~/artwork/trunk/Scripts/Bash/centos-art.sh'</tt>).  This is necessary
because <tt>`centos-art'</tt> symbolic link, under <tt>`~/bin/'</tt>
directory, has not been created yet.
</p>
<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC411"></a>
<h4 class="subsubsection"> 2.72.2.1 Packages </h4>

<p>Installation of auxiliar RPM packages provides the software required
to manipulate files inside the repository (e.g., image files,
documentation files, translation files, script files, etc.). Most of
RPM packages <code>centos-art.sh</code> script uses are shipped with
CentOS distribution, and can be installed from CentOS base repository.
The only exception is <samp>`inkscape'</samp>, the package we use to
manipulate SVG files.  The <samp>`inkscape'</samp> package is not inside
CentOS distribution so it needs to be installed from third party
repositories.
</p>
<blockquote class="blue icon"><img src="/home/centos/artwork/trunk/Identity/Images/Webenv/icon-admonition-info.png" alt="Info" /><h3>Note</h3><p> Configuration of third party repositories inside CentOS
distribution is described in CentOS wiki, specifically in the
following URL:
<a class="www" href="http://wiki.centos.org/AdditionalResources/Repositories">http://wiki.centos.org/AdditionalResources/Repositories</a>
</p></blockquote>

<p>Before installing packages, the <tt>`centos-art.sh'</tt> script uses
<code>sudo</code> to request root privileges to execute <code>yum</code>
installation functionality.  If your user isn't defined as a
privileged user--at least to run <code>yum</code> commands-- inside
<tt>`/etc/sudoers'</tt> configuration file, you will not be able to
perform package installation tasks as set in <tt>`centos-art.sh'</tt>
script <samp>`verify'</samp> functionality. 
</p>
<p>Setting sudo privileges to users is an administrative task you have to
do by yourself. If you don't have experience with <code>sudo</code>
command, please read its man page running the command: <code>man
sudo</code>. This reading will be very useful, and with some practice, you
will be able to configure your users to have <code>sudo</code>
privileges.
</p>
<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC412"></a>
<h4 class="subsubsection"> 2.72.2.2 Links </h4>

<p>Creation of symbolic links helps us to alternate between different
implementations of <tt>`centos-art.sh'</tt> script-line (e.g.,
<tt>`centos-art.sh'</tt>, for Bash implementation; <tt>`centos-art.py'</tt>,
for Python implementation; <tt>`centos-art.pl'</tt>, for Perl
implementation; and so on for other implementations). The
<tt>`centos-art.sh'</tt> script-line definition takes place inside your
personal binary (<tt>`~/bin/'</tt>) directory in order to make the script
implementation --the one that <tt>`centos-art'</tt> links to-- available
to <var>PATH</var> environment variable.
</p>
<p>Creation of symbolic links helps us to reuse components from repository
working copy. For example, color information files maintained inside
your working copy must never be duplicated inside program-specific
configuration directories that uses them in your workstation (e.g.,
Gimp, Inkscape, etc.).  Instead, a symbolic link must be created for
each one of them, from program-specific configuration directories to
files in the working copy.  In this configuration, when someone
commits changes to color information files up to central repository,
they--the changes committed-- will be immediatly available to your
programs the next time you update your working copy --the place
inside your workstation those color information files are stored--.
</p>
<p>Creation of symbolic links helps us to make <tt>`centos-art.sh'</tt>
script functionalities available outside <tt>`trunk/'</tt> repository
directory structure, but at its same level in repository tree. This is
useful if you need to use the &quot;render&quot; functionality of
<code>centos-art.sh</code> under <tt>`branches/'</tt> repository directory
structure as you usually do inside <tt>`trunk/'</tt> repository directory
structure. As consequence of this configuration, automation scripts
cannot be branched under <tt>`branches/Scripts'</tt> directory structure.
</p>
<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC413"></a>
<h4 class="subsubsection"> 2.72.2.3 Environment variables </h4>

<p>Definition of environemnt variables helps us to set default values to
our user session life. The user session environment variable defintion
takes place in the user's <tt>`~/.bash_profile'</tt> file.  The
<samp>`verify'</samp> functionality of <tt>`centos-art.sh'</tt> script doesn't
modify your <tt>`~/.bash_profile'</tt> file.  
</p>
<p>The <samp>`verify'</samp> functionality of <tt>`centos-art.sh'</tt> script
evaluates the following environment variables:
</p>
<dl compact="compact">
<dt> <code>EDITOR</code></dt>
<dd><p>Default text editor. 
</p>
<p>The <tt>`centos-art.sh'</tt> script uses default text <code>EDITOR</code> to edit
pre-commit subversion messages, translation files, configuration
files, script files, and similar text-based files.
</p>
<p>If <code>EDITOR</code> environment variable is not set, <tt>`centos-art.sh'</tt>
script uses <tt>`/usr/bin/vim'</tt> as default text editor. Otherwise, the
following values are recognized by <tt>`centos-art.sh'</tt> script:
</p>
<ul class="toc">
<li> <tt>`/usr/bin/vim'</tt>
</li><li> <tt>`/usr/bin/emacs'</tt>
</li><li> <tt>`/usr/bin/nano'</tt>
</li></ul>

<p>If no one of these values is set in <code>EDITOR</code> environment variable,
<tt>`centos-art.sh'</tt> uses <tt>`/usr/bin/vim'</tt> text editor by default. 
</p>
</dd>
<dt> <code>TEXTDOMAIN</code></dt>
<dd>
<p>Default domain used to retrieve translated messages.  This variable is
set in <tt>`initFunctions.sh'</tt> and shouldn't be changed.
</p>
</dd>
<dt> <code>TEXTDOMAINDIR</code></dt>
<dd>
<p>Default directory used to retrieve translated messages.  This variable
is set in <tt>`initFunctions.sh'</tt> and shouldn't be changed.
</p>
</dd>
<dt> <code>LANG</code></dt>
<dd>
<p>Default locale information.
</p>
<p>This variable is initially set in the configuration process of CentOS
distribution installer (i.e., Anaconda), specifically in the
<samp>`Language'</samp> step; or once installed using the
<code>system-config-language</code> tool.
</p>
<p>The <tt>`centos-art.sh'</tt> script uses the <var>LANG</var> environment
variable to know in which language the script messages are printed
out.
</p>
</dd>
<dt> <code>TZ</code></dt>
<dd>
<p>Default time zone representation.
</p>
<p>This variable is initially set in the configuration process of CentOS
distribution installer (i.e., Anaconda), specifically in the
<samp>`Date and time'</samp> step; or once installed using the
<code>system-config-date</code> tool.
</p>
<p>The <tt>`centos-art.sh'</tt> script doesn't use the <var>TZ</var> environment
variable information at all. Instead, this variable is used by the
system shell to show the time information according to your phisical
location on planet Earth.  
</p>
<p>Inside your computer, the time information is firstly set in the BIOS
clock (which may need correction), and later in the configuration
process of CentOS distribution installer (or later, by any of the
related configuration tools inside CentOS distribution).  Generally,
setting time information is a straight-forward task and configuration
tools available do cover most relevant location. However, if you need
a time precision not provided by the configuration tools available
inside CentOS distribution then, using <var>TZ</var> variable may be
necessary.
</p>
<blockquote class="orange icon"><img src="/home/centos/artwork/trunk/Identity/Images/Webenv/icon-admonition-ruler.png" alt="Convenction" /><h3>Convenction</h3><p> In order to keep changes syncronized between
central repository and its working copies: configure both repository
server and workstations (i.e., the place where each working copy is
set on) to use Coordinated Universal Time (UTC) as base time
representation.  Later, correct the time information for your specific
location using time zone correction.
</p></blockquote>

<p>The format of <var>TZ</var> environment variable is described in
<tt>`tzset(3)'</tt> manual page.
</p>
</dd>
</dl>

<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC414"></a>
<h3 class="subsection"> 2.72.3 Usage </h3>

<dl compact="compact">
<dt> <code>centos-art verify --packages</code></dt>
<dd>
<p>Verify required packages your workstation needs in order to run the
<tt>`centos-art.sh'</tt> script correctly.  If there are missing packages,
the <tt>`centos-art.sh'</tt> script asks you to confirm their
installation. When installing packages, the <tt>`centos-art.sh'</tt>
script uses the <code>yum</code> application in order to achieve the
task.
</p>
<p>In case all packages required by <tt>`centos-art.sh'</tt> script are
already installed in your workstation, the message <samp>`The required
packages are already installed.'</samp> is output for you to know. 
</p>
</dd>
<dt> <code>centos-art verify --links</code></dt>
<dd>
<p>Verify required links your workstation needs in order to run the
centos-art command correctly.  If any required link is missing, the
<code>centos-art.sh</code> script asks you to confirm their installation.
To install required links, the <code>centos-art.sh</code> script uses the
<code>ln</code> command.
</p>
<p>In case all links required by <tt>`centos-art.sh'</tt> script are already
created in your workstation, the message <samp>`The required links are
already installed.'</samp> is output for you to know. 
</p>
<p>In case a regular file exists with the same name of a required link,
the <tt>`centos-art.sh'</tt> script outputs the <samp>`Already exists as
regular file.'</samp> message when listing required links that will be
installed. Of course, as there is already a regular file where must be
a link, no link is created. In such cases the <tt>`centos-art.sh'</tt>
script will fall into a continue installation request for that missing
link.  To end this continue request you can answer <samp>`No'</samp>, or
remove the existent regular file to let <tt>`centos-art.sh'</tt> script
install the link on its place.
</p>
</dd>
<dt> <code>centos-art verify --environment</code></dt>
<dt> <code>centos-art verify --environment --filter='regex'</code></dt>
<dd>
<p>Output a brief description of environment variables used by
<tt>`centos-art.sh'</tt> script. 
</p>
<p>If <samp>`--filter'</samp> option is provided, output is reduced as defined in
the <samp>`regex'</samp> regular expression value. If <samp>`--filter'</samp> option
is specified but <samp>`regex'</samp> value is not, the <tt>`centos-art.sh'</tt>
script outputs information as if <samp>`--filter'</samp> option had not been
provided at all.  
</p>
</dd>
</dl>

<div class="page-line white"><hr style="display:none;" /></div>
<a name="SEC415"></a>
<h3 class="subsection"> 2.72.4 See also </h3>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="repository_67.xhtml#SEC329">2.60 The <tt>`trunk/Scripts'</tt> Directory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>



<div class="page-line white"><hr style="display:none;" /></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC414" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="repository_80.xhtml#SEC416" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="repository_7.xhtml#SEC12" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC408" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="repository_80.xhtml#SEC416" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>

            <div class="page-line"><hr style="display:none;" /></div>

        </div>

    </div>

    <div class="page-line white"><hr style="display:none;" /></div>

</div>

</body>

</html>