[csw-devel] SF.net SVN: gar:[22134] csw/mgar/pkg/opencsw-manual/trunk/files/ for-maintainers/buildfarm-setup.rst
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Oct 6 17:08:09 CEST 2013
Revision: 22134
http://gar.svn.sourceforge.net/gar/?rev=22134&view=rev
Author: wahwah
Date: 2013-10-06 15:08:09 +0000 (Sun, 06 Oct 2013)
Log Message:
-----------
opencsw-manual/trunk: Added a note about old instructions. Small changes in the file.
Modified Paths:
--------------
csw/mgar/pkg/opencsw-manual/trunk/files/for-maintainers/buildfarm-setup.rst
Modified: csw/mgar/pkg/opencsw-manual/trunk/files/for-maintainers/buildfarm-setup.rst
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/for-maintainers/buildfarm-setup.rst 2013-10-06 14:11:02 UTC (rev 22133)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/for-maintainers/buildfarm-setup.rst 2013-10-06 15:08:09 UTC (rev 22134)
@@ -9,7 +9,7 @@
If you prefer a video tutorial instead of a written document, there is
a `packaging video tutorial`_ available. It covers a subset of this document,
starting from a fresh Solaris 10 install and ends with a built package. It
-takes about 2-3h to complete.
+takes about 2-3h to complete. It covers the basic GAR setup.
A build-farm is a set of hosts where you can build Solaris packages. You can
connect Intel and SPARC hosts together to build a set of packages with one
@@ -44,27 +44,25 @@
Base setup (required)
---------------------
-The base setup is enough to build packages but does not allow to automatically
-check your packages for errors.
+The base setup is enough to start building packages.
::
pkgutil -y -i gar_dev mgar gcc4core gcc4g++ sudo
-Please note that this must be run as ``root``.
+Please note that this must be run as ``root``. The rest of the instructions
+assume they're executed as a regular user or are prepended with ``sudo``.
Setup ``~/.garrc`` (required)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Finally, you need to create your personal ``~/.garrc`` configuration file. It
-contains your name and e-mail address, both of which are included in the
-meta-data of built packages. Further, GAR needs to know where to store
-downloaded sources and generated packages.
+The ``~/.garrc`` file is specific to your user and contains your name and
+e-mail address. These values are later stored in the meta-data of packages
+built by you. Further, GAR needs to know where to store downloaded sources
+and generated packages.
-Here's an example:
+Here's an example::
-::
-
# Data for pkginfo
SPKG_PACKAGER = Dagobert Michelsen
SPKG_EMAIL = dam at example.com
@@ -119,21 +117,18 @@
Initialize the source tree (required)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-As regular user, initialize your local repository. **For obvious
-security reasons, do not use** ``root``.
+As regular user, initialize your local repository.
-To initialize the source tree, you execute:
+**For security reasons, do not do it as root**.
::
mgar init
-This will create, by default, in your home directory, the ``opencsw``
-entry. If you wish to use another place, please use a third argument,
-e.g.:
+This will create, by default, in your home directory, the ``~/opencsw``
+directory. If you wish to use another place, please use a third argument,
+e.g.::
-::
-
mgar init /tank/opencsw
or set the ``BUILDTREE`` parameter in the configuration file
@@ -141,14 +136,12 @@
Please make yourself familiar with `mgar`_.
-To fetch all the build recipes, you execute:
+To fetch all the build recipes, you execute::
-::
-
mgar up --all
-Beware that this takes a lot of time and creates hundreds of
-directories and thousands files.
+Beware that this takes a lot of time and creates hundreds of directories and
+thousands of files.
checkpkg database (optional)
----------------------------
@@ -161,35 +154,27 @@
Required packages
^^^^^^^^^^^^^^^^^
-Install the required packages:
+Install the required packages::
-::
-
sudo pkgutil --yes --install mysql5 mysql5client
-Create a minimal configuration file:
+Create a minimal configuration file::
-::
+ echo "[mysqld]" | sudo tail -a /etc/opt/csw/my.cnf
+ echo "max_allowed_packet=64M" | sudo tail -a /etc/opt/csw/my.cnf
- sudo echo >>/etc/opt/csw/my.cnf "[mysqld]"
- sudo echo >>/etc/opt/csw/my.cnf "max_allowed_packet=64M"
-
This is needed since checkpkg stores objects in JSON, it sometimes
stores values way bigger than the default allowed 1MB, as there are
packages which require data structures larger than 32MB, hence the
64MB value.
-You start the data base server:
+You start the data base server::
-::
-
sudo svcadm enable svc:/network/cswmysql5:default
-Eventually, you make your installation secure:
+Eventually, you make your installation secure::
-::
-
sudo /opt/csw/bin/mysql_secure_installation
and answer affirmatively to all the questions.
@@ -204,12 +189,10 @@
mysql -u root -p
> create database checkpkg;
- > grant all privileges on checkpkg.* to "checkpkg" identified by "password";
+ > grant all privileges on checkpkg.* to "checkpkg" identified by "<your-chosen-password>";
> flush privileges;
> exit;
-Note that you must use your own value instead of ``password``.
-
To verify that your user creation is correct you can execute this:
::
@@ -224,26 +207,35 @@
The database access configuration is held in ``/etc/opt/csw/checkpkg.ini``.
You can also use a per-user file: ``~/.checkpkg/checkpkg.ini``. The format is
-as follows:
+as follows::
-::
-
[database]
type = mysql
name = checkpkg
host = mysql
user = checkpkg
- password = yourpassword
+ password = <your-chosen-password>
Initializing tables and indexes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The next step is creating the tables in the database:
+**BEGIN OLD INSTRUCTIONS. As of October 2013, these instructions refer to the
+old, broken code. They do not work. If you want to set up the checkpkg
+database, you need to use the development version of the code, using the
+development checkpkg database setup instructions.**
+* `development checkpkg database setup instructions`_
+
+The next step is creating the tables in the database.
+
+NOTE: All the ``bin/pkgdb`` commands here and below are meant to be executed
+from GAR sources.
+
::
- pkgdb initdb
+ cd /path/to/gar/sources/v2
+ bin/pkgdb initdb
case-insensitive string comparison in MySQL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -304,8 +296,10 @@
updated. Otherwise your packages will be checked against an old state of the
catalog.
-Your database is now ready.
+Your database is ready.
+**END OLD INSTRUCTIONS.**
+
Multi-host setup (optional)
---------------------------
@@ -386,8 +380,8 @@
Make sure you uninstall ``SUNWgmake``. That version is outdated and misses
functions needed by GAR (e.g. abspath).
-Install Java Package
-++++++++++++++++++++
+Install the Java Package
+++++++++++++++++++++++++
There are versions of JDK and JRE between Java 1.3 and Java 6 installed in ``/usr``.
@@ -666,3 +660,8 @@
.. _mgar:
http://wiki.opencsw.org/gar-wrapper
+
+.. _development checkpkg database setup instructions:
+ http://wiki.opencsw.org/checkpkg#toc20
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list