[mythtv] Gentoo CVS ebuild
Bruce C. Dillahunty
bdillahu at peachbush.com
Tue Mar 11 22:05:06 EST 2003
We've had some request, so here you go. No promises, and I'm fixing to
be out of town, so questions may be delayed:
----------------
03/08/03
----------------
Started again...
net-setup eth0
manual
192.168.0.50
192.168.1.255
255.255.255.0
192.168.0.1
192.168.0.1
passwd
/etc/init.d/sshd (to run sshd so I can do this remotely)
Create partitions - use LVM
cfdisk
/dev/hda1 /boot 30Mb ext3 (bootable)
/dev/hda2 LVM 50Gb
/dev/hdb1 swap 512Mb
mkswap /dev/hdb1
vgscan
pvcreate (-ff due to this was second time) /dev/hda2
vgcreate mastervg /dev/ide/host0/bus0/target0/lun0/part2
lvcreate -L4000 -nusrlv mastervg
lvcreate -L4000 -nrootlv mastervg
lvcreate -L20000 -nhomelv mastervg
lvcreate -L4000 -nvarlv mastervg
mke2fs -j /dev/mastervg/rootlv
mke2fs -j /dev/mastervg/usrlv
mke2fs -j /dev/mastervg/varlv
mkreiserfs /dev/mastervg/homelv
mke2fs -j /dev/hda1
mkdir /mnt/gentoo
mount /dev/mastervg/rootlv /mnt/gentoo
mkdir /mnt/gentoo/boot
mkdir /mnt/gentoo/home
mkdir /mnt/gentoo/usr
mkdir /mnt/gentoo/var
mount /dev/hda1 /mnt/gentoo/boot
mount /dev/mastervg/homelv /mnt/gentoo/home
mount /dev/mastervg/varlv /mnt/gentoo/var
mount /dev/mastervg/usrlv /mnt/gentoo/usr
swapon /dev/hdb1
Start installing:
cd /mnt/gentoo
tar -xvjpf /mnt/cdrom/gentoo/stage1-x86-1.4_rc3.tar.bz2
mount -o bind /proc /mnt/gentoo/proc
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
# change sync mirror - add:
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
# to /etc/make.conf
emerge sync
export CONFIG_PROTECT="-*"
export USE="-* bootstrap build"
emerge portage
unset USE
Set up the USE flags:
nano -w /etc/make.conf
# This is what first iteration had used
USE="aalib acpi alsa cdr dga directfb dvd fbcon flash gd -gnome
gphoto2 -gpm -gtk imap innodb maildir mysql -nls pda perl pic samba sse
tcltk tiff usb -X xface xml"
# This is what I used last time
USE="-arts -avi -berkdb directfb dvd -encode fbcon -gif -gpm -gtk
-imlib -jpeg -kde -gnome -libg++ -mikmod -motif -mpeg -nls pdflib -qt
-quicktime samba -sdl sse -svga -truetype usb -X -xmms -xv"
# This is what the defaults are
USE="x86 oss 3dnow apm arts avi berkdb crypt cups encode gdbm gif gpm
gtk imlib java jpeg kde gnome libg++ libwww mikmod mmx motif mpeg
ncurses nls oggvorbis opengl pam pdflib png python qt quicktime
readline sdl slang spell ssl svga tcpd truetype X xml2 xmms xv zlib"
# This is what I used
USE="directfb dvd fbcon -gpm imap -gnome -nls samba sse usb"
cd /usr/portage
mkdir /usr/local/portage // If you turn on portage overlay
// you have to create the directory
scripts/bootstrap.sh
# Stage 2
emerge -p system
emerge system
--------
03/09/03
--------
# Stage 3
emerge sync
emerge -up world
emerge -u world
ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime
#Kernel
emerge sys-kernel/gentoo-sources
cd /usr/src/linux
source /etc/profile
make menuconfig
make dep && make clean bzImage modules modules_install
cp /usr/src/linux/arch/i386/boot/bzImage /boot
#Syslog
emerge app-admin/metalog
rc-update add metalog default
#Cron
emerge sys-apps/vcron
rc-update add vcron default
#Disk utils
emerge sys-apps/reiserfsprogs
emerge sys-apps/lvm-user
#LVM setup
lvmcreate_initrd 2.4.20-gentoo-r1
#fstab
nano -w /etc/fstab
#set root passwd
passwd
#set machine hostname
echo XXXXX.XXXXX.com > /etc/hostname
#setup /etc/hosts
nano -w /etc/hosts
#network setup
nano -w /etc/conf.d/net
rc-update add net.eth0 default
rc-update add sshd default
#basic setup
nano -w /etc/rc.conf
#bootloader
emerge grub
grub
root (hd0,0)
setup (hd0)
quit
cd /boot/grub
nano -w grub.conf
default 0
timeout 15
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,0)
kernel (hd0,0)/boot/bzImage root=/dev/mastervg/rootlv
initrd=/boot/initrd-lvm-2.4.20-gentoo-r1.gz
ln -s /boot/grub/grub.conf /boot/grub/menu.lst
#Done!
etc-update
exit
cd /
umount /mnt/gentoo/home
umount /mnt/gentoo/var
umount /mnt/gentoo/usr
umount /mnt/gentoo/boot
umount /mnt/gentoo/proc
umount /mnt/gentoo
reboot
REMOVE the CD!!!
#Wouldn't boot... drag the monitor in and fix the name of the
# initrd file (include the -lvm-) and the name of the
# volume group (mastervg instead of xxxxxxvg)
#Log back in
update-modules
emerge sync
emerge -up world
ACCEPT_KEYWORDS="~x86" emerge xfree
ACCEPT_KEYWORDS="~x86" emerge nvidia-kernel
ACCEPT_KEYWORDS="~x86" emerge nvidia-glx
#Install xfs (x font server)
rc-update add xfs default
/etc/init.d/xfs start
Install XF86Config-4 file from before
# Note that things wouldn't run without relogging in (probably could
source /etc/profile again or something instead)
# Mouse device was not found... need to get hid loading in
modules.autoload
ACCEPT_KEYWORDS="~x86" USE="-X" emerge vim
####NOT WORKING yet!!!
Install modules.autoload data for hid and nvidia
modprobe nvidia
modprobe hid
Install ALSA from http://www.gentoo.org/doc/en/alsa-guide.xml
grep audio /proc/pci
env ACCEPT_KEYWORDS="~x86" ALSA_CARDS='intel8x0' emerge alsa-driver
# to support future recompiles
echo ALSA_CARDS='intel8x0' >> /etc/make.conf
env ACCEPT_KEYWORDS="~x86" ALSA_CARDS='intel8x0' emerge alsa-oss
nano -w /etc/modules.d/alsa
## ALSA portion
alias snd-card-0 snd-intel8x0
update-modules
####(non root users to use sound will need to be part of audio group)
rc-update add alsasound boot
/etc/init.d/alsasound start
env ACCEPT_KEYWORDS="~x86" emerge alsa-utils
amixer
amixer set Master 100 unmute
amixer set PCM 100 unmute
amixer set Line 100 mute
amixer set Line 100 cap
Install a test file
Play a test file:
aplay XXXXX.wav
Automate rebuilding the kernel
cd
mkdir bin
cd bin
nano -w kernelbuild
cd /usr/src/linux
make dep && make clean bzImage modules modules_install
nano -w kernelinstall
cp /boot/bzImage /boot/bzImage.previous
cp /usr/src/linux/arch/i386/boot/bzImage /boot
emerge nvidia-kernel
emerge nvidia-glx
emerge alsa-driver
umount /boot
chmod 755 kernel*
cd
nano -w .bashrc
export PATH=~/bin:$PATH
Other stuff
emerge screen
installed bttv in /etc/modules.d/bttv
#alias char-major-81 bttv
#options bttv card=34 tuner=2 radio=1
alias char-major-81 bttv
options bttv card=34 radio=1
options tuner type=2
update-modules
To get LIRC (IR remote) working:
export LIRC_OPTS="--with-driver=winfast_tv2000";
env ACCEPT_KEYWORDS="~x86" emerge lirc
add modules to modules.autoload: lirc_gpio
modify /etc/init.d/lircd to add "-- --device=/dev/lirc/0" to the end of
the start line
Also add modules for bttv and tuner to /etc/modules.autoload
reboot
Start on mythtv
emerge cvs
cvs -d :pserver:mythtv at cvs.mythtv.org:/var/lib/cvs login
mythtv
cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/cvs checkout MC
--------
03/10/03
--------
Finish cvs download of mythweather and mythweb
Create a cvsdownload file/script to update these
Download the myth portage package and put it in /usr/local/portage
rm -rf /usr/local/portage/media-libs
rm -rf /usr/local/portage/dev-libs
rm -rf /usr/local/portage/<all but xmltv>
cp /usr/local/portage/dev-perl/xmltv/xmltv-0.5.6-r1.ebuild to
/usr/local/portage/dev-perl/xmltv/xmltv-0.5.8.ebuild
cd /usr/local/portage
env ACCEPT_KEYWORDS="~x86" emerge xmltv
# Build digest since this isn't a "normal" ebuild
ebuild dev-perl/xmltv/xmltv-0.5.8.ebuild digest
env ACCEPT_KEYWORDS="~x86" emerge xmltv
#Answer questions:
yes
no
yes
no
no
no
env ACCEPT_KEYWORDS="~x86" emerge mythtv
######## Fix process!!!
Add mysql to USE flags
env ACCEPT_KEYWORDS="~x86" emerge qt
(this also installed mysql)
cd /root/mythtv/MC
./configure --prefix=/usr --enable-a52bin --enable-shared
make
# Building mythtv-cvs ebuild file
emerge pexpect
emerge mythtv-cvs
# Get mysql running
/usr/bin/mysql_install_db
/etc/init.d/mysql start
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h xxxxxx.xxxxxx.com password
'new-password'
# Remove a password
# !!! Special fix process
/usr/bin/mysqladmin -u root -p password ''
/usr/bin/mysqladmin -u root -h xxxxx.xxxxx.com -p password ''
rc-update add mysql default
# Only works with blank password
mysql < /usr/share/mythtv/database/mc.sql
# Set up XWindow forwarding for ssh
nano -w sshd_config
Uncommend X11Forwarding and make it "yes"
/etc/init.d/sshd restart
# Fix vim problem
cd /usr/portage/distfiles/
wget ftp://ftp.vim.org/pub/vim/extra/vim-6.1-lang.tar.gz
USE="-nls" emerge vim
# Create video partitions - use LVM
cfdisk /dev/hdb
# Create primary partition for rest of disk
# Set type to 8e
# Write partition table
# Quit cfdisk
# REBOOT (required for some reason)
pvcreate /dev/hda2
vgcreate storagevg /dev/ide/host0/bus0/target1/lun0/part2
lvcreate -L60000 -nmythlv storagevg
mke2fs -j /dev/storagevg/mythlv
mkdir /home/mythtv
mkdir /home/mythtv/store
# edit /etc/fstab
/dev/storagevg/mythlv /home/mythtv/store ext3 defaults 0 2
# MythTV setup
/usr/share/mythtv/setup
yes
yes
mythfilldatabase
!!! Fix process --- hadn't set timezone link... fixed it and reran
mythfilldatabase
# Work on sound
!!! Fix process - hadn't done:
# amixer set Line 100 unmute
# above (added it above now)
alsamixer
Run up Master
Run up Master Mono
Run up PCM
Run up Line
Hit <Space> to set Capture mode
Mute (M key)
<ESC> to exit
# Set up decent windowmanager
emerge WindowMaker
vim /etc/rc.conf
set XSESSION=wmaker
Set up .xinitrc
wmaker --no-dock --no-clip
Set up WindowMaker to have an XTerm autoopen (so that you can work
without the dock)
Set up GNUStep/Default/WMState
In Applications section add (this will autostart mythtv):
,
{
Hidden = No;
Dock = Dock;
ShortcutMask = 0;
Name = mythfrontend.mythfrontend;
Workspace = Main;
Shaded = No;
Command = mythfrontend;
Miniaturized = No;
}
# Set up myth
In the setup screens, adjust the sound volume up!
# Set up apache
emerge apache
--------
03/11/03
--------
<SNIP>
# Set up mythweb
vim /etc/apache/conf/apache.conf
Change Listen and Port to 8090
/etc/init.d/apache start
rc-update add apache default
Edit firewall to allow this connection
vim /etc/conf.d/apache to have
APACHE_OPTS="-D SSL -D PHP4"
env USE="-imap" emerge apache php mod_php mod_ssl
# Fix for mod_php problem:
env USE="-imap -java -qt" emerge apache php mod_php mod_ssl
ebuild /var/db/pkg/dev-php/mod_php-4.2.2-r1/mod_php-4.2.2-r1.ebuild
config
ebuild /var/db/pkg/net-www/mod_ssl-2.8.10/mod_ssl-2.8.10.ebuild config
# Set up user
useradd -d
mkdir /home/xxxxx
chown -R bdillahu.users /home/xxxx
change xxxxxx script to not log in as root
# Set up IMAP
emerge courier-imap
rc-update add courier-imapd default
nano -w /etc/courier-imap/authdaemonrc
#authmodulelist="authcustom authcram authuserdb authpam"
authmodulelist="authpam"
/usr/sbin/mkimapdcert
rc-update add courier-imapd-ssl default
/etc/init.d/courier-imapd-ssl start
# Set up Squirrelmail
emerge squirrelmail
cd /home/httpd/htdocs
cd squirrelmail
./configure
2
s
<ENTER>
q
/etc/init.d/apache restart
# Set up mythgallery
Get CVS load (and modify CVS script)
Set up mythgallery-cvs ebuild
emerge mythgallery-cvs
# Set up mythweater
set up mythweather-cvs ebuild
emerge mythweather-cvs
Bruce
On Tuesday, Mar 11, 2003, at 19:22 US/Eastern, Ryan A. Carris wrote:
> Bruce C. Dillahunty wrote:
>> I think it's right :-)
>> You will have to manually configure mysql (add the password stuff,
>> etc. as prompted at the end of the mysql ebuild) and then include
>> the mc.sql file into mysql as defined in the myth instructions.
>> Also, for sound support, you'll need to work through the ALSA
>> directions that can be found at www.gentoo.org/docs
>> I just built a brand new machine, loaded gentoo and set up myth... I
>> have fairly complete notes of what I did (including LVM - logical
>> volume manager, etc.) if that would help anybody.
>> I don't know that its perfect, but I'm watching TV in the background
>> while I type :-)
>> Bruce
>
> I would like to read that.
>
> -rac
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-dev
>
More information about the mythtv-dev
mailing list