Blob Blame History Raw
@subsection Goals

This section exists to organize files related to @file{centos-art.sh}
script @samp{verify} functionality.  The @samp{verify}
functionality of @file{centos-art.sh} script helps you to verify the
workstation configuration you are planning to use as host for your
working copy of CentOS Artwork Repository.

@subsection Description

The first time you download CentOS Artwork Repository you need to
configure your workstation in order to use @file{centos-art.sh}
script.  These preliminar configurations are based mainly on auxiliar
RPM packages installation, symbolic links creations, and environment
variables definitions.  The @samp{verify} functionality of
@file{centos-art.sh} script guides you through this preliminar
configuration process.  

If this is the first time you run @file{centos-art.sh} script, the
appropriate way to use its @samp{verify} functionality is not using
the @file{centos-art.sh} script directly, but the absolute path to
@command{centos-art.sh} script instead (i.e.,
@file{~/artwork/trunk/Scripts/Bash/centos-art.sh}).  This is necessary
because @file{centos-art} symbolic link, under @file{~/bin/}
directory, has not been created yet.

@subsubsection Packages

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 @command{centos-art.sh} script uses are shipped with
CentOS distribution, and can be installed from CentOS base repository.
The only exception is @samp{inkscape}, the package we use to
manipulate SVG files.  The @samp{inkscape} package is not inside
CentOS distribution so it needs to be installed from third party
repositories.

@quotation
@strong{Note} Configuration of third party repositories inside CentOS
distribution is described in CentOS wiki, specifically in the
following URL:
@url{http://wiki.centos.org/AdditionalResources/Repositories}
@end quotation

Before installing packages, the @file{centos-art.sh} script uses
@command{sudo} to request root privileges to execute @command{yum}'s
installation functionality.  If your user isn't defined as a
privileged user---at least to run @command{yum} commands--- inside
@file{/etc/sudoers} configuration file, you will not be able to
perform package installation tasks as set in @file{centos-art.sh}
script @samp{verify} functionality. 

Setting sudo privileges to users is an administrative task you have to
do by yourself. If you don't have experience with @command{sudo}
command, please read its man page running the command: @command{man
sudo}. This reading will be very useful, and with some practice, you
will be able to configure your users to have @command{sudo}
privileges.

@subsubsection Links

Creation of symbolic links helps us to alternate between different
implementations of @file{centos-art.sh} script-line (e.g.,
@file{centos-art.sh}, for Bash implementation; @file{centos-art.py},
for Python implementation; @file{centos-art.pl}, for Perl
implementation; and so on for other implementations). The
@file{centos-art.sh} script-line definition takes place inside your
personal binary (@file{~/bin/}) directory in order to make the script
implementation ---the one that @file{centos-art} links to--- available
to @var{PATH} environment variable.

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---.

Creation of symbolic links helps us to make @file{centos-art.sh}
script functionalities available outside @file{trunk/} repository
directory structure, but at its same level in repository tree. This is
useful if you need to use the ``render'' functionality of
@command{centos-art.sh} under @file{branches/} repository directory
structure as you usually do inside @file{trunk/} repository directory
structure. As consequence of this configuration, automation scripts
cannot be branched under @file{branches/Scripts} directory structure.

@subsubsection Environment variables

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 @file{~/.bash_profile} file.  The
@samp{verify} functionality of @file{centos-art.sh} script doesn't
modify your @file{~/.bash_profile} file.  

The @samp{verify} functionality of @file{centos-art.sh} script
evaluates the following environment variables:

@table @env
@item EDITOR
Default text editor. 

The @file{centos-art.sh} script uses default text @env{EDITOR} to edit
pre-commit subversion messages, translation files, configuration
files, script files, and similar text-based files.

If @env{EDITOR} environment variable is not set, @file{centos-art.sh}
script uses @file{/usr/bin/vim} as default text editor. Otherwise, the
following values are recognized by @file{centos-art.sh} script:

@itemize
@item @file{/usr/bin/vim}
@item @file{/usr/bin/emacs}
@item @file{/usr/bin/nano}
@end itemize

If no one of these values is set in @env{EDITOR} environment variable,
@file{centos-art.sh} uses @file{/usr/bin/vim} text editor by default. 

@item TZ

Default time zone representation.

Time representation inside repository server is set to Coordinated
Universal Time (UTC).  Time represetation inside repository working
copies is set as their administrators personally define.  

When repository working copies time representation be defined, it
would be a very good convention to follow if working copies
administrators would set their systems clock to use UTC.  Otherwise it
would be difficult for working copies users to find out when changes
were committed up to repository server exactly in time.

@quotation
@strong{Tip} Coordinated Univeral Time (UTC) representation can be
configured when you install CentOS distribution; or later, runing the
@command{system-config-date} command at a shell prompt from your
graphical interface.
@end quotation

@quotation
@strong{Note} If you set your system clock to use UTC representation,
you also need to set the @env{TZ} environment variable inside
@file{~/.bash_profile} as follows:
@verbatim
export TZ=UTC
@end verbatim
This is required in order for your terminal to display the correct
time information of your zone, taking UTC representation as reference.
@end quotation

@item TEXTDOMAIN

Default domain used to retrieve translated messages.  This value is
set in @file{initFunctions.sh} and shouldn't be changed.

@item TEXTDOMAINDIR

Default directory used to retrieve translated messages. This value is
set in @file{initFunctions.sh} and shouldn't be changed.

@item LANG

Default locale information. This value is set when you start your
session and can be changed using the @samp{locale} functionality of
@file{centos-art.sh} script (@pxref{trunk Scripts Bash Functions
Locale}, for more information).
@end table

@subsection Usage

@table @samp
@item centos-art verify --packages
Verify required packages your workstation needs in order to run the
@file{centos-art.sh} script correctly.  If there are missing packages,
the @file{centos-art.sh} script asks you to confirm their
installation. When installing packages, the @file{centos-art.sh}
script uses the @command{yum} application in order to achieve the
task.

In case all packages required by @file{centos-art.sh} script are
already installed in your workstation, the message @samp{The required
packages are already installed.} is output for you to know. 

@item centos-art verify --links
Verify required links your workstation needs in order to run the
centos-art command correctly.  If any required link is missing, the
@command{centos-art.sh} script asks you to confirm their installation.
To install required links, the @command{centos-art.sh} script uses the
@command{ln} command.

In case all links required by @file{centos-art.sh} script are already
created in your workstation, the message @samp{The required links are
already installed.} is output for you to know. 

In case a regular file exists with the same name of a required link,
the @file{centos-art.sh} script outputs the @samp{Already exists as
regular file.} 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 @file{centos-art.sh}
script will fall into a continue installation request for that missing
link.  To end this continue request you can answer @samp{No}, or
remove the existent regular file to let @file{centos-art.sh} script
install the link on its place.

@item centos-art verify --environment
@itemx centos-art verify --environment --filter='regex'
Output a brief description of environment variables used by
@file{centos-art.sh} script. 

If @samp{--filter} option is provided, output is reduced as defined in
the @samp{regex} regular expression value. If @samp{--filter} option
is specified but @samp{regex} value is not, the @file{centos-art.sh}
script outputs information as if @samp{--filter} option had not been
provided at all.
@end table

@subsection See also

@menu
* trunk Scripts Bash::
* trunk Scripts Bash Functions::
@end menu