Page 1 of 2

Update RPMs for ZMliveCD/Mandrake/Mandriva installations

Posted: Mon May 15, 2006 12:49 am
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

Posted: Sun May 28, 2006 2:01 pm
by rdmelin
touch to bump post date :)

Posted: Sun May 28, 2006 2:33 pm
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!!

Posted: Sun May 28, 2006 9:18 pm
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

Posted: Tue May 30, 2006 8:39 am
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.

Re: Update RPMs for ZMliveCD/Mandrake/Mandriva installations

Posted: Wed May 31, 2006 7:10 am
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... :-(

Posted: Wed May 31, 2006 8:40 am
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

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

Posted: Wed May 31, 2006 8:51 am
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....

Posted: Wed May 31, 2006 8:59 am
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

Ahh - this helped!

Posted: Wed May 31, 2006 9:01 am
by ekiboy69
James,

Thanks a million! This was the lacking piece in my puzzle...

Posted: Wed May 31, 2006 9:05 am
by jameswilson
no worries mate glad to help

Posted: Sun Jun 04, 2006 1:27 am
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?

Posted: Sun Jun 04, 2006 8:53 am
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

Posted: Thu Jul 27, 2006 9:44 pm
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

Posted: Thu Jul 27, 2006 10:28 pm
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