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