Blame Manual/Filesystem/trunk/Scripts/Bash/Cli/Functions/Verify.texi

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