Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO Beagle Installation
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3 ... 14, 15, 16  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Tue Feb 01, 2005 11:22 am    Post subject: HOWTO Beagle Installation Reply with quote

curtis119: Beagle is now in Portage so these instructions are deprecated. If you need help with Beagle look here

HOWTO: Beagle Installation


This was the main thread that deals with beagle, the search tool that's supposed to change our lives.


The HOWTO has moved to gentoo-wiki: http://gentoo-wiki.com/HOWTO_Beagle



The following is kept here for in the meanwhile just in case something goes wrong :wink: :


This guide is inspired by the beagle wiki: http://www.beaglewiki.org/index.php/Installing%20Beagle
bug #67768: https://bugs.gentoo.org/show_bug.cgi?id=67768
and a bit of the french thread: https://forums.gentoo.org/viewtopic.php?t=286104




1. Inotify (optional) and Extended Attributes
First step is optional but recommended for best experience with beagle - It is to compile the kernel with the inotify support (Robert Love's new implementation for notifying user-space about changes to files/dirs). You can thus skip the inotify step of the installation and come back after you are finished installing beagle - just don't skip now the Extended Attributes part - this is required.
If you use gentoo-dev-sources you are good to go, but inotify is not yet in official kernel yet, so if you use vanilla kernel ou need to patch it yourself. For this version of beagle you need at least inotify-0.18, but 0.20 is recommeded... Get if here:
http://www.kernel.org/pub/linux/kernel/people/rml/inotify/v2.6/ (You need the one that matches your kernel)
To manually patch your kernel do something like that:
Code:
# cd /usr/src/linux
# patch -p1 < /path/to/inotify...patch

Once the kernel sources are patched you need to make sure it's configured correctly in menuconfig:
Code:
Device Drivers > Character Devices > [*] Inotify file change notification support.
or
File Systems > [*] Inotify file change notification support

Very important (and NOT optional) is to enable extended attributes for your filesystems:
Code:
File systems >
<*> Second extended fs support
[*]   Ext2 extended attributes

That's for ext2. Do the same for Ext3 or Reiserfs according to your need.
After that compile and install your kernel.
Extended attributes need to be enabled in /etc/fstab too, so you should add the to your filesystem[s] "user_xattr" option, e.g:
Code:
/dev/hda4     /      reiserfs        noatime,notail,user_xattr        0 0

Inotify uses a device node /dev/inotify. In my setup the device node got automatically created for me on boot (using udev). In case you don't find that device node, you might need to automatically create it. This is explained here: http://www.beaglewiki.org/index.php/inotify-Enabled%20Linux%20Kernel#CreateInotifyDevice



2. Download ebuilds
Download the beagle-0.0.8.ebuild from https://bugs.gentoo.org/show_bug.cgi?id=67768 . You also need the file beagle-0.0.8-configure.in.patch from the same bug report. Those two files need to be put in your overlay (Assuming you have one, or know how to configure it). I put it in /usr/local/portage/app-misc/beagle/ but that's only me... Make sure to create a 'files' dir inside the ebuild dir, the patch needs to go in that dir (beagle/files/).
You might need to rename the files you download to represent beagle-0.0.8.1, e.g: beagle-0.0.8.1.ebuild etc...
Next run:
Code:
# ebuild /path/to/beagle-0.0.8.1.ebuild digest

You also might want the evolution-sharp ebuild (needed for the 'eds' USE flag) - you can download it from https://bugs.gentoo.org/show_bug.cgi?id=79300 . Place it in /usr/local/portage/dev-dotnet/evolution-sharp/ and digest it:
Code:
# ebuild /usr/local/portage/dev-dotnet/evolution-sharp/evolution-sharp-0.6 digest




3. Unmask packages and emerge Beagle
Before you can actually emerge beagle, you still need to make sure all dependencies are unmasked.
The most important package is mono. Mono has two branches, stable and development. As of the latest version, the mono team recommends the development release (1.1.5) over the stable (1.0.6), and I suggest you follow that recommendation - I had great results with that release. If you want to use mono-1.0.6 after all just put in /etc/portage/package.keywords something like:
Code:
dev-lang/mono ~x86

If you want to go with 1.1.5 you also need to add to /etc/portage/package.unmask the following:
Code:
dev-lang/mono

Because for now mono-1.1.5 is hard masked. (No reason to be afraid though... :) )
Also important is to unmask dbus so you use the latest version of it in portage, so add to /etc/portage/package.keywords:
Code:
sys-apps/dbus ~x86

The easiest way to find out what other packages need to be unmasked in /etc/portage/package.keywords is to run:
Code:
# emerge -av app-misc/beagle

And see what ebuilds that are needed are masked. then just add those to /etc/portage/package.keywords with a line such as:
Code:
app-misc/beagle ~x86
dev-dotnet/evolution-sharp ~x86
sys-apps/dbus ~x86
etc...

Also you need to add to your USE flags: "mono" and "dbus", and optionally "eds" too.
Continue to unmask all packages until you are finally ready to emerge beagle.



4. Restart system
If you haven't done so yet, it's probably time to restart your system, so the recompiled kernel gets loaded, as well as the filesystem mounted with extended attributes support. DBUS has two daemons: a system daemon and a session daemon. To have the system daemon started add its init script to the default runlevel (if you haven't already done so):
Code:
# rc-update add dbus default

The latest dbus ebuilds take care of automatically starting the DBUS session daemon when you log in to your session. (I'm removing now my instructions on manually getting it to work...)
NOW you are ready to restart your machine! Good luck!



5. Running Beagle
Now we are ready to launch beagle itself, which is a daemon that indexes your files/data and allows searching through. Generally it should be running all the time. I suggest that for a start you run beagle in the foreground to see that it works OK:
Code:
$ beagled --fg --debug

If you receive an error here and beagled quits, it is possible that either dbus is not running, your environment is not set correctly, Inotify is not installed or extended attributes are not setup.
To check if dbus is running:
Code:
$ ps ax|grep dbus

that should output something like:
Code:
10453 ?        Ss     0:00 /usr/bin/dbus-daemon-1 --system
17518 ?        Ss     0:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session
18655 pts/2    S+     0:00 grep dbus

So you can see that both the system DBUS daemon and the user session daemon are running.

To check if environment is set correctly:
Code:
$ export|grep DBUS

This should output the something like (but not the same as):
Code:
declare -x DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-pfX5xlSlMV"

To check if Inotify is enabled and working just look if you got a /dev/inotify.
To check if extended attributes are used run:
Code:
$ mount

and check to see in the output user_xattr set on your filesystem[s]:
Code:
/dev/hda3 on / type reiserfs (rw,noatime,notail,user_xattr)

If the beagle daemon seems to run fine, you can just run it with:
Code:
$ beagled

The daemon will fork and start indexing your data. This takes a bit of time. You can monitor what the daemon is doing/indexing by running:
Code:
$ beagle-status

Once everything works correctly you might consider adding beagled to your Gnome session. In the gnome-session preferences dialog add 'beagled' to the list of "Startup Programs" (The third tab).



6. Using Beagle
Now that dbus and beagle are running you have two ways to perform a beagle search. one is through the command line tool:
Code:
$ beagle-query search_term

Running that should return the files that match your search_term.
The other way is through the 'best' tool which is a GTK+ GUI. Run the command:
Code:
$ best

Once it's running, pressing on F12 will show the search window, through which you perform the search.
Both methods talk to the beagle daemon through DBUS, so you have to make sure that on the console or terminal where you run them you have the proper environment setting needed for DBUS to work. You can check this according to the instructions mentioned earlier in step 5.



7. Firefox Extension
Another feature you can easily add to Beagle, is the option to index the webpages you visit in Firefox. This is done through a Firefox extension that comes with Beagle. Once you install the extension and enable it through Firefox, beagle will index the webpages you visit, and will then return results about webpages mayching your search term.
To install the extension open a Firefox window, and put in the address bar:
Code:
file:///usr/share/beagle/beagle.xpi

Press Enter and you will be prompted to install the extension. After that you will need to restart Firefox, and then in the Extensions window (from the Tools menu), you can change the Beagle extension's options (enable it...). A small beagle icon will appear on the status bar, bottom right, of Firefox, which allows you to quicly enable/disable the extension.
Also keep in mind that you will need to have ENV variables of dbus available to Firefox.
The firefox extension is a very nice feature, but I had experience with it slowing my machine and taking up quite a bit of memory. Mono-1.1.5 has many improvements for better memory consumtion, so that's the major reason to use it. Be warned...


It is suggested that you remove your whole index when upgrading beagle, because beagle is in early stages, and index might not be compatible across different versions. This is done by:
Code:
$ rm -r .beagle/







GOOD LUCK !!!



Many thanks to Kai Zimmermann who posts and maintains the beagle ebuild in bug #67768.




P.S
Keep in mind that beagle is very experimental yet and might not work or be easy to install and use. Also the ebuild we use from bug #67768 is new, and still under heavy development. It still doesn't include many features of beagle available through plugins. You might want to keep an eye on that bug report for updates and/or fixes to the beagle ebuild, as well as on other beagle related web-pages, some of which were mentioned here... :wink:


Last edited by fuoco on Fri Apr 08, 2005 11:44 pm; edited 26 times in total
Back to top
View user's profile Send private message
mileswu
n00b
n00b


Joined: 02 Feb 2005
Posts: 23
Location: UK

PostPosted: Wed Feb 02, 2005 3:45 pm    Post subject: Mono problem Reply with quote

Apparently if you get this bug in BEST:

Code:
Unhandled Exception: System.NullReferenceException: A null value was found where an object instance was required.
in (unmanaged) (wrapper managed-to-native) Gtk.Application:gtk_main ()
in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main ()
in <0x00007> Gtk.Application:Run ()
in <0x00007> Gnome.Program:Run ()
in [0x0007f] (at /var/tmp/portage/beagle-0.0.5/work/beagle-0.0.5/Best/Best.cs:92) Best.Best:Main (string[])


It is a problem in Mono 1.0. Apparently it is fixed in mono 1.1

See this bug
Back to top
View user's profile Send private message
Mon
n00b
n00b


Joined: 17 Jul 2003
Posts: 34
Location: The Netherlands

PostPosted: Wed Feb 02, 2005 5:04 pm    Post subject: Reply with quote

I run the deamon with: beagled --fg --debug
after finding some .desktop files and bringing the load up to at least 25, the deamon just seems to crash:

(More DEBUG .desktop files found)
DEBUG: + file:///usr/share/applications/gnome-search-tool.desktop
Killed

Just saying "killed" doesn't mean much to me. Can anyone help figure this out?

edit:
I think Mono is the evildoer. It takes all of my ram (512M + 256M Sw) and then the thing just gets killed:
(dmesg) Out of Memory: Killed process 16039 (mono).
I think i'll emerge the latest mono version and try again, after that i'm out of idea's.
Back to top
View user's profile Send private message
mileswu
n00b
n00b


Joined: 02 Feb 2005
Posts: 23
Location: UK

PostPosted: Wed Feb 02, 2005 6:34 pm    Post subject: Reply with quote

You need to get a mono 1.1 ebuild (there aren't any anywhere). I am just emerging it with my own ebuild now.

I will post it if it works.
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Wed Feb 02, 2005 10:28 pm    Post subject: Reply with quote

Oops, sorry guys, my mistake, forgot to mention that Beagle-0.0.5 needs version 0.17 of the Inotify patch. (For CVS you need version 0.18 )
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Wed Feb 02, 2005 11:14 pm    Post subject: Reply with quote

I fixed and updated a few things in the guide. It should be even easier now...
I would like to know if anyone has tried it and how good/bad was/is his/hers experience :)

mileswu: I'm happily using mono-1.0.4-r1 from portage...

Mon: are you by any chance using beagle-0.0.5 with Inotify patch version 0.18?
Back to top
View user's profile Send private message
neotyk
n00b
n00b


Joined: 23 Mar 2004
Posts: 37
Location: Mind?

PostPosted: Thu Feb 03, 2005 1:00 am    Post subject: no success Reply with quote

Hi,
Have no success in running beagle.
I use 2.6.10-nitro4 no mm patches

And get this error:
Quote:
huberti@lary huberti $ beagle-query test
The query failed with error:

DBus.DBusException: Message did not receive a reply
in [0x0005d] (at /var/tmp/portage/dbus-0.23-r1/work/dbus-0.23/mono/Message.cs:205) DBus.Message:SendWithReplyAndBlock ()
in <0x0007c> Beagle.Factory.Proxy:NewQueryPath ()
in [0x00005] (at /var/tmp/portage/beagle-0.0.5/work/beagle-0.0.5/BeagleClient/Factory.cs:52) Beagle.Factory:NewQuery ()
in [0x00005] (at /var/tmp/portage/beagle-0.0.5/work/beagle-0.0.5/tools/Query.cs:160) QueryTool:Main (string[])

free(): invalid pointer 0x81ab000!


Thanks in advance,
Hubert.
_________________
yes, yes, no, no
[img:5b0d5ae295]http://jobble.uaznia.net/images/antypixel/Jobblemap.png[/img:5b0d5ae295]
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Thu Feb 03, 2005 6:30 am    Post subject: Reply with quote

neotyk: Do you get this also on other commands like, beagle-ping or beagle-shutdown ?
Are you sure the terminal from which you run these commands have the correct ENV variables exported? (check with export|grep DBUS)
By any chance do you run an NPTL system (glibc)? If you do make sure mono is compiled with NPTL too...
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Thu Feb 03, 2005 6:38 am    Post subject: Reply with quote

Hey - Looks like the Beagle Wiki now has a link to our guide:

http://www.beaglewiki.org/index.php/Installing%20Beagle

Look for GENTOO on that page :)
Back to top
View user's profile Send private message
Mon
n00b
n00b


Joined: 17 Jul 2003
Posts: 34
Location: The Netherlands

PostPosted: Thu Feb 03, 2005 9:46 am    Post subject: Reply with quote

fuoco wrote:

Mon: are you by any chance using beagle-0.0.5 with Inotify patch version 0.18?

I'm using the latest Nitro-sources https://forums.gentoo.org/viewtopic.php?t=287962
I'm still trying to find out what version of inotify was merged in this kernel. The nitro dev's haven't said anything so far, and looking into the inotify source files didn't get me any further either.

Perhaps you know of an easy way to find it out?
Back to top
View user's profile Send private message
mileswu
n00b
n00b


Joined: 02 Feb 2005
Posts: 23
Location: UK

PostPosted: Thu Feb 03, 2005 10:09 am    Post subject: Reply with quote

What version patch of inotify is in the gentoo-dev kernel 2.6.10-r6?
Back to top
View user's profile Send private message
mileswu
n00b
n00b


Joined: 02 Feb 2005
Posts: 23
Location: UK

PostPosted: Thu Feb 03, 2005 10:11 am    Post subject: Reply with quote

Mono 1.1 doesn't seem to help my problem with best. Any ideas anyone? Does everyone elses work?
Back to top
View user's profile Send private message
ralph
Advocate
Advocate


Joined: 02 Mar 2003
Posts: 2001
Location: Hamburg

PostPosted: Thu Feb 03, 2005 10:31 am    Post subject: Reply with quote

mileswu wrote:
What version patch of inotify is in the gentoo-dev kernel 2.6.10-r6?

AFAIK it's inotify-0.17, so it should work with beagle-0.0.5, but not with the current cvs.
_________________
The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows.
- Frank Zappa
Back to top
View user's profile Send private message
neotyk
n00b
n00b


Joined: 23 Mar 2004
Posts: 37
Location: Mind?

PostPosted: Thu Feb 03, 2005 11:53 am    Post subject: Reply with quote

fuoco wrote:
neotyk: Do you get this also on other commands like, beagle-ping or beagle-shutdown ?
Are you sure the terminal from which you run these commands have the correct ENV variables exported? (check with export|grep DBUS)
By any chance do you run an NPTL system (glibc)? If you do make sure mono is compiled with NPTL too...

beagle-ping: same error
beagle-shutdown: same error
Environ is OK.
I run NPTL system, couldn't get mono to compile with nptl.
I'll try to emerge mono with nptl again.

Thanks,
H.

-- edit
Building mono-1.0.5-r3 with nptl support, but first gcc 3.4.3..20050110
_________________
yes, yes, no, no
[img:5b0d5ae295]http://jobble.uaznia.net/images/antypixel/Jobblemap.png[/img:5b0d5ae295]
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Thu Feb 03, 2005 5:00 pm    Post subject: Reply with quote

neotyk: I strongly believe that your problem is caused by your mono not being compiled with nptl. In order to compile mono with nptl you need gcc-3.4. If you use gcc-3.3.5 like I do, all you need to do is unmask the gcc package as well as its deps, i think stdc++v3 or something like that. Then use gcc-config to switch to gcc-3.4 and compile mono (be careful, there could be deprecated CFLAG, like -mcpu which becomes -mtune in gcc-3.4).
After compiling mono (with the nptl USE flag and gcc-3.4) you can use again gcc-config to revert back to gcc-3.3.5 or whatever you want, because they install in seperate slots. I hope that helps, I already saw your problem on one machine and nptl-mono was the problem...

mileswu: I have beagle working perfectly (ok, well it's still under development but yet) and I only use mono-1.0.4-r1 from portage. And so: yes it works for me and for some others too :) Good luck!

The rest: I'm sorry, I don't know of an easy way to find out what is the patch that your sources use. I tend to always use vanilla-sources and patch it myself - exactly because I like to know what I put in it :) . I will try to find an answer for you though... :)


Last edited by fuoco on Thu Feb 03, 2005 5:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
Schmolch
l33t
l33t


Joined: 16 Jun 2002
Posts: 746
Location: Germany

PostPosted: Thu Feb 03, 2005 5:39 pm    Post subject: Reply with quote

Im using reiser4 which has no extended attribute option in the kernel-config (2.6.10-nitro4).
Therefore i get this error when starting the beagle-daemon:
Code:

INFO: Starting Beagle Daemon (version 0.0.5)
DEBUG: Command Line: /usr/lib/beagle/BeagleDaemon.exe --fg --debug
FATAL: Could not set extended attributes on a file in your home directory.  See http://www.beaglewiki.org/index.php/Enable%20Extended%20Attributes for more information.


is there anything i can do?
Back to top
View user's profile Send private message
fuoco
Guru
Guru


Joined: 23 May 2004
Posts: 386
Location: Israel

PostPosted: Thu Feb 03, 2005 5:52 pm    Post subject: Reply with quote

Schmolch: as far as i know there's no way right now to use beagle with reiser4, because reiser4 has no support in extended attributes. Instead it has a different system which is not supported for now...
You can right a patch to beagle to make it work if you want :)
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Thu Feb 03, 2005 6:12 pm    Post subject: Reply with quote

Code:
mileswu: I have beagle working perfectly (ok, well it's still under development but yet) and I only use mono-1.0.4-r1 from portage. And so: yes it works for me and for some others too Smile Good luck!


mileswu: yup, i got it working as well. there's some memory consumption issues, so long term usage is still an issue, but i did get it up and running.
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
mileswu
n00b
n00b


Joined: 02 Feb 2005
Posts: 23
Location: UK

PostPosted: Thu Feb 03, 2005 6:23 pm    Post subject: Reply with quote

Some headway is being made over at Gnome's bugzilla.
See Bug Report

So. I guess I have got just to sit back and wait...
Back to top
View user's profile Send private message
Mon
n00b
n00b


Joined: 17 Jul 2003
Posts: 34
Location: The Netherlands

PostPosted: Thu Feb 03, 2005 7:13 pm    Post subject: Reply with quote

fuoco wrote:

Mon: are you by any chance using beagle-0.0.5 with Inotify patch version 0.18?

I just found out: yes i do. Is that a problem or should it work?

sog wrote:

mileswu: yup, i got it working as well. there's some memory consumption issues, so long term usage is still an issue, but i did get it up and running.

Just wondering: how much mem and swap do you have?
Back to top
View user's profile Send private message
spijon
Tux's lil' helper
Tux's lil' helper


Joined: 22 Dec 2003
Posts: 148
Location: Ukraine, Kiev

PostPosted: Thu Feb 03, 2005 7:31 pm    Post subject: 2.6.10-ck5 sources Reply with quote

i am using 2.6.10-ck5 sources and it seems there is no INOTIFY in there :?
Code:
# cat .config | grep -i notif
CONFIG_DNOTIFY=y

Are there some patches for enabling INOTIFY, or may be you could advice some better kernel?
Back to top
View user's profile Send private message
Mon
n00b
n00b


Joined: 17 Jul 2003
Posts: 34
Location: The Netherlands

PostPosted: Thu Feb 03, 2005 7:32 pm    Post subject: Re: 2.6.10-ck5 sources Reply with quote

spijon wrote:
i am using 2.6.10-ck5 sources and it seems there is no INOTIFY in there :?
Code:
# cat .config | grep -i notif
CONFIG_DNOTIFY=y

Are there some patches for enabling INOTIFY, or may be you could advice some better kernel?


mm-sources or nitro-sources afaik.
Back to top
View user's profile Send private message
spijon
Tux's lil' helper
Tux's lil' helper


Joined: 22 Dec 2003
Posts: 148
Location: Ukraine, Kiev

PostPosted: Thu Feb 03, 2005 7:59 pm    Post subject: Reply with quote

where can one get that nitro-sources? seems there is no standart ebuild :roll:
Back to top
View user's profile Send private message
neotyk
n00b
n00b


Joined: 23 Mar 2004
Posts: 37
Location: Mind?

PostPosted: Thu Feb 03, 2005 8:55 pm    Post subject: Reply with quote

spijon wrote:
where can one get that nitro-sources? seems there is no standart ebuild :roll:

If you use OVERLAY go for gentoo.de repo, or simply download rom gentoo.de nitro-sources.
_________________
yes, yes, no, no
[img:5b0d5ae295]http://jobble.uaznia.net/images/antypixel/Jobblemap.png[/img:5b0d5ae295]
Back to top
View user's profile Send private message
neotyk
n00b
n00b


Joined: 23 Mar 2004
Posts: 37
Location: Mind?

PostPosted: Thu Feb 03, 2005 8:58 pm    Post subject: NPTL systems Reply with quote

In order to get beagle work in NPTL enabled system you need mono with NPTL support.
Works for me!!! :D
_________________
yes, yes, no, no
[img:5b0d5ae295]http://jobble.uaznia.net/images/antypixel/Jobblemap.png[/img:5b0d5ae295]
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3 ... 14, 15, 16  Next
Page 1 of 16

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum