Gentoo custom portage for 1.22...

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Gentoo custom portage for 1.22...

Post by lazyleopard »

I have put a gzipped tar file of my portage stuff into zm-1.22.0-portage.tgz.

It's my custom ebuild, an alternative to the one in the main portage tree, and I don't use ffmpeg, so it may need tweaks if it's to work with ffmpeg. Also, note that it is customised, and it isn't in an install and run out of the box state. To make some use of it, fetch the file, and then do:

Code: Select all

# cd /usr/local/portage  # or wherever you put your *local* portage tree
# tar zvxf /path/to/zm-1.22.0-portage.tgz
# cd www-misc/zoneminder
# ls
In there you'll find the ebuild and a directory called files which contains patches.

Code: Select all

-rw-r--r-- rick/users     2531 2006-01-26 22:50:57 www-misc/zoneminder/zoneminder-1.22.0.ebuild
-rw-r--r-- rick/users    16425 2006-01-22 20:20:48 www-misc/zoneminder/files/zm-1.22.0-scripts.patch
-rw-r--r-- rick/users     6522 2006-01-19 08:31:14 www-misc/zoneminder/files/zm-1.22.0-security.patch
-rw-r--r-- rick/users     2628 2006-01-19 08:31:14 www-misc/zoneminder/files/zm-1.22.0-zone.patch
Have a look at the ebuild. Once you're happy with it, try:

Code: Select all

# ebuild zoneminder-1.22.0.ebuild digest
If that's ok you can be daring and go straight to try an emerge (with -p first, of course), or you can work in stages using ebuild to unpack and patch, compile, and install. ("man ebuild" and "man 5 ebuild" will be helpful here.)

It will put:
  • executable stuff into /usr/bin
  • the init script into /etc/init.d
  • config stuff into /etc/zm
  • logs into /var/log/zm
  • runstate stuff into /var/run/zm
  • web stuff into ~apache/zm
  • CGI stuff into ~apache/zm/bin (I probably ought to move this...)
  • documentation into /usr/share/doc/zoneminder-1.22.0
I'm not sure how emerge will work with a first-time install, as it doesn't explicitly try to create the database and so on. You may need to run emerge twice, once to get enough to gether to allow you to create the database, and then again to get a usable system.

Also, note that the destination for the web stuff is determined by the home directory assigned to the apache user, so if you want to move this from the default /var/www/localhost/htdocs then modify /etc/passwd before running emerge. While you're there, ZoneMinder needs to have apache able to run a normal shell, so you'll have to change the default /bin/false to something useful like /bin/bash.

You'll need to edit /etc/zm/zm.conf to make sure things like the ZM_DB_USER and ZM_DB_PASS are sane.

You'll need to do some tweaks to your apache config too. If ~apache were at /www you'd need something a bit like this:

Code: Select all

    Alias /zm/ /www/zm/
    <Directory /www/zm>
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    ScriptAlias /cgi-bin/ /www/zm/bin/
    <Directory /www/zm/bin>
        AllowOverride None
        Options ExecCGI
        Order allow,deny
        Allow from all
    </Directory>
If you're upgrading from a previous version then you'll need to run zmupdate.pl

Code: Select all

/usr/bin/zmupdate.pl -version=1.21.? --user=root --pass=?????
Once everything's in place you should be able to try starting ZoneMinder...

Code: Select all

/etc/init.d/zm start
...and even adding it to things to be started at boot time...

Code: Select all

rc-update -a default zm
Good Luck(tm)
Rick Hewett
Post Reply