Blame Manuals/Repository-fs/trunk/Scripts/Bash/Functions/Verify.texi

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