Blob Blame History Raw
@subheading Name

The @code{prepare} functionality is part of the
@command{centos-art.sh} script and standardizes configuration of
preliminar steps you need to follow in order to get your workstation
ready for using a working copy of CentOS Artwork Repository.

@subheading Synopsis

@command{centos-art prepare [OPTIONS]}

There is no need to specify @file{path/to/dir} information in this
functionality. Most actions are performed through options.

The @code{prepare} functionality of centos-art.sh script accepts the
following options:

@table @option

@item --quiet

Supress all output messages except error messages.  When this option
is passed, all confirmation requests are supressed as well and a
possitive answer is assumed for them, just as if the
@option{--answer-yes} option had been provided.

@item --answer-yes

Assume @samp{yes} to all confirmation requests.

@item --packages

Install/update software packages required by the working copy of
CentOS Artwork Repository.

The process of software installation takes place through @command{sudo
yum} and the repository configuration currently set in your
workstation.

Most of the software packages required by the working copy of CentOS
Artwork Repository are available on The CentOS Distribution and can be
installed using The CentOS Distribution installation media.  The only
exception is Inkscape, the program used to manipulate
@acronym{SVG,Scalable Vector Graphics} files in the working copy.  

The @file{inkscape} package isn't inside The CentOS Distribution or
any of The CentOS Project repositories neither, so you need to install
it from a third party repository like @samp{RPMForge} or @samp{EPEL}.
See page
@url{http://wiki.centos.org/AdditionalResources/Repositories/,The
CentOS Repositories}, to know how to configure third party
repositories in The CentOS Distribution.

@item --link

This option uses symbolic links to install/update the connection
between components inside the working copy and components outside the
working copy. Among the components that need to be connected figure
out the command-line internface of @command{centos-art.sh} script;
fonts, brushes, palettes and patterns used by programs like GIMP and
Inkscape; and configuration files of text editors.

The main purpose of such connection is to adapt the working copy to
the CentOS Distribution filesystem layout (e.g., @file{~/bin}
directory is for storing personal programs, @file{~/gimp-2.2/brushes}
is for storing GIMP brushes for personal use, etc.) and, at the same
time, to provide a way of sharing changes made to connected components
to other workstations (e.g., if I update a GIMP brush in my
workstation, you'll receive the change the next you update your
working copy and then will be immediatly available for you to use in
GIMP).

@item --environment

Print the name and value of some of the environment variables used by
@command{centos-art.sh} scripts.  

@end table

@subheading Description

The @code{prepare} functionality of @command{centos-art.sh} script is
part of the CentOS Artwork Repository. So, in order to execute the
@code{prepare} functionality of @command{centos-art.sh} script you
need to have access to a working copy of CentOS Artwork Repository,
first.  Working copies of CentOS Artwork Repository are downloaded
from the source repository and made available to you by mean of
workstations.  A workstation is a computer that you install and
configure (prepare) to do something. In this case, you pick up a
computer and prepare it for working on the CentOS Artwork Repository.

@subsubheading Installing the workstation

Installing the workstation is the first step you need to do. In this
step you make your computer functional through an operating system. In
this case, The Community Enterprise Operating System; which is also
know as The CentOS Distribution or just CentOS, for short.

To install The CentOS Distribution you need to have the installation
media somehow (e.g., CDs, DVDs, Pendrives, etc.). There are several
different ways to perform the installation process of CentOS
distribution, but generally, you put the installation media in your
media reader, boot the computer from it, and follow the installer
intructions.  That simple.

If you don't have the installation media of CentOS distribution, you
need to download the ISO files related to the media you plan to use
(e.g., CD or DVD) and then create the installation media by yourself.
The CentOS Distribution ISO files can be downloaded from
@url{http://mirrors.centos.org/} and, if you chosen CD or DVD as your
prefered installation medium, you can burn the ISO files using the
@command{K3B} application so as to create the installation media
you'll use.  Of course, in order to download the ISO files and create
the installation media, you need to have an already installed CentOS
workstation where you can realized all the work.

@subsubheading Configuring the workstation

Once you've installed the workstation and it is up and running, login
as @samp{root} user, create a username (e.g., @samp{centos}) and set a
password for it. This is the username you must use for everyday work
inside your working copy of the CentOS Artwork Repository.

@quotation
@strong{Caution} Do not use the @samp{root} username for your everyday
work inside the working copy of CentOS Artwork Repository.  It is
dangerous and might provoke unreversable damages on your workstation.
@end quotation

Once you've created the username for your everyday work, there are
some environment variables that you can customize to fit your personal
needs (e.g., default text editor, default locale information, default
time zone representation, etc.).  To customize these variables you
need to edit your profile file (i.e., @file{~/.bash_profile}) and set
the redefinition there.  Notice that you may need to logout and then
do login again in order for the new variable values to take effect.

@table @strong
@item Default text editor:

The default text editor information is contrlled by the @env{EDITOR}
environment variable. The @file{centos-art.sh} script uses the default
text editor to edit subversion pre-commit messages, translation files,
documentation 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 the @env{EDITOR} environment
variable, the @file{centos-art.sh} script uses @file{/usr/bin/vim}
text editor, the one installed by default in The CentOS Distribution. 

@item Default locale information:

The default locale information is controlled by the @env{LANG}
environment variable. This variable is initially set in the
configuration process of CentOS distribution installer, specifically
in the @samp{Language} step; or once installed using the
@command{system-config-language} tool.

The @command{centos-art.sh} script uses the @env{LANG} environment
variable to determine what language to use for printing output
messages. Another use of @env{LANG} variable inside
@command{centos-art.sh} script is to determine what translation file
to update or edit when input files are localized.

@item Default time zone representation:

The time zone representation is a time correction applied to the
system time (stored in the BIOS clock) based on your country location.
This correction is specially useful to distributed computers around
the world that work together and need to be syncronized in time to
know when things happened.

The CentOS Artwork Repository is made of one server and several
workstations spread around the world. In order for all these
workstations to know when changes in the server took place, it is
required that they all set their system clocks to use the same time
information (i.e., @acronym{UTC,Coordinated Universal Time}) and set
the time correction for their specific countries in the operating
system.  Otherwise, it would be difficult to know when something
exactly happened.

Generally, setting the time information is a straight-forward task and
configuration tools provided by The CentOS Distribution do cover time
correction for most of the countries around the world.  However, if
you need a time precision not provided by any of the date and time
configuration tools provided by The CentOS Distribution then, you need
to use the @env{TZ} environment variable to correct the time
information by yourself.  The format of @env{TZ} environment variable
is described in @file{tzset(3)} manual page.  
@end table

@subsubheading Downloading the working copy

Once you've configured the workstation, it is time to download the
working copy of CentOS Artwork Repository. 

To download the working copy of CentOS Artwork Repository you need to
login as your everyday work username (e.g., @samp{centos}) and use the
Subversion client to bring all the files you need to work with down
from the source location of CentOS Artwork Repository
(@url{https://projects.centos.org/svn/artwork/}) to your workstation,
just as the following command describes:

@verbatim
svn co https://projects.centos.org/svn/artwork ~/
@end verbatim

This command will create the working copy of CentOS Artwork Repository
in your workstation, specifically in the @file{/home/centos/artwork}
directory.  Note that you only need to execute this command once.
After that, to keep your working copy up to date, you use the
Subversion @command{update} command instead.

@quotation
@strong{Tip} In the condition that you don't have Subversion client
installed in the workstation, then you can install it using the
command:

@verbatim
sudo yum install subversion
@end verbatim
@end quotation

@subsubheading Configuring the working copy

Once you have a working copy of CentOS Artwork Repository in your
workstation, you can go and run the @code{prepare} functionality of
@command{centos-art.sh} script to realize the remaining configuration
stuff.

Assuming this is the very first time you run the
@command{centos-art.sh} script, you'll find that there is no
@command{centos-art} command-line interface for it in your
workstation.  This is correct. In order to have the
@command{centos-art} command-line in your workstation, you need to run
the @command{centos-art.sh} script using its absolute path:

@verbatim
~/artwork/trunk/Scripts/centos-art.sh prepare [OPTIONS]
@end verbatim

Assuming you've already run the @code{prepare} functionality
before, there is no need for you to use the absolute path again.
Instead, you can use the @command{centos-art} command-line interface
directly, as the following example describes:

@verbatim
centos-art.sh prepare [OPTIONS]
@end verbatim

Notice that you can execute the @code{prepare} functionality more than
once. This is specially useful to keep the link information
syncronized. For example, considering you've added new brushes to or
removed old brushes from your working copy of CentOS Artwork
Repository, the link information related to those files need to be
updated in the @file{~/.gimp-2.2/brushes} directory too, in a way the
addition/deletion change that took place in your working copy can be
reflected there, as well.  The same is true for other similar
components like fonts, patterns and palettes components.

@subheading Examples

@table @command
@item centos-art prepare --packages --link
Preapare both links and packages required to use the working copy of
CentOS Artwork Repository in the workstation. If required packages are
already installed this command looks for updates instead.

@item centos-art prepare --link --quiet
Update connection between the workstation and the working copy of
CentOS Artwork Repository, using no output.
@end table

@subheading Author

Written by Alain Reguera Delgado.

@subheading Reporting bugs

Report bugs to @email{centos-artwork@@centos.org} mailing list.

@subheading Copyright

Copyright @copyright{}  2009, 2010, 2011 The CentOS Project.

This is free software.  You may redistribute copies of it under the
terms of the GNU General Public License (@pxref{GNU General Public
License}).  There is NO WARRANTY, to the extent permitted by law.

@subheading See also

@itemize
@item @ref{Directories trunk Scripts Functions}
@item @ref{Directories trunk Scripts}
@item @ref{Directories trunk}
@end itemize