1.30 Upgrade From RPM fails

Forum for questions and support relating to the 1.30.x releases only.
Locked
kbocek
Posts: 58
Joined: Mon Nov 13, 2006 6:57 pm

1.30 Upgrade From RPM fails

Post by kbocek »

I am attempting to upgrade from 1.29 to 1.30 using RPMS on CentOS 6. I keep getting

Code: Select all

error: unpacking of archive failed on file /usr/share/zoneminder/www/events: cpio: rename failed - Is a directory
I tried uninstalling zm 1.29. I made sure all the monitors were stopped. I have tried manually renaming that dir:

Code: Select all

$mv events xxx
mv: cannot move `events' to `xxx': Device or resource busy
I don't seem to find any processes using that dir using lsof or fuser.

Any ideas? Thanks.
kbocek
Posts: 58
Joined: Mon Nov 13, 2006 6:57 pm

Re: 1.30 Upgrade From RPM fails

Post by kbocek »

I am seeing files created in /usr/share/zoneminder/www

Code: Select all

events;58791c58 -> ../../../../var/lib/zoneminder/events
Even though zm is uninstalled an all monitors stopped. What could be creating these?
kbocek
Posts: 58
Joined: Mon Nov 13, 2006 6:57 pm

Re: 1.30 Upgrade From RPM fails

Post by kbocek »

I forgot I was using bind mounts on my system to point to a larger file system to store events:

http://unix.stackexchange.com/questions ... bind-mount

That post doesn't say how to unbind a mount so I just uncommented the lines in /etc/fstab and rebooted.

But I still got the same error. Finally, renaming /usr/share/zoneminder/www allowed the zoneminder 1.30 package to install.

Puzzling.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: 1.30 Upgrade From RPM fails

Post by knight-of-ni »

I've seen this error occasionally, but not often enough to know exactly how this is happening. For some reason cpio isn't able to overwrite the file or folder in question, and as it looks like, as you have discovered, the way to work around it is to manually move the file or folders in question out of the way.
I've only seen this on CentOS 6, not CentOS 7 or Fedora, which makes me wonder if there isn't some bug in rpm or cpio that got fixed in newer versions.

Just to be sure, make sure you have followed these steps exactly to setup your dedicated events drive:
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
kbocek
Posts: 58
Joined: Mon Nov 13, 2006 6:57 pm

Re: 1.30 Upgrade From RPM fails

Post by kbocek »

knnniggett wrote: Just to be sure, make sure you have followed these steps exactly to setup your dedicated events drive:
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
Yeah, I'm pretty sure those are the instructions I used. ZM is working now. It was just a bunch of work to manually install the RPM and then clean up a bunch of package from another repo.

Thanks.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: 1.30 Upgrade From RPM fails

Post by knight-of-ni »

I was looking for something else, when I stumbled across the following bug report confirming my suspicion:
https://bugzilla.redhat.com/show_bug.cgi?id=447156

So there is an issue with rpm when it comes to replacing directories with symlinks. Reading through the bug report, beginning with rpm 4.11, this situation is handled differently, which explains why I have not seen this issue on distros newer than centos 6.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked