[csw-devel] SF.net SVN: gar:[22020] csw/mgar/pkg/opencsw-manual/trunk

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Sep 25 22:43:17 CEST 2013


Revision: 22020
          http://gar.svn.sourceforge.net/gar/?rev=22020&view=rev
Author:   wahwah
Date:     2013-09-25 20:43:17 +0000 (Wed, 25 Sep 2013)
Log Message:
-----------
opencsw-manual/trunk: Buildfarm setup docs consolidation, step 1

Modified Paths:
--------------
    csw/mgar/pkg/opencsw-manual/trunk/Makefile
    csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/getting-started.rst
    csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/index.rst
    csw/mgar/pkg/opencsw-manual/trunk/files/for-maintainers/buildfarm-setup.rst

Added Paths:
-----------
    csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/installation-en-masse.rst

Modified: csw/mgar/pkg/opencsw-manual/trunk/Makefile
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/Makefile	2013-09-25 19:25:13 UTC (rev 22019)
+++ csw/mgar/pkg/opencsw-manual/trunk/Makefile	2013-09-25 20:43:17 UTC (rev 22020)
@@ -14,9 +14,8 @@
 VERSION = 0.1
 GARTYPE = v2
 DESCRIPTION = OpenCSW manual
-define BLURB
-endef
-SPKG_SOURCEURL = http://www.opencsw.org
+
+VENDOR_URL = http://www.opencsw.org
 MASTER_SITES = http://www.gnu.org/licenses/
 DISTFILES  = fdl-1.3.txt
 CONFIGURE_SCRIPTS =

Modified: csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/getting-started.rst
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/getting-started.rst	2013-09-25 19:25:13 UTC (rev 22019)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/getting-started.rst	2013-09-25 20:43:17 UTC (rev 22020)
@@ -8,6 +8,10 @@
 
 .. _pkgutil: http://pkgutil.net
 
+Solaris 10
+^^^^^^^^^^
+
+
 On a Solaris 10 system, you can use the capacity of ``pkgadd`` to download
 and install it via http in one step::
 
@@ -16,6 +20,9 @@
 You may need to specify a proxy with ``-x <proxy>:<port>``, be aware that there are
 known issues with Squid and possibly other proxies.
 
+Solaris 8 and 9
+^^^^^^^^^^^^^^^
+
 On Solaris 8 and 9 (or 10 if you have issues with the above ``pkgadd``) you
 need to download the package manually (e.g. using wget) and then install it::
 
@@ -50,7 +57,7 @@
 
 
 ------------------
-Selecting catalog and mirror
+Selecting your mirror and the catalog release
 ------------------
 
 Now that you are about to install lots of stuff it may be a good time to select
@@ -65,7 +72,8 @@
   mirror=http://mirror.opencsw.org/opencsw/unstable
 
 By default, ``pkgutil`` is configured to use the ``testing`` catalog. You might
-change it to ``unstable`` if you want to use newer versions of packages.
+change it to ``unstable`` on your development hosts to catch any issues before
+they hit the ``testing`` catalog.
 
 You can verify the setting with ``pkgutil -V``::
 
@@ -134,52 +142,3 @@
   Primary key fingerprint: 4DCE 3C80 AAB2 CAB1 E60C  9A3C 05F4 2D66 9306 CC77
   ==> 3173 packages loaded from /var/opt/csw/pkgutil/catalog.mirror_opencsw_current_sparc_5.10
   ...
-
-
---------------------
-Package dependencies
---------------------
-
-The OpenCSW packages have been compiled to allow easy forward migration and
-crossgrades/mixing between SPARC and x86_64 CPUs. That means the same version of the
-package is available for Solaris 10 and 11 for both SPARC and x86. There are
-some exceptions where the software is absolutely not available or has a version
-mismatch (e.g. acroread). To allow this, there are usually no dependencies on
-SUNW packages. This sometimes leads to large dependency chains (and people
-thinking of OpenCSW packages as bloated) but that is the price to pay for
-the interoperability and we feel that in times of ever growing disks the
-flexibility is worth more than the saved bytes.
-
-Package dependencies are modeled in the OpenCSW catalogs to allow automatic
-dependency resolution via pkgutil. To view the current dependencies for a
-package you can use::
-
-  pkgutil --deptree <pkg>
-
-
---------------------------------------------------------------
-Creating a .pkg file for a host without an Internet connection
---------------------------------------------------------------
-
-If you need to install a package with multiple dependencies on a host with no
-Internet access, you can use ``pkgutil`` to prepare a ``.pkg`` file with the
-whole dependency chain. This is much easier than copying dependencies one by
-one::
-
-  pkgutil \
-    --stream \
-    --target=sparc:5.10 \
-    --output imagemagick-and-others.pkg \
-    --yes \
-    --download \
-    imagemagick coreutils vim ggrep gsed
-
-At the end of the run, ``pkgutil`` displays the correct order to install the
-packages in.
-
-The resulting package stream will be placed in the ``~/.pkgutil/packages``
-directory.
-
-This topic is also `discussed`_ on the community site.
-
-.. _discussed: http://www.opencsw.org/community/questions/92/installing-without-a-direct-internet-access

Modified: csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/index.rst
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/index.rst	2013-09-25 19:25:13 UTC (rev 22019)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/index.rst	2013-09-25 20:43:17 UTC (rev 22020)
@@ -9,6 +9,7 @@
 
   introduction
   getting-started
+  installing-en-masse
   configuring-services
   mirror-setup
 

Added: csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/installation-en-masse.rst
===================================================================
--- csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/installation-en-masse.rst	                        (rev 0)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/for-administrators/installation-en-masse.rst	2013-09-25 20:43:17 UTC (rev 22020)
@@ -0,0 +1,51 @@
+==========================
+Installing packages en masse
+==========================
+
+--------------------
+Package dependencies
+--------------------
+
+The OpenCSW packages have been compiled to allow easy forward migration and
+crossgrades/mixing between SPARC and x86_64 CPUs. That means the same version of the
+package is available for Solaris 10 and 11 for both SPARC and x86. There are
+some exceptions where the software is absolutely not available or has a version
+mismatch (e.g. acroread). To allow this, there are usually no dependencies on
+SUNW packages. This sometimes leads to large dependency chains (and people
+thinking of OpenCSW packages as bloated) but that is the price to pay for
+the interoperability and we feel that in times of ever growing disks the
+flexibility is worth more than the saved bytes.
+
+Package dependencies are modeled in the OpenCSW catalogs to allow automatic
+dependency resolution via pkgutil. To view the current dependencies for a
+package you can use::
+
+  pkgutil --deptree <pkg>
+
+
+--------------------------------------------------------------
+Creating a .pkg file for a host without an Internet connection
+--------------------------------------------------------------
+
+If you need to install a package with multiple dependencies on a host with no
+Internet access, you can use ``pkgutil`` to prepare a ``.pkg`` file with the
+whole dependency chain. This is much easier than copying dependencies one by
+one::
+
+  pkgutil \
+    --stream \
+    --target=sparc:5.10 \
+    --output imagemagick-and-others.pkg \
+    --yes \
+    --download \
+    imagemagick coreutils vim ggrep gsed
+
+At the end of the run, ``pkgutil`` displays the correct order to install the
+packages in.
+
+The resulting package stream will be placed in the ``~/.pkgutil/packages``
+directory.
+
+This topic is also `discussed`_ on the community site.
+
+.. _discussed: http://www.opencsw.org/community/questions/92/installing-without-a-direct-internet-access

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-09-25 19:25:13 UTC (rev 22019)
+++ csw/mgar/pkg/opencsw-manual/trunk/files/for-maintainers/buildfarm-setup.rst	2013-09-25 20:43:17 UTC (rev 22020)
@@ -4,28 +4,164 @@
 
 .. highlight:: text
 
-Packages released by OpenCSW must be built on the OpenCSW buildfarm, but if
-you want to experiment, or build in-house packages, you might want to set up
-your own build farm, or at least a build host.
+Buildfarm is a set of hosts where you can build Solaris packages. You can
+connect Intel and SPARC and build a set of packages with one shell command.
 
-Core setup
-----------
+If you prefer a video tutorial instead of a written document, there is
+a `packaging video tutorial`_ available. It covers all the steps from a fresh
+Solaris 10 install to a built package. It takes about 2-3h to complete.
 
-The following setup is sufficient to create packages using the OpenCSW build
-system. You can set up a small virtual machine on a home server, or build
-a set of custom packages in your company.
+Prerequisites
+-------------
 
 * `basic OpenCSW installation`_, as you would do on any Solaris host where
   you're using OpenCSW packages.
-* `GAR setup`_, including subversion checkout of build recipes. This is the
-  core part of the package building system,
 
-A `packaging video tutorial`_ is available. It covers all the steps from
-a fresh Solaris 10 install to a built package. It takes about 2-3h to complete
-it (but YMMV).
 
+Core setup
+----------
+
+The core setup is enough to build packages but does not allow to automatically
+check your packages for errors.
+
+::
+
+    sudo pkgutil -y -i vim gar_dev mgar gcc4core gcc4g++ sudo
+
+Oracle Solaris Studio Compiler
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+You need a compiler. Most of the packages built by OpenCSW use Oracle Solaris
+Studio (historically called 'SOS'), which you can `download from Oracle`_. You
+want to go with the packaged (non-tar) version. In case you have access to an
+Oracle Solaris development tools support contract, please make sure to also
+install `the latest Oracle Solaris Studio compiler patches`_. The compilers
+should be installed at the following locations:
+
+* Sun Studio 11: ``/opt/studio/SOS11``
+* Sun Studio 12: ``/opt/studio/SOS12``
+* Sun Studio 12u1: ``/opt/studio/sunstudio12.1``
+* Solaris Studio 12u2: ``/opt/solstudio12.2``
+* Solaris Studio 12u3: ``/opt/solarisstudio12.3``
+
+You can install multiple versions of SOS on one system. If you have your
+compiler installed at a different location you can set it in your ``~/.garrc``
+with the following lines:
+
+::
+
+    SOS11_CC_HOME = /opt/SUNWspro
+    SOS12_CC_HOME = /opt/studio12/SUNWspro
+
+
+Installing Oracle Solaris Studio 12
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+::
+
+    cd ss12
+    ./batch_installer -d /opt/studio/SOS12 --accept-sla
+
+Installing Oracle Solaris Studio 12u3
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+::
+
+    sudo ./solarisstudio.sh --non-interactive --tempdir /var/tmp
+
+Patching the installed compilers
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Remember to patch the compilers, with PCA or manually (requires a software
+service contract from Oracle).
+
+Setup ``~/.garrc``
+^^^^^^^^^^^^^^^^^^
+
+Finally, you need to create your personal ``~/.garrc`` configuration file. It
+contains your name and e-mail adress, both of which are included in the
+metadata of built packages. Further, GAR needs to know where to store
+downloaded sources and generated packages.
+
+Here's an example:
+
+::
+
+    # Data for pkginfo
+    SPKG_PACKAGER   = Dagobert Michelsen
+    SPKG_EMAIL      = dam at example.com
+    #
+    # Where to store generated packages
+    SPKG_EXPORT     = /home/dam/pkgs
+    #
+    # Where to store downloaded sources
+    GARCHIVEDIR     = /home/dam/src
+    #
+    # Disable package sanity checks by checkpkg if you are building on your
+    # own host (checkpkg depends on OpenCSW buildfarm infrastructure)
+    ENABLE_CHECK    = 0
+
+In case you are sitting behind a proxy, you would also want to configure this in ~/.garrc.
+
+::
+
+    http_proxy = http://proxy[:port]
+
+You can customize several other things in ``~/.garrc`` which we'll see later.
+Do not customize anything which makes the build dependent on your
+``~/.garrc``-settings! This includes changing compilers flags, ``PATH``, etc.
+This is equally true for ``gar.conf.mk`` - please don't modify it! If you feel
+it needs change please subscribe to the `users mailing list`_ and discuss your
+change there.
+
+Basic git configuration
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Git will be installed as one of dependencies. It is used by GAR to make source
+patching easier. Provide basic configuration for git:
+
+::
+
+    git config --global user.email "you at example.com"
+    git config --global user.name "Your Name"
+
+You also need to set up the EDITOR command, because git's expectations don't
+match up with the behavior of ``/bin/vi``. Here's an example how to set it to
+use vim:
+
+::
+
+    sudo pkgutil -y -i vim
+    echo "export EDITOR=/opt/csw/bin/vim" >> ~/.bashrc
+
+Of course, it can be your editor of choice.
+
+Initialize the source tree
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+As regular user (do not use ``root`` for safety reasons) to be used for
+building init your local repository:
+
+::
+
+    mgar init [<path-for-build-recipes>] (defaults to ~/opencsw)
+
+Please make yourself familiar with `mgar`_.
+
+Fetch all the build recipes:
+
+::
+
+    mgar up --all
+
+Done!
+^^^^^
+
+Congratulations, you now have all pre-requisites in place to continue to learn
+building packages with GAR.
+
 Advanced setup
---------------
+^^^^^^^^^^^^^^
 
 The following components are not required, but are quite useful.
 
@@ -71,3 +207,16 @@
 
 .. _Catalog signing daemon source code:
   http://sourceforge.net/p/opencsw/code/HEAD/tree/catalog_signatures/
+
+.. _download from Oracle:
+.. _Oracle Solaris Studio:
+  http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html
+
+.. _the latest Oracle Solaris Studio compiler patches:
+   http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-136213.html
+
+.. _users mailing list:
+   https://lists.opencsw.org/mailman/listinfo/users
+
+.. _mgar:
+   http://wiki.opencsw.org/gar-wrapper

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