Blame Manuals/Filesystem/trunk/Scripts/Bash/centos-art/Functions/Verify.texi

cc8089
@subsection Goals
cc8089
cc8089
This section exists to organize files related to @file{centos-art.sh}
cc8089
script @samp{verify} functionality.  The @samp{verify}
cc8089
functionality of @file{centos-art.sh} script helps you to verify the
cc8089
workstation configuration you are planning to use as host for your
cc8089
working copy of CentOS Artwork Repository.
cc8089
cc8089
@subsection Description
cc8089
cc8089
The first time you download CentOS Artwork Repository you need to
cc8089
configure your workstation in order to use @file{centos-art.sh}
cc8089
script.  These preliminar configurations are based mainly on auxiliar
cc8089
RPM packages installation, symbolic links creations, and environment
cc8089
variables definitions.  The @samp{verify} functionality of
cc8089
@file{centos-art.sh} script guides you through this preliminar
cc8089
configuration process.  
cc8089
cc8089
If this is the first time you run @file{centos-art.sh} script, the
cc8089
appropriate way to use its @samp{verify} functionality is not using
cc8089
the @file{centos-art.sh} script directly, but the absolute path to
cc8089
@command{centos-art.sh} script instead (i.e.,
cc8089
@file{~/artwork/trunk/Scripts/Bash/centos-art.sh}).  This is necessary
cc8089
because @file{centos-art} symbolic link, under @file{~/bin/}
cc8089
directory, has not been created yet.
cc8089
cc8089
@subsubsection Packages
cc8089
cc8089
Installation of auxiliar RPM packages provides the software required
cc8089
to manipulate files inside the repository (e.g., image files,
cc8089
documentation files, translation files, script files, etc.). Most of
cc8089
RPM packages @command{centos-art.sh} script uses are shipped with
cc8089
CentOS distribution, and can be installed from CentOS base repository.
cc8089
The only exception is @samp{inkscape}, the package we use to
cc8089
manipulate SVG files.  The @samp{inkscape} package is not inside
cc8089
CentOS distribution so it needs to be installed from third party
cc8089
repositories.
cc8089
cc8089
@quotation
cc8089
@strong{Note} Configuration of third party repositories inside CentOS
cc8089
distribution is described in CentOS wiki, specifically in the
cc8089
following URL:
cc8089
@url{http://wiki.centos.org/AdditionalResources/Repositories}
cc8089
@end quotation
cc8089
cc8089
Before installing packages, the @file{centos-art.sh} script uses
cc8089
@command{sudo} to request root privileges to execute @command{yum}
cc8089
installation functionality.  If your user isn't defined as a
cc8089
privileged user---at least to run @command{yum} commands--- inside
cc8089
@file{/etc/sudoers} configuration file, you will not be able to
cc8089
perform package installation tasks as set in @file{centos-art.sh}
cc8089
script @samp{verify} functionality. 
cc8089
cc8089
Setting sudo privileges to users is an administrative task you have to
cc8089
do by yourself. If you don't have experience with @command{sudo}
cc8089
command, please read its man page running the command: @command{man
cc8089
sudo}. This reading will be very useful, and with some practice, you
cc8089
will be able to configure your users to have @command{sudo}
cc8089
privileges.
cc8089
cc8089
@subsubsection Links
cc8089
cc8089
Creation of symbolic links helps us to alternate between different
cc8089
implementations of @file{centos-art.sh} script-line (e.g.,
cc8089
@file{centos-art.sh}, for Bash implementation; @file{centos-art.py},
cc8089
for Python implementation; @file{centos-art.pl}, for Perl
cc8089
implementation; and so on for other implementations). The
cc8089
@file{centos-art.sh} script-line definition takes place inside your
cc8089
personal binary (@file{~/bin/}) directory in order to make the script
cc8089
implementation ---the one that @file{centos-art} links to--- available
cc8089
to @var{PATH} environment variable.
cc8089
cc8089
Creation of symbolic links helps us to reuse components from repository
cc8089
working copy. For example, color information files maintained inside
cc8089
your working copy must never be duplicated inside program-specific
cc8089
configuration directories that uses them in your workstation (e.g.,
cc8089
Gimp, Inkscape, etc.).  Instead, a symbolic link must be created for
cc8089
each one of them, from program-specific configuration directories to
cc8089
files in the working copy.  In this configuration, when someone
cc8089
commits changes to color information files up to central repository,
cc8089
they---the changes committed--- will be immediatly available to your
cc8089
programs the next time you update your working copy ---the place
cc8089
inside your workstation those color information files are stored---.
cc8089
cc8089
Creation of symbolic links helps us to make @file{centos-art.sh}
cc8089
script functionalities available outside @file{trunk/} repository
cc8089
directory structure, but at its same level in repository tree. This is
cc8089
useful if you need to use the ``render'' functionality of
cc8089
@command{centos-art.sh} under @file{branches/} repository directory
cc8089
structure as you usually do inside @file{trunk/} repository directory
cc8089
structure. As consequence of this configuration, automation scripts
cc8089
cannot be branched under @file{branches/Scripts} directory structure.
cc8089
cc8089
@subsubsection Environment variables
cc8089
cc8089
Definition of environemnt variables helps us to set default values to
cc8089
our user session life. The user session environment variable defintion
cc8089
takes place in the user's @file{~/.bash_profile} file.  The
cc8089
@samp{verify} functionality of @file{centos-art.sh} script doesn't
cc8089
modify your @file{~/.bash_profile} file.  
cc8089
cc8089
The @samp{verify} functionality of @file{centos-art.sh} script
cc8089
evaluates the following environment variables:
cc8089
cc8089
@table @env
cc8089
@item EDITOR
cc8089
Default text editor. 
cc8089
cc8089
The @file{centos-art.sh} script uses default text @env{EDITOR} to edit
cc8089
pre-commit subversion messages, translation files, configuration
cc8089
files, script files, and similar text-based files.
cc8089
cc8089
If @env{EDITOR} environment variable is not set, @file{centos-art.sh}
cc8089
script uses @file{/usr/bin/vim} as default text editor. Otherwise, the
cc8089
following values are recognized by @file{centos-art.sh} script:
cc8089
cc8089
@itemize
cc8089
@item @file{/usr/bin/vim}
cc8089
@item @file{/usr/bin/emacs}
cc8089
@item @file{/usr/bin/nano}
cc8089
@end itemize
cc8089
cc8089
If no one of these values is set in @env{EDITOR} environment variable,
cc8089
@file{centos-art.sh} uses @file{/usr/bin/vim} text editor by default. 
cc8089
cc8089
@item TEXTDOMAIN
cc8089
cc8089
Default domain used to retrieve translated messages.  This variable is
cc8089
set in @file{initFunctions.sh} and shouldn't be changed.
cc8089
cc8089
@item TEXTDOMAINDIR
cc8089
cc8089
Default directory used to retrieve translated messages.  This variable
cc8089
is set in @file{initFunctions.sh} and shouldn't be changed.
cc8089
cc8089
@item LANG
cc8089
cc8089
Default locale information.
cc8089
cc8089
This variable is initially set in the configuration process of CentOS
cc8089
distribution installer (i.e., Anaconda), specifically in the
cc8089
@samp{Language} step; or once installed using the
cc8089
@command{system-config-language} tool.
cc8089
cc8089
The @file{centos-art.sh} script uses the @var{LANG} environment
cc8089
variable to know in which language the script messages are printed
cc8089
out.
cc8089
cc8089
@item TZ
cc8089
cc8089
Default time zone representation.
cc8089
cc8089
This variable is initially set in the configuration process of CentOS
cc8089
distribution installer (i.e., Anaconda), specifically in the
cc8089
@samp{Date and time} step; or once installed using the
cc8089
@command{system-config-date} tool.
cc8089
cc8089
The @file{centos-art.sh} script doesn't use the @var{TZ} environment
cc8089
variable information at all. Instead, this variable is used by the
cc8089
system shell to show the time information according to your phisical
cc8089
location on planet Earth.  
cc8089
cc8089
Inside your computer, the time information is firstly set in the BIOS
cc8089
clock (which may need correction), and later in the configuration
cc8089
process of CentOS distribution installer (or later, by any of the
cc8089
related configuration tools inside CentOS distribution).  Generally,
cc8089
setting time information is a straight-forward task and configuration
cc8089
tools available do cover most relevant location. However, if you need
cc8089
a time precision not provided by the configuration tools available
cc8089
inside CentOS distribution then, using @var{TZ} variable may be
cc8089
necessary.
cc8089
cc8089
@quotation
cc8089
@strong{Convenction} In order to keep changes syncronized between
cc8089
central repository and its working copies: configure both repository
cc8089
server and workstations (i.e., the place where each working copy is
cc8089
set on) to use Coordinated Universal Time (UTC) as base time
cc8089
representation.  Later, correct the time information for your specific
cc8089
location using time zone correction.
cc8089
@end quotation
cc8089
cc8089
The format of @var{TZ} environment variable is described in
cc8089
@file{tzset(3)} manual page.
cc8089
cc8089
@end table
cc8089
cc8089
@subsection Usage
cc8089
cc8089
@table @command
cc8089
cc8089
@item centos-art verify --packages
cc8089
cc8089
Verify required packages your workstation needs in order to run the
cc8089
@file{centos-art.sh} script correctly.  If there are missing packages,
cc8089
the @file{centos-art.sh} script asks you to confirm their
cc8089
installation. When installing packages, the @file{centos-art.sh}
cc8089
script uses the @command{yum} application in order to achieve the
cc8089
task.
cc8089
cc8089
In case all packages required by @file{centos-art.sh} script are
cc8089
already installed in your workstation, the message @samp{The required
cc8089
packages are already installed.} is output for you to know. 
cc8089
cc8089
@item centos-art verify --links
cc8089
cc8089
Verify required links your workstation needs in order to run the
cc8089
centos-art command correctly.  If any required link is missing, the
cc8089
@command{centos-art.sh} script asks you to confirm their installation.
cc8089
To install required links, the @command{centos-art.sh} script uses the
cc8089
@command{ln} command.
cc8089
cc8089
In case all links required by @file{centos-art.sh} script are already
cc8089
created in your workstation, the message @samp{The required links are
cc8089
already installed.} is output for you to know. 
cc8089
cc8089
In case a regular file exists with the same name of a required link,
cc8089
the @file{centos-art.sh} script outputs the @samp{Already exists as
cc8089
regular file.} message when listing required links that will be
cc8089
installed. Of course, as there is already a regular file where must be
cc8089
a link, no link is created. In such cases the @file{centos-art.sh}
cc8089
script will fall into a continue installation request for that missing
cc8089
link.  To end this continue request you can answer @samp{No}, or
cc8089
remove the existent regular file to let @file{centos-art.sh} script
cc8089
install the link on its place.
cc8089
cc8089
@item centos-art verify --environment
cc8089
@itemx centos-art verify --environment --filter='regex'
cc8089
cc8089
Output a brief description of environment variables used by
cc8089
@file{centos-art.sh} script. 
cc8089
cc8089
If @samp{--filter} option is provided, output is reduced as defined in
cc8089
the @samp{regex} regular expression value. If @samp{--filter} option
cc8089
is specified but @samp{regex} value is not, the @file{centos-art.sh}
cc8089
script outputs information as if @samp{--filter} option had not been
cc8089
provided at all.  
cc8089
cc8089
@end table
cc8089
cc8089
@subsection See also
cc8089
cc8089
@menu
cc8089
* trunk Scripts Bash::
65cd8a
@comment --- Removed(* trunk Scripts Bash Functions::) ---
cc8089
@end menu