Page 1 of 1

1.30 Upgrade From RPM fails

Posted: Fri Jan 13, 2017 6:38 pm
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.

Re: 1.30 Upgrade From RPM fails

Posted: Fri Jan 13, 2017 6:42 pm
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?

Re: 1.30 Upgrade From RPM fails

Posted: Fri Jan 13, 2017 7:11 pm
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.

Re: 1.30 Upgrade From RPM fails

Posted: Sat Jan 14, 2017 5:38 pm
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

Re: 1.30 Upgrade From RPM fails

Posted: Sat Jan 14, 2017 7:12 pm
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.

Re: 1.30 Upgrade From RPM fails

Posted: Wed Jan 25, 2017 4:36 pm
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.