← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2781: 1. Updated build-farm script (building Debian and Ubuntu packages for different distributions).

 

------------------------------------------------------------
revno: 2781
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Tue 2011-03-08 14:38:49 +0100
message:
  1. Updated build-farm script (building Debian and Ubuntu packages for different distributions).
  2. Updated installation section of documentation (Gentoo installation).
modified:
  doc/sphinx/installation.rst
  scripts/build-infrastructure/build-farm


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'doc/sphinx/installation.rst'
--- doc/sphinx/installation.rst	2011-02-21 20:22:14 +0000
+++ doc/sphinx/installation.rst	2011-03-08 13:38:49 +0000
@@ -7,24 +7,28 @@
 Packages
 ----------
 
-Packages are (as of now) provided for several Ubuntu versions from `Yade package archive <https://launchpad.net/~yade-users/+archive/ppa>`_. Different version of Yade can be installed alongisde each other. The ``yade`` vitual package always depends on the latest stable package, while ``yade-snapshot`` will pull the latest snapshot package. To install quickly, run the following::
+Packages are (as of now) provided for several Ubuntu versions from ``Yade package archive`` for `stable <https://launchpad.net/~yade-pkg/+archive/stable>`_ and `snapshot <https://launchpad.net/~yade-pkg/+archive/snapshots>`_ releases. Different version of Yade can be installed alongside each other. The ``yade`` virtual package always depends on the latest stable package, while ``yade-snapshot`` will pull the latest snapshot package. To install quickly, run the following:
+
+* For stable releases::
 
 	sudo add-apt-repository ppa:yade-pkg/stable       # for stable releases 
 	sudo add-apt-repository ppa:yade-users/external   # optional (updates of other packages)
 	sudo apt-get update
 	sudo apt-get install yade
 
-More detailed instructions are available at the `archive page <https://launchpad.net/~yade-users/+archive/ppa>`_
-
-For latest builds from trunk, add the following PPA::
+* For latest builds from trunk::
 
 	sudo add-apt-repository ppa:yade-pkg/snapshots    # for latest releases 
 	sudo apt-get update
 	sudo apt-get install yade-bzr...
 
+More detailed instructions are available at the corresponding pages of ppa`s (links above).
+
 Source code
 ------------
 
+Installation from source code is reasonable, when you want to add or modify constitutive laws, engines or functions... Installing the latest trunk version allows to use newly added features, which are not yet available in packaged versions. 
+
 Download
 ^^^^^^^^^^
 
@@ -59,26 +63,68 @@
 * `Loki <http://loki-lib.sf.net>`_ library
 * `VTK <http://www.vtk.org/>`_ library (optional but recommended)
 
-Most of the list above is very likely already packaged for your distribution. In Ubuntu, it can be all installed by the following command (cut&paste to the terminal)::
-
-	sudo apt-get install scons freeglut3-dev libloki-dev \
-	libboost-date-time-dev libboost-filesystem-dev libboost-thread-dev \
-	libboost-regex-dev fakeroot dpkg-dev build-essential g++ \
-	libboost-iostreams-dev liblog4cxx10-dev python-dev libboost-python-dev ipython \
-	python-matplotlib libsqlite3-dev python-numeric python-tk gnuplot doxygen \
-	libgts-dev python-pygraphviz libvtk5-dev python-scientific bzr libeigen2-dev \
-	binutils-gold python-xlib python-qt4 pyqt4-dev-tools \
-	libqglviewer-qt4-dev python-imaging libjs-jquery python-sphinx
-
-command line (cut&paste to the terminal under root privileges) for Fedora (not good tested yet!)::
-
-	yum install scons qt3-devel freeglut-devel boost-devel boost-date-time \
-	boost-filesystem boost-thread boost-regex fakeroot gcc gcc-c++ boost-iostreams \
-	log4cxx log4cxx-devel python-devel boost-python ipython python-matplotlib \
-	sqlite-devel python-numeric ScientificPython-tk gnuplot doxygen gts-devel \
-	graphviz-python vtk-devel ScientificPython bzr eigen2-devel libQGLViewer-devel \
-	loki-lib-devel python-xlib PyQt4 PyQt4-devel python-imaging python-sphinx python-bibtex
-
+Most of the list above is very likely already packaged for your distribution. The following commands have to be executed in command line of corresponding distributions. Just copy&paste to the terminal. To perform commands you should have root privileges
+
+	* **Ubuntu**, **Debian** and their derivatives::
+
+		sudo apt-get install scons freeglut3-dev libloki-dev \
+		libboost-date-time-dev libboost-filesystem-dev libboost-thread-dev \
+		libboost-regex-dev fakeroot dpkg-dev build-essential g++ \
+		libboost-iostreams-dev liblog4cxx10-dev python-dev libboost-python-dev ipython \
+		python-matplotlib libsqlite3-dev python-numeric python-tk gnuplot doxygen \
+		libgts-dev python-pygraphviz libvtk5-dev python-scientific bzr bzrtools libeigen2-dev \
+		binutils-gold python-xlib python-qt4 pyqt4-dev-tools \
+		libqglviewer-qt4-dev python-imaging libjs-jquery python-sphinx
+
+	* **Fedora**::
+
+		yum install scons qt3-devel freeglut-devel boost-devel boost-date-time \
+		boost-filesystem boost-thread boost-regex fakeroot gcc gcc-c++ boost-iostreams \
+		log4cxx log4cxx-devel python-devel boost-python ipython python-matplotlib \
+		sqlite-devel python-numeric ScientificPython-tk gnuplot doxygen gts-devel \
+		graphviz-python vtk-devel ScientificPython bzr bzrtools eigen2-devel libQGLViewer-devel \
+		loki-lib-devel python-xlib PyQt4 PyQt4-devel python-imaging python-sphinx python-bibtex
+
+	* **Gentoo** (not good tested yet)
+		* Command to install all main dependencies::
+		
+			emerge dev-util/scons media-libs/freeglut media-libs/gd sys-libs/lib-compat-loki \
+			dev-util/boost-build dev-libs/boost sys-apps/fakeroot app-arch/dpkg \
+			sys-devel/gcc dev-libs/log4cxx dev-lang/python dev-python/ipython \
+			dev-python/matplotlib dev-db/sqlite dev-python/numpy dev-lang/tk \
+			sci-visualization/gnuplot app-doc/doxygen sci-libs/gts dev-python/pygraphviz \
+			sci-libs/vtk dev-python/scientificpython dev-vcs/bzr dev-vcs/bzrtools dev-cpp/eigen \
+			sys-devel/binutils dev-python/python-xlib dev-python/PyQt4 dev-python/imaging \
+			dev-python/sphinx dev-python/imaging dev-python/python-bibtex
+		
+		
+		* *masked by* problem solution. 
+			For example, if you have got a problem with installing ``log4cxx``:
+			
+				!!! All ebuilds that could satisfy "dev-libs/log4cxx" have been masked.
+				!!! One of the following masked packages is required to complete your request:
+				- dev-libs/log4cxx-0.10.0 (masked by: ~x86 keyword)
+			
+			You should unmask ``log4cxx``, doing the following::
+			
+				mkdir /etc/portage -p;\
+				echo "=dev-libs/log4cxx-0.10.0 ~x86" >> /etc/portage/package.keywords;\
+				emerge dev-libs/log4cxx
+			
+			Other packages with similar warnings can be fixed by this way as well.
+			
+		* ``libqglviewer`` is not in official Gentoo repository yet. But it can be installed from `Gentoo Portage Overlay <http://gpo.zugaina.org>`_::
+			
+			emerge -va layman; emerge subversion; layman -f -a sunrise;\
+			echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf \
+			layman -s sunrise; layman -S; emerge x11-libs/libqglviewer
+		
+		* Probably ``media-libs/gd`` will require the following commands::
+			
+			mkdir /etc/portage -p;\
+			echo "media-libs/gd fontconfig jpeg png truetype" >>/etc/portage/package.use
+			
+			
 
 Compilation
 ^^^^^^^^^^^
@@ -96,7 +142,7 @@
 
 The compilation process can take a long time, be patient.
 
-Decreasing RAM usage furing compilation
+Decreasing RAM usage during compilation
 """""""""""""""""""""""""""""""""""""""""
 
 Yade demands a large amount of memory for compilation (due to extensive template use). If you have less than 2GB of RAM, it will be, you might encounter difficulties such as the computer being apparently stalled, compilation taking very long time (hours) or erroring out. This command will minimize RAM usage, but the compilation will take longer -- only one file will be compiled simultaneously and files will be "chunked" together one by one::

=== modified file 'scripts/build-infrastructure/build-farm'
--- scripts/build-infrastructure/build-farm	2011-02-09 14:35:22 +0000
+++ scripts/build-infrastructure/build-farm	2011-03-08 13:38:49 +0000
@@ -8,7 +8,7 @@
 
 parser = argparse.ArgumentParser(description='Build packages for different distributions')
 parser.add_argument('--buildpath', metavar=os.path.normpath(sys.path[0]), default = os.path.normpath(sys.path[0]) , help ='path, where all files for building will be stored ) [default: current directory]')
-parser.add_argument('--distributions', metavar="lucid maverick", default = "lucid maverick" , help ='distributions for building [default: lucid maverick]')
+parser.add_argument('--distributions', metavar="lucid maverick natty sid", default = "lucid maverick natty sid" , help ='distributions for building [default: lucid maverick]')
 parser.add_argument('--architectures', metavar="i386 amd64", default = "i386 amd64" , help ='architectures to building [default: i386 amd64]')
 args = parser.parse_args()
 
@@ -16,13 +16,14 @@
 distributionsNames = args.distributions.split()
 distributionsArch = args.architectures.split()
 
-# Check, whether base files for building exist	
+# Check, whether base files for building exist
+
 for distrName in distributionsNames:
 	for archName in distributionsArch:
 		distr_plus_arch = distrName+'_'+archName
 		if not(os.path.exists('/var/cache/pbuilder/'+distr_plus_arch+'.tgz')):
 			os.system('sudo pbuilder --create --basetgz /var/cache/pbuilder/'+distr_plus_arch+'.tgz --aptcache /var/cache/pbuilder/aptcache_'+archName+'/ --distribution '+distrName+' --architecture '+archName+' --components "main universe" --debootstrapopts --variant=buildd')
-		os.system('sudo pbuilder --update --override-config --components "main universe" --aptcache /var/cache/pbuilder/aptcache_'+archName+'/ --distribution '+distrName+' --othermirror "deb http://ppa.launchpad.net/yade-users/external/ubuntu '+distrName+' main |" --architecture '+archName+' --basetgz /var/cache/pbuilder/'+distr_plus_arch+'.tgz')
+		os.system('sudo pbuilder --update --basetgz /var/cache/pbuilder/'+distr_plus_arch+'.tgz')
 
 #Update to the latest revision or checkout
 if os.path.exists(defaultPath+'/cleanBzr'):
@@ -53,12 +54,11 @@
 	os.chdir('yade')
 	os.system('scripts/debian-prep ' + distrName)
 	os.chdir('..')
-	os.rename('yade', 'yade-'+VERSION+'-'+VERSION)
-	os.system('dpkg-source -b -I yade-'+VERSION+'-'+VERSION)
+	os.system('dpkg-source -b -I yade-'+VERSION)
 	dscFile = glob.glob('*.dsc')[0]
 	for archName in distributionsArch:
 		os.mkdir(archName)
-		os.system('sudo pbuilder --build --distribution '+distrName+' --architecture '+archName+' --basetgz /var/cache/pbuilder/'+distr_plus_arch+'.tgz  --buildresult '+defaultPath+'/'+distrName+'/'+archName+'  --aptcache /var/cache/pbuilder/aptcache_'+archName+'/ --debbuildopts "-j1" '+dscFile)
+		os.system('sudo pbuilder --build --basetgz /var/cache/pbuilder/'+distr_plus_arch+'.tgz  --buildresult '+defaultPath+'/'+distrName+'/'+archName+' '+dscFile)
 	os.chdir('..')