Mandrake RPMS

Support and queries relating to all previous versions of ZoneMinder
Locked
stevep
Posts: 2
Joined: Tue Mar 29, 2005 10:51 am

Mandrake RPMS

Post by stevep »

Hi

Found a link in the forum for the Mandrake 10.1 RPMS but unable to downloadfrom that link, although can browse the directory.

stevep
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

You can find a beta Mandrake 10.1 RPM here:

http://www.elltel.net/melins/mdk_10.1/RPMS/

Note: This RPM should work fine if you are installing fresh. If you are trying to upgrade from an earlier version RPM you will have problems. You will lose any saved events.
If you don't mind losing saved events, remove your old version first, then drop your database, and install fresh from this RPM.
I'm working on a solution for this deplorable state of affairs. ( The whole point of package management is to make upgrades easy, no?)
The problem is that previous version RPMs were simply rebuilt from FC3 packages, and they seem to have a flaw that bombs upgrade attempts.
I would like to hear from anyone who has upgraded their FC3 system. How did it go? :twisted:
wang960
Posts: 3
Joined: Sun Mar 27, 2005 4:18 pm

Post by wang960 »

Hi,

do we still need mysql's headers and libjpeg.a in order to install this rpm?
Thanks,
Frank
oskin
Posts: 84
Joined: Tue May 25, 2004 7:03 pm
Location: Moscow, Russia

Post by oskin »

rdmelin wrote:I would like to hear from anyone who has upgraded their FC3 system. How did it go? :twisted:
I always check "new install" and "update". On my home system updating ZM is made exclusively by a command "rpm -F zm-.... rpm".
At "update" there were similar problems, but they are corrected still in zm-1.19.5-?.rpm
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Hi Serg,
I'm not sure what the behavior of "rpm -F" is. The problem I've seen is if you are upgrading from v.1.20.1 to 1.21.0 for example.
If you do "rpm -Uvh zm-1.21.0..." as you should be able to, you will delete all your saved events.
The behavior of "rpm -U" is to first install the new package, and then erase the old package. The last thing done is the postun scripts of the old package. This is illustrated by this example from the book Maximum RPM:

Code: Select all

# rpm -U bother-3.5-1.i386.rpm
This is the bother 3.5 preinstall script
This is the bother 3.5 postinstall script
This is the bother 2.7 preuninstall script
This is the bother 2.7 postuninstall script
#
          
So after installing the new package and removing the old package the zm.spec %postun section is:

Code: Select all

%postun
#!/bin/sh
if [ "$1" -ge "1" ]; then
        /sbin/service zm condrestart > /dev/null 2>&1
else
        rm -rf /var/lib/zm
fi
I don't follow

Code: Select all

if [ "$1" -ge "1" ]; then
But in my tests the line "rm -rf /var/lib/zm" is consistently executed, and poof, no more saved events.

Best regards,

Ross
oskin
Posts: 84
Joined: Tue May 25, 2004 7:03 pm
Location: Moscow, Russia

Post by oskin »

The difference between "-F" and "-U" consists only that "-F" will update a package only in the event that the previous version of a package is already installed.
But in my tests the line "rm -rf /var/lib/zm" is consistently executed, and poof, no more saved events.
Probably it is feature rpm in Mandrake. Here is how it works in RH and FC:

Code: Select all

# rpm -i tstrpm-1.0-1.i386.rpm
Pre: 1
Post: 1
#
# rpm -U tstrpm-1.1-1.i386.rpm
Pre: 2
Post: 2
PreUn: 1
PostUn 1
#
# rpm -e tstrpm
PreUn: 0
PostUn 0
Delete
#
Use ftp://oskin.ru/pub/linux/RedHat/MyRPMS/tstrpm.spec for test.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Thanks Serg,
The debug utility was useful. Now I follow the logic of the test for installed package or delete.
I want to thank you too, for putting together the patches and scripts to make ZoneMinder work with RPM.
Starting with v1.21.0 my Mandrake RPMs will not simply be rebuilds of the FC3 packages. I'm moving the web directory back to /var/www/html/zm and removing the /etc/httpd/conf.d/zm.conf. My reason for doing this is to allow zm to function properly running from a livecd. The symlink from /usr/lib/zm to /var/lib/zm for events prevented saving events while running from the CD. Also installing an RPM to upgrade a system originally installed from source is simpler if everything stays in ~/apache.

Best regards,

Ross
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

zm-1.21.0-6_mdk101.i586.rpm is now available from here:
http://www.elltel.net/melins/mdk_10.1/RPMS/

It has been tested and works for a fresh installation, or upgrading from a previous zm RPM, or from a source zm installation (if the default config switches were used when compiling).

Saved events are preserved in all the above upgrade situations, at least in my tests. However, if your saved events are very important to you, please back them up first.

If you are upgrading from a previous RPM installation you will need to change ZM_PATH_ZMS to /cgi-bin/zms in the Paths tab of the Options menu. Until you do this you will see only a broken image icon when trying to view streams or events.

PS There is no significance to the date of this announcement. :)
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

If you used nph-zms before, you should ensure that ZM_PATH_ZMS is /cgi-bin/nph-zms otherwise things may break.

Phil
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Hi Phil,
What is the story now with nph-zms as opposed to zms. They are the same file with different behavior depending on how its called? Did this change at some point, or has this always been the case? Just curious.

Best regards,

Ross
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

nph-zms uses non-parsed headers so it will emit all relevant headers, anything called nph-* gets passed untainted by httpd. Regular zms is intended to work through apache or other web daemon and relies on the httpd to add the appropriate headers, which in some cases they screw up. Generally I would recommend nph-zms but it's not always the best.

Phil
Locked