«
»

Merry Christmas… with Mono and Beagle

December 29th, 2005 by George Notaras

This post is a bit delayed, but I was away from town. I just love the fact that I had plenty of free time to spend with good old friends and family.

I wish Merry Christmas, Happy Holidays and Happy New Year with peace to all people worldwide.

Now that I am back and since we are still on holiday, I plan to devote some time to tweaking my server and desktop system. I’ve already spent the whole afternoon with implementing the Beagle search infrastracture to my desktop.

Although the NRPMS repository and the Mono Project page has all the relevant binaries for Mono and Beagle, I tried a different approach and built my own RPMs. In fact, instead of building separate RPM packages for the various main Mono components, for example mono-core/mono-data etc., I have included them all in the mono, mono-devel packages. This is because I haven’t found any fedora specific naming scheme for the Mono components and I didn’t want to mess my local YUM repo with a dozen of packages. I also built some other packages from the mono project: gtk-sharp, gtk-sharp2, gecko-sharp, gecko-sharp2.

Regarding the the critical Beagle dependencies, all of them are satisfied:

  • mono and mono-devel
  • gtk-sharp2
  • gecko-sharp2
  • mozilla
  • gmime and gmime-sharp
  • sqlite2
  • libexif
  • xorg-x11-devel
  • zip

For the gmime-sharp package I compiled gmime with the --enable-mono configuration option.

Unfortunately not all the optional beagle dependencies could be satisfied:

  • evolution-sharp: I created an RPM package for this, but the Beagle daemon would not start, unless I disabled the EvolutionDataServer backend, so this was dropped. The reason is unknown, but I assume there is an incompatibility with the Evolution Data Server v1.2 which comes with FC4.
  • galago-sharp: I did not spent much time with this one, as I do not consider beagle searching my online contacts as a first priority. Anyway, I built a needed library, libgalago, but galago-sharp v0.6 would not compile.
  • wv: I tried to compile wv v1.2.0 without success, as it needs a higher version of libgsf than the one shipped with FC4. So, I installed this package from the extras repository. This probably needs a patch in order to work with beagle, so I might rebuild it.
  • pdfinfo: Fortunately, this is satisfied by only installing xpdf, so no problems here.
  • ssindex: the default gnumeric package for FC4 is not configured with the --enable-ssindex option, so this will not be satisfied until I rebuild gnumeric.
  • gsf-sharp: This, like the wv-1.2.0, needs an updated version of libgsf.
  • Epiphany: I use the Epiphany browser as my main web browser, so this was the actual dependency for me, instead of firefox.

So, I guess there wasn’t much success with the optional beagle dependencies, but I did not lose much without using them.

A last thing to say about the beagle prerequisites, which is actually a top priority, is to enable the filesystem extended attributes for the /home partition, by adding the user_xattr mount option in fstab. Furthermore, the default fedora kernel has inotify enabled in the kernel configuration, so I had to do nothing about that one. More info about these or about the beagle usage and capabilities can be found at the Beagle Project page.

My first impression of beagle was: "…damn!! this thing rocks!". It’s really impressive. I can say that it deserved all the pain. By default, it indexes files, evolution email, liferea cache, gaim history conversations and much more in a very clever way, without consuming system resources when the user needs them. BEST, the beagle search tool, updates the search results in real time as files are modified, thanks to the inotify-enabled fedora kernel.

Apart from beagle, I also tried to compile some more applications that use Mono, f-spot for example, but they wouldn’t compile due to an "old" version of gnome libraries. I guess that I have to reconsider updating gnome to version 2.12 or newer from the NRPMS repository or from the Rawhide, but I’m sure this will produce other problems, which I am not in the mood to deal with.

My beagle spec file

A patch is needed for beagle v0.1.4 in order to compile correctly. You can read Planet Beagle for more info or download the patch from the relevant GNOME Bugzilla page.

Here is my spec file for beagle. This is provided strictly as a custom sample, as it is written for my custom Mono components naming scheme:

Name:			beagle
Summary:		Beagle is a search tool
Version:		0.1.4
Release:		10.custom.FC4
License:		LGPL
Group:			Applications/Productivity
URL:			http://ftp.gnome.org/pub/GNOME/sources/beagle/
Source0:		%{name}-%{version}.tar.gz
Patch0:			beagle-mono-1.1.12-bludgeon.patch
Buildroot:		%{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:	mono-devel
BuildRequires:	gtk-sharp2
BuildRequires:	gecko-sharp2
#BuildRequires:	evolution-sharp
BuildRequires:	mozilla-devel
BuildRequires:	gmime-devel
BuildRequires:	gmime-sharp
BuildRequires:	sqlite2-devel
BuildRequires:	libexif-devel
BuildRequires:	xorg-x11-devel
BuildRequires:	zip
#BuildRequires:	galago-sharp
#BuildRequires:	gsf-sharp
BuildRequires:	wv
Requires:		mono
Requires:		gtk-sharp2
Requires:		gecko-sharp2
#Requires:		evolution-sharp
Requires:		mozilla
Requires:		gmime
Requires:		gmime-sharp
Requires:		sqlite2
Requires:		libexif
Requires:		xorg-x11
Requires:		zip
#Requires:		galago-sharp
#Requires:		gsf-sharp
Requires:		wv
Requires:		xpdf
Requires:		epiphany
%description
Beagle is a search tool that ransacks your personal information space to find whatever you're looking for. Beagle can search in many different domains.
%package	 -n %{name}-devel
Summary:		Files required to compile software that uses %{name}
Group:			Development/Libraries
Requires:		%{name} = %{version}-%{release}
# Possibly
#Requires:		mono-devel
%description -n %{name}-devel
This package includes the header files and libraries needed to link software
with the %{name} libraries.
%package	 -n python-%{name}
Summary:		Python %{name}
Group:			Development/Libraries
#Possibly
#Requires:		%{name}-devel = %{version}-%{release}
Requires:		python
Requires:		python-devel
%description -n python-%{name}
Python %{name}
%package	 -n %{name}-epiphany-extension
Summary:		Epiphany extension for Beagle
Group:			Applications/Internet
Requires:		%{name} = %{version}-%{release}
Requires:		epiphany
Requires:		epiphany-extensions
%description -n %{name}-epiphany-extension
Epiphany extension for Beagle
%prep
%setup -q -n %{name}-%{version}
# Check http://www.planetbeagle.org/ for info
%patch0 -p0 -b .beagle-mono-1.1.12-bludgeon
%build
%configure \
	--prefix=%{_prefix} \
	--libdir=%{_libdir} \
	--includedir=%{_includedir} \
	--mandir=%{_mandir} \
	--infodir=%{_infodir} \
	--sysconfdir=%{_sysconfdir} \
	--localstatedir=%{_localstatedir} \
	--with-mozilla=mozilla \
	--with-x \
	--enable-epiphany-extension \
	--enable-epiphany-extension-install
#--enable-network \
#--enable-webservices \
%{__make}
%install
%{__rm} -fr %{buildroot}
make DESTDIR=%{buildroot} install
%clean
%{__rm} -fr %{buildroot}
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_sysconfdir}/beagle
%config(noreplace) %{_sysconfdir}/beagle/crawl*
%config(noreplace) %{_sysconfdir}/cron.d/beagle-crawl-system.crontab
%{_bindir}/beagle*
%{_bindir}/best
%{_bindir}/searchomatic
%dir %{_libdir}/beagle
%{_libdir}/beagle/*
%{_libdir}/libbeagle.so.*
%attr(0755,root,root) %{_libexecdir}/beagle-crawl-system
%{_sbindir}/beagle-build-index
%{_sbindir}/beagle-manage-index
%{_datadir}/applications/beagle-settings.desktop
%{_datadir}/applications/best.desktop
%{_datadir}/locale/*/LC_MESSAGES/beagle.mo
%{_mandir}/man1/beagle*
%{_mandir}/man1/best*
%{_mandir}/man8/beagle*
%{_datadir}/pixmaps/best.png
%{_datadir}/pixmaps/dog.png
%files -n %{name}-devel
%defattr(-, root, root, 0755)
%dir %{_includedir}/libbeagle
%{_includedir}/libbeagle/*
%{_libdir}/libbeagle.a
%{_libdir}/libbeagle.la
%{_libdir}/libbeagle.so
%{_libdir}/pkgconfig/beagle-0.0.pc
%{_libdir}/pkgconfig/beagle-daemon.pc
%{_libdir}/pkgconfig/libbeagle-0.0.pc
%files -n python-%{name}
%defattr(-, root, root, 0755)
%{_libdir}/python2.4/site-packages/beagle.a
%{_libdir}/python2.4/site-packages/beagle.la
%{_libdir}/python2.4/site-packages/beagle.so
%files -n %{name}-epiphany-extension
%defattr(-, root, root, 0755)
%{_libdir}/epiphany-1.6/extensions/beagle.xml
%{_libdir}/epiphany-1.6/extensions/libbeagleextension.a
%{_libdir}/epiphany-1.6/extensions/libbeagleextension.la
%{_libdir}/epiphany-1.6/extensions/libbeagleextension.so
%changelog

I also have spec files for all beagle dependencies, but I would suggest that you use the binaries from NRPMS or from the Mono Project page, as mine might be incomplete. Finally, if you seek for adventures, I suggest you walk your own way…

Have fun!

The Merry Christmas… with Mono and Beagle by George Notaras, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at www.g-loaded.eu.

Related Articles

Tags: , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight=""> <pre>