First I want to say Thanks to Xamarin for providing packages now for Linux again. I am personally using the Mono packages from Xamarin for CentOS7, and the MonoDevelop package for Ubuntu from Xamarin.

I have decided I will not build my own MonoDevelop packages anymore, since the Xamarin packages are sufficient.
There are also some issues that I could not figure out, so at the moment my MonoDevelop packages on OBS do not build at all. I have no intention to fix them, because there is no need for them.

For example, to install the latest MonoDevelop on Ubuntu, you can follow these instructions (see also http://www.monodevelop.com/download/linux/#debian-ubuntu-and-derivatives):

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
apt-get update
apt-get install monodevelop monodoc-browser

I also wanted to stop building the Mono packages for various Linux distributions, but there are issues for CentOS6 with libgdiplus and libpng15 with the Xamarin packages (http://lists.ximian.com/pipermail/mono-list/2014-October/051241.html), so I will keep providing Mono packages at the moment.

The latest Mono packages for 3.12.1 are available according to the instructions at http://software.opensuse.org/download.html?project=home%3Atpokorra%3Amono&package=mono-opt

I have added packages for Fedora 21 there recently.

I have also worked on getting Mono 3.12.1 built for CentOS5. This required to use a newer GCC than is available on CentOS5. This meant I cannot build it on OBS since it is not allowed to link in different repositories. Obviously I could try to build a newer GCC on OBS as well, but then it becomes more and more complicated, and others have done this work already (http://people.centos.org/tru/devtools-2/readme)

The solution now works with my own LightBuildServer, and the result can be seen here: https://lbs.solidcharity.com/package/tpokorra/mono/mono-opt
If you want to build Mono on your own LBS, let me know, and I will improve the installation instructions for the LBS. All the code is public already, at https://github.com/SolidCharity/LightBuildServer/
The sources for the RPM packages are maintained here: https://github.com/tpokorra/lbs-mono/tree/master/mono-opt

If you need some paid assistance with Mono packages for your distribution, please contact me via ODesk: https://www.odesk.com/o/profiles/users/_~01e826605fea50faae/

Tags: , ,
Posted in Software Development | Comments Closed
Tags: ,
Posted in Software Development | Comments Closed

Mono 3.6 for Linux   August 16th, 2014

This week there has been the release of Mono 3.6, and the launch of the new Mono website!

There is a section for Linux as well:
http://www.mono-project.com/download/#download-lin
It is good to see that Jo Shields has joined the Xamarin team, and he will look into providing supported packages of Mono for the major Linux distributions.
For more details, see the mailinglist:
http://lists.ximian.com/pipermail/mono-devel-list/2014-June/041658.html
and http://lists.ximian.com/pipermail/mono-devel-list/2014-June/041668.html

I have been busy to provide a community version of Mono for the various Linux distributions. At the moment I have binaries for CentOS 6 and 7, Fedora 19 and 20, Debian 7, OpenSUSE 12.3 and 13.1, and Ubuntu 12.04 and 14.04.

You can install the packages according to the instructions here: http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt

To run mono, you have to load some environment variables first:

. /opt/mono/env.sh
mono --version

One user requested to still be able to use Mono 3.4, because of some regression in Mono 3.6. So I have added a package mono-opt-3.4, that you can install from the same repository as mono-opt.

Another suggestion from the community was to include support for LLVM. Since today, my mono-opt packages are compiled with LLVM for Mono present, so you can now use LLVM for compiling code: mono –llvm
For more details, see http://www.mono-project.com/docs/advanced/mono-llvm/

If you have any suggestions, please let me know!

Tags:
Posted in Software Development | Comments Closed

Debugging Mono Web Services   June 27th, 2014

I had this problem that the asmx files did display fine in the browser, but when I called a function, it would always return a red Zero.

To get to the bottom of this problem, I created a web.config file with this content:

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
    <compilation debug="true" />
</configuration>

Best to use a clean directory without a bin subdirectory, for testing.
Use the MathService sample asmx file from http://www.mono-project.com/Writing_a_WebService:

<%@ WebService Language="C#" Class="MathService.MathService" %>
 
using System;
using System.Web.Services;
 
namespace MathService
{
	[WebService (Namespace = "http://tempuri.org/NumberService")]
	public class MathService : WebService
	{
		[WebMethod]
		public int AddNumbers (int number1, int number2)
		{
			return number1 + number2;
		}
 
		[WebMethod]
		public int SubtractNumbers (int number1, int number2)
		{
			return number1 - number2;
		}
	}
}

Starting the xsp server for testing purposes:

. /opt/mono/env.sh
cd /var/www/openpetra
MONO_OPTIONS=--debug xsp4 --port 80 --verbose

When you now call the asmx file in your browser, you see the output on the console.

In my case there was an error about sqlite3.dll in the bin directory, which is a windows dll, and this caused trouble for the server.

But it still did only show a red zero. Finally I looked at the html source of the asmx file in the webbrowser, and I realised that the ports got mixed up, since I was using port forwarding into a virtual machine. So the port defined in the webbrowser was different than the port that xsp was running on.

The url in the browser is: http://myhost:8090, but this is the url in the source code:

getXML ("GET", "http://myhost/test.asmx/SubtractNumbers", "number1=asf&number2=asdf");

To solve this: make sure that in your /etc/lighttpd/vhosts.d/openpetra9000.conf, you have a server.name set with a value that the server is reachable from the client.
It seems the document path is also part of server.name. You can put the port into another variable called server.port, but then the port will be attached to the server.name, after the document path.

In the end, I am now only using the default port.

Tags: ,
Posted in Software Development | Comments Closed

This is an updated version of the post Install OpenPetra.Now 2014-05 on CentOS5.

Now we are installing on CentOS6, and using my own LBS repository. OpenPetra.Now is now using the unmodified Mono-opt packages.

OpenPetra.Now is a tagged revision of the official OpenPetra, plus some patches which have not made it into the official OpenPetra yet. This includes a replacement of .Net remoting with https webservices, and a plugin system.

These are the instructions:

Install the Epel repository, the Postgresql repository and my OpenPetra repository.

For Postgresql, have a look here: http://yum.postgresql.org/repopackages.php#pg92

Epel Repo (for lighttpd): see http://mirror.de.leaseweb.net/epel/6/x86_64/repoview/epel-release.html

For the mono-opt repository, have a look here:
http://lbs.solidcharity.com/detail/tpokorra/mono/mono-opt

rpm -Uhv http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
rpm -Uhv http://mirror.de.leaseweb.net/epel/6/x86_64/epel-release-6-8.noarch.rpm
cd /etc/yum.repos.d/
wget http://lbs.solidcharity.com/repos/tpokorra/mono/centos/6/lbs-tpokorra-mono.repo
wget http://lbs.solidcharity.com/repos/tpokorra/openpetra/centos/6/lbs-tpokorra-openpetra.repo

Now install the packages (this will automatically also install the packages mono-opt, postgresql92, lighttpd and some other dependencies):

yum install openpetranow-server

Now configure the OpenPetra server, and start it:

/etc/init.d/openpetra-server init
chkconfig openpetra-server on

To test the server, connect to http://<yourhostname>/openpetra9000/serverSessionManager.asmx

Tags: , , ,
Posted in Software Development | Comments Closed

OpenPetra.Now is a tagged revision of the official OpenPetra, plus some patches which have not made it into the official OpenPetra yet. This includes a replacement of .Net remoting with https webservices, and a plugin system.

For an installation which involves upgrading from the old Petra 2.3 every night, I had to install OpenPetra.Now on a CentOS5 based system.

These are the instructions:

Install the Epel repository, the Postgresql repository and my OpenPetra repository.

If you have a 64 bit system, the links will be different.

For Postgresql, have a look here: http://yum.postgresql.org/

For the mono-openpetra repository, have a look here:
http://software.opensuse.org/download/package?project=home:tpokorra:openpetra&package=mono-openpetra

rpm -Uhv http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uhv http://yum.postgresql.org/9.2/redhat/rhel-5-i386/pgdg-centos92-9.2-6.noarch.rpm
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:tpokorra:openpetra/CentOS_CentOS-5/home:tpokorra:openpetra.repo

Now install the packages (this will automatically also install the packages mono-openpetra, postgresql92, lighttpd and some other dependencies):

yum install openpetranow-server

Now configure the OpenPetra server, and start it:

/etc/init.d/openpetra-server init
chkconfig openpetra-server on
Tags: , , ,
Posted in Software Development | Comments Closed

I have just finished the work on the latest MonoDevelop packages.

Quite a bit has changed in the build process, so it needed some work to make the build from tarball finish successfully again.
See this thread on the mailinglist: http://lists.ximian.com/pipermail/monodevelop-list/2014-May/016077.html

I have updated the packages at
https://build.opensuse.org/project/monitor/home:tpokorra:mono

MonoDevelop 4.2.5:
http://software.opensuse.org/download.html?project=home%3Atpokorra%3Amono&package=monodevelop-opt

MonoDevelop 4.3.4:
http://software.opensuse.org/download.html?project=home%3Atpokorra%3Amono&package=monodevelop-beta

MonoDevelop 5.1 (nightly build from this morning):
http://software.opensuse.org/download.html?project=home%3Atpokorra%3Amono&package=monodevelop-alpha

By the way, I am working on a new project called LightBuildServer, which is a very light-weight alternative to OBS.
see http://lightbuildserver.org

Tags: , , ,
Posted in Software Development | Comments Closed

In this blog post, I want to describe some of the workarounds I need to do to release the latest mono and monodevelop packages on OBS.

For more details on this project from a using perspective, see:
Easy installation of current Mono and MonoDevelop for all major Linux Distributions

The download of the source files is specified in the _service file, eg. https://build.opensuse.org/package/view_file/home:tpokorra:mono/mono/_service?expand=1

The problem is that sometimes the tarballs are not available on http://download.mono-project.com/sources/mono or http://download.mono-project.com/sources/monodevelop, especially for the Alpha releases.

As long as you can find a tagged release at Github, you can build your own tarball (eg. on CentOS):

Preparations:

wget -O /etc/yum.repos.d/home:tpokorra:mono.repo http://download.opensuse.org/repositories/home:tpokorra:mono/CentOS_CentOS-6/home:tpokorra:mono.repo
yum install git-core automake autoconf libtool tar which gcc-c++ gettext mono-opt bzip2

For Mono:

git clone https://github.com/mono/mono.git
cd mono 
git checkout -b tarball mono-3.2.5
./autogen.sh
. /opt/mono/env.sh
make dist

And for MonoDevelop:

git clone https://github.com/mono/monodevelop.git
cd monodevelop
git branch tarball monodevelop-4.3.0
git checkout tarball
. /opt/mono/env.sh
./configure
make dist

I have uploaded the resulting tarballs to http://download.pokorra.de/mono/tarballs/, and my _service files are now referencing that location if the official source directory is missing the tarball or the tarball is broken.

Tags: , , ,
Posted in Software Development | Comments Closed

This blog post is a repeat of an email that I sent to the Mono mailing list back in July 2013:
http://lists.ximian.com/pipermail/mono-list/2013-July/050114.html

The problem is that there are no recent packages for the major Linux distributions offered at http://www.go-mono.com/mono-downloads/download.html and http://monodevelop.com/Download

I personally use Mono and MonoDevelop for developing and deploying OpenPetra, an open source accounting and contact management system for charities and missions organisations.

I am using the OBS (Open Build Service) from build.opensuse.org to build recent packages of Mono and MonoDevelop for the Linux distributions CentOS, Fedora, Debian, Ubuntu, and openSUSE.

The installation for MonoDevelop is documented here:

http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=monodevelop-opt
This will install Mono as well.

I also have builds of the Beta and the Alpha versions of MonoDevelop.

If you only want to install Mono, see here:

http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt

There are also packages for mono-xsp, mod_mono and mono-tools (including monodoc).

Package mono-libgdiplus makes sure that the libgdiplus is linked properly, which is important for GUI applications.

Since you have the right repo from installing Mono already, you can just run this:

#for RPM based distros:
yum install mono-libgdiplus-opt mod_mono-opt mono-xsp-opt mono-tools-opt

or (please note slightly different name for mod_mono-opt, somehow Debian does not like the underscore in the package name…)

#for Debian based distros:
apt-get install mono-libgdiplus-opt modmono-opt mono-xsp-opt mono-tools-opt

MonoDevelop and Mono (and the other mono specific packages) will be installed to /opt to avoid conflict with the Mono version that comes with your Linux distribution.

To run this Mono on the command line, you can add this line to your .bash_profile file:

 . /opt/mono/env.sh

If you are interested in the way how the packages are built, have a look here: https://build.opensuse.org/project/show/home:tpokorra:mono

We have upgraded all the code of OpenPetra to .net 4.0.
We also upgraded to Ext.Net 1.2.

There were two bugs in Mono 2.10, which were show-stoppers:
http://bugzilla.xamarin.com/show_bug.cgi?id=2505 was a problem with the mono compiler, in Mono 2.10.x
This was fixed in mono master.

So I tried to build mono from master, but then I had problems with fastcgi, while xsp4 was serving the content correctly:
http://bugzilla.xamarin.com/show_bug.cgi?id=2876
This was also fixed in mono master.

Below is a link to a tar.gz file, that contains the build of Mono, with mod_mono and xsp, at the beginning of February 2012.

I wanted to use lighttpd and fastcgi with Mono and Ext.Net, but that did not work.
The error that I got was similar as to described here, but without a solution that works for me:
http://forums.ext.net/showthread.php?14040-All-DirectEvents-Is-Error
It works fine with xsp4.

I then tried with mod_mono and apache2:
I came across this issue http://forums.ext.net/showthread.php?12348-404-Not-Found-for-a-few-resources-requests, that the resources cannot be loaded. The solution from that thread also helped me:
Add CleanResourceUrl = “false” to your .aspx file:

<ext:ResourceManager  runat="server" CleanResourceUrl="false" />
So here are my configuration steps for Ext.Net with Mono and Apache2:

This works with Ubuntu Oneiric 64 bit (11.04). But it might work on other Ubuntu/Debian version as well. I have also used it on CentOS.

apt-get install apache2
cd /opt
wget http://download.pokorra.de/mono/ubuntu/mono.tar.gz
for 32 bit: wget http://download.pokorra.de/mono/ubuntu32/mono.tar.gz
tar xzf mono.tar.gz
cd /usr/lib/apache2/modules/
wget http://download.pokorra.de/mono/ubuntu/mod_mono.so
for 32 bit: wget http://download.pokorra.de/mono/ubuntu32/mod_mono.so
cd /etc/apache2/mods-enabled
wget http://download.pokorra.de/mono/ubuntu/mod_mono.conf
# note that mod_mono.conf contains this line:
# MonoServerPath /opt/mono-2.10-git/bin/mod-mono-server4
vi /etc/init.d/apache2
# search for LANG, and replace with this line:

ENV="env -i LANG=en_GB PATH=/opt/mono-2.10-git/bin:/usr/local/bin:/usr/bin:/bin"

Mono will create a directory /var/www/.mono which should not be public.
In your apache site configuration file, add just before 

           Deny from all

cd /var/www
wget http://download.pokorra.de/mono/ubuntu/extnet-sample-mono.tar.gz
tar xzf extnet-sample-mono.tar.gz
chown -R www-data:www-data /var/www
/etc/init.d/apache2 restart

See the result here:
http://demo.openpetra.org/DemoDesktop

This is the demo for the Desktop from Ext.Net 1.2, with a slight modification in Default.aspx and Desktop.aspx for the ResourceManager as described above.