Blame Manuals/en/Texinfo/Repository/trunk/Scripts/Bash/Functions/Verify.texi

38bcd9
@subsection Goals
38bcd9
2d7726
This section exists to organize files related to @file{centos-art.sh}
2bb528
script @samp{verify} functionality.  The @samp{verify}
efa7b7
functionality of @file{centos-art.sh} script helps you to verify the
efa7b7
workstation configuration you are planning to use as host for your
efa7b7
working copy of CentOS Artwork Repository.
38bcd9
38bcd9
@subsection Description
38bcd9
12494b
The first time you download CentOS Artwork Repository you need to
ca45c0
configure your workstation in order to use @file{centos-art.sh}
ca45c0
script.  These preliminar configurations are based mainly on auxiliar
ca45c0
RPM packages installation, symbolic links creations, and environment
2bb528
variables definitions.  The @samp{verify} functionality of
ca45c0
@file{centos-art.sh} script guides you through this preliminar
ca45c0
configuration process.  
ca45c0
2bb528
If this is the first time you run @file{centos-art.sh} script, the
2bb528
appropriate way to use its @samp{verify} functionality is not using
2bb528
the @file{centos-art.sh} script directly, but the absolute path to
ca45c0
@command{centos-art.sh} script instead (i.e.,
ca45c0
@file{~/artwork/trunk/Scripts/Bash/centos-art.sh}).  This is necessary
2bb528
because @file{centos-art} symbolic link, under @file{~/bin/}
ca45c0
directory, has not been created yet.
eae802
eae802
@subsubsection Packages
12494b
12494b
Installation of auxiliar RPM packages provides the software required
12494b
to manipulate files inside the repository (e.g., image files,
12494b
documentation files, translation files, script files, etc.). Most of
ca45c0
RPM packages @command{centos-art.sh} script uses are shipped with
ca45c0
CentOS distribution, and can be installed from CentOS base repository.
ca45c0
The only exception is @samp{inkscape}, the package we use to
ca45c0
manipulate SVG files.  The @samp{inkscape} package is not inside
ca45c0
CentOS distribution so it needs to be installed from third party
eae802
repositories.
eae802
eae802
@quotation
eae802
@strong{Note} Configuration of third party repositories inside CentOS
eae802
distribution is described in CentOS wiki, specifically in the
eae802
following URL:
eae802
@url{http://wiki.centos.org/AdditionalResources/Repositories}
eae802
@end quotation
eae802
494aa1
Before installing packages, the @file{centos-art.sh} script uses
494aa1
@command{sudo} to request root privileges to execute @command{yum}'s
494aa1
installation functionality.  If your user isn't defined as a
494aa1
privileged user---at least to run @command{yum} commands--- inside
494aa1
@file{/etc/sudoers} configuration file, you will not be able to
494aa1
perform package installation tasks as set in @file{centos-art.sh}
2bb528
script @samp{verify} functionality. 
494aa1
494aa1
Setting sudo privileges to users is an administrative task you have to
494aa1
do by yourself. If you don't have experience with @command{sudo}
494aa1
command, please read its man page running the command: @command{man
494aa1
sudo}. This reading will be very useful, and with some practice, you
494aa1
will be able to configure your users to have @command{sudo}
494aa1
privileges.
494aa1
eae802
@subsubsection Links
eae802
ca45c0
Creation of symbolic links helps us to alternate between different
2bb528
implementations of @file{centos-art.sh} script-line (e.g.,
12494b
@file{centos-art.sh}, for Bash implementation; @file{centos-art.py},
12494b
for Python implementation; @file{centos-art.pl}, for Perl
eae802
implementation; and so on for other implementations). The
2bb528
@file{centos-art.sh} script-line definition takes place inside your
ca45c0
personal binary (@file{~/bin/}) directory in order to make the script
2bb528
implementation ---the one that @file{centos-art} links to--- available
2bb528
to @var{PATH} environment variable.
ca45c0
ca45c0
Creation of symbolic links helps us to reuse components from repository
ca45c0
working copy. For example, color information files maintained inside
ca45c0
your working copy must never be duplicated inside program-specific
ca45c0
configuration directories that uses them in your workstation (e.g.,
ca45c0
Gimp, Inkscape, etc.).  Instead, a symbolic link must be created for
ca45c0
each one of them, from program-specific configuration directories to
ca45c0
files in the working copy.  In this configuration, when someone
ca45c0
commits changes to color information files up to central repository,
ca45c0
they---the changes committed--- will be immediatly available to your
ca45c0
programs the next time you update your working copy ---the place
ca45c0
inside your workstation those color information files are stored---.
ca45c0
ca45c0
Creation of symbolic links helps us to make @file{centos-art.sh}
ca45c0
script functionalities available outside @file{trunk/} repository
ca45c0
directory structure, but at its same level in repository tree. This is
ca45c0
useful if you need to use the ``render'' functionality of
ca45c0
@command{centos-art.sh} under @file{branches/} repository directory
ca45c0
structure as you usually do inside @file{trunk/} repository directory
ca45c0
structure. As consequence of this configuration, automation scripts
ca45c0
cannot be branched under @file{branches/Scripts} directory structure.
eae802
eae802
@subsubsection Environment variables
eae802
ca45c0
Definition of environemnt variables helps us to set default values to
ca45c0
our user session life. The user session environment variable defintion
efa7b7
takes place in the user's @file{~/.bash_profile} file.  The
2bb528
@samp{verify} functionality of @file{centos-art.sh} script doesn't
efa7b7
modify your @file{~/.bash_profile} file.  
ca45c0
2bb528
The @samp{verify} functionality of @file{centos-art.sh} script
efa7b7
evaluates the following environment variables:
ca45c0
41f1ec
@table @env
ef356a
@item EDITOR
2bb528
Default text editor. 
ca45c0
2bb528
The @file{centos-art.sh} script uses default text @env{EDITOR} to edit
2bb528
pre-commit subversion messages, translation files, configuration
2bb528
files, script files, and similar text-based files.
ca45c0
2bb528
If @env{EDITOR} environment variable is not set, @file{centos-art.sh}
2bb528
script uses @file{/usr/bin/vim} as default text editor. Otherwise, the
2bb528
following values are recognized by @file{centos-art.sh} script:
ca45c0
2bb528
@itemize
2bb528
@item @file{/usr/bin/vim}
2bb528
@item @file{/usr/bin/emacs}
2bb528
@item @file{/usr/bin/nano}
2bb528
@end itemize
2bb528
2bb528
If no one of these values is set in @env{EDITOR} environment variable,
2bb528
@file{centos-art.sh} uses @file{/usr/bin/vim} text editor by default. 
eae802
ef356a
@item TZ
eae802
ef356a
Default time zone representation.
ca45c0
ca45c0
Time representation inside repository server is set to Coordinated
ca45c0
Universal Time (UTC).  Time represetation inside repository working
ca45c0
copies is set as their administrators personally define.  
ca45c0
ca45c0
When repository working copies time representation be defined, it
ca45c0
would be a very good convention to follow if working copies
ca45c0
administrators would set their systems clock to use UTC.  Otherwise it
ca45c0
would be difficult for working copies users to find out when changes
ca45c0
were committed up to repository server exactly in time.
eae802
eae802
@quotation
180cc5
@strong{Tip} Coordinated Univeral Time (UTC) representation can be
2bb528
configured when you install CentOS distribution; or later, runing the
2bb528
@command{system-config-date} command at a shell prompt from your
2bb528
graphical interface.
eae802
@end quotation
eae802
eae802
@quotation
180cc5
@strong{Note} If you set your system clock to use UTC representation,
2bb528
you also need to set the @env{TZ} environment variable inside
180cc5
@file{~/.bash_profile} as follows:
eae802
@verbatim
eae802
export TZ=UTC
eae802
@end verbatim
eae802
This is required in order for your terminal to display the correct
180cc5
time information of your zone, taking UTC representation as reference.
eae802
@end quotation
ef356a
ef356a
@item TEXTDOMAIN
ef356a
ef356a
Default domain used to retrieve translated messages.  This value is
ef356a
set in @file{initFunctions.sh} and shouldn't be changed.
ef356a
ef356a
@item TEXTDOMAINDIR
ef356a
ef356a
Default directory used to retrieve translated messages. This value is
ef356a
set in @file{initFunctions.sh} and shouldn't be changed.
ef356a
ef356a
@item LANG
ef356a
ef356a
Default locale information. This value is set when you start your
2bb528
session and can be changed using the @samp{locale} functionality of
ef356a
@file{centos-art.sh} script (@pxref{trunk Scripts Bash Functions
ef356a
Locale}, for more information).
ca45c0
@end table
38bcd9
ca45c0
@subsection Usage
eae802
12494b
@table @samp
12494b
@item centos-art verify --packages
2bb528
Verify required packages your workstation needs in order to run the
2bb528
@file{centos-art.sh} script correctly.  If there are missing packages,
2bb528
the @file{centos-art.sh} script asks you to confirm their
2bb528
installation. When installing packages, the @file{centos-art.sh}
ca45c0
script uses the @command{yum} application in order to achieve the
ca45c0
task.
12494b
b17ce8
In case all packages required by @file{centos-art.sh} script are
b17ce8
already installed in your workstation, the message @samp{The required
b17ce8
packages are already installed.} is output for you to know. 
b17ce8
eae802
@item centos-art verify --links
2bb528
Verify required links your workstation needs in order to run the
2bb528
centos-art command correctly.  If any required link is missing, the
2bb528
@command{centos-art.sh} script asks you to confirm their installation.
2bb528
To install required links, the @command{centos-art.sh} script uses the
2bb528
@command{ln} command.
12494b
b17ce8
In case all links required by @file{centos-art.sh} script are already
b17ce8
created in your workstation, the message @samp{The required links are
b17ce8
already installed.} is output for you to know. 
b17ce8
0c6cdb
In case a regular file exists with the same name of a required link,
6226b1
the @file{centos-art.sh} script outputs the @samp{Already exists as
1c7bf6
regular file.} message when listing required links that will be
1c7bf6
installed. Of course, as there is already a regular file where must be
1c7bf6
a link, no link is created. In such cases the @file{centos-art.sh}
1c7bf6
script will fall into a continue installation request for that missing
0c6cdb
link.  To end this continue request you can answer @samp{No}, or
1c7bf6
remove the existent regular file to let @file{centos-art.sh} script
0c6cdb
install the link on its place.
1c7bf6
eae802
@item centos-art verify --environment
ef356a
@itemx centos-art verify --environment --filter='regex'
2bb528
Output a brief description of environment variables used by
2bb528
@file{centos-art.sh} script. 
ef356a
ef356a
If @samp{--filter} option is provided, output is reduced as defined in
ef356a
the @samp{regex} regular expression value. If @samp{--filter} option
ef356a
is specified but @samp{regex} value is not, the @file{centos-art.sh}
ef356a
script outputs information as if @samp{--filter} option had not been
ef356a
provided at all.
eae802
@end table
38bcd9
38bcd9
@subsection See also
38bcd9
38bcd9
@menu
64d0d3
* trunk Scripts Bash::
eae802
* trunk Scripts Bash Functions::
38bcd9
@end menu