Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305813 - Request for ebuild: preyproject
Summary: Request for ebuild: preyproject
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Markos Chandras (RETIRED)
Depends on:
Reported: 2010-02-19 01:32 UTC by Denilson Sá Maia
Modified: 2011-09-19 16:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---

prey-0.3.73.ebuild (prey-0.3.73.ebuild,2.31 KB, text/plain)
2010-07-15 05:59 UTC, Thomas Kear
files/prey.cron (prey.cron,43 bytes, text/plain)
2010-07-15 06:00 UTC, Thomas Kear
prey-0.3.73-functions.diff (prey-0.3.73-functions.diff,615 bytes, patch)
2010-07-15 06:01 UTC, Thomas Kear
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denilson Sá Maia 2010-02-19 01:32:04 UTC
"Prey helps you locate your missing laptop by sending timed reports with a bunch of information of its whereabouts."

Although I haven't installed it yet, the installation seems pretty simple: just unpack everything at the /usr/share/prey, then add a cronjob.

From the README file, these are the requirements:
 o curl / wget
 o scrot or imagemagick (for screenshot capture)
 o streamer (for webcam capture) --> in Fedora the xawtv package includes it
 o Perl libs IO::Socket::SSL and NET::SSLeay

Looking through the sources, it requires bash.
There is a that requires pygtk, but you can write your config file manually.

It seems that the webcam module always write to the /tmp/imagen.jpeg file, which might be a security issue (it should use a random, non-existent tmp file, instead).
Comment 1 Thomas Kear 2010-07-15 05:59:59 UTC
Created attachment 238835 [details]

I've had a shot at writing an ebuild for this - I make no guarantees but this seems to be working for me (some $FILESDIR content to follow in a second).  Hopefully someone finds this useful or will improve on it.

* The option to not install individual modules is provided (perhaps unnecessarily, but I feel the option to disable webcam at least is necessary).
* I have used /etc/cron.d for scheduling instead of root's user crontab, with corresponding change in the re-scheduling code (should work with frequency change via control panel).
* Config is in /etc/prey rather than mixed with core/modules in /usr/share/prey, set fairly restrictive permissions on these.
* LINGUAS removes unwanted core/module language files.
* Main launcher script in /usr/bin (perhaps should be sbin?)

One outstanding issue for me is the mentioned 'streamer' binary gets stuck in an infinite loop after opening the webcam:
ioctl: VIDIOC_DQBUF(index=0;type=VIDEO_CAPTURE;bytesused=0;flags=0x0 [];field=ANY;;timecode.type=0;timecode.flags=0;timecode.frames=0;timecode.seconds=0;timecode.minutes=0;timecode.hours=0;timecode.userbits="";sequence=0;memory=unknown): Invalid argument
I can only assume this is to do with my kernel V4L settings, perhaps others will have better luck (or we can patch it to use an alternative application).  In either case USE=-webcam will ensure it can't get into trouble.
Comment 2 Thomas Kear 2010-07-15 06:00:39 UTC
Created attachment 238837 [details]

Cron.d script
Comment 3 Thomas Kear 2010-07-15 06:01:16 UTC
Created attachment 238839 [details, diff]

Replacement functions to adjust timing in /etc/cron.d/prey.cron rather than root's crontab
Comment 4 Travis Hansen 2010-12-21 21:49:15 UTC
I see .05 is out.  I'd like to help make this pretty as well :)
Comment 5 Brandon Captain 2011-01-14 19:05:42 UTC
needs version bump to 0.5.1

zip package:
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2011-09-19 09:33:39 UTC
I will take it
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2011-09-19 11:58:24 UTC
If someone (user or dev) is willing to co-maintain this ebuild with me please say so
Comment 8 Travis Hansen 2011-09-19 15:13:06 UTC

I have some newer stuff you can use here(although still not current)...;a=tree;f=sys-apps/prey;h=bda208d4708d0389705b7244464baf92a0940a8c;hb=HEAD

They don't release very often so I don't think the maintenance will be much.  I'd be willing to help when possible.  I'm not sure about the latest release, but 5.1 has deps on hal which hopefully has been ripped out in the latest releases.
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2011-09-19 16:24:09 UTC
(In reply to comment #8)
Hi Travis,

I committed an ebuild based on the original one posted here by Thomas and on the one from your git repository. I added you as co-maintainer. Please test the ebuild in portage and let me know if that works for you. It will remain masked for now. contact me by email or open bugs if you need to talk to me about the prey ebuild. Thank you all