Koozali.org formerly Contribs.org

MythTV - AMAZING!

duncan

MythTV - AMAZING!
« Reply #30 on: January 05, 2007, 08:26:17 AM »
Quote from: "meanpenguin"
Duncan,

Would you mind posting the MythWeb portion on this board.

Thanks,
Ed


This should work. I am assuming you have created an ibay called mythweb and copied the mythweb contents into it. Adjust accordingly.

You will need to create a custom template

Code: [Select]
# mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
# pico 99mythweb


And past in the following

Code: [Select]
<Directory /home/e-smith/files/ibays/mythweb/html>
    php_admin_flag      allow_url_fopen on
</Directory>


We allow htaccess

Code: [Select]
# /sbin/e-smith/db accounts setprop mythweb AllowOverride All
# /sbin/e-smith/signal-event ibay-modify mythweb


edit the mythweb .htaccess file and add

Code: [Select]
Options FollowSymlinks

Towards the bottom of the file where it says "RewriteEngine  on". Whilst in this file uncomment the line

Code: [Select]
#    RewriteBase    /mythweb

And save (ctrl x). Do a

Code: [Select]
# chown -R www.www *

inside your mythweb directory.

Hopefully thats all thats needed.

cl

MythTV - AMAZING!
« Reply #31 on: March 25, 2007, 09:31:54 AM »
Hi duncan, just wondering if you still have the mythtv howto online in some form? (tried the link from your earlier post but it failed)

Thanks...

duncan

MythTV - AMAZING!
« Reply #32 on: March 26, 2007, 01:52:50 AM »
Quote from: "cl"
Hi duncan, just wondering if you still have the mythtv howto online in some form? (tried the link from your earlier post but it failed)

Thanks...


Just migrating servers at the moment. Will put it up this afternoon.

duncan

MythTV - AMAZING!
« Reply #33 on: March 26, 2007, 10:22:25 AM »

MythTV - AMAZING!
« Reply #34 on: May 06, 2007, 08:48:57 AM »
Sorry for a dumb question: I'm trying to get a MythTV backend working on sme 7.1.3. All's well so far thanks to the howto's in this thread. The backend has a PVR500, which I believe needs "ivtv" installed to work. When I try to install ivtv, I get the error below about missing kernel headers:

Code: [Select]

# yum install ivtv --enablerepo atrpms
...
---> Package ivtv-firmware.noarch 2:20070217-13.at set to be updated
---> Downloading header for kernel to pack into transaction set.
http://mirror.contribs.org/smeserver/releases/7/smeos/i386/RPMS/kernel-2.6.9-42.0.3.EL.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
...
Error: failure: RPMS/kernel-2.6.9-42.0.3.EL.i686.rpm from smeos: [Errno 256] No more mirrors to try.
================================================================
No new rpms were installed. No additional commands are required.


Where can I find the headers from my kernel: 2.6.9-42.0.10.ELsmp ?
Or is there a better way to go about this?
Or is there a dependency definition problem in ivtv? (I noticed the URL below does exist with an extra 'CentOS' in the path...)
Code: [Select]

http://mirror.contribs.org/smeserver/releases/7/smeos/i386/CentOS/RPMS/kernel-smp-2.6.9-42.0.3.EL.i686.rpm


Thanks!
Dan

PS: I tried: yum install kernel-devel, and: yum install kernel-smp-devel, but still getting the same error installing ivtv.

More Info: I started installing the ivtv deps by themselves using yum. Then I tried installing the ivtv-kmdl for my current kernel via:

Code: [Select]

# uname -r
2.6.9-42.0.10.ELsmp
# yum install ivtv-kmdl-2.6.9-42.0.10.ELsmp


That seems to have worked...on to the next silly mistake. Sorry for the noise.

duncan

MythTV - AMAZING!
« Reply #35 on: May 06, 2007, 12:57:48 PM »
Hi - I run a PVR500. IVTV will not build with that kernel. 2.6.15 is the minimum.

You will need to build a new kernel from source.

MythTV - AMAZING!
« Reply #36 on: May 06, 2007, 06:16:54 PM »
So far I've been lucky: I didn't have to build ivtv from source, but was able to install an ivtv-kmdl for my stock sme kernel from atrpms via:
Code: [Select]

# uname -r
2.6.9-42.0.10.ELsmp
# yum install ivtv-kmdl-2.6.9-42.0.10.ELsmp


Not sure if it was required to do each alone, but before doing the above, I installed the ivtv dependencies listed in the failed "yum install ivtv" like:
Code: [Select]

# yum install ivtv-firmware-audio
...


Also, for other newbies like myself, don't forget to do:
Code: [Select]

# modprobe ivtv

after installing "ivtv-kmdl-<your kernel version>", "ivtv", and all it's deps. I haven't yet verified/figured out how to ensure this kernel module is always loaded when the box reboots. (next on my todo probably...)

One other tidbit: Turns out, in order to do commercial flagging on the backend, you also need to install a small frontend package:
Code: [Select]

# yum install mythtv-frontend --enablerepo atrpms

This is required since most all the myth functions can run either on the backend or a frontend. Even though the package naming is a little counter intuitive, it all seems to work. (for details, see: http://lists.atrpms.net/pipermail/atrpms-users/2006-October/006086.html ).

To summarize, so far, the myth packages needed for my sme backend are: "mythtv-backend", "mythtv-frontend" and "mythtv-setup".

duncan

MythTV - AMAZING!
« Reply #37 on: May 07, 2007, 12:50:05 AM »
Nice one. Just watch out for kernel updates via the Software installer. It will kill both IVTV and X.

MythTV - AMAZING!
« Reply #38 on: May 07, 2007, 12:59:03 AM »
Thanks Duncan. Your HowTo was a great help (and I've tried to post comments there where appropriate).

I'm still stuck figuring out the last of two myth tasks:

1. How to properly load the ivtv module on startup.
2. How to properly start the mythbackend service on startup.

I banged around in the dev manual and tried mucking with mopprobe.conf, but that's were my luck ran out. My current workaround is some nasty creation of symlinks in rc.d and adding even nastier code to the mythbackend startup script to load and sleep while ivtv loads before starting mythbackend. If anyone has a "right" way to do these, please post!

Dan

duncan

MythTV - AMAZING!
« Reply #39 on: May 07, 2007, 01:12:52 AM »
Quote from: "bhamail"
Thanks Duncan. Your HowTo was a great help (and I've tried to post comments there where appropriate).

I'm still stuck figuring out the last of two myth tasks:

1. How to properly load the ivtv module on startup.
2. How to properly start the mythbackend service on startup.

I banged around in the dev manual and tried mucking with mopprobe.conf, but that's were my luck ran out. My current workaround is some nasty creation of symlinks in rc.d and adding even nastier code to the mythbackend startup script to load and sleep while ivtv loads before starting mythbackend. If anyone has a "right" way to do these, please post!

Dan


Well - regarding ivtv - try doing a modprobe -a to see if that adds it to modules.dep. I have not needed to do anything out of the ordinary to get ivtv to load.

I have an init script for loading mythbackend if you want it.

I really should finish my howto  :)  Happy it helped.

MythTV - AMAZING!
« Reply #40 on: May 07, 2007, 03:56:32 AM »
I tried modprobe -a and made sure ivtv was listed in: /lib/modules/2.6.9-42.0.10.ELsmp/modules.dep

Unfortunately, after a reboot the ivtv module is still not loaded (checking via lsmod), which results in the PVR not being recognized. (Not s show stopper 'cause my kludge works, but I'd like to know the "right" way to do it if possible).

Yes, please do share your init script for mythbackend.

Offline slords

  • ****
  • 235
MythTV - AMAZING!
« Reply #41 on: May 07, 2007, 04:54:36 PM »
I've added the following for modprobe.conf

Code: [Select]
[root@router ~]# cat /etc/e-smith/templates-custom/etc/modprobe.conf/10ivtv
{
    foreach my $line
        (
            "alias char-major-81 videodev",
            "alias char-major-81-0 ivtv",
        )
    {
        unless (exists $lines{$line})
        {
            push @lines, $line;
        }
    }
    "";
}


And I have the following code for the mythbackend service.  The service directory also has a down file and a log directory similar to other runit services.

Code: [Select]
[root@router ~]# cat /var/service/mythbackend/run
#!/bin/sh

exec 2>&1

if ! [[ -r /dev/video ]]
then
    modprobe ivtv
    c=1
    until [[ -r /dev/video || "$c" -gt 30 ]]
    do
        sleep 2
        c=$((c+1))
    done
    sleep 10
fi
exec /usr/bin/mythbackend
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -- Rich Cook

MythTV - AMAZING!
« Reply #42 on: June 22, 2007, 04:44:37 AM »
Thanks for the script, but I'm sure I'm doing a dumb noobie trick, 'cause I can't seem to get the script to run at startup.

I didn't add the modprobe.conf part because I'm not sure how it should be adapted for my pvr-500 card (which has two tuners).

I did create the "run" file in /var/service/mythbackend (and did chmod +x on it). I also copied the "down" file and "log" dir from the "sshd" tree. I modified the log/run file to:

Code: [Select]
#!/bin/sh

exec                                    \
    /usr/local/bin/multilog t s5000000  \
    /var/log/mythtv


I'm pretty sure I have missed some core step needed to get the service to start. (I did try rtfm'ing the dev docs, but I'm sorry to say I'm still a bit confused). Any pointers?

Thanks again,
Dan

MythTV - AMAZING!
« Reply #43 on: June 22, 2007, 05:39:40 AM »
Code: [Select]
Well darn, I guess I just needed to re-rtfm. ;)

Here are the steps I took to get the mythbackend loading at startup (afer re-re-reading the dev docs at: http://mirror.contribs.org/smeserver/contribs/gordonr/devguide/html/x2105.htm
 "Starting up programs automatically upon system boot"). Please sound any alarms if I'm doing something really bad.

1. Create the modprobe.conf file posted by slords (edited for the second tuner on my pvr-500):
[code]
{
    foreach my $line
        (
            "alias char-major-81 videodev",
            "alias char-major-81-0 ivtv",
            "alias char-major-81-1 ivtv",
        )
    {
        unless (exists $lines{$line})
        {
            push @lines, $line;
        }
    }
    "";
}
2. Create the "run" file posted by slords:
Code: [Select]
# mkdir /var/service/mythbackend
# cd /var/service/mythbackend
# vi run
and paste in the content of that file and save it. Then:
Code: [Select]
# chmod +x run3. Copy the "log" dir and "down" file from sshd into this dir (will edit later):
Code: [Select]
# cp -R /var/service/sshd/log /var/service/mythbackend/
# cp /var/service/sshd/down /var/service/mythbackend/
4. Edit "/var/service/mythbackend/log/run" to contain the lines below as per my prior post.
Code: [Select]
#!/bin/sh

exec                                    \
    /usr/local/bin/multilog t s5000000  \
    /var/log/mythtv
5. Reread the above referenced dev docs. Create the link in rc7, props, db:
Code: [Select]
# ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99mythbackend
# cd /etc/e-smith/db/configuration/defaults/
# mkdir mythbackend
# cd mythbackend/
# echo service >type
# echo enabled >status
# /etc/e-smith/events/actions/initialize-default-databases
When I rebooted (via "Reconfigure" from the server-manager pages), mythtv came up, but apparently the ivtv module didn't load. Any suggestions on how to get /var/services/mythbackend to run?

Dan

PS: I think I figured out why my "stock" kernel worked so nicely with ivtv: It ain't a stock kernel! -- There's apparently a yum conf bug in the 7.1.3 release which causes a non-sme repo to be enabled immediately after installation. Since I ran a yum update right after I installed, I think I ended up with a newer CentOS kernel. Later yum updates fix the yum conf (and the repo gets disabled...I think).[/code]


Aug - 26

PPS: I guess my good luck had to run out some time...SME and MythTV have been rock solid, but now, due to DataDirect/SchedulesDirect changes (the old source of listings is going dark Sept 1), I think I'm gonna have to muck with a perfectly fine installation to get the schedule data from the new source (SchedulesDirect). I guess the good news is hopefully, atrpms will have released binaries for this stuff soon, but in the mean time -- If anyone out there has some steps on how to update Myth/XMLTV/whatever else is needed, please respond. I haven't seen any howto's yet, so even if the response is s link to a CentOS/Myth howto, I'd appreciate it. Thanks again.
« Last Edit: August 26, 2007, 07:01:08 AM by bhamail »