[ < ] [ > ]   [Contents] [Index] [ ? ]

2.72 The `trunk/Scripts/Functions/Verify' Directory

2.72.1 Goals

This section exists to organize files related to `centos-art.sh' script `verify' functionality. The `verify' functionality of `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.

2.72.2 Description

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

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

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

info

Note

Configuration of third party repositories inside CentOS distribution is described in CentOS wiki, specifically in the following URL: http://wiki.centos.org/AdditionalResources/Repositories

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

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

2.72.2.2 Links

Creation of symbolic links helps us to alternate between different implementations of `centos-art.sh' script-line (e.g., `centos-art.sh', for Bash implementation; `centos-art.py', for Python implementation; `centos-art.pl', for Perl implementation; and so on for other implementations). The `centos-art.sh' script-line definition takes place inside your personal binary (`~/bin/') directory in order to make the script implementation --the one that `centos-art' links to-- available to 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 `centos-art.sh' script functionalities available outside `trunk/' repository directory structure, but at its same level in repository tree. This is useful if you need to use the "render" functionality of centos-art.sh under `branches/' repository directory structure as you usually do inside `trunk/' repository directory structure. As consequence of this configuration, automation scripts cannot be branched under `branches/Scripts' directory structure.

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

The `verify' functionality of `centos-art.sh' script evaluates the following environment variables:

EDITOR

Default text editor.

The `centos-art.sh' script uses default text EDITOR to edit pre-commit subversion messages, translation files, configuration files, script files, and similar text-based files.

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

If no one of these values is set in EDITOR environment variable, `centos-art.sh' uses `/usr/bin/vim' text editor by default.

TEXTDOMAIN

Default domain used to retrieve translated messages. This variable is set in `initFunctions.sh' and shouldn't be changed.

TEXTDOMAINDIR

Default directory used to retrieve translated messages. This variable is set in `initFunctions.sh' and shouldn't be changed.

LANG

Default locale information.

This variable is initially set in the configuration process of CentOS distribution installer (i.e., Anaconda), specifically in the `Language' step; or once installed using the system-config-language tool.

The `centos-art.sh' script uses the LANG environment variable to know in which language the script messages are printed out.

TZ

Default time zone representation.

This variable is initially set in the configuration process of CentOS distribution installer (i.e., Anaconda), specifically in the `Date and time' step; or once installed using the system-config-date tool.

The `centos-art.sh' script doesn't use the TZ environment variable information at all. Instead, this variable is used by the system shell to show the time information according to your phisical location on planet Earth.

Inside your computer, the time information is firstly set in the BIOS clock (which may need correction), and later in the configuration process of CentOS distribution installer (or later, by any of the related configuration tools inside CentOS distribution). Generally, setting time information is a straight-forward task and configuration tools available do cover most relevant location. However, if you need a time precision not provided by the configuration tools available inside CentOS distribution then, using TZ variable may be necessary.

Convenction

Convenction

In order to keep changes syncronized between central repository and its working copies: configure both repository server and workstations (i.e., the place where each working copy is set on) to use Coordinated Universal Time (UTC) as base time representation. Later, correct the time information for your specific location using time zone correction.

The format of TZ environment variable is described in `tzset(3)' manual page.

2.72.3 Usage

centos-art verify --packages

Verify required packages your workstation needs in order to run the `centos-art.sh' script correctly. If there are missing packages, the `centos-art.sh' script asks you to confirm their installation. When installing packages, the `centos-art.sh' script uses the yum application in order to achieve the task.

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

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 centos-art.sh script asks you to confirm their installation. To install required links, the centos-art.sh script uses the ln command.

In case all links required by `centos-art.sh' script are already created in your workstation, the message `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 `centos-art.sh' script outputs the `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 `centos-art.sh' script will fall into a continue installation request for that missing link. To end this continue request you can answer `No', or remove the existent regular file to let `centos-art.sh' script install the link on its place.

centos-art verify --environment
centos-art verify --environment --filter='regex'

Output a brief description of environment variables used by `centos-art.sh' script.

If `--filter' option is provided, output is reduced as defined in the `regex' regular expression value. If `--filter' option is specified but `regex' value is not, the `centos-art.sh' script outputs information as if `--filter' option had not been provided at all.

2.72.4 See also

[Contents] [Index] [ ? ]

This document was generated on March, 30 2011 using texi2html 1.76.