Update RPMs for ZMliveCD/Mandrake/Mandriva installations

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Update RPMs for ZMliveCD/Mandrake/Mandriva installations

Post by rdmelin »

ZoneMinder RPMs are available for Mandriva 2006 here:
http://www.isentrix.com/pub/zoneminder/

Note for zm-1.22.1 RPMs
If upgrading from zm-1.22.0 do not use "rpm -U"
Instead uninstall 1.22.0 with "rpm -e --noscripts zm"
This will leave your events and database intact. Then you can
install your update RPM with "rpm -i zm-1.22.1...." or whatever version.
This should only be needed for updates from 1.22.0 due to a bug in the
post uninstall script.

Note for zm-1.22.2 RPMS
If upgrading and you aren't using authentication, set it before upgrading. Otherwise you will be unable to access the zm console. If you get caught by this bug you will need to set ZM_OPT_USE_AUTH=1 in the zm DB manually.
If installing fresh authentication is already set. Login is default admin : admin

No special notes for zm-1.22.3 RPMS
I have believe these will work without problems both for upgrade and new installations. If you have problems please report them ASAP including details like "new installation" or "upgrade from version XXX".

See the wiki for notes for zm-1.22.3 RPMS
http://www.zoneminder.com/wiki/index.ph ... _RPM_notes

I have tried to test these RPMs for both fresh installations and updates and they work here. However time for extended testing is limited so they come with no warranty.

For questions or bug reports related to update RPMs please post as a new thread in this forum, rather than posting to this thread. I will maintain this thread as a sort of FAQ / HOWTO
Last edited by rdmelin on Fri Jun 20, 2008 6:45 pm, edited 9 times in total.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

touch to bump post date :)
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Can we u/g to 1.22.2 or do we need to uninstall as per 1.22.1?

Many Thanks Again Ross and quick too. 1.22.2 was only out like yesterday!!
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Can we u/g to 1.22.2 ...?
I believe that upgrading will be fine, but I cannot be certain in every case.

Here is an example of the variables

Since before 1.22.0 there are 6 ZonePresets but the 1.22.0 zmschema missed one. So 1.22.0 installed fresh had 5 but if upgraded from 1.21.4 had 6. So 1.22.1 installed fresh has 6, upgraded from 1.22.0 has 5, or upgraded from <=1.21.4 has 6.

The 1.22.2 package has a zm_update-1.22.1.sql that adds the missing ZonePreset, but on any but an upgrade from a fresh 1.22.0 installation the zmupdate.pl script throws an error (duplicate key) and exits.

The zm start script (/etc/init.d/zm) includes code to detect an old db version and upgrade it. So if the zmupdate.pl fails zm will not start.

On a RPM upgrade (rpm -U ) the new package is installed first,and then the old package is removed. Previous zm packages have a post uninstall script that restarts the service. During restart if the zmupdate.pl fails, the postun script fails and rpm is left believing there are two zm versions installed.

I believe I have the above variations all covered with a patched zmschema for 1.22.2. But who knows if there are other similar obscure pitfalls lurking.

Testing the upgrade function involves removing zm completely, installing an older version, perhaps some configuring so the db has some real data, and then trying the upgrade package. If there is a problem, identify it, rebuild, repeat. So I cannot possibly test every case.

So backup important data, and then try u/g if you will. I posted a zm-1.22.2-5 that fixed a permissions bug so get the latest. If you already installed zm-1.22.2-4 you can just u/g
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I have modified the upgrade script now to do a 'replace' rather than an 'insert' for the missing preset. This should insert it when missing and just overwrite it when present and so should work in all cases. It may be worth adopting the same approach here.
Phil
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Re: Update RPMs for ZMliveCD/Mandrake/Mandriva installations

Post by ekiboy69 »

rdmelin wrote: Note for zm-1.22.2 RPMS
If upgrading and you aren't using authentication, set it before upgrading. Otherwise you will be unable to access the zm console. If you get caught by this bug you will need to set ZM_OPT_USE_AUTH=1 in the zm DB manually.
Should this be in the ZM database already or do you mean that one should add it to the DB in order to get it to work again? Which table should it be in?

Needless to say that I did not read the instructions thoroughly... :-(
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

It was a bug in zm 1.22.2 that Phil has now fixed but the prm's will need to be updated. It means you cannot access zm with authentication turned off at all
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Yes, I did get that but how do I fix it?

Post by ekiboy69 »

James,

I do understand that it is a bug and I also did get the nature of the bug. However, I need to know where to put or alter something in the existing ZM database as I am unable to find ZM_OPT_USE_AUTH anywhere....
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Sorry Eki
zm_opt-use-auth is the second row in the config db, I use webmin but i believe it can be edited form the command line
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
ekiboy69
Posts: 101
Joined: Tue Jun 22, 2004 9:26 pm
Location: Kaarina-Finland

Ahh - this helped!

Post by ekiboy69 »

James,

Thanks a million! This was the lacking piece in my puzzle...
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

no worries mate glad to help
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
TomAnderson
Posts: 5
Joined: Fri Mar 31, 2006 8:11 pm

Post by TomAnderson »

Can I upgrade from 1.22.0 to 1.22.2 using rpm -U or do I need to follow the instructions for upgrading to 1.22.1?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i upgraded from 1.22.2 from 22.1 and sis a Uvh but if u/g from 1.220 then id follow rodd's eadvice. As it appears an issue with th eunintsll script of 1.22.0 that sthe issue i think upgradeing fom 1.22.0 is the issue not what you upgrade too
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
KegRaider
Posts: 25
Joined: Mon Sep 05, 2005 5:06 am
Location: Townsville/Queensland/Australia

Post by KegRaider »

Is it possible to upgrade from v1.21.3 from the Live Install CD using the above procedures? I'm currently away at work, and have ssh access to my box from work, and have the correct tunnels in place to view the http page via the tunnel. I don't wanna break it as i won't be home for another 5 days yet. :|

I want to upgrade because as of 2 days ago, the events seem to be broken. There are 'broken image' icons in the events, the events are logged, but have no recordings. But, i can see the cameras images fine in montage, or in the actual name of the cam. Make sense? I have issued a reboot command, and it still happens after rebooting.

If i can fix the current version, i'll be happy with that too :)

-->KegRaider
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i would bet you have db corruption so id look at your logs as to why you cant record before the upgrade mate
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Post Reply