SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Github Development (http://forums.sagetv.com/forums/forumdisplay.php?f=53)
-   -   FreeBSD Port (http://forums.sagetv.com/forums/showthread.php?t=62629)

ptoal 10-27-2015 06:34 AM

FreeBSD Port
 
So, I've started to try to port the server to FreeBSD, so I can run it on my FreeNAS server. Since OSX is BSD based, there are some nice hints along the way. :)

So far, I have got the Sage.jar to build, but it's not running, because I haven't got all my natives sorted yet.

I've run into a problem with the Sage IVTV code. the Sage.jar seems to require it, but I don't know if it really provides value on FreeBSD. There's work to emulate V4L, but I will be using "HDHomerun Connect"s exclusively, so I don't really need it.

Therefore, the question to those in the know is: Is my time better spent trying to get the IVTV libs to compile, or to try to modify the java code to decouple the dependency?

stuckless 10-27-2015 07:23 AM

I wonder if you'd have more success if you ran a Docker container for SageTV on your FreeNAS server?

https://wiki.freebsd.org/Docker

ptoal 10-27-2015 07:38 AM

Quote:

Originally Posted by stuckless (Post 579413)
I wonder if you'd have more success if you ran a Docker container for SageTV on your FreeNAS server?

https://wiki.freebsd.org/Docker

I had considered it, but FreeNAS is currently running on FreeBSD 9.3. FreeNAS is concerned more with stability than anything else. Also, Docker is still rather experimental on BSD.

So my current approach is probably best. As far as I can tell, there isn't a ton of native code for the server portion? So far, it's mostly #ifdef's and Makefile modifications. In the IVTV code, though, there's a bunch of non-portable recursive thread locking that will take some time to figure out.

Fuzzy 10-27-2015 09:39 AM

Quote:

Originally Posted by ptoal (Post 579414)
I had considered it, but FreeNAS is currently running on FreeBSD 9.3. FreeNAS is concerned more with stability than anything else. Also, Docker is still rather experimental on BSD.

So my current approach is probably best. As far as I can tell, there isn't a ton of native code for the server portion? So far, it's mostly #ifdef's and Makefile modifications. In the IVTV code, though, there's a bunch of non-portable recursive thread locking that will take some time to figure out.

Unfortunately, there's no 'difference' between the server and the client, regarding the actual compilation, just the configuration at launch makes the difference. Because of that, all the 'native' ties for the client (IR input, video decoding, etc) are rolled into a server build as well. Separating them apart would be a big undertaking. I have started looking at what it would take to move as much as possible to pure java, so that a 'lite' server could be built, and it's daunting (for me at least). My reasoning was to be able to make a 64-bit server build 'easier' than having to have all 64-bit native libraries as well.

ptoal 10-27-2015 11:57 AM

Running
 
Well, I managed to cobble enough things together that the service runs on FreeBSD. I ran into some ugly problems with the PVR150/250 support, so just disabled them in my Sage.properties. I won't be using them anyway.

I had an issue with my Placeshifter connecting, but that was actually an issue with a missing native library, which I fixed. So now, I can actually connect to the server, too... W00t! :)

The only major stumbling block I have right now is that the HDHomerun natives exploded all over the place when I tried to build them. Might be a simple issue, like the other things I've run into, but I've spent all the time I have for now. Maybe try again in a day or two.

ptoal 10-27-2015 12:26 PM

Github Fork
 
If anyone is interested in following along, you can pull my forked repo, and checkout the FreeBSD branch.

https://github.com/ptoal/sagetv/tree/FreeBSD

ptoal 10-29-2015 07:39 PM

It's Alive!
 
Finally got the HDHomeRun2.0 module to compile, and Ho-lee-cow, it seems to be working! :)

MoePat 03-29-2016 12:06 PM

Any Progress?
 
I would really like to see this work. Any more progress getting Sage to run under FreeNAS? Or even just FreeBSD?

Scott

ptoal 03-29-2016 12:15 PM

Quote:

Originally Posted by MoePat (Post 586905)
I would really like to see this work. Any more progress getting Sage to run under FreeNAS? Or even just FreeBSD?

Scott

Actually, I have had Sage running in a Jail on my FreeNAS for 3+ months now. It's been rock solid.

Unfortunately, a few of the changes I made were in haste, and really should have been made with more care to integration back into the main SageTV fork.

You're the first person that has commented on this in the nearly 5 months since I posted this, so I don't think there's a lot of interest in the FreeBSD port. I basically got things working for myself, and left my forked repo up for anyone to do with as they please. I don't really need any future features, I just needed to get rid of the old machine that was in my basement. Unfortunately, I don't have time to do a lot more than I already have.

KJake 04-01-2016 04:43 PM

Wanna comment that this is cool! My FreeNAS box is running two jails already, so once I upgrade the hardware a bit - I will be looking at this!

ex-tivoman 04-06-2016 10:18 AM

Ditto, this is a cool port
 
Once I have fully moved from v7 on WHS to OSS 9 on Linux(using FREENAS as my storage volume) I will then look at this to cut the Linux component out.

So please post any new/interesting problems and solutions.

Don't let this thread die.


All times are GMT -6. The time now is 03:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.