Blame Manual/Directories/trunk/Scripts/Functions/Prepare.texi

41622d
@subheading Goals
9c6e0d
7c40cb
This section describes the @code{prepare} functionality of
7c40cb
@command{centos-art.sh} script and the preliminar steps you need to
7c40cb
follow in order to get your workstation ready for using the CentOS
7c40cb
Artwork Repository.
9c6e0d
41622d
@subheading Description
9c6e0d
7c40cb
The @code{prepare} functionality of @command{centos-art.sh} script
7c40cb
verifies all the information required by the working copy of CentOS
7c40cb
Artwork Repository (e.g., packages of software, symbolic links, etc.)
7c40cb
does exist in your workstation.
7c40cb
7c40cb
The @code{prepare} functionality of @command{centos-art.sh} script is
7c40cb
part of the CentOS Artwork Repository. So, in order to execute the
7c40cb
@code{prepare} functionality of @command{centos-art.sh} script you
7c40cb
need to have access to a working copy of CentOS Artwork Repository,
7c40cb
first.  Working copies of CentOS Artwork Repository are downloaded
7c40cb
from the source repository and made available to you by mean of
7c40cb
workstations.  A workstation is a computer that you install and
7c40cb
configure (prepare) to do something. In this case, you pick a computer
7c40cb
and prepare it for working on the CentOS Artwork Repository.
7c40cb
7c40cb
@subsubheading Installing the workstation
7c40cb
7c40cb
Installing the workstation is the first step you need to perform for
7c40cb
using the CentOS Artwork Repository. In this step you make your
7c40cb
computer functional through an operating system. In this case, The
7c40cb
Community Enterprise Operating System; which is also know as The
7c40cb
CentOS Distribution or just CentOS, for short.
7c40cb
7c40cb
To install The CentOS Distribution you need to have the installation
7c40cb
media somehow (e.g., CDs, DVDs, Pendrives, etc.). There are several
7c40cb
different ways to perform the installation process of CentOS
7c40cb
distribution, but generally, you put the installation media in your
7c40cb
media reader, boot the computer from it, and follow the installer
7c40cb
intructions.  That simple.
7c40cb
7c40cb
If you don't have the installation media of CentOS distribution, you
7c40cb
need to download the ISO files related to the media you plan to use
7c40cb
(e.g., CD or DVD) and then create the installation media by yourself.
7c40cb
The CentOS Distribution ISO files can be downloaded from
7c40cb
@url{http://mirrors.centos.org/} and, if you chosen CD or DVD as your
7c40cb
prefered installation medium, you can burn the ISO files using the
7c40cb
@command{K3B} application to create the installation media you'll use.
7c40cb
Of course, in order to download the ISO files and create the
7c40cb
installation media, you need to have an already installed CentOS
7c40cb
workstation where you can realized all the work.
7c40cb
7c40cb
@subsubheading Configuring the workstation
7c40cb
7c40cb
Once you've installed the workstation and it is up and running, login
7c40cb
as @samp{root} user, create a username (e.g., @samp{centos}) and set a
7c40cb
password for it. This is the username you must use for everyday work
7c40cb
inside your working copy of the CentOS Artwork Repository.
9c6e0d
9c6e0d
@quotation
7c40cb
@strong{Caution} Do not use ever the @samp{root} username for your
7c40cb
everyday work inside the working copy of CentOS Artwork Repository.
7c40cb
It is dangerous and might provoke unreversable damages on your
7c40cb
workstation.
9c6e0d
@end quotation
9c6e0d
7c40cb
Once you've created the username for everyday work, there are some
7c40cb
environment variables that you can customize to fit your personal
7c40cb
needs (e.g., the text editor you'll use, the language the automation
7c40cb
scripts will use to print and translate output messages, the time
7c40cb
correction for your location, etc.).  To customize these variables you
7c40cb
need to edit your profile file (i.e., @file{~/.bash_profile}) and set
7c40cb
the redefinition there.  Notice that you may need to logout and then
7c40cb
do login again in order for the new variable values to take effect.
7c40cb
7c40cb
@table @strong
7c40cb
@item Default text editor:
7c40cb
7c40cb
The default text editor information is contrlled by the @env{EDITOR}
7c40cb
environment variable. The @file{centos-art.sh} script uses the default
7c40cb
text editor to edit subversion pre-commit messages, translation files,
7c40cb
documentation files, script files, and similar text-based files.
9c6e0d
9c6e0d
If @env{EDITOR} environment variable is not set, @file{centos-art.sh}
9c6e0d
script uses @file{/usr/bin/vim} as default text editor. Otherwise, the
9c6e0d
following values are recognized by @file{centos-art.sh} script:
9c6e0d
9c6e0d
@itemize
9c6e0d
@item @file{/usr/bin/vim}
9c6e0d
@item @file{/usr/bin/emacs}
9c6e0d
@item @file{/usr/bin/nano}
9c6e0d
@end itemize
9c6e0d
7c40cb
If no one of these values is set in the @env{EDITOR} environment
7c40cb
variable, the @file{centos-art.sh} script uses @file{/usr/bin/vim}
7c40cb
text editor, the one installed by default in The CentOS Distribution. 
9c6e0d
7c40cb
@item Default locale information:
9c6e0d
7c40cb
The default locale information is controlled by the @env{LANG}
7c40cb
environment variable. This variable is initially set in the
7c40cb
configuration process of CentOS distribution installer, specifically
7c40cb
in the @samp{Language} step; or once installed using the
9c6e0d
@command{system-config-language} tool.
9c6e0d
7c40cb
The @command{centos-art.sh} script uses the @env{LANG} environment
7c40cb
variable to determine what language to use for printing output
7c40cb
messages. Moreover, the @code{locale} functionality uses the
7c40cb
@env{LANG} to determine what translation messages to udpate or edit.
7c40cb
7c40cb
@item Default time zone representation:
7c40cb
7c40cb
The time zone representation is a time correction applied to the
7c40cb
system time (stored in the BIOS clock) based on your country location.
7c40cb
This correction is specially useful to distributed computers around
7c40cb
the world that work together and need to be syncronized in time to
7c40cb
know when things happened.
7c40cb
7c40cb
The CentOS Artwork Repository is made of one server and several
7c40cb
workstations spread around the world. In order for all these
7c40cb
workstations to know when changes in the server took place, it is
7c40cb
required that all the workstations set their system clocks to use the
7c40cb
same time information (i.e., @acronym{UTC,Coordinated Universal Time})
7c40cb
and set the time correction for their countries in the operating
7c40cb
system.  Otherwise, it'd be hard to know when something exactly
7c40cb
happened.
7c40cb
7c40cb
Generally, setting the time information is a straight-forward task and
7c40cb
configuration tools provided by The CentOS Distribution do cover time
7c40cb
correction for most of the countries around the world.  However, if
7c40cb
you need a time precision not provided by any of the date and time
7c40cb
configuration tools provided by The CentOS Distribution then, you need
7c40cb
to use the @env{TZ} environment variable to correct the time
7c40cb
information by yourself.  The format of @env{TZ} environment variable
7c40cb
is described in @file{tzset(3)} manual page.  
9c6e0d
@end table
9c6e0d
7c40cb
@subsubheading Downloading the working copy
5da4a8
7c40cb
Once you've configured the workstation, it is time to download the
7c40cb
working copy of CentOS Artwork Repository. 
5da4a8
7c40cb
To download the working copy of CentOS Artwork Repository you need to
7c40cb
login as your everyday work username (e.g., @samp{centos}) and use the
7c40cb
Subversion client to bring all the files you need to work with down
7c40cb
from the source location of CentOS Artwork Repository
7c40cb
(@url{https://projects.centos.org/svn/artwork/}) to your workstation,
7c40cb
just as the following command describes:
5da4a8
5da4a8
@verbatim
7c40cb
svn co https://projects.centos.org/svn/artwork ~/
5da4a8
@end verbatim
5da4a8
7c40cb
This command will create the working copy of CentOS Artwork Repository
7c40cb
in your workstation, specifically in the @file{/home/centos/artwork}
7c40cb
directory.  Note that you only need to execute this command once.
7c40cb
After that, to keep your working copy up to date, you use the
7c40cb
Subversion @command{update} command instead.
5da4a8
5da4a8
@quotation
7c40cb
@strong{Tip} In the condition that you don't have Subversion client
7c40cb
installed in the workstation, then you can install it using the
7c40cb
command:
7c40cb
7c40cb
@verbatim
7c40cb
sudo yum install subversion
7c40cb
@end verbatim
5da4a8
@end quotation
5da4a8
7c40cb
@subsubheading Configuring the working copy
5da4a8
7c40cb
Once you have a working copy of CentOS Artwork Repository in your
7c40cb
workstation, you can go and run the @code{prepare} functionality of
7c40cb
@command{centos-art.sh} script to realize the remaining configuration
7c40cb
stuff.
5da4a8
7c40cb
Assuming this is the very first time you run the
7c40cb
@command{centos-art.sh} script, you'll find that there is no
7c40cb
@command{centos-art} command-line interface for it in your
7c40cb
workstation.  This is correct. In order to have the
7c40cb
@command{centos-art} command-line in your workstation, you need to run
7c40cb
the @command{centos-art.sh} script using its absolute path:
5da4a8
5da4a8
@verbatim
7c40cb
~/artwork/trunk/Scripts/centos-art.sh prepare [OPTIONS]
5da4a8
@end verbatim
5da4a8
7c40cb
Assuming you've already run the @code{prepare} functionality before,
7c40cb
there is no need for you to use the absolute path again. Instead, you
7c40cb
can use the @command{centos-art} command-line interface directly, as
7c40cb
the following example describes:
5da4a8
5da4a8
@verbatim
7c40cb
centos-art.sh prepare [OPTIONS]
5da4a8
@end verbatim
5da4a8
7c40cb
Notice that you can execute the @code{prepare} functionality more than
7c40cb
once. This is specially useful to keep the link information
7c40cb
syncronized. For example, considering you've added new brushes to or
7c40cb
removed old brushes from your working copy of CentOS Artwork
7c40cb
Repository, the link information related to those files need to be
7c40cb
updated in the @file{~/.gimp-2.2/brushes} directory too, in a way that
7c40cb
reflect the addition/deletion change that took place in your working
7c40cb
copy.  The same is true for fonts, patterns and palettes components.
5da4a8
7c40cb
@subheading Usage
5da4a8
7c40cb
@subsubheading Synopsis
5da4a8
7c40cb
@command{centos-art prepare [OPTIONS]}
9c6e0d
7c40cb
@subsubheading Options
9c6e0d
7c40cb
@table @option
7c40cb
@item --packages
9c6e0d
7c40cb
Verify existence of software packages and install them if they aren't
7c40cb
installed yet.
9c6e0d
7c40cb
This option provides the software required to manipulate files inside
7c40cb
the repository (e.g., image files, documentation files, translation
7c40cb
files, script files, etc.). Most of the software packages required by
7c40cb
the CentOS Artwork Repository are available on The CentOS Distribution
7c40cb
and can be installed using The CentOS Distribution installation media.
7c40cb
The only exception is the @file{inkscape}, the package you use to
7c40cb
manipulate @acronym{SVG,Scalable Vector Graphics} files.  The
7c40cb
@file{inkscape} package isn't inside The CentOS Distribution or any of
7c40cb
The CentOS Project repositories neither, so you need to install it from
7c40cb
a third party repositories like @samp{RPMForge} or @samp{EPEL}.
9c6e0d
7c40cb
@item --link
9c6e0d
7c40cb
Update connection between working copy and workstation through
7c40cb
symbolic links.
9c6e0d
7c40cb
This option creates the @command{centos-art} command-line interface of
7c40cb
@command{centos-art.sh} script through a symbolic link.  There is no
7c40cb
need for you to type the full path to @command{centos-art.sh} script
7c40cb
each time you need to execute it.  Instead, you use the
7c40cb
@command{centos-art} command which is much shorter and faster to type.
9c6e0d
7c40cb
This option connects design compenents like fonts, brushes, patterns
7c40cb
and palettes inside your working copy of CentOS Artwork Repository
7c40cb
with programs like @acronym{GIMP, GNU Image Manipulation Program} and
7c40cb
Inkscape outside it. This way, all your modifications on these
7c40cb
components will take place inside the repository and will be shared to
7c40cb
all other working copies the next time you commit the changes up to
7c40cb
source repository.
9c6e0d
7c40cb
This option standardizes width, tabulation, indentation, and line
7c40cb
numbering for text editors in your workstation.  The configuration
7c40cb
file where these definitions are set, is versioned inside your working
7c40cb
copy and linked from the appropriate place in the workstation to make
7c40cb
it valid to your default text editor.
9c6e0d
7c40cb
@item --environment
9c6e0d
7c40cb
Print the name and value of some of the environment variables used by
7c40cb
@command{centos-art.sh} scripts.  
7c40cb
7c40cb
@item --quiet
7c40cb
275ed4
Supress all output messages, including confirmation question. Use this
275ed4
option with care.
275ed4
275ed4
@item --answer-yes
275ed4
275ed4
Assume @samp{yes} to all confirmation questions.
9c6e0d
9c6e0d
@end table
9c6e0d
41622d
@subheading See also
9c6e0d
7c40cb
@itemize
7c40cb
@item @ref{Directories trunk Scripts Functions}
7c40cb
@item @ref{Directories trunk Scripts}
7c40cb
@item @ref{Directories trunk}
7c40cb
@item
7c40cb
@url{http://wiki.centos.org/AdditionalResources/Repositories/,The
7c40cb
CentOS Repositories}, to know how to configure third party
7c40cb
repositories inside The CentOS Distribution.
7c40cb
@end itemize